You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add swc_ecma_ast::NodeId and propagate node_id across concrete AST nodes with backward-compatible serde defaults
add assign_node_ids in swc_ecma_visit and run it from parser entry points
add NodeId-based scope data and canonical binding analysis, and wire resolver internals to use it
regenerate visit/hooks outputs and propagate node_id through touched parser, utils, transformer, and compatibility code paths
Testing
cargo fmt --all
cargo test -p swc_ecma_ast
cargo test -p swc_ecma_visit
cargo test -p swc_ecma_hooks
cargo test -p swc_ecma_codegen
cargo test -p swc_ecma_utils
cargo test -p swc_ecma_parser
cargo test -p swc_ecma_transforms_base
cargo test -p swc_typescript
cargo test -p swc_ecma_lints
cargo test -p swc_ecma_lexer
cargo test -p swc_ecma_quote_macros
cargo test -p swc_ecma_transformer
cargo test -p swc_ecma_transforms_classes
cargo check -p swc_estree_compat --message-format short
cargo check -p swc_ecma_transforms_optimization --message-format short
Known follow-ups
cargo clippy --all --all-targets -- -D warnings is still red because node_id propagation is incomplete in downstream transform crates that were not updated in this diff, primarily swc_ecma_transforms_react, swc_ecma_transforms_module, swc_ecma_transforms_proposal, and swc_ecma_transforms_testing
cargo test -p swc_ecma_transforms_optimization still fails for the same downstream reason because it compiles those crates as dependencies
this PR is intentionally opened as draft until the remaining downstream fallout is cleaned up
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
No successful run was found on main (87dee57) during the generation of this report, so 236eff0 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
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
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.
Summary
swc_ecma_ast::NodeIdand propagatenode_idacross concrete AST nodes with backward-compatible serde defaultsassign_node_idsinswc_ecma_visitand run it from parser entry pointsNodeId-based scope data and canonical binding analysis, and wire resolver internals to use itnode_idthrough touched parser, utils, transformer, and compatibility code pathsTesting
cargo fmt --allcargo test -p swc_ecma_astcargo test -p swc_ecma_visitcargo test -p swc_ecma_hookscargo test -p swc_ecma_codegencargo test -p swc_ecma_utilscargo test -p swc_ecma_parsercargo test -p swc_ecma_transforms_basecargo test -p swc_typescriptcargo test -p swc_ecma_lintscargo test -p swc_ecma_lexercargo test -p swc_ecma_quote_macroscargo test -p swc_ecma_transformercargo test -p swc_ecma_transforms_classescargo check -p swc_estree_compat --message-format shortcargo check -p swc_ecma_transforms_optimization --message-format shortKnown follow-ups
cargo clippy --all --all-targets -- -D warningsis still red becausenode_idpropagation is incomplete in downstream transform crates that were not updated in this diff, primarilyswc_ecma_transforms_react,swc_ecma_transforms_module,swc_ecma_transforms_proposal, andswc_ecma_transforms_testingcargo test -p swc_ecma_transforms_optimizationstill fails for the same downstream reason because it compiles those crates as dependencies