Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Oct 4, 2025

Add an option to oxc-parser to add parent to all AST nodes. This option is only available with raw transfer (not really feasible with JSON transfer, as JSON doesn't support circular references).

This is really for the purposes of JS plugins in Oxlint, so have not included the new deserializers which add parent in the oxc-parser NPM package, to avoid bloating download size. But it's ideal home is in napi/parser so can add it to the conformance tests.

parent is correct for all nodes in all Test262 and TypeScript test cases.

@github-actions github-actions bot added A-parser Area - Parser A-ast Area - AST A-ast-tools Area - AST tools C-enhancement Category - New feature or request labels Oct 4, 2025
Copy link
Member Author

overlookmotel commented Oct 4, 2025


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 hot fixes, skip the queue and merge this PR next

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.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 4, 2025

CodSpeed Instrumentation Performance Report

Merging #14344 will not alter performance

Comparing 10-04-feat_napi_parser_add_option_to_add_parent_prop_to_ast_nodes_with_raw_transfer (7e4d04f) with main (a11bc9f)1

Summary

✅ 37 untouched

Footnotes

  1. No successful run was found on main (08f14e6) during the generation of this report, so a11bc9f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel marked this pull request as ready for review October 5, 2025 00:10
@overlookmotel overlookmotel self-assigned this Oct 5, 2025
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Oct 5, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 5, 2025

Merge activity

…raw transfer (#14344)

Add an option to `oxc-parser` to add `parent` to all AST nodes. This option is only available with raw transfer (not really feasible with JSON transfer, as JSON doesn't support circular references).

This is really for the purposes of JS plugins in Oxlint, so have not included the new deserializers which add `parent` in the `oxc-parser` NPM package, to avoid bloating download size. But it's ideal home is in `napi/parser` so can add it to the conformance tests.

`parent` is correct for all nodes in all Test262 and TypeScript test cases.
@graphite-app graphite-app bot force-pushed the 10-04-refactor_ast_tools_raw_transfer_generate_deserializers_in_loop branch from f4119a6 to 08f14e6 Compare October 5, 2025 00:32
@graphite-app graphite-app bot force-pushed the 10-04-feat_napi_parser_add_option_to_add_parent_prop_to_ast_nodes_with_raw_transfer branch from 2fed560 to 7e4d04f Compare October 5, 2025 00:32
graphite-app bot pushed a commit that referenced this pull request Oct 5, 2025
Use the new raw transfer deserializer added in #14344 to add `parent` field to all AST node in Oxlint JS plugins.
Base automatically changed from 10-04-refactor_ast_tools_raw_transfer_generate_deserializers_in_loop to main October 5, 2025 00:37
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 5, 2025
@graphite-app graphite-app bot merged commit 7e4d04f into main Oct 5, 2025
30 checks passed
@graphite-app graphite-app bot deleted the 10-04-feat_napi_parser_add_option_to_add_parent_prop_to_ast_nodes_with_raw_transfer branch October 5, 2025 00:38
@Boshen Boshen mentioned this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST A-ast-tools Area - AST tools A-parser Area - Parser C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants