oxc/crates/oxc_traverse/CHANGELOG.md
2024-12-04 19:43:22 +08:00

19 KiB

Changelog

All notable changes to this package will be documented in this file.

The format is based on Keep a Changelog, and this project does not adhere to Semantic Versioning until v1.0.0.

[0.39.0] - 2024-12-04

  • f2f31a8 traverse: [BREAKING] Remove unsound APIs (#7514) (overlookmotel)

Features

  • 9c9deae traverse: Add generate_uid_in_current_hoist_scope method (#7423) (Dunqing)

Bug Fixes

Documentation

  • 4d157c5 traverse: Document soundness hole (#7515) (overlookmotel)

[0.38.0] - 2024-11-26

Features

  • 971c91a traverse: Add methods to BoundIdentifier + MaybeBoundIdentifier to create SimpleAssignmentTargets (#7418) (overlookmotel)

Documentation

  • be5f843 traverse: Fix docs for BoundIdentifier + MaybeBoundIdentifier (#7417) (overlookmotel)

Styling

  • 10ea830 traverse: Fix indentation in codegen (#7475) (overlookmotel)

[0.37.0] - 2024-11-21

  • f059b0e ast: [BREAKING] Add missing ChainExpression from TSNonNullExpression (#7377) (Boshen)

  • 1cbc624 traverse: [BREAKING] Rename TraverseCtx methods for creating IdentifierReferences (#7300) (overlookmotel)

  • e84ea2c traverse: [BREAKING] Remove TraverseCtx::clone_identifier_reference (#7266) (overlookmotel)

  • 44375a5 ast: [BREAKING] Rename TSEnumMemberName enum variants (#7250) (overlookmotel)

Features

  • 6cfb5df transformer: Support generate proper binding name from ChainExpression (#7326) (Dunqing)
  • 234c7b9 traverse: Implement GatherNodeParts for member expression types (#7363) (overlookmotel)
  • faf8dde traverse: Add methods for creating Expression::Identifiers (#7301) (overlookmotel)
  • 8c754b1 traverse: Introduce MaybeBoundIdentifier (#7265) (overlookmotel)

Bug Fixes

Documentation

  • 834c94d traverse: Tidy doc comments for TraverseCtx::is_static (#7267) (overlookmotel)

Refactor

  • de472ca ast: Move StringLiteral definition higher up (#7270) (overlookmotel)
  • 7a48728 traverse: Reorder imports (#7264) (overlookmotel)

[0.36.0] - 2024-11-09

  • b11ed2c ast: [BREAKING] Remove useless ObjectProperty::init field (#7220) (Boshen)

  • 0e4adc1 ast: [BREAKING] Remove invalid expressions from TSEnumMemberName (#7219) (Boshen)

  • 843bce4 ast: [BREAKING] IdentifierReference::reference_id return ReferenceId (#7126) (overlookmotel)

Features

Refactor

  • cacfb9b traverse: Use symbol_id etc methods (#7129) (overlookmotel)

[0.35.0] - 2024-11-04

Bug Fixes

  • caaf00e parser: Fix incorrect parsed TSIndexSignature (#7016) (Boshen)

Refactor

  • d9edef6 transformer: Combine ObjectRestSpread into a single file (#7002) (Boshen)
  • 938ee87 traverse: Do not use AstBuilder::*_from_* methods (#7069) (overlookmotel)

[0.34.0] - 2024-10-26

Features

  • 419343b traverse: Implement GetAddress for Ancestor (#6877) (overlookmotel)

Refactor

  • 423d54c rust: Remove the annoying clippy::wildcard_imports (#6860) (Boshen)
  • a366fae traverse: Rename TraverseScoping::generate_binding_in_current_scope (#6832) (overlookmotel)
  • 3b99fe6 traverse: Move generate_binding to TraverseScoping (#6831) (overlookmotel)
  • 60f487a traverse: TraverseCtx::generate_binding take an Atom (#6830) (overlookmotel)

[0.33.0] - 2024-10-24

  • aeaa27a ast, parser, transformer, traverse: [BREAKING] Remove BindingIdentifier::new methods (#6786) (overlookmotel)

  • ecc9151 ast, parser, transformer, traverse: [BREAKING] Remove IdentifierReference::new methods (#6785) (overlookmotel)

  • 1248557 ast: [BREAKING] Remove AstKind::FinallyClause (#6744) (Boshen)

Features

  • 10484cd transformer: Class static block transform (#6733) (overlookmotel)
  • c96e739 traverse: Add generate_binding and generate_binding_current_scope APIs in context (#6805) (Dunqing)
  • ce1d8cf traverse: Add BoundIdentifier::from_binding_ident method (#6814) (overlookmotel)

Documentation

  • 55c07f2 traverse: Correct doc comment for BoundIdentifier (#6810) (overlookmotel)

Refactor

  • 47bc368 traverse: BoundIdentifier methods only take &TraverseCtx (#6811) (overlookmotel)
  • 1370c2d traverse: Change generate_uid_in_based_on_node to accept a generic type parameter as node type (#6708) (Dunqing)

[0.32.0] - 2024-10-19

  • 2808973 ast: [BREAKING] Add Program::comments (#6445) (Boshen)

Features

  • d9718ad ast_tools: Support #[scope(exit_before)] (#6350) (DonIsaac)

Bug Fixes

  • 834ee2a semantic: TSConditionalType scope enter/exit locations (#6351) (DonIsaac)

Performance

  • ac77c87 traverse: Optimize TraverseScoping::generate_uid_name (#6663) (overlookmotel)

Refactor

  • 073b02a ast: Type params field before params in TS function declaration types (#6391) (overlookmotel)

[0.31.0] - 2024-10-08

  • 01b878e parser: [BREAKING] Use BindingIdentifier for namespace declaration names (#6003) (DonIsaac)

  • 409dffc traverse: [BREAKING] generate_uid return a BoundIdentifier (#6294) (overlookmotel)

Features

  • 9e62396 syntax_operations: Add crate oxc_ecmascript (#6202) (Boshen)

Documentation

  • c7636d7 traverse: Remove erroneous doc comment (#6328) (overlookmotel)

Refactor

  • 7b62966 transformer: Move BoundIdentifier into oxc_traverse crate (#6293) (overlookmotel)
  • 0dd9a2e traverse: Add helper methods to BoundIdentifier (#6341) (overlookmotel)
  • c0e2fef traverse: Function to get var name from node (#6317) (overlookmotel)
  • adc5381 traverse: TraverseAncestry use NonEmptyStack (#6217) (overlookmotel)

[0.30.0] - 2024-09-23

Features

  • 635e918 traverse: generate_uid_name method (#5839) (overlookmotel)

Refactor

  • 1c1353b transformer: Use AstBuilder instead of using struct constructor (#5778) (Boshen)

[0.29.0] - 2024-09-13

  • c3dd2a0 ast: [BREAKING] Revert: reduce byte size of TaggedTemplateExpression::quasi by Boxing it (#5679) (#5715) (overlookmotel)

Performance

Refactor

  • cc0408b semantic: S/AstNodeId/NodeId (#5740) (Boshen)

[0.28.0] - 2024-09-11

  • afc4548 ast: [BREAKING] Educe byte size of TaggedTemplateExpression::quasi by Boxing it (#5679) (Boshen)

  • 7415e85 ast: [BREAKING] Reduce byte size of TSImportType::attributes by Boxing it (#5678) (Boshen)

  • ee4fb42 ast: [BREAKING] Reduce size of WithClause by Boxing it (#5677) (Boshen)

Features

  • 17226dd traverse: Add methods for deleting references (#5559) (overlookmotel)

Performance

  • e8013d2 traverse: Faster string operations generating UIDs (#5626) (overlookmotel)
  • 4996874 traverse: generate_uid cache available binding names (#5611) (overlookmotel)

Documentation

  • 1c051ae traverse: Correct code comment 2 (#5607) (overlookmotel)
  • 2e24a15 traverse: Correct code comment (#5604) (overlookmotel)

Refactor

  • 2de6ea0 index, traverse: Remove unnecessary type annotations (#5650) (overlookmotel)
  • 19cdcc5 traverse: Revert changes to walk.rs (#5652) (overlookmotel)- 26d9235 Enable clippy::ref_as_ptr (#5577) (夕舞八弦)

Styling

  • e52d006 traverse: Fix formatting of traverse codegen (#5651) (overlookmotel)
  • 97e99bd traverse: Remove excess line break (#5603) (overlookmotel)

Testing

  • 2e367c9 traverse: Enable tests for oxc_traverse crate (#5625) (overlookmotel)

[0.27.0] - 2024-09-06

  • cba93f5 ast: [BREAKING] Add ThisExpression variants to JSXElementName and JSXMemberExpressionObject (#5466) (overlookmotel)

Features

Bug Fixes

  • 0eb32a6 traverse: Invalid variable name generated by generate_uid_based_on_node (#5407) (Dunqing)

Refactor

  • d9d7e7c ast: Remove IdentifierName from TSThisParameter (#5327) (overlookmotel)

[0.26.0] - 2024-09-03

  • 1aa49af ast: [BREAKING] Remove JSXMemberExpressionObject::Identifier variant (#5358) (Dunqing)

  • 32f7300 ast: [BREAKING] Add JSXElementName::IdentifierReference and JSXMemberExpressionObject::IdentifierReference (#5223) (Dunqing)

  • 23e8456 traverse: [BREAKING] TraverseCtx::ancestor with level 0 = equivalent to parent (#5294) (overlookmotel)

  • 582ce9e traverse: [BREAKING] TraverseCtx::ancestor return Ancestor::None if out of bounds (#5286) (overlookmotel)

  • 234a24c ast: [BREAKING] Merge UsingDeclaration into VariableDeclaration (#5270) (Kevin Deng 三咲智子)

  • c100826 semantic: [BREAKING] Always create a scope for for statements (#5110) (overlookmotel)

  • d304d6f semantic: [BREAKING] Always create a scope for CatchClause (#5109) (overlookmotel)

Features

  • 5505749 ast: Add accessibility field to AccessorProperty (#5290) (Dunqing)
  • 49cd5db ast,parser: Add definite flag to AccessorProperty node (#5182) (DonIsaac)
  • c2fa725 ast,parser: Parse TSTypeAnnotations on AccessorProperty (#5179) (DonIsaac)

Bug Fixes

  • d594818 traverse: insert_scope_below update child scopes records (#5409) (overlookmotel)
  • 25d6e20 traverse: Add missing visitors to ChildScopeCollector (#5118) (overlookmotel)

Refactor

  • 946c867 ast: Box TSThisParameter (#5325) (overlookmotel)
  • 05d25e2 semantic: Combine add scope methods (#5262) (overlookmotel)
  • a17cf33 semantic: Remove ScopeTree::child_ids (#5232) (Boshen)
  • b43a394 traverse: Correct code comments (#5293) (overlookmotel)
  • d71f0ed traverse: Inline all passthrough methods (#5279) (overlookmotel)
  • 188ce07 traverse: Improve safety via type system (#5277) (overlookmotel)
  • 0f4a8b3 traverse: Add debug asserts for safety invariants (#5272) (overlookmotel)
  • 341e42a traverse: Make Ancestor an owned type (#5269) (overlookmotel)
  • eba5033 traverse: Codegen ChildScopeCollector (#5119) (overlookmotel)
  • f771d7c traverse: Remove unnecessary imports (#5116) (overlookmotel)
  • c6590ae traverse: Move generated files into separate folder (#5115) (overlookmotel)
  • fc2e9ad traverse: Remove support for #[scope(if(...))] attr (#5114) (overlookmotel)
  • 1ba11a3 traverse: Refactor ChildScopeCollector (#5112) (overlookmotel)
  • 40e2f6e traverse: Remove unnecessary branch in ChildScopeCollector (#5111) (overlookmotel)

[0.25.0] - 2024-08-23

  • 78f135d ast: [BREAKING] Remove ReferenceFlag from IdentifierReference (#5077) (Boshen)

  • f2b8d82 semantic: [BREAKING] ScopeTree::get_child_ids + get_child_ids_mut return value not Option (#5058) (overlookmotel)

  • c4c08a7 ast: [BREAKING] Rename IdentifierReference::reference_flags field (#5024) (overlookmotel)

  • d262a58 syntax: [BREAKING] Rename ReferenceFlag to ReferenceFlags (#5023) (overlookmotel)

  • f88970b ast: [BREAKING] Change order of fields in CallExpression (#4859) (Burlin)

Features

  • 6b885fe traverse: Expose generate_uid_based_on_node and generate_uid_in_current_scope_based_on_node from TraverseCtx (#4965) (Dunqing)

Refactor

  • ca70cc7 linter, mangler, parser, semantic, transformer, traverse, wasm: Rename various flag vars to flags (#5028) (overlookmotel)
  • 59d15c7 semantic: root_unresolved_references contain only ReferenceId (#4959) (overlookmotel)

[0.24.3] - 2024-08-18

Features

  • fd34640 traverse: Support generate_uid_based_on_node method in TraverseCtx (#4940) (Dunqing)
  • 72a37fc traverse: Support clone_identifier_reference method in TraverseCtx (#4880) (Dunqing)

[0.24.0] - 2024-08-08

  • 75f2207 traverse: [BREAKING] Replace find_scope with ancestor_scopes returning iterator (#4693) (overlookmotel)

  • 506709f traverse: [BREAKING] Replace find_ancestor with ancestors returning iterator (#4692) (overlookmotel)

Bug Fixes

  • a40a217 parser: Parse assert keyword in TSImportAttributes (#4610) (Boshen)

Refactor

  • e0832f8 minifier: Use oxc_traverse for AST passes (#4725) (Boshen)
  • 54f9897 traverse: Simpler code for entering/exiting unconditional scopes (#4685) (overlookmotel)
  • 83546d3 traverse: Enter node before entering scope (#4684) (overlookmotel)

[0.23.1] - 2024-08-06

Bug Fixes

  • a40a217 parser: Parse assert keyword in TSImportAttributes (#4610) (Boshen)

[0.23.0] - 2024-08-01

Bug Fixes

  • d5c4b19 parser: Fix enum member parsing (#4543) (DonIsaac)

Refactor

  • e6a8af6 traverse: Speed up tests (#4538) (overlookmotel)

[0.22.1] - 2024-07-27

Bug Fixes

  • c04b9aa transformer: Add to SymbolTable::declarations for all symbols (#4460) (overlookmotel)

Performance

  • 348c1ad semantic: Remove span field from Reference (#4464) (overlookmotel)

Refactor

  • f17254a semantic: Populate declarations field in SymbolTable::create_symbol (#4461) (overlookmotel)

[0.22.0] - 2024-07-23

  • 85a7cea semantic: [BREAKING] Remove name from reference (#4329) (Dunqing)

  • f68b659 ast: [BREAKING] Reorder fields of ArrowFunctionExpression (#4364) (Dunqing)

Bug Fixes

  • aece1df ast: Visit Programs hashbang field first (#4368) (overlookmotel)

Performance

  • e70c67b semantic: Remove a branch from add_scope (#4384) (overlookmotel)
  • 7eb2864 traverse: Speed up finding UID binding name (#4356) (overlookmotel)

Refactor

  • 5f1c7ec ast: Rename the visited_node marker to ast. (#4289) (rzvxa)

[0.21.0] - 2024-07-18

Features

  • af4dc01 ast: Align ts ast scope with typescript (#4253) (Dunqing)
  • 20cdb1f semantic: Align class scope with typescript (#4195) (Dunqing)

Bug Fixes

  • 1108f2a semantic: Resolve references to the incorrect symbol (#4280) (Dunqing)

Refactor

  • 2c7bb9f ast: Pass final ScopeFlags into visit_function (#4283) (overlookmotel)
  • 3e099fe ast: Move enter_scope after visit_binding_identifier (#4246) (Dunqing)
  • c418bf5 semantic: Directly record current_node_id when adding a scope (#4265) (Dunqing)
  • ace4f1f semantic: Update the order of visit_function and Visit fields in the builder to be consistent (#4248) (Dunqing)
  • fc0b17d syntax: Turn the AstNodeId::dummy into a constant field. (#4308) (rzvxa)

[0.20.0] - 2024-07-11

Bug Fixes

  • 48947a2 ast: Put decorators before everything else. (#4143) (rzvxa)

[0.17.0] - 2024-07-05

  • 4a0eaa0 ast: [BREAKING] Rename visit_enum to visit_ts_enum_declaration. (#3998) (rzvxa)

  • c98d8aa ast: [BREAKING] Rename visit_arrow_expression to visit_arrow_function_expression. (#3995) (rzvxa)

Refactor

[0.16.3] - 2024-07-02

Refactor

  • 0fe22a8 ast: Reorder fields to reflect their visit order. (#3994) (rzvxa)

[0.16.2] - 2024-06-30

Features

  • dc6d45e ast,codegen: Add TSParenthesizedType and print type parentheses correctly (#3979) (Boshen)

Performance

  • 1eac3d2 semantic: Use Atom<'a> for References (#3972) (Don Isaac)

Refactor

  • 5845057 transformer: Pass in symbols and scopes (#3978) (Boshen)

[0.16.0] - 2024-06-26

  • 6796891 ast: [BREAKING] Rename all instances of BigintLiteral to BigIntLiteral. (#3898) (rzvxa)

  • 1f85f1a ast: [BREAKING] Revert adding span field to the BindingPattern type. (#3899) (rzvxa)

  • ae09a97 ast: [BREAKING] Remove Modifiers from ts nodes (#3846) (Boshen)

  • 1af5ed3 ast: [BREAKING] Replace Modifiers with declare and const on EnumDeclaration (#3845) (Boshen)

  • 0673677 ast: [BREAKING] Replace Modifiers with declare on Function (#3844) (Boshen)

  • ee6ec4e ast: [BREAKING] Replace Modifiers with declare and abstract on Class (#3841) (Boshen)

  • 9b38119 ast: [BREAKING] Replace Modifiers with declare on VariableDeclaration (#3839) (Boshen)

  • cfcef24 ast: [BREAKING] Add directives field to TSModuleBlock (#3830) (Boshen)

  • 4456034 ast: [BREAKING] Add IdentifierReference to ExportSpecifier (#3820) (Boshen)

Features

  • 5847e16 ast,parser: Add intrinsic keyword (#3767) (Boshen)
  • 2a16ce0 traverse: Disable syntax check and disable build module record (#3794) (Boshen)

Bug Fixes

  • 08fcfb3 transformer: Fix spans and scopes in TS enum transform (#3911) (overlookmotel)
  • 17ad8f7 transformer: Create new scopes for new blocks in TS transform (#3908) (overlookmotel)

Refactor

  • 363d3d5 ast: Add span field to the BindingPattern type. (#3855) (rzvxa)
  • 4cf3c76 parser: Improve parsing of TypeScript types (#3903) (Boshen)
  • 1061baa traverse: Separate #[scope] attr (#3901) (overlookmotel)
  • fcd21a6 traverse: Indicate scope entry point with scope(enter_before) attr (#3882) (overlookmotel)
  • 24979c9 traverse: Use camel case props internally (#3880) (overlookmotel)
  • 2045c92 traverse: Improve parsing attrs in traverse codegen (#3879) (overlookmotel)

[0.15.0] - 2024-06-18

  • 0578ece ast: [BREAKING] Remove ExportDefaultDeclarationKind::TSEnumDeclaration (#3666) (Dunqing)

Bug Fixes

  • 90743e2 traverse: Change visit order for Function (#3685) (overlookmotel)

Refactor

[0.14.0] - 2024-06-12

Refactor

  • 60cbdec traverse: generate_uid_in_root_scope method (#3611) (overlookmotel)

[0.13.5] - 2024-06-08

Bug Fixes

  • 48bb97e traverse: Do not publish the build script (Boshen)

[0.13.4] - 2024-06-07

Bug Fixes

  • c00598b transformer: JSX set reference_id on refs to imports (#3524) (overlookmotel)

Refactor

  • 6978269 transformer/typescript: Replace reference collector with symbols references (#3533) (Dunqing)

[0.13.3] - 2024-06-04

Refactor

  • 7bbd3da traverse: generate_uid return SymbolId (#3520) (overlookmotel)

[0.13.2] - 2024-06-03

Features

  • bcdc658 transformer: Add TraverseCtx::generate_uid (#3394) (overlookmotel)

Bug Fixes

  • 3967a15 traverse: Exit scope early if enter it late (#3493) (overlookmotel)

Refactor

  • 55bbde2 ast: Move scope from TSModuleBlock to TSModuleDeclaration (#3488) (overlookmotel)

[0.13.1] - 2024-05-22

Features

  • 0c09047 traverse: Mutable access to scopes tree + symbol table (#3314) (overlookmotel)
  • 421107a traverse: Pass &mut TraverseCtx to visitors (#3312) (overlookmotel)

Refactor

  • 723a46f ast: Store ScopeId in AST nodes (#3302) (overlookmotel)
  • 2b5b3fd traverse: Split context code into multiple files (#3367) (overlookmotel)
  • f8b5e1e traverse: Move parent method etc into TraverseAncestry (#3308) (overlookmotel)
  • 05c71d2 traverse: Traverse produce scopes tree using Semantic (#3304) (overlookmotel)

[0.13.0] - 2024-05-14

Features

  • eefb66f ast: Add type to AccessorProperty to support TSAbractAccessorProperty (#3256) (Dunqing)
  • be87ca8 transform: oxc_traverse crate (#3169) (overlookmotel)
  • 46c02ae traverse: Add scope flags to TraverseCtx (#3229) (overlookmotel)

Bug Fixes

  • 0ba7778 parser: Correctly parse cls.fn = x (#3208) (Dunqing)
  • 6fd7a3c traverse: Create scopes for functions (#3273) (overlookmotel)
  • a23ba71 traverse: Allow TraverseCtx::find_ancestor closure to return AST node (#3236) (overlookmotel)
  • 4e20b04 traverse: Create scope for function nested in class method (#3234) (overlookmotel)

Documentation

  • a4f881f transform: Improve docs for TraverseCtx::ancestors_depth (#3194) (overlookmotel)

Refactor

  • 4208733 ast: Order AST type fields in visitation order (#3228) (overlookmotel)
  • 762677e transform: retag_stack use AncestorType (#3173) (overlookmotel)
  • ec41dba traverse: Simplify build script (#3231) (overlookmotel)
  • 132db7d traverse: Do not expose TraverseCtx::new (#3226) (overlookmotel)