oxc/crates/oxc_parser/CHANGELOG.md
oxc-bot 01722f34ff
release(crates): v0.45.0 (#8434)
## [0.45.0] - 2025-01-11

- 7f69561 ast: [**BREAKING**] `oxc_ast` do not export `BigUint` (#8428)
(overlookmotel)

- d8b27af ast: [**BREAKING**] No unneccesary trailing underscores on
`AstBuilder` method names (#8283) (overlookmotel)

- 5106088 ast: [**BREAKING**] Remove `FromIn<Expression> for Statement`
(#8280) (overlookmotel)

### Features

- 6c7acac allocator: Implement `IntoIterator` for `&mut Vec` (#8389)
(overlookmotel)
- 3212bcd ast_tools: Ignore `raw` field of `NumericLiteral` and
`StringLiteral` in `ContentEq` (#8417) (Boshen)
- ad146bb codegen: Print real newline when `\n` is inside template
literals (#8178) (Boshen)
- 41ddf60 minfier: Add `CompressOptions::target` (#8179) (Boshen)
- d56020b minifier: Drop `0` from `new Int8Array(0)` and other
TypedArrays (#8431) (sapphi-red)
- f935d94 minifier: Remove `new` from NativeErrors / `AggregateError`
(#8430) (sapphi-red)
- dab7a51 minifier: Minimize not `!(x === undefined)` -> `x !==
undefined` (#8429) (Boshen)
- 0e7bab8 minifier: Remove `if(false){}` in a single pass (#8421)
(Boshen)
- 5b5b844 minifier: Fold `ambiguous if else` (#8415) (Boshen)
- 438a6e7 minifier: Minimize conditions in boolean context (#8381)
(Boshen)
- 793cb43 minifier: `a != null ? a : b` -> `a ?? b` (#8352) (camc314)
- 814da55 minifier: Compress `x = x || 1` to `x ||= 1` (#8368)
(sapphi-red)
- a596821 minifier: Compress `a.b = a.b + c` to `a.b += c` (#8367)
(sapphi-red)
- 579eb60 minifier: Compress `a.b || (a.b = c)` to `a.b ||= c` (#8366)
(sapphi-red)
- f367a16 minifier: Port esbuild conditional expr minification (#8351)
(camc314)
- 8d52cd0 minifier: Merge assign expression in conditional expression
(#8345) (sapphi-red)
- a69d15f minifier: Compress `new Array(2)` -> `[,,]` (#8344)
(sapphi-red)
- 819c475 minifier: Compress `new Array(7n)` -> `[7n]` (#8343)
(sapphi-red)
- e085d66 minifier: Remove empty IIFE (#8340) (Boshen)
- 2c2e483 minifier: Fold object spread `({ ...null })` -> `({})` (#8339)
(Boshen)
- 6220e05 minifier: Remove empty if statment `if (test) {}` -> `test`
(#8336) (Boshen)
- a76dfae minifier: Remove label statement with empty body (#8333)
(Boshen)
- e88a6bd minifier: Minimize `!0 + null !== 1` -> `!0 + null != 1`
(#8332) (Boshen)
- ec88c68 minifier: Compress `a || (a = b)` to `a ||= b` (#8315)
(sapphi-red)
- e6fe84d minifier: Compress `a = a + b` to `a += b` (#8314)
(sapphi-red)
- 9ea4e31 minifier: Remove `new` from `new Error`/`new Function`/`new
RegExp` (#8313) (sapphi-red)
- 051fbb6 minifier: Minimize `x["0"]` -> x[0] (#8316) (Boshen)
- a542013 minifier: Minimize `do{}while(true)` -> `do;while(true)`
(#8311) (Boshen)
- e3ff81e minifier: Minimize `(x = 1) === 1` -> `(x = 1) == 1` (#8310)
(Boshen)
- 4b68cc0 minifier: Minimize empty `try` statement (#8309) (Boshen)
- 922c514 minifier: Fold `.toString()` (#8308) (Boshen)
- 66a2443 minifier: Minify sequence expressions (#8305) (camc314)
- af65c36 minifier: Minimize double negated binary expressions (#8304)
(camc314)
- 76c778b minifier: Remove logical nots when arg is a delete expression
(#8303) (camc314)
- 5ed439b minifier: Minify typeof in binary expressions (#8302)
(camc314)
- 6afc590 minifier: Compress typeof addition string (#8301) (camc314)
- ecc789f minifier: Fold `if(x >> y == 0){}` -> `if(!(x >> y)){}`
(#8277) (Boshen)
- 0e3b79a minifier: Fold `String()` -> `''`, `Number()` -> `false`
(#8274) (Boshen)
- c9cf593 minifier: Compress property key `{[1]: _}` -> {1: _} (#8272)
(Boshen)
- b92b2ab minifier: Fold `BigInt(1n)` -> `1n` (#8270) (Boshen)
- a4df387 minifier: Compress loose equals undefined (#8268) (camc314)
- f000596 minifier: Minify call expressionsto `Number` (#8267) (camc314)
- 092aeaf minifier: Flatten spread args in call expressions (#8266)
(camc314)
- 04ec38d minifier: Remove unused arrow function expressions (#8262)
(camc314)
- e446c15 minifier: Improve minimizing unary not expressions (#8261)
(camc314)
- 7f19211 minifier: Minimize unary expression statements (#8256)
(camc314)
- cec63e2 minifier: `{}` evals to `f64::NaN` (Boshen)
- 4d8a08d minifier: Improve constant evaluation (#8252) (Boshen)
- e84f267 minifier: Compress more property keys (#8253) (Boshen)
- d1224f9 minifier: Improve minimizing conditional expressions (#8251)
(camc314)
- 65f46f5 minifier: Constant fold `String.fromCharCode` (#8248) (Boshen)
- bd8d677 minifier: Minimize `~undefined`, `~null`, `~true`, `~false`
(#8247) (Boshen)
- f73dc9e minifier: Constant fold `'x'.toString()` and `true.toString()`
(#8246) (Boshen)
- fd5af73 minifier: Minimize `Number` constructor (#8245) (Boshen)
- 2f52f33 minifier: Minsize `!!!foo ? bar : baz` -> `foo ? baz : bar`
(#8244) (Boshen)
- ccdc039 minifier: Always put literals on the rhs of equal op `1==x` =>
`x==1` (#8240) (Boshen)
- 39353b2 minifier: Improve minimizing conditionals (#8238) (Cameron)
- c90fc16 minifier: Restore conditional minification and fix edge case
(#8235) (camc314)
- 6c8ee9f minifier: Remove last redundant `return` statement (#8234)
(Boshen)
- 51f4792 minifier: Minimize `foo ? foo : bar` and `foo ? bar : foo`
(#8229) (Boshen)
- 6e2ec17 minifier: Statement fusion switch cases; improved minimize
exit poitns (#8228) (Boshen)
- 574a242 minifier: Minimize all variants of `typeof x == 'undefined'`
(#8227) (Boshen)
- 2041477 minifier: Fold `if(x)return;y` -> `if(!x)y` (#8226) (Boshen)
- 9c1afa4 minifier: Optional catch binding when catch param is unused
(#8221) (Boshen)
- 4a29845 minifier: Add `ConvertToDottedProperties` (#8212) (Boshen)
- 2786dea minifier: Add `RemoveUnusedCode` (#8210) (Boshen)
- cd274ee minifier: Minimize logical exprs (#8209) (Cameron)
- 4ae15df minifier: Imprve more conditional expr minification with
boolean lit (#8208) (camc314)
- 3202b4f minifier: Imprve conditional expr minification with boolean
lit (#8207) (camc314)
- 3b45011 minifier: Handle conditional expr with boolean lit (#8206)
(camc314)
- 4c2059a minifier: Reverse negated conditional exprs (#8205) (camc314)
- 4804933 minifier: Add `MinimizeExitPoints` and ExploitAssigns`
boilerplate (#8203) (Boshen)
- bf266e1 minifier: Try collapse conditional to logical or expr (#8197)
(Cameron)
- 06e1780 minifier: Improve `StatementFusion` (#8194) (Boshen)
- 42e211a minifier: Only constant fold numbers when result is smaller
(#8092) (Boshen)
- d0de560 minifier: Change `NaN` to `f64::NAN` (#8191) (Boshen)
- cef8eb8 minifier: Change `foo?.['bar']` to `foo?.bar` (#8176) (翠 /
green)
- 8149e34 minifier: Optional catch binding when es target >= es2019
(#8180) (Boshen)
- fc43ec5 minifier: Fold `string.length` / `array.length` (#8172)
(sapphi-red)
- 29dc0dc minifier: Change `foo['bar']` -> foo.bar (#8169) (Boshen)
- 3c5718d minifier: Fold `typeof foo == undefined` into `foo ==
undefined` when possible (#8160) (翠 / green)
- f3a36e1 minifier: Fold `typeof foo != "undefined"` into `typeof foo <
"u"` (#8159) (翠 / green)
- 37c9959 minifier: Normalize `Infinity` into `f64::Infinity` (#8148)
(Boshen)
- 8fb71f5 minifier: Minify string `PropertyKey` (#8147) (Boshen)
- 6615e1e minifier: Constant fold `instanceof` (#8142) (翠 / green)
- 2b2a373 minifier: Minimize `a + 'b' + 'c'` -> `a + 'bc'` (#8137)
(Boshen)
- 213364a minifier: Minimize `if (x) if (y) z` -> `if (x && y) z`
(#8136) (Boshen)
- 6b51e6d minifier: Minimize `if(foo) bar else baz` -> `foo ? bar : baz`
(#8133) (Boshen)
- f615bfa minifier: Minimize `if (x) return; return 1` -> `return x ?
void 0 : 1` (#8130) (Boshen)
- f0b1ee5 minifier: Minimize `if(!x) foo()` -> `x || foo()` (#8122)
(Boshen)
- f8200a8 minifier: Minimize `if(foo) bar` -> `foo && bar` (#8121)
(Boshen)
- 72d9967 minifier: Add `Normalize` ast pass (#8120) (Boshen)
- fef0b25 minifier: Collapse `var` into for loop initializer (#8119)
(Boshen)
- 2331ea8 minifier: `typeof foo === 'number'` => `typeof foo ==
'number'` (#8112) (Boshen)
- ad9a0a9 mininifier: Minimize variants of `a instanceof b == true`
(#8241) (Boshen)
- 2da4365 parser: Missing initializer in destructuring declaration
inside for loop head (#8222) (Boshen)
- 55744fd semantic: Allow getting mutable reference to symbols table
(#8189) (Max Stoumen)
- 0592a8b transformer/class-properties: Transform private in expression
(#8202) (Dunqing)
- ad77ad5 transformer/class-properties: Transform static/instance
accessor methods (#8132) (Dunqing)
- e405f79 transformer/class-properties: Transform static private method
invoking (#8117) (Dunqing)
- 3303e99 transformer/class-properties: Insert statements after
statement of class expression (#8116) (Dunqing)
- 0cc71cf transformer/class-properties: Transform super expressions and
identifiers that refers to class binding in private method (#8106)
(Dunqing)
- 58ed832 transformer/class-properties: Transform private field
expression which invokes private method (#8102) (Dunqing)
- f14567a transformer/class-properties: Transform callee which invokes
private method (#8100) (Dunqing)
- 13349ef transformer/class-properties: Transform private methods
(#8099) (Dunqing)

### Bug Fixes

- eb25bc0 allocator: Fix lifetimes on `IntoIterator` for `Vec` (#8388)
(overlookmotel)
- 97a7992 ast: Fix `ContentEq` and `ContentHash` impls for literal types
(#8426) (overlookmotel)
- a1752a0 codegen: Fix incorrect minified `return 1n` output (#8374)
(Boshen)
- 5a648bc codegen: Fix white space issue with do statements (#8348)
(Boshen)
- b6d16f4 codegen: Print parenthesis on negative bigint lit when
neccessary (#8258) (camc314)
- 8ed9766 codegen: Source map builder panicked because it attempted to
subtract with overflow in `search_original_line_and_column` (#8185)
(Dunqing)
- ad61e70 codegen: Print if else without block with proper indentation
(#8135) (Boshen)
- 74572de ecmascript: Incorrect `to_int_32` value for Infinity (#8144)
(翠 / green)
- e1f8ea4 lexer: `Source` is not `Clone` (#8294) (overlookmotel)
- 5c63414 mangler: Keep exported symbols for `top_level: true` (#7927)
(翠 / green)
- 3c93549 minifier: Dce if statement should keep side effects and vars
(#8433) (Boshen)
- 52f88c0 minifier: Rotate associative operators to make it more
idempotent (#8424) (camc314)
- a80460c minifier: Correctly set `self.changed` when minimizing if
stmts (#8420) (camc314)
- d4ca8d4 minifier: `!!x` is not idempotent in `RemoveDeadCode` (#8419)
(Boshen)
- 357b61d minifier: Do not minify `Object.defineProperty` in sequence
expressions (#8416) (Boshen)
- 0efc845 minifier: `+0n` produces `TypeError` (#8410) (Boshen)
- 7ce6a7c minifier: `a in b` has error throwing side effect (#8406)
(Boshen)
- 2f3a9dc minifier: Cannot transform property key `#constructor` (#8405)
(Boshen)
- c0a3dda minifier: `instanceof` has error throwing side effect (#8378)
(Boshen)
- 5516f7f minifier: Do not fold object comparisons (#8375) (Boshen)
- cb098c7 minifier: Computed property key `prototype` cannot be changed
(#8373) (Boshen)
- 82ee77e minifier: Do not remove shadowned `undefined` in return
statement (#8371) (Boshen)
- f87da16 minifier: Do not fold literals in `-0 != +0` (#8278) (Boshen)
- 62a2644 minifier: Handle arrow fn expressions correctly in
`is_in_boolean_context` (#8260) (camc314)
- d2f8eaa minifier: Fix panic in `peephole_minimize_conditions` (#8242)
(Boshen)
- a698def minifier: Fix incorrect return value for `(x ? true : y)`
(#8233) (Boshen)
- 05be1fc minifier: Remove incorrect fold
`Expression::AssignmentExpression` (#8211) (Boshen)
- 56b7f13 minifier: Do not constant fold `0 instanceof F` (#8199)
(Boshen)
- 75d5f17 minifier: Minify string `PropertyKey` (#8177) (sapphi-red)
- f88acb3 parser: Allow line breaks between `const` and `enum` (#8193)
(branchseer)
- 79a8fc6 semantic: Report error for super property appearing in
function body (#8376) (Dunqing)
- 79af100 semantic: Reference flags not correctly resolved when after an
export stmt (#8134) (camc314)
- 3eaff2a transformer: Ensure last expression statement in arrow
function expression is wrapped in return (#8192) (Dunqing)
- 3feac27 transformer/arrow-functions: Outer `super()` in nested class
(#8382) (Dunqing)
- 335065d transformer/arrow-functions: Do not transform super that
inside nested non-async method (#8335) (Dunqing)
- e4d66e4 transformer/arrow-functions: Store `super_methods` on a
`Stack` to fix nested async methods (#8331) (Dunqing)
- 775a289 transformer/arrow-functions: `_this = this` should be inserted
after super call expression (#8024) (Dunqing)
- ac72adb transformer/private-methods: Fix panic if instance private
accessor in class (#8362) (overlookmotel)
- f1f129b transformer/private-methods: Create brand binding `var` in
hoist scope (#8361) (overlookmotel)
- ab61425 transformer/private-methods: No temp var for class when unused
private methods (#8360) (overlookmotel)
- 9a03bd2 transformer/typescript: Remove type-only `import =` when
`only_remove_type_imports` is true (#8275) (Dunqing)
- 0df1866 transformer/typescript: Create `Reference` for `require`
(#8355) (overlookmotel)
- 78d7c97 transformer/typescript: Create `Reference` for `Infinity`
(#8354) (overlookmotel)
- 2e7207f transformer/typescript: Should strip import specifiers type
with `only_remove_type_imports` (#8141) (underfin)

### Performance

- 07edf74 transformer/arrow-function: Stop traversal at function as
super() can't appear in a nested function (#8383) (Dunqing)
- 62e3f7e transformer/arrow-functions: Reduce size of inlined visitor
(#8322) (overlookmotel)
- aebe0ea transformer/arrow-functions: Use `NonEmptyStack` instead of
`Stack` (#8318) (overlookmotel)

### Documentation

- c8e4843 ast: Fix doc comment (#8286) (overlookmotel)
- e0a09ab data_structures: Improve docs for stack types (#8356)
(overlookmotel)
- aaa009d minifier: Clarify assumptions for compressor (#8404) (翠 /
green)
- 05cba5b transformer/private-methods: Amend comments (#8398)
(overlookmotel)

### Refactor

- b29655f ast: Rearrange impls for literal types in same order as they
are defined (#8425) (overlookmotel)
- 0db2a22 ast: `AstBuilder` enum builder methods use `alloc_*` methods
(#8281) (overlookmotel)
- aea9551 ast: Simplify `get_identifier_reference` of `TSType` and
`TSTypeName` (#8273) (Dunqing)
- 9c1844a data_structures: Remove `NonNull` shim (#8423) (overlookmotel)
- 1835687 ecmascript: Remove unnecessary `use` statement (#8284)
(overlookmotel)
- 64bfdfe lexer: Tighten safety of lexer by always including lifetime on
`SourcePosition` (#8293) (overlookmotel)
- 0344e98 lexer: Make `handle_byte` a method of `Lexer` (#8291)
(overlookmotel)
- fabf116 lexer: Replace `#[allow]` with `#[expect]` (#8289)
(overlookmotel)
- 0462edb lexer: Rename function param (#8288) (overlookmotel)
- fb2acd8 minifier: Change minimize conditionals into a loop (#8413)
(Boshen)
- baaec60 minifier: Remove the buggy `??` transform (#8411) (Boshen)
- 1c4658d minifier: Change ast passes order, `!in_fixed_loop` happen
last (#8380) (Boshen)
- 09f0f48 minifier: Remove the buggy `minimize_exit_points`
implementation (#8349) (Boshen)
- 9a5c66a minifier: Clean up (#8346) (Boshen)
- 98f2b1c minifier: Clean up `peephole_substitute_alternate_syntax`
(#8327) (Boshen)
- fc662b7 minifier: Handle big int values later (#8324) (Boshen)
- d16e598 minifier: Clean up `peephole_replace_known_methods` (#8306)
(Boshen)
- b8d26ea minifier: Move optional catch param to
peephole_substitute_alternate_syntax (#8282) (Boshen)
- 0845162 minifier: Clean up `ReplaceKnownMethods` (Boshen)
- 7c7f5d7 minifier: Clean up `peephole_fold_constants` (Boshen)
- bf0fbce minifier: Improve constant fold numbers (#8239) (Boshen)
- 62f8fba minifier: Move all conditional minification logic to
minimze_conditions (#8231) (camc314)
- cfb51f2 minifier: Fuse ast passes (#8184) (Boshen)
- bf9cafe minifier: Clean up `peephole_substitute_alternate_syntax` a
little bit (Boshen)
- 75264ed minifier: Clean up `try_optimize_block` (#8139) (Boshen)
- c22062b minifier: Cleanup peephole_minimize_conditions (#8114)
(Boshen)
- e594c39 minifier: Clean up `peephole_substitute_alternate_syntax.rs`
(#8111) (Boshen)
- 0903501 semantic: Check super usage based on scope (#8377) (Dunqing)
- 109b8fc transformer: Elide lifetimes where possible (#8285)
(overlookmotel)
- fb389f7 transformer/arrow-function: Create a new ident instead of
clone (#8338) (Dunqing)
- dddbd29 transformer/arrow-functions: Reorder assertions (#8386)
(overlookmotel)
- ce6c445 transformer/arrow-functions: Add TODO comments (#8328)
(overlookmotel)
- 73d0025 transformer/arrow-functions: Reduce repeated code (#8323)
(overlookmotel)
- 3dd08e9 transformer/arrow-functions: Do not inline non-trivial visitor
method (#8321) (overlookmotel)
- ea9cefb transformer/arrow-functions: Reorder visitor methods (#8320)
(overlookmotel)
- 37199a4 transformer/arrow-functions: Rename lifetime (#8319)
(overlookmotel)
- 57e9dcf transformer/arrow-functions: Shorten `AstBuilder` call (#8317)
(overlookmotel)
- a5e3528 transformer/async-to-generator: Pass `TraverseCtx` to function
not `AstBuilder` (#8279) (overlookmotel)
- e7c89ba transformer/class-properties: TODO comments (#8392)
(overlookmotel)
- 6790d1d transformer/class-properties: Simplify determining if class is
declaration (#8357) (overlookmotel)
- c786a13 transformer/class-properties: Share
`replace_class_name_with_temp_var` in class_properties (#8105) (Dunqing)
- f54f48e transformer/class-properties: Remove all `*_if_super` methods
in `static_block_and_prop_init` (#8104) (Dunqing)
- d82fb52 transformer/class-properties: Move `supers` to
`super_converter` (#8103) (Dunqing)
- 3dad85e transformer/private-methods: Remove unnecessary clone (#8400)
(overlookmotel)
- aa5e65f transformer/private-methods: Simplify finding parent statement
of class expression (#8364) (overlookmotel)
- c786fd1 transformer/private-methods: TODO comments (#8363)
(overlookmotel)

### Styling

- 4d2888d lexer: Reorder imports (#8290) (overlookmotel)
- e81f34f span: Reformat code (#8296) (overlookmotel)
- 45e2402 transformer/private-methods: Move comments (#8399)
(overlookmotel)
- 0a1ffc0 transformer/private-methods: Rename var (#8397)
(overlookmotel)

### Testing

- 16dcdaf lexer: Assert size of `Token` in 32-bit WASM (#8292)
(overlookmotel)
- 3149fe0 minifier: Add anonymous function test case for logical
expression to logical assignment compression (#8347) (sapphi-red)
- 91b42de minifier: Enable some passing tests (#8250) (camc314)
- 1fa5341 minifier: Port tests from ConvertToDottedPropertiesTest
(#8175) (sapphi-red)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2025-01-11 22:34:31 +08:00

34 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.45.0] - 2025-01-11

Features

  • 6c7acac allocator: Implement IntoIterator for &mut Vec (#8389) (overlookmotel)
  • 2da4365 parser: Missing initializer in destructuring declaration inside for loop head (#8222) (Boshen)

Bug Fixes

  • e1f8ea4 lexer: Source is not Clone (#8294) (overlookmotel)
  • f88acb3 parser: Allow line breaks between const and enum (#8193) (branchseer)

Refactor

  • 64bfdfe lexer: Tighten safety of lexer by always including lifetime on SourcePosition (#8293) (overlookmotel)
  • 0344e98 lexer: Make handle_byte a method of Lexer (#8291) (overlookmotel)
  • fabf116 lexer: Replace #[allow] with #[expect] (#8289) (overlookmotel)
  • 0462edb lexer: Rename function param (#8288) (overlookmotel)

Styling

  • 4d2888d lexer: Reorder imports (#8290) (overlookmotel)

Testing

  • 16dcdaf lexer: Assert size of Token in 32-bit WASM (#8292) (overlookmotel)

[0.44.0] - 2024-12-25

  • ad2a620 ast: [BREAKING] Add missing AssignmentTargetProperty::computed (#8097) (Boshen)

Bug Fixes

  • 55d6eb9 parser: Disallow type parameters on class constructors (#8071) (injuly)
  • be2c60d parser: Parse import source from from 'mod' (#8056) (Boshen)

[0.42.0] - 2024-12-18

Features

  • 81eedb1 parser: 'readonly' type modifier is only permitted on array and tuple literal types. (#7880) (Boshen)

Bug Fixes

  • 111dc52 parser: Include export token in spans of TSNamespaceExportDeclaration (#7963) (branchseer)

Refactor

  • 3858221 global: Sort imports (#7883) (overlookmotel)

Styling

  • 7fb9d47 rust: cargo +nightly fmt (#7877) (Boshen)

[0.41.0] - 2024-12-13

  • fb325dc ast: [BREAKING] span field must be the first element (#7821) (Boshen)

Bug Fixes

  • 7610dc1 parser: Parse import source from 'mod' (#7833) (Boshen)

Refactor

[0.40.0] - 2024-12-10

  • 72eab6c parser: [BREAKING] Stage 3 import source and import defer (#7706) (Boshen)

  • ebc80f6 ast: [BREAKING] Change 'raw' from &str to Option (#7547) (Song Gao)

Features

  • 00fea92 napi/parser: Expose span positions of import.meta (#7677) (Boshen)
  • b8dc333 syntax: Add ExportEntry::is_type (#7676) (Boshen)

Bug Fixes

  • 8c0b0ee parser: Better diagnostic for invalid for await syntax (#7649) (Boshen)

Performance

  • d503a84 parser: Reorder parse_statement match conditions (#7645) (Boshen)
  • e923e4e parser: Inline all token kind checks (#7644) (Boshen)

Refactor

  • 36d1493 parser: Use ModuleRecord::has_module_syntax for setting sourceType (#7646) (Boshen)

[0.39.0] - 2024-12-04

  • c2ced15 parser,linter: [BREAKING] Use a different ModuleRecord for linter (#7554) (Boshen)

  • 8a788b8 parser: [BREAKING] Build ModuleRecord directly in parser (#7546) (Boshen)

  • b0e1c03 ast: [BREAKING] Add StringLiteral::raw field (#7393) (Boshen)

Features

  • 33e5a49 syntax: Add statement span to ImportEntry and ExportEntry (#7583) (Boshen)

Refactor

  • b24beeb parser: Use PropName trait from oxc_ecmascript (#7543) (Boshen)
  • f0e7acc syntax: Change ModuleRecord::not_esm to has_module_syntax (#7579) (Boshen)
  • 18519de syntax: Remove ModuleRecord::export_default (#7578) (Boshen)
  • d476660 syntax: Remove ModuleRecord::exported_bindings_duplicated because it is a syntax error (#7577) (Boshen)
  • 17663f5 syntax: Remove ModuleRecord::export_default_duplicated because it is a syntax error (#7576) (Boshen)

[0.37.0] - 2024-11-21

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

  • 878189c parser,linter: [BREAKING] Add ParserReturn::is_flow_language; linter ignore flow error (#7373) (Boshen)

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

Features

  • e6922df parser: Fix incorrect AST for x?.f<T>() (#7387) (Boshen)

Bug Fixes

  • 666b6c1 parser: Add missing ChainExpression in optional TSInstantiationExpression (#7371) (Boshen)

Refactor

[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)

  • d1d1874 ast: [BREAKING] Change comment.span to real position that contain // and /* (#7154) (Boshen)

Features

  • 9d6cc9d estree: ESTree compatibility for all literals (#7152) (ottomated)

Refactor

[0.35.0] - 2024-11-04

Bug Fixes

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

Performance

  • fa9a4ec parser: Check . before [ in parse_member_expression_rest (#6979) (Boshen)

Refactor

  • 953b051 parser: Remove oxc_ecmascript crate (#7109) (Boshen)
  • fdd480d parser: Do not use AstBuilder::*_from_* methods (#7068) (overlookmotel)
  • 9e85b10 parser: Add ParserImpl::alloc method (#7063) (overlookmotel)
  • 17a938e parser: Use function parse_type_member_semicolon (#7018) (Boshen)
  • aa1b29c parser: Remove parse_ts_index_signature_member function (#7017) (Boshen)

[0.34.0] - 2024-10-26

Refactor

  • 423d54c rust: Remove the annoying clippy::wildcard_imports (#6860) (Boshen)

[0.33.0] - 2024-10-24

  • a1ca964 ast, parser: [BREAKING] Remove NumericLiteral::new method (#6787) (overlookmotel)

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

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

  • 8032813 regular_expression: [BREAKING] Migrate to new regexp parser API (#6741) (leaysgur)

Bug Fixes

Refactor

[0.32.0] - 2024-10-19

  • 5200960 oxc: [BREAKING] Remove passing Trivias around (#6446) (Boshen)

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

Features

  • 58467a5 parser: Better handling of invalid modifiers (#6482) (DonIsaac)
  • 8ea6b72 parser: Better errors for reserved words used as identifier names (#6478) (DonIsaac)

Bug Fixes

  • 721cf0f parser: Should be treated comments where after ( as leading comments of next token (#6588) (Dunqing)
  • b1bf12c parser: Do not parse as and satisfies expression in javascript (#6442) (Boshen)

Performance

  • 4d8bc8c parser: Precompute is_typescript (#6443) (Boshen)

Refactor

  • 073b02a ast: Type params field before params in TS function declaration types (#6391) (overlookmotel)
  • c45723b parser: Fix typo in var name (#6500) (overlookmotel)

[0.31.0] - 2024-10-08

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

  • 5a73a66 regular_expression: [BREAKING] Simplify public APIs (#6262) (leaysgur)

  • 32d972e parser: [BREAKING] Treat unambiguous files containing TS export assignments as modules (#6253) (overlookmotel)

Features

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

Bug Fixes

  • 6159560 parser: String ImportSpecifiers for type imports (#6352) (DonIsaac)
  • 1380d8b parser: Should regard comments where after = as leading comments of next token (#6355) (Dunqing)

Refactor

  • 3b53dd4 parser: Provide better error messages for const modifiers on class elements (#6353) (DonIsaac)

[0.30.4] - 2024-09-28

Bug Fixes

  • fd6798f parser: Remove unintended pub Kind (#6109) (Boshen)

[0.30.2] - 2024-09-27

Bug Fixes

  • 0658576 paresr: Do not report missing initializer error in ambient context (#6020) (Boshen)

[0.30.0] - 2024-09-23

Features

  • e8bf30a ast: Add Comment::real_span (#5764) (Boshen)
  • bcdbba3 codegen: Print jsdoc comments that are attached to statements and class elements (#5845) (Boshen)
  • 8e7556f parser: Calculate leading and trailing position for comments (#5785) (Boshen)

Bug Fixes

  • 42dcadf parser: Hashbang comment should not keep the end newline char (#5844) (Boshen)

Documentation

  • 3120c6c parser: Add module and struct level documentation (#5831) (DonIsaac)

Refactor

  • 6dd6f7c ast: Change Comment struct (#5783) (Boshen)
  • 31e9db4 parser: Shorten UniquePromise code (#5805) (overlookmotel)
  • 2322b8b parser: Remove dead code warning when running tests (#5804) (overlookmotel)
  • 4abfa76 parser: Add --ast and --comments to example (Boshen)
  • a4b55bf parser: Use AstBuilder (#5743) (Boshen)

[0.29.0] - 2024-09-13

Features

  • 953fe17 ast: Provide NONE type for AST builder calls (#5737) (overlookmotel)

Performance

  • d18c896 rust: Use cow_utils instead (#5664) (dalaoshu)

[0.28.0] - 2024-09-11

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

  • 4a8aec1 span: [BREAKING] Change SourceType::js to SourceType::cjs and SourceType::mjs (#5606) (Boshen)

  • 603817b oxc: [BREAKING] Add SourceType::Unambiguous; parse .js as unambiguous (#5557) (Boshen)

Features

Performance

Refactor

  • 0ac420d linter: Use meaningful names for diagnostic parameters (#5564) (Don Isaac)

[0.27.0] - 2024-09-06

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

Features

  • 59abf27 ast, parser: Add oxc_regular_expression types to the parser and AST. (#5256) (rzvxa)
  • 10279f5 parser: Add syntax error for hyphen in JSXMemberExpression <Foo.bar-baz /> (#5440) (Boshen)

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)

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

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)
  • 7dfd51a parser: Report class properties that are both definite and optional (#5181) (DonIsaac)
  • a563968 parser: Report errors on optional accessor properties (#5180) (DonIsaac)

Bug Fixes

  • d4c06ef parser: Revert "check for @flow with recoverable errors as well" (#5297) (overlookmotel)
  • e1d8b92 parser: Check for @flow with recoverable errors as well (Boshen)
  • e6fd52e parser: Change unterminated regex error to be non-recoverable (#5285) (Boshen)
  • 1686920 parser: Span for invalid regex flags (#5225) (leaysgur)

Refactor

  • d236554 parser: Move JSXIdentifier conversion code into parser (#5345) (overlookmotel)
  • bc59dd2 parser: Improve example for byte_search! macro usage (#5234) (overlookmotel)
  • a3ddfdd parser: Improve lexer pointer maths (#5233) (overlookmotel)

Testing

  • 7009177 parser: Fix incorrect flow error test (Boshen)

[0.25.0] - 2024-08-23

  • b2ff2df parser: [BREAKING] Remove builder pattern from Parser struct (#5000) (Boshen)

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

Features

  • 6800e69 oxc: Add Compiler and CompilerInterface (#4954) (Boshen)
  • afe728a parser: Parse regular expression with regex parser (#4998) (Boshen)

Bug Fixes

  • efbdced parser: Only show flow error if it's a flow file (#5069) (Boshen)

Refactor

  • ca70cc7 linter, mangler, parser, semantic, transformer, traverse, wasm: Rename various flag vars to flags (#5028) (overlookmotel)

[0.24.3] - 2024-08-18

Bug Fixes

  • 21f5762 codegen: Minify large numbers (#4889) (Boshen)
  • 1bdde2c parser: Detect @flow in `/** @flow */ comment (#4861) (Boshen)

[0.24.2] - 2024-08-12

Documentation

  • 559baa5 parser: Clean up doc regarding performance; remove conformance (Boshen)

[0.24.0] - 2024-08-08

Bug Fixes

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

Refactor

  • d25dea7 parser: Use ast_builder in more places. (#4612) (rzvxa)

[0.23.1] - 2024-08-06

Bug Fixes

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

Refactor

  • d25dea7 parser: Use ast_builder in more places. (#4612) (rzvxa)

[0.23.0] - 2024-08-01

Features

  • 7446e98 codegen: Align more esbuild implementations (#4510) (Boshen)
  • 35654e6 codegen: Align operator precedence with esbuild (#4509) (Boshen)

Bug Fixes

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

Performance

  • 55a8763 parser: Faster decoding unicode escapes in identifiers (#4579) (overlookmotel)
  • ae1d38f parser: Fast path for ASCII when checking char after numeric literal (#4577) (overlookmotel)
  • 56ae615 parser: Make not at EOF the hot path in Source methods (#4576) (overlookmotel)
  • 25679e6 parser: Optimize Lexer::hex_digit (#4572) (overlookmotel)
  • bb33bcc parser: Speed up lexing non-decimal numbers (#4571) (overlookmotel)
  • ab8509e parser: Use - not saturating_sub (#4561) (overlookmotel)
  • c9c38a1 parser: Support peeking over bytes (#4304) (lucab)
  • 0870ee1 parser: Get and check lookahead token (#4534) (lucab)

Refactor

  • e68ed62 parser: Convert lexer byte handler for | to a single match (#4575) (overlookmotel)
  • bba824b parser: Convert Lexer::read_minus to a single match (#4574) (overlookmotel)
  • ef5418a parser: Convert Lexer::read_left_angle to a single match (#4573) (overlookmotel)
  • 9e5be78 parser: Add Lexer::consume_2_chars (#4569) (overlookmotel)
  • 649913e parser: Extract u8 not &u8 when iterating over bytes (#4568) (overlookmotel)
  • 59f00c0 parser: Rename function (#4566) (overlookmotel)
  • 8e3e910 parser: Rename vars (#4565) (overlookmotel)
  • 0c0601f parser: Rename function (#4564) (overlookmotel)
  • 0acc4a7 parser: Fetch 2 bytes in ? byte handler (#4563) (overlookmotel)
  • 565eccf parser: Shorten lexer code (#4562) (overlookmotel)
  • 148bdb5 parser: Adjust function inlining (#4530) (overlookmotel)

[0.22.1] - 2024-07-27

Performance

  • 868fc87 parser: Optimize conditional advance on ASCII values (#4298) (lucab)

[0.22.0] - 2024-07-23

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

Bug Fixes

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

Refactor

  • a2eabe1 parser: Use error codes for ts diagnostics (#4335) (DonIsaac)

[0.21.0] - 2024-07-18

Features

  • 20cdb1f semantic: Align class scope with typescript (#4195) (Dunqing)

Bug Fixes

  • 9a87e41 parser: Avoid crashing on invalid const modifier (#4267) (lucab)
  • 641a78b parser: Fix tests for number parsing (#4254) (overlookmotel)

Performance

  • a8dc4f3 parser: Speed up parsing numbers with _ separators (#4259) (overlookmotel)
  • b94540d parser: Speed up parsing octal literals (#4258) (overlookmotel)
  • a7b328c parser: Faster parsing decimal numbers (#4257) (overlookmotel)

Refactor

  • 2c7bb9f ast: Pass final ScopeFlags into visit_function (#4283) (overlookmotel)
  • ace4f1f semantic: Update the order of visit_function and Visit fields in the builder to be consistent (#4248) (Dunqing)

[0.20.0] - 2024-07-11

  • 5731e39 ast: [BREAKING] Store span details inside comment struct (#4132) (Luca Bruno)

Bug Fixes

  • 48947a2 ast: Put decorators before everything else. (#4143) (rzvxa)
  • 4a656c3 lexer: Incorrect lexing of large hex/octal/binary literals (#4072) (DonIsaac)
  • 28eeee0 parser: Fix asi error diagnostic pointing at invalid text causing crash (#4163) (Boshen)

Refactor

[0.19.0] - 2024-07-09

  • b936162 ast/ast_builder: [BREAKING] Shorter allocator utility method names. (#4122) (rzvxa)

Refactor

[0.18.0] - 2024-07-09

  • d347aed ast: [BREAKING] Generate ast_builder.rs. (#3890) (rzvxa)

Features

  • 3a0f2aa parser: Check for illegal modifiers in modules and namespaces (#4126) (DonIsaac)

[0.17.1] - 2024-07-06

Performance

  • 7fe2a2f parser: Do not copy comments (#4067) (overlookmotel)

[0.17.0] - 2024-07-05

  • e32b4bc ast: [BREAKING] Store trivia comments in a sorted slice (#4045) (Luca Bruno)

Refactor

  • 243c9f3 parser: Use function instead of trait to parse list with rest element (#4028) (Boshen)
  • 1dacb1f parser: Use function instead of trait to parse delimited lists (#4014) (Boshen)

[0.16.3] - 2024-07-02

Refactor

  • d0eac46 parser: Use function instead of trait to parse normal lists (#4003) (Boshen)

[0.16.2] - 2024-06-30

Features

  • dc6d45e ast,codegen: Add TSParenthesizedType and print type parentheses correctly (#3979) (Boshen)
  • 63f36da parser: Parse modifiers with parse_modifiers (take 2) (#3977) (DonIsaac)

[0.16.1] - 2024-06-29

Features

  • 7b38bde parser: Parse modifiers with parse_modifiers (#3948) (DonIsaac)

Refactor

  • 2705df9 linter: Improve diagnostic labeling (#3960) (DonIsaac)

[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)
  • dd540c8 minifier: Add skeleton for ReplaceGlobalDefines ast pass (#3803) (Boshen)

Bug Fixes

  • 275349a parser: Parse function type parameter name accessor (#3926) (Boshen)
  • ef82c78 parser: Trailing comma is not allowed in ParenthesizedExpression (#3885) (Dunqing)
  • 13754cb parser: Change diagnostic to "modifier cannot be used here" (#3853) (Boshen)

Performance

  • 4bf405d parser: Add a few more inline hints to cursor functions (#3894) (Boshen)- 4f7ff7e Do not pass &Atom to functions (#3818) (overlookmotel)

Refactor

  • 363d3d5 ast: Add span field to the BindingPattern type. (#3855) (rzvxa)
  • a471e62 parser: Clean up try_parse (#3925) (Boshen)
  • 3db2553 parser: Improve parsing of TypeScript type arguments (#3923) (Boshen)
  • 4cf3c76 parser: Improve parsing of TypeScript types (#3903) (Boshen)
  • 187f078 parser: Improve parsing of parse_function_or_constructor_type (#3892) (Boshen)
  • 97d59fc parser: Move code around for parsing Modifiers (#3849) (Boshen)- d6437fe Clean up some usages of with_labels (#3854) (Boshen)

[0.15.0] - 2024-06-18

Features

  • d65c652 parser: Display jsx mismatch error, e.g. <Foo></Bar> (#3696) (Boshen)

Bug Fixes

  • da1e2d0 codegen: Improve typescript codegen (#3708) (Boshen)

[0.13.2] - 2024-06-03

Bug Fixes

  • 350cd91 parser: Should parser error when function declaration has no name (#3461) (Dunqing)
  • cf41513 parser: Parse const extends in arrow functions correctly (#3450) (Dunqing)
  • 6078a6d parser: Fix lexer error while parsing parenthesized arrow expressions (#3400) (Boshen)

[0.13.1] - 2024-05-22

Performance

  • 27030b9 lexer: Use bitshifting when parsing known integers (#3296) (Don Isaac)
  • 508dae6 lexer: Dedupe numeric separator check (#3283) (Don Isaac)
  • fdb31c3 parser: More efficient number parsing (#3342) (overlookmotel)
  • 46cb5f9 parser: Use FxHashSet for not_parenthesized_arrow (#3344) (Boshen)

Refactor

  • 6b3d019 paresr: Move some structs to js module (#3341) (Boshen)
  • 89a1f97 parser: Improve expression parsing (#3352) (Boshen)
  • e818fba parser: Improve parse_simple_arrow_function_expression (#3349) (Boshen)
  • 1e802c7 parser: Clean up ParserState (#3345) (Boshen)
  • 0742081 parser: Improve is_parenthesized_arrow_function_expression (#3343) (Boshen)
  • 9ced605 parser: Start porting arrow function parsing from tsc (#3340) (Boshen)

[0.13.0] - 2024-05-14

Features

  • eefb66f ast: Add type to AccessorProperty to support TSAbractAccessorProperty (#3256) (Dunqing)

Bug Fixes

  • c4ccf9f parser: Parse DecoratorCallExpression when Arguments contains MemberExpression (#3265) (Boshen)
  • 0ba7778 parser: Correctly parse cls.fn = x (#3208) (Dunqing)

Performance

  • 7338364 lexer: Improve comment building performance by using a vec instead of btreemap (#3186) (Boshen)

Refactor

  • 7e1fe36 ast: Squash nested enums (#3115) (overlookmotel)
  • 0185eb2 ast: Remove duplicate TSNamedTupleMember representation (#3101) (overlookmotel)
  • 942b2ba ast: Add array element Elision type (#3074) (overlookmotel)
  • 312f74b diagnostics: S/OxcDiagnostic::new/OxcDiagnostic::error (Boshen)
  • b27a905 parser: Simplify Context passing (#3266) (Boshen)
  • 2064ae9 parser,diagnostic: One diagnostic struct to eliminate monomorphization of generic types (#3214) (Boshen)
  • a8af5de syntax: Move number related functions to number module (#3130) (Boshen)- 1b4ebb3 Run fmt (Boshen)

[0.12.5] - 2024-04-22

Features

  • 92d709b ast: Add CatchParameter node (#3049) (Boshen)

Bug Fixes

  • d44301c parser: Fix comment typos (#3036) (overlookmotel)

Performance

  • 6c82961 ast: Box typescript enum variants. (#3065) (Ali Rezvani)
  • 48e2088 ast: Box enum variants (#3058) (overlookmotel)
  • 383b449 ast: Box ImportDeclarationSpecifier enum variants (#3061) (overlookmotel)
  • 2804e7d ast: Reduce indirection in AST types (#3051) (overlookmotel)

[0.12.3] - 2024-04-11

Refactor

  • 5974819 ast: Clean up the ts type visit methods (Boshen)

[0.11.0] - 2024-03-30

Bug Fixes

  • b76b02d parser: Add support for empty module declaration (#2834) (Ali Rezvani)
  • 798a1fd parser: Fix failed to parse JSXChild after JSXEmptyExpression (#2726) (Boshen)

Performance

  • e793063 parser: Faster lexing JSX identifiers (#2557) (overlookmotel)

Refactor

  • fc38783 ast: Add walk_mut functions (#2776) (Ali Rezvani)
  • 198eea0 ast: Add walk functions to Visit trait. (#2791) (Ali Rezvani)

[0.10.0] - 2024-03-14

  • c3477de ast: [BREAKING] Rename BigintLiteral to BigIntLiteral (#2659) (Arnaud Barré)

  • 7768123 parser: [BREAKING] Drop TSImportEqualsDeclaration.is_export (#2654) (Arnaud Barré)

Features

  • 697b6b7 Merge features serde and wasm to serialize (#2716) (Boshen)- 265b2fb Miette v7 (#2465) (Boshen)

Bug Fixes

  • 6c6adb4 ast: Parse rest parameter with the correct optional and type annotation syntax (#2686) (Boshen)
  • 2a235d3 ast: Parse with_clause in re-export declaration (#2634) (magic-akari)
  • 86ee074 parser: Remove all duplicated comments in trivia builder (#2689) (Boshen)
  • cda9c93 parser: Improve lexing of jsx identifier to fix duplicated comments after jsx name (#2687) (Boshen)
  • b378e7e parser: Fix span for JSXEmptyExpression with comment (#2673) (Arnaud Barré)
  • 8226031 parser: Fix span start for return type in function type (#2660) (Arnaud Barré)
  • b453a07 parser: Parse named rest element in type tuple (#2655) (Arnaud Barré)

Refactor

  • 0f86333 ast: Refactor Trivias API - have less noise around it (#2692) (Boshen)
  • 240ff19 parser: Improve parsing of BindingPattern in TypeScript (#2624) (Boshen)- 0646bf3 Rename CompactString to CompactStr (#2619) (overlookmotel)

[0.9.0] - 2024-03-05

  • f66059e ast: [BREAKING] Align TSImportType with ESTree (#2578) (Arnaud Barré)

Features

  • 20c7bf7 ast: Add AssignmentTargetRest (#2601) (Boshen)
  • 3efbbb2 ast: Add "abstract" type to MethodDefinition and PropertyDefinition (#2536) (Boshen)
  • 9479865 napi/parser: Expose preserveParans option (#2582) (Boshen)
  • e2d2ce3 parser: Parse decorators properly (#2603) (Boshen)

Bug Fixes

  • 637cd1d ast: Support TSIndexSignature.readonly (#2579) (Arnaud Barré)
  • 258b9b1 ast: Support FormalParameter.override (#2577) (Arnaud Barré)
  • 78f30bc ast: Change TSMappedType.type_annotation from TSTypeAnnotation to TSType (#2571) (Arnaud Barré)
  • 97aa9cf parser: Fix span end for TSEmptyBodyFunctionExpression (#2606) (Arnaud Barré)
  • 9cc960e parser: Fix duplicated comments during parser rewind (#2600) (Boshen)
  • 24d46bc parser: Fix span start for TSModuleDeclaration (#2593) (Arnaud Barré)
  • ac520d0 parser: Fix span start for TSExportAssignment (#2594) (Arnaud Barré)
  • d9cc429 parser: Parse empty method declaration as TSEmptyBodyFunctionExpression (#2574) (Arnaud Barré)
  • 32028eb parser: TSConditionalType span start (#2570) (Arnaud Barré)
  • 6700810 parser: Set span end for TSEnumDeclaration (#2573) (Arnaud Barré)
  • 8a81851 parser: Don't parse null as a literal type (#2572) (Arnaud Barré)

Performance

  • bf42158 parser: Inline end_span and parse_identifier_kind which are on the hot path (#2612) (Boshen)
  • 78f8c2c parser: Lex JSXText with memchr (#2558) (overlookmotel)
  • 5a13714 parser: Faster lexing template strings (#2541) (overlookmotel)
  • 24ded3c parser: Lex JSX strings with memchr (#2528) (overlookmotel)

Refactor

  • dd31c64 parser: byte_search macro evaluate to matched byte (#2555) (overlookmotel)
  • c579620 parser: Small efficiencies in byte_search macro usage (#2554) (overlookmotel)
  • 18cff6a parser: Remove start params for byte_search macro arms (#2553) (overlookmotel)
  • 34ecdd5 parser: Simplify byte_search macro (#2552) (overlookmotel)
  • ddccaa1 parser: Remove unsafe code in lexer (#2549) (overlookmotel)
  • 9d7ea6b parser: Single function for all string slicing (#2540) (overlookmotel)
  • 0ddfc85 parser: Remove unsafe code (#2527) (overlookmotel)

[0.8.0] - 2024-02-26

Features

  • 6b3b260 Codegen: Improve codegen (#2460) (Andrew McClenaghan)
  • 70295a5 ast: Update arrow_expression to arrow_function_expression (#2496) (Dunqing)
  • 7a796c4 ast: Add TSModuleDeclaration.kind (#2487) (Boshen)
  • 60db720 parser: Parse import attributes in TSImportType (#2436) (Dunqing)
  • ef336cb parser: Recover from async x [newline] => x (#2375) (Boshen)
  • 197fa16 semantic: Add check for duplicate class elements in checker (#2455) (Dunqing)

Bug Fixes

  • 5212f7b parser: Fix missing end span from TSTypeAliasDeclaration (#2485) (Boshen)
  • 73e116e parser: Incorrect parsing of class accessor property name (#2386) (Dunqing)

Performance

  • 996a9d2 parser: byte_search macro always unroll main loop (#2439) (overlookmotel)
  • 383f5b3 parser: Consume multi-line comments faster (#2377) (overlookmotel)
  • c4fa738 parser: Consume single-line comments faster (#2374) (overlookmotel)
  • 0be8397 parser: Optimize lexing strings (#2366) (overlookmotel)

Refactor

  • 9087f71 ast: S/TSThisKeyword/TSThisType to align with estree (Boshen)
  • d08abc6 ast: S/NumberLiteral/NumericLiteral to align with estree (Boshen)
  • 3cbe786 ast: Update TSImportType parameter to argument (#2429) (Dunqing)
  • a78303d parser: continue_if in byte_search macro not unsafe (#2440) (overlookmotel)
  • a5a3c69 parser: Correct comment (#2441) (overlookmotel)
  • cc2ddbe parser: Catch all illegal UTF-8 bytes (#2415) (overlookmotel)
  • b29719d parser: Add methods to Source + SourcePosition (#2373) (overlookmotel)
  • 79ae9a9 parser: Extend byte_search macro (#2372) (overlookmotel)- a2c173d Remove panic! from examples (#2454) (Boshen)

[0.7.0] - 2024-02-09

Features

  • a3570d4 semantic: Report parameter related errors for setter/getter (#2316) (Dunqing)

Bug Fixes

  • 2f6cf73 parser: Remove erroneous debug assertion (#2356) (overlookmotel)

Performance

  • c0d1d6b parser: Lex strings as bytes (#2357) (overlookmotel)
  • 8376f15 parser: Eat whitespace after line break (#2353) (overlookmotel)
  • d3a59f2 parser: Lex identifiers as bytes not chars (#2352) (overlookmotel)

Refactor

  • 1822cfe ast: Fix BigInt memory leak by removing it (#2293) (Boshen)
  • 6910e4f parser: Macro for ASCII identifier byte handlers (#2351) (overlookmotel)
  • 6f597b1 parser: All pointer manipulation through SourcePosition (#2350) (overlookmotel)
  • 185b3db parser: Fix outdated comment (#2344) (overlookmotel)
  • f347016 parser: Make Source::set_position safe (#2341) (overlookmotel)
  • 0bdecb5 parser: Wrapper type for parser (#2339) (overlookmotel)
  • cdef41d parser: Lexer replace Chars with Source (#2288) (overlookmotel)
  • 9811c3a parser: Name byte handler functions (#2301) (overlookmotel)

[0.6.0] - 2024-02-03

Features

  • 2578bb3 ast: Remove generator property from ArrowFunction (#2260) (Dunqing)
  • 165f948 ast: Remove expression property from Function (#2247) (Dunqing)
  • 36c718e tasks: Benchmarks for lexer (#2101) (overlookmotel)

Bug Fixes

  • ea8cc98 ast: AcessorProperty is missing decorators (#2176) (Dunqing)
  • 2beacd3 lexer: Correct the span for irregular whitespaces (#2245) (Boshen)
  • e123be0 parser: Correct MAX_LEN for 32-bit systems (#2204) (overlookmotel)
  • 2f5afff parser: Fix crash on TSTemplateLiteralType in function return position (#2089) (Boshen)
  • 712e99c parser: Restore regex flag parsing (#2007) (overlookmotel)

Performance

  • 81e33a3 parser: Faster offset calculation (#2215) (overlookmotel)
  • 20679d1 parser: Pad Token to 16 bytes (#2211) (overlookmotel)
  • 66a7a68 parser: Lexer byte handlers consume ASCII chars faster (#2046) (overlookmotel)
  • 60a927d parser: Lexer match byte not char (#2025) (overlookmotel)
  • 1886a5b parser: Reduce Token size from 16 to 12 bytes (#2010) (Boshen)

Refactor

  • 766ca63 ast: Rename RestElement to BindingRestElement (#2116) (Dunqing)
  • 622a2c3 lexer: Don't use lexer.current.chars directly (#2237) (overlookmotel)
  • d0d7082 parser: Consume chars when parsing surrogate pair escape (#2243) (overlookmotel)
  • 5279e89 parser: Byte handler for illegal bytes (#2229) (overlookmotel)
  • 3d79d77 parser: Split lexer into multiple files (#2228) (overlookmotel)
  • 51ac392 parser: Mark ByteHandlers unsafe (#2212) (overlookmotel)
  • 872d751 parser: Re-order match branches (#2209) (overlookmotel)
  • 71898ff parser: Move source length check into lexer (#2206) (overlookmotel)
  • bc7ea0b parser: Make is_identifier methods consistent (overlookmotel)
  • 3f2b48f parser: Remove useless string builder from jsx text lexer (#2096) (Boshen)
  • 0e32618 parser: Combine token kinds for skipped tokens (#2072) (overlookmotel)
  • 8d5f5b8 parser: Macro for ASCII byte handlers (#2066) (overlookmotel)
  • 408acb9 parser: Lexer handle unicode without branch (#2039) (overlookmotel)
  • b4d76f0 parser: Remove noop code (#2028) (overlookmotel)
  • 6996948 parser: Remove extraneous code from regex parsing (#2008) (overlookmotel)

[0.5.0] - 2024-01-12

Features

  • c1cfd17 linter: No-irregular-whitespace rule (#1835) (Deivid Almeida)

Bug Fixes

  • b50c5ec parser: Unexpected ts type annotation in get/set (#1942) (Dunqing)
  • eb2966c parser: Fix incorrectly identified directives (#1885) (overlookmotel)
  • c3090c2 parser: Terminate parsing if an EmptyParenthesizedExpression error occurs (#1874) (Dunqing)
  • 62bc8c5 parser: Error on source larger than 4 GiB (#1860) (overlookmotel)
  • 2b4d1bf parser: Await in jsx expression (Boshen)
  • 19e77b0 parser: False postive for "Missing initializer in const declaration" in declare + namespace (#1724) (Boshen)

Refactor

  • a2858ed ast: Introduce ThisParameter (#1728) (magic-akari)
  • aa91fde parser: Only allocate for escaped template strings (#2005) (Boshen)
  • 38f86b0 parser: Remove string builder from number parsing (#2002) (Boshen)
  • c731685 parser: Reduce work parsing regexps (#1999) (overlookmotel)
  • 4706765 parser: Reduce Token size from 32 to 16 bytes (#1962) (Boshen)
  • 6e0bd52 parser: Remove TokenValue::Number from Token (#1945) (Boshen)
  • 08438e0 parser: Remove TokenValue::RegExp from Token (#1926) (Boshen)
  • 7eb2573 parser: Parse BigInt lazily (#1924) (Boshen)
  • 5b2696b parser: Report this parameter error (#1788) (magic-akari)

[0.4.0] - 2023-12-08

Features

  • 9ff0ffc ast: Implement new proposal-import-attributes (#1476) (magic-akari)
  • 07b0109 parser: Add preserve_parens option (default: true) (#1474) (Boshen)
  • 1554f7c parsr: Parse let.a = 1 with error recovery (#1587) (Boshen)
  • 567c6ed prettier: Print directives (#1497) (Boshen)
  • 0218ae8 prettier: Print leading comments with newlines (#1434) (Boshen)

Bug Fixes

  • a7e0706 parser: Correct import_kind of TSImportEqualsDeclaration (#1449) (magic-akari)
  • 4453529 parser: Fix type import (#1291) (magic-akari)
  • 9c0aafc parser: Disallow ReservedWord in NamedExports (#1230) (magic-akari)
  • 8afb81a parser: ASI of async class member (#1214) (magic-akari)

Refactor

  • 9842be4 parser: Remove duplicated code (Boshen)
  • 1a576f6 rust: Move to workspace lint table (#1444) (Boshen)

[0.3.0] - 2023-11-06

Features

  • 854b55a codegen: Json strings proposal (#1039) (Boshen)
  • 55b2f03 minifier: Partially re-enable minifier (#963) (Boshen)
  • 5b1e1e5 parser: TypeScript 5.2 (#811) (Cameron)
  • af1a76b transformer: Implement some of needs_explicit_esm for typescript (#1047) (Boshen)

Bug Fixes

  • 6295f9c ast: Jsx attribute value and text child should be jsx string (#1089) (Boshen)
  • a455c81 linter: Revert changes to JSX attribute strings (#1101) (Boshen)- 266253c Ts parsing error (#940) (IWANABETHATGUY)

Refactor

  • 4787220 ast: Clean up some methods (Boshen)
  • 70189f9 ast: Change the arguments order for some new functions (Boshen)
  • db5417f clippy: Allow clippy::too_many_lines (Boshen)

[0.2.0] - 2023-09-14

Features

  • e7c2313 ast: Add SymbolId and ReferenceId (#755) (Yunfei He)

Bug Fixes

  • 7c8e6ab parser: Parse [+In] in object binding initializer (#874) (Boshen)
  • 2f48bdf parser,semantic: Make semantic own Trivias (#711) (Boshen)

Performance

  • f447cf3 lexer: Only check the first lower case for match_keyword (#913) (Boshen)
  • 7962e81 lexer: Remove an extra branch from identifier_name_handler (#912) (Boshen)
  • d25355c lexer: Reduce an extra branch from peek (#841) (Boshen)
  • a272c1f lexer: Reduce checks on ident -> keyword (#783) (Boshen)
  • c8a215e lexer: Jump table (#779) (Boshen)
  • babbc47 parser: Lazily build trivia map instead of build in-place (#903) (Boshen)
  • 1793397 parser: Remove an extra branch from parse_member_expression_rhs hot path (#896) (Boshen)

Refactor

  • 3516759 ast: Use atom for Directive and Hashbang (#701) (Yunfei He)
  • 56aaf31 benchmark: Use codspeed for all benchmarks (#839) (Boshen)- a2dbfee Clean up fuzzer, move it to repo root (#872) (Boshen)- 12798e0 Improve code coverage a little bit (Boshen)