feat(ast/estree): ESTree AST ExportNamedDeclaration always have attributes field#9546
Merged
graphite-app[bot] merged 1 commit intomainfrom Mar 5, 2025
Conversation
This was referenced Mar 4, 2025
Member
Author
CodSpeed Performance ReportMerging #9546 will create unknown performance changesComparing Summary
Benchmarks breakdown
|
This was referenced Mar 4, 2025
Merged
camchenry
approved these changes
Mar 5, 2025
Contributor
Merge activity
|
…tributes` field (#9546) Acorn does not include an `attributes` field on `ExportNamedDeclaration` when `source == null`. I think that's an oversight - acornjs/acorn#1346. Bump `acorn-test262` to include commit oxc-project/estree-conformance@96faefa which adds the missing `attributes` field to Acorn's AST. This allows simplifying serialization/deserialization code, as we now don't need to deal with this special case.
49a4100 to
a9889f5
Compare
e6e6279 to
3e4f909
Compare
graphite-app bot
pushed a commit
that referenced
this pull request
Mar 5, 2025
Similar to #9546. Acorn has inconsistent field order for `Property` nodes - acornjs/acorn#1347. Bump `acorn-test262` to include commit oxc-project/estree-conformance@7b7fa95, which orders the fields consistently in Acorn's AST. This allows simplifying serialization/deserialization code, as we now don't need to deal with shuffling field order to match Acorn.
graphite-app bot
pushed a commit
that referenced
this pull request
Mar 5, 2025
Similar to #9546. Acorn outputs `RegExpLiteral`'s flags in same order as in source text. There is nothing wrong with this, but it makes our serialization/deserialization code more complex than it needs to be, just to match Acorn. I don't think we need to follow Acorn here - there's no particular "good" order for the flags. Bump `acorn-test262` to include commit oxc-project/estree-conformance@3d7013e, which reorders the flags in alphabetical order in Acorn's AST. This allows simplifying serialization/deserialization code on our side.
Base automatically changed from
03-03-ci_benchmarks_benchmark_napi_parser
to
main
March 5, 2025 02:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Acorn does not include an
attributesfield onExportNamedDeclarationwhensource == null. I think that's an oversight - acornjs/acorn#1346.Bump
acorn-test262to include commit oxc-project/estree-conformance@96faefa which adds the missingattributesfield to Acorn's AST.This allows simplifying serialization/deserialization code, as we now don't need to deal with this special case.