oxc/crates/oxc_semantic/CHANGELOG.md
github-actions[bot] 95e0571c2e
Release crates v0.14.0 (#3643)
## [0.14.0] - 2024-06-12

### Breaking

* fix(codegen)!: remove the unecessary 4th argument from `Codegen::new`
(#3640)
* feat(ast)!: make `Trivias` clonable by adding `Arc` (#3638)

### Features

- f6d9ca6 linter: Add `eslint/sort-imports` rule (#3568) (Wang Wenzhe)
- 129f91e span: Port over more methods from TextRange (#3592) (Don
Isaac)

### Bug Fixes

- f8f6d33 ast: Correct `visited_node` attr for strict mode of arrow fns
(#3635) (overlookmotel)
- e6ad3fb diagnostics: Do not print ansi color codes in non-TTYs (#3624)
(Boshen)
- d65202d span: Correct doc comments (#3608) (overlookmotel)
- 35e267b transformer: Arrow function transform use UIDs for `_this`
vars (#3634) (overlookmotel)
- 39bdebc transformer: Arrow func transform maintain scope ID (#3633)
(overlookmotel)
- 5cb7e6a transformer: Arrow func transform use correct spans (#3630)
(overlookmotel)
- 0c4ccb4 transformer: Arrow function transform alter `</this>` (#3627)
(overlookmotel)
- 8d237c4 transformer: JSX source calculate correct column when Unicode
chars (#3615) (overlookmotel)
- 9e8f4d6 transformer: Do not add `__source` for generated nodes (#3614)
(overlookmotel)
- 0fb4c35 transformer: Use UID for JSX source filename var (#3612)
(overlookmotel)

### Performance

- 3a59294 transformer: React display name transform reduce Atom
allocations (#3616) (overlookmotel)
- f4c1389 transformer: Create `Vec` with capacity (#3613)
(overlookmotel)

### Refactor

- 0f92521 ast: Replace recursion with loop (#3626) (overlookmotel)
- 08f1010 ast: Make `AstBuilder` `Copy` (#3602) (overlookmotel)
- 84304b4 linter: Add a `ctx.module_record()` method (#3637) (Boshen)
- f98f777 linter: Add rule fixer (#3589) (Don Isaac)
- e90e6a2 minifier: Make `Prepass` `Copy` (#3603) (overlookmotel)
- 7d61832 semantic: Pass `Rc` by value (#3586) (overlookmotel)
- 89bcbd5 transformer: Move `BoundIdentifier` into helpers (#3610)
(overlookmotel)
- 5793ff1 transformer: Replace `&’a Trivias` with `Rc<Trivias>` (#3580)
(Dunqing)
- 509871f transformer: Comment for unimplemented `spec` option in arrow
fns transform (#3618) (overlookmotel)
- 4b2e3a7 transformer: Fix indentation (#3617) (overlookmotel)
- 3467e3d transformer: Remove outdated comment (#3606) (overlookmotel)
- a799225 transformer: Flatten file structure for React transform
(#3604) (overlookmotel)
- 70f31a8 transformer: Reduce branching in JSX transform (#3596)
(overlookmotel)
- 3ae567d transformer: Remove dead code (#3588) (overlookmotel)
- 60cbdec traverse: `generate_uid_in_root_scope` method (#3611)
(overlookmotel)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-12 17:52:41 +08:00

15 KiB
Raw Blame History

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.14.0] - 2024-06-12

Refactor

  • 84304b4 linter: Add a ctx.module_record() method (#3637) (Boshen)
  • 7d61832 semantic: Pass Rc by value (#3586) (overlookmotel)
  • 5793ff1 transformer: Replace &a Trivias with Rc<Trivias> (#3580) (Dunqing)
  • 60cbdec traverse: generate_uid_in_root_scope method (#3611) (overlookmotel)

[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

  • 3a5f088 linter/jsdoc: Implement require-returns rule (#3218) (Yuji Sugiura)
  • bcdc658 transformer: Add TraverseCtx::generate_uid (#3394) (overlookmotel)

Bug Fixes

  • 5e06298 linter: Memorize visited block id in neighbors_filtered_by_edge_weight (#3407) (mysteryven)
  • 6f71541 semantic: Set program scope_id for TS definition files (#3496) (overlookmotel)
  • d4371e8 transformer: Use UIDs in TS namespace transforms (#3395) (overlookmotel)

Refactor

  • 55bbde2 ast: Move scope from TSModuleBlock to TSModuleDeclaration (#3488) (overlookmotel)
  • 9c58231 semantic: Use a simpler way to resolve reference for ReferenceFlag::Type (#3430) (Dunqing)- de75fb2 Compile less test binaries to speed up CI (#3414) (Boshen)

[0.13.1] - 2024-05-22

Refactor

  • 6f3b1c8 semantic: Semantic populate scope_id fields in AST (#3303) (overlookmotel)
  • 78e6326 semantic/cfg: Alias petgraph's NodeIndex as BasicBlockId. (#3380) (rzvxa)

[0.13.0] - 2024-05-14

Features

  • 44b16ef linter/eslint: Implement max-classes-per-file (#3241) (Jelle van der Waa)
  • 5866086 linter/jsdoc: Implement no-defaults rule (#3098) (Yuji Sugiura)
  • 1f135ce linter/react: Add the rules_of_hooks rule. (#3071) (rzvxa)
  • c3d8a85 semantic: Report that enum member must have initializer (#3113) (Dunqing)
  • 2dd96df semantic: Report namespace related errors (#3093) (Dunqing)

Bug Fixes

  • 5e36e0d semantic: Add cfg nodes for ConditionalExpressions. (#3127) (Ali Rezvani)
  • c91d261 semantic: Connect test expression of for statements to the cfg. (#3122) (Ali Rezvani)
  • dcb2528 semantic: Revert test code pushed to the main by accident. (#3085) (Ali Rezvani)
  • 8d17ab3 semantic: Allow root_node to be empty for empty trees. (#3084) (Ali Rezvani)

Refactor

  • 7e1fe36 ast: Squash nested enums (#3115) (overlookmotel)
  • dbde5b3 diagnostics: Remove export of miette (Boshen)
  • 312f74b diagnostics: S/OxcDiagnostic::new/OxcDiagnostic::error (Boshen)
  • c5588c9 semantic: Clean up redeclaration diagnostic (Boshen)
  • 09f34fc semantic: Unify diagnostic in checker (Boshen)
  • a8af5de syntax: Move number related functions to number module (#3130) (Boshen)- 893af23 Clean up more diagnostics usages (Boshen)- d8173e1 Remove all usages of Into<Error> (Boshen)

[0.12.5] - 2024-04-22

Features

  • 92d709b ast: Add CatchParameter node (#3049) (Boshen)
  • 57ad6c4 semantic: Add root node to the AstNodes structure. (#3032) (Ali Rezvani)

Bug Fixes

  • 84c43c8 semantic: Correctly resolve identifiers inside catch parameter initializers (#3050) (Boshen)
  • 1f7033e semantic: Correctly resolve identifiers inside parameter initializers (#3046) (Boshen)

[0.12.4] - 2024-04-19

Features

  • 40af2b1 semantic/jsdoc: Handle optional type syntax for type name part (#2960) (Yuji Sugiura)

Bug Fixes

  • 2c325ef semantic/jsdoc: Skip parsing @ inside of backticks (#3017) (Yuji Sugiura)

[0.12.3] - 2024-04-11

Refactor

  • 0a77d62 semantic/jsdoc: Rework JSDoc struct for better Span handling (#2917) (Yuji Sugiura)

[0.12.2] - 2024-04-08

Features

  • aa63b64 linter: Implement jsdoc/check-access (#2642) (Yuji Sugiura)

Bug Fixes

  • 1ea24ea semantic: Symbols inside functions and classes incorrectly flagged as exported (#2896) (Don Isaac)

[0.12.1] - 2024-04-03

Bug Fixes

  • d3eb1c3 semantic: Flag function expressions with SymbolFlags::Function (#2891) (Don Isaac)

[0.11.0] - 2024-03-30

Features

  • 712b3d2 semantic: Distinguish type imports in ModuleRecord (#2785) (Dunqing)
  • df744b2 semantic/jsdoc: Add Span for JSDoc, JSDocTag (#2815) (Yuji Sugiura)

Bug Fixes

  • df62828 linter/import: Ignore export declaration in no-duplicates (#2863) (Dunqing)
  • 947a9f0 semantic: Missing SymbolFlags::Export when identifier used in ExportDefaultDeclaration (#2837) (Dunqing)
  • b28b617 semantic: Incorrect ExportEntry span for ExportAllDeclaration in ModuleRecord (#2793) (Dunqing)
  • b6e493b semantic: ModuleRecord's indirect_export_entires missing reexported imports (#2792) (Dunqing)

Refactor

  • 1b5e544 semantic: Distinguish whether requested_modules is type imports/exports (#2848) (Dunqing)
  • 4a42c5f semantic/jsdoc: JSDocTag parser rework (#2765) (Yuji Sugiura)

[0.10.0] - 2024-03-14

Features

  • 57ce737 semantic: Move redeclare varaibles to symbol table (#2614) (Dunqing)
  • 4f9dd98 span: Remove From<String> and From<Cow> API because they create memory leak (#2628) (Boshen)- 697b6b7 Merge features serde and wasm to serialize (#2716) (Boshen)

Bug Fixes

  • b00d4b8 semantic/jsdoc: Support multibyte chars (#2694) (Yuji Sugiura)
  • 2609e90 semantic/jsdoc: Fix up builder (#2623) (Yuji Sugiura)

Refactor

  • 0f86333 ast: Refactor Trivias API - have less noise around it (#2692) (Boshen)
  • cba1e2f ast: Import Tsify to shorten code (#2665) (overlookmotel)
  • 6b5723c ast: Shorten manual TS defs (#2638) (overlookmotel)- cbc2f5f Remove unused dependencies (#2718) (Boshen)- 3c1e0db Reduce cfg_attr boilerplate with SerAttrs derive (#2669) (overlookmotel)- d76ee6b "wasm" feature enable "serde" feature (#2639) (overlookmotel)- 8001b2f Make CompactStr immutable (#2620) (overlookmotel)- 0646bf3 Rename CompactString to CompactStr (#2619) (overlookmotel)

[0.9.0] - 2024-03-05

Features

  • d41dcc3 linter: Remove all commonjs logic for import plugin (#2537) (Boshen)
  • f760108 transformer: Call build module record (#2529) (Dunqing)

Bug Fixes

  • 37de80d semantic: Jsx reference with an incorrect node id (#2546) (Dunqing)
  • 1519b90 semantic: Incorrect scope for switch statement (#2513) (Dunqing)

Refactor

  • 1391e4a semantic/jsdoc: Misc fixes for JSDoc related things (#2531) (Yuji Sugiura)- c56b6cb Replace InlinableString with CompactString for Atom (#2517) (Boshen)

[0.8.0] - 2024-02-26

Features

  • f5aadc7 linter: Handle cjs `module.exports = {} as default export (#2493) (Boshen)
  • f64c7e0 linter: Handle cjs module.exports.foo = bar and exports.foo = bar (#2492) (Boshen)
  • d0a9c46 linter: Handle top-level require for import plugin (#2491) (Boshen)
  • 197fa16 semantic: Add check for duplicate class elements in checker (#2455) (Dunqing)
  • 950298d semantic: Add static property, ElementKind::Getter, ElementKind::Setter in ClassTable (#2445) (Dunqing)

Bug Fixes

  • fba66dc linter: Improve import/no-named-as-default (#2494) (Boshen)
  • 4c2e2bd semantic: Add export symbol flag to identifiers in export declarations (#2508) (Dunqing)
  • 04f4621 semantic: Should return nearest JSDoc (#2490) (Yuji Sugiura)
  • bc22ae5 semantic: Refactor jsdoc finding (#2437) (Yuji Sugiura)
  • 5bd2ce6 semantic: Incorrect reference flag for MemberExpression assign (#2433) (Dunqing)

Performance

  • 8110288 semantic: Reduce visit parent nodes in resolve_reference_usages (#2419) (Dunqing)

Refactor

  • d08abc6 ast: S/NumberLiteral/NumericLiteral to align with estree (Boshen)
  • e6b391a ast: S/ArrowExpression/ArrowFunctionExpression to align estree (Boshen)
  • 7c2d868 semantic: Delete the redundant code in binder (#2423) (Dunqing)
  • c6767fa semantic: Reduce allocation in resolve_references_for_current_scope (#2414) (Dunqing)
  • 28ba28f semantic: Check directive by current_scope_id (#2411) (Dunqing)- a2c173d Remove panic! from examples (#2454) (Boshen)

[0.7.0] - 2024-02-09

Features

  • d571839 ast: Enter AstKind::ExportDefaultDeclaration, AstKind::ExportNamedDeclaration and AstKind::ExportAllDeclaration (#2317) (Dunqing)
  • 40e9541 semantic: Add export binding for ExportDefaultDeclarations in module record (#2329) (Dunqing)
  • a3570d4 semantic: Report parameter related errors for setter/getter (#2316) (Dunqing)
  • 9ca13d0 semantic: Report type parameter list cannot be empty (#2315) (Dunqing)
  • f53c54c semantic: Report unexpected type annotation in ArrayPattern (#2309) (Dunqing)
  • f3035f1 semantic: Apply ImportSpecifier's binder and remove ModuleDeclaration's binder (#2307) (Dunqing)
  • 6002560 span: Fix memory leak by implementing inlineable string for oxc_allocator (#2294) (Boshen)

Bug Fixes

  • 540b2a0 semantic: Remove unnecessary SymbolFlags::Import (#2311) (Dunqing)
  • cb17a83 semantic: Remove ignore cases (#2300) (Dunqing)

[0.6.0] - 2024-02-03

Features

  • f673e41 ast: Remove serde skip for symbol_id and reference_id (#2220) (Dunqing)
  • cd5026c ast: TypeScript definition for wasm target (#2158) (Nicholas Roberts)
  • 721a869 linter: Improve no_redeclare rule implementation (#2084) (Dunqing)
  • 2768195 oxc_semantic: Improve sample visualization (#2251) (Tzvi Melamed)
  • 28daf83 semantic: Report no class name error (#2273) (Boshen)
  • da2ffdf semantic: Check parameters property (#2264) (Dunqing)
  • d71175e semantic: Check optional parameters (#2263) (Dunqing)
  • 8d99a15 semantic: Report error on optional variable declaration in TypeScript (#2261) (Boshen)
  • e561457 semantic: Track cfg index per ast node (#2210) (Tzvi Melamed)
  • 8898377 semantic: Cfg prototype (#2019) (Boshen)
  • ead4e8d transformer/typescript: Remove import if only have type reference (#2001) (Dunqing)

Bug Fixes

  • 989ab88 codegen: Print Directive original string (#2157) (underfin)
  • f4674f3 oxc_semantic: Handle short-circuiting operators in CFG (#2252) (Tzvi Melamed)
  • 73ccf8a oxc_semantic: Proper traversal of try statements (#2250) (Tzvi Melamed)
  • 972be83 semantic: Fix incorrect semantic example (#2198) (Dunqing)
  • 122abd5 semantic: Replace ClassStatickBlockAwait with ClassStaticBlockAwait (#2179) (Dunqing)
  • 24ac957 semantic: Incorrect reference flag (#2057) (Dunqing)

Refactor

  • 766ca63 ast: Rename RestElement to BindingRestElement (#2116) (Dunqing)
  • 2924258 semantic: Adding binder for ImportSpecifier replaces the ModuleDeclaration's binder (#2230) (Dunqing)
  • c62495d semantic: Get function by scope_id in set_function_node_flag (#2208) (Dunqing)
  • f59e87f semantic: Checking label in ContinueStatement based on LabelBuilder (#2202) (Dunqing)
  • 56adfb1 semantic: Use LabelBuilder instead of UnusedLabeled (#2184) (Dunqing)
  • fc1592b semantic: Remove all #[dead_code[ from tester (Boshen)
  • 8bccdab semantic: Add binder for FormalParameters and RestElement, replacing the binder for FormalParameters (#2114) (Dunqing)
  • 8e43eef semantic: Improve declare symbol logic in FormalParameters (#2088) (Dunqing)- 87b9978 Move all miette usages to oxc_diagnostics (Boshen)

[0.5.0] - 2024-01-12

Features

  • f45a3cc linter: Support eslint/no-unused-private-class-members rule (#1820) (Dunqing)
  • f1b433b playground: Visualize symbol (#1886) (Dunqing)
  • 45a7985 playground: Visualize scope (#1882) (Dunqing)
  • 3b4fe0e semantic: Allow reserved keyword defined in ts module block (#1907) (Dunqing)
  • b0569bc semantic: Add current_scope_flags function in SemanticBuilder (#1906) (Dunqing)
  • b9bdf36 semantic: Improve check super implementation, reduce access nodes (#1827) (Dunqing)
  • f7b7f0a semantic: Support get node id by scope id (#1826) (Dunqing)
  • ca04312 semantic: Add ClassTable (#1793) (Dunqing)
  • edc6fa4 semantic: Add SymbolFlags::Function for FunctionDeclaration (#1713) (Dunqing)
  • 78b427b transform: Support es2015 new target (#1967) (underfin)

Bug Fixes

  • 9c9d882 semantic: Remove duplicate errors in ModuleDeclaration::ImportDeclaration (#1846) (Dunqing)

Performance

  • 0080638 linter/react: Find class node by symbols in get_parent_es6_component (#1657) (Dunqing)
  • dae5f62 semantic: Check duplicate parameters in Binder of FormalParameters (#1840) (Dunqing)
  • a743d06 semantic: Just need to find the AstKind::FormalParameter in is_in_formal_parameters (#1852) (Dunqing)
  • 0e0f258 semantic: Reduce calls to span() (#1851) (Dunqing)

Refactor

  • 6c5b22f semantic: Improve ClassTable implmention and merge properties and methods to elements (#1902) (Dunqing)
  • bfd5cd9 semantic: Improve check function declaration implementation (#1854) (Dunqing)
  • 497a0b8 semantic: Rename add_node_id to add_current_node_id_to_current_scope (#1847) (Dunqing)
  • d63c50a semantic: Improve check private identifier implementation (#1794) (Dunqing)
  • da67fe1 semantic: Remove unused methods from AstNode (Boshen)

[0.4.0] - 2023-12-08

Features

  • 446ba16 ast: Add to_string function to VariableDelcartionKind (#1303) (Dunqing)
  • 0115314 ast/semantic: Parse jsdoc on PropertyDefinition (#1517) (Shannon Rothe)
  • 5f31662 prettier: Add the basics of comment printing (#1313) (Boshen)
  • c6ad660 semantic: Support scope descendents starting from a certain scope. (#1629) (Miles Johnson)

Refactor

  • be043c3 ast: VariableDeclarationKind::to_string -> as_str (#1321) (Boshen)
  • 1a576f6 rust: Move to workspace lint table (#1444) (Boshen)

[0.3.0] - 2023-11-06

Features

  • 2453954 linter: Add no-redeclare rule. (#683) (cin)
  • ef8aaa7 minifier: Re-enable mangler (#972) (Boshen)
  • 55b2f03 minifier: Partially re-enable minifier (#963) (Boshen)
  • a442fad semantic: Bind function expression name (#1049) (Boshen)
  • 1661385 semantic: Check non-simple lhs expression of assignment expression (#994) (Boshen)
  • af1a76b transformer: Implement some of needs_explicit_esm for typescript (#1047) (Boshen)
  • dfee853 transformer: Add utils to make logical_assignment_operators pass (#1017) (Boshen)
  • 678db1d transformer: ES2020 Nullish Coalescing Operator (#1004) (Boshen)
  • 0f72066 transformer: Finish 2016 exponentiation operator (#996) (Boshen)
  • 203cf37 transformer/react: Read comment pragma @jsxRuntime classic / automatic (#1133) (Boshen)

Bug Fixes

  • 0f02d37 semantic: Make ExportDeclaration span accurate (#928) (Wenzhe Wang)

Refactor

  • 903854d ast: Fix the lifetime annotations around Vist and VisitMut (#973) (Boshen)
  • 69150d8 transformer: Move Semantic into Transformer (#1130) (Boshen)

Testing

  • b4b39b8 semantic: Add scoping test cases (#954) (Don Isaac)

[0.2.0] - 2023-09-14

Features

  • e7c2313 ast: Add SymbolId and ReferenceId (#755) (Yunfei He)
  • 4e5f63a linter: Implement re-exports (#877) (Boshen)
  • ee54575 linter: Add runner for import-plugin (#858) (Boshen)
  • c5ff534 semantic: Add node_id to Reference (#689) (Makoto Tateno)
  • 75d928a syntax: Add loaded_modules to ModuleRecord (Boshen)

Bug Fixes

  • 2f48bdf parser,semantic: Make semantic own Trivias (#711) (Boshen)
  • 815db57 semantic: Symbol of identifier of top level function declaration should be in the root scope (#843) (Yunfei He)
  • d3accc1 semantic: Nested references (#661) (Don Isaac)

Performance

  • babbc47 parser: Lazily build trivia map instead of build in-place (#903) (Boshen)

Testing

  • 38fb4c2 semantic: Test harness (#679) (Don Isaac)