Skip to content

refactor(napi/parser, linter/plugins): shorten raw transfer deserializers for Options#20924

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/04-01-refactor_napi_parser_linter_plugins_shorten_raw_transfer_deserializers_for_option_s
Apr 1, 2026
Merged

refactor(napi/parser, linter/plugins): shorten raw transfer deserializers for Options#20924
graphite-app[bot] merged 1 commit intomainfrom
om/04-01-refactor_napi_parser_linter_plugins_shorten_raw_transfer_deserializers_for_option_s

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Apr 1, 2026

Refactor. Just shorten the code generated for deserializing Options in raw transfer deserializer.

Copy link
Copy Markdown
Member Author

overlookmotel commented Apr 1, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added A-linter Area - Linter A-parser Area - Parser A-cli Area - CLI A-ast-tools Area - AST tools A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Apr 1, 2026
@overlookmotel overlookmotel self-assigned this Apr 1, 2026
@overlookmotel overlookmotel marked this pull request as ready for review April 1, 2026 08:33
@overlookmotel overlookmotel requested a review from camc314 as a code owner April 1, 2026 08:33
Copilot AI review requested due to automatic review settings April 1, 2026 08:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the raw-transfer JS deserializer codegen to emit a shorter Option deserialization pattern, then updates the generated deserializer outputs for the NAPI parser and oxlint JS bundles accordingly.

Changes:

  • Update generate_option in the raw-transfer generator to use a single ternary return instead of an if + return.
  • Regenerate napi/parser JS deserializer artifacts to reflect the new Option pattern.
  • Regenerate apps/oxlint JS deserializer artifact to reflect the new Option pattern.

Reviewed changes

Copilot reviewed 1 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tasks/ast_tools/src/generators/raw_transfer.rs Updates Option deserializer codegen to a ternary return form.
napi/parser/src-js/generated/deserialize/ts.js Regenerated TS deserializer output with shortened Option functions.
napi/parser/src-js/generated/deserialize/ts_range.js Regenerated TS (range) deserializer output with shortened Option functions.
napi/parser/src-js/generated/deserialize/ts_range_parent.js Regenerated TS (range+parent) deserializer output with shortened Option functions.
napi/parser/src-js/generated/deserialize/ts_parent.js Regenerated TS (parent) deserializer output with shortened Option functions.
napi/parser/src-js/generated/deserialize/js.js Regenerated JS deserializer output with shortened Option functions.
napi/parser/src-js/generated/deserialize/js_range.js Regenerated JS (range) deserializer output with shortened Option functions.
napi/parser/src-js/generated/deserialize/js_range_parent.js Regenerated JS (range+parent) deserializer output with shortened Option functions.
napi/parser/src-js/generated/deserialize/js_parent.js Regenerated JS (parent) deserializer output with shortened Option functions.
apps/oxlint/src-js/generated/deserialize.js Regenerated oxlint deserializer output with shortened Option functions.

@overlookmotel overlookmotel force-pushed the om/04-01-perf_napi_parser_linter_plugins_faster_deserialization_of_raw_fields branch from 1ba5af3 to 3170f01 Compare April 1, 2026 10:59
@overlookmotel overlookmotel force-pushed the om/04-01-refactor_napi_parser_linter_plugins_shorten_raw_transfer_deserializers_for_option_s branch from a89d62e to 2770276 Compare April 1, 2026 10:59
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app Bot commented Apr 1, 2026

Merge activity

…zers for `Option`s (#20924)

Refactor. Just shorten the code generated for deserializing `Option`s in raw transfer deserializer.
@graphite-app graphite-app Bot force-pushed the om/04-01-perf_napi_parser_linter_plugins_faster_deserialization_of_raw_fields branch from 3170f01 to 0503a78 Compare April 1, 2026 12:08
@graphite-app graphite-app Bot force-pushed the om/04-01-refactor_napi_parser_linter_plugins_shorten_raw_transfer_deserializers_for_option_s branch from 2770276 to 15546c0 Compare April 1, 2026 12:08
Base automatically changed from om/04-01-perf_napi_parser_linter_plugins_faster_deserialization_of_raw_fields to main April 1, 2026 12:12
@graphite-app graphite-app Bot merged commit 15546c0 into main Apr 1, 2026
25 checks passed
@graphite-app graphite-app Bot deleted the om/04-01-refactor_napi_parser_linter_plugins_shorten_raw_transfer_deserializers_for_option_s branch April 1, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast-tools Area - AST tools A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants