oxc-bot
be1a6d4c84
Release crates v0.26.0 ( #5418 )
...
## [0.26.0] - 2024-09-03
- 1aa49af ast: [**BREAKING**] Remove
`JSXMemberExpressionObject::Identifier` variant (#5358 ) (Dunqing)
- 01cc2ce semantic: [**BREAKING**] Add `ScopeTree:get_child_ids` API
behind a runtime flag (#5403 ) (Boshen)
- b1d0075 napi/transform: [**BREAKING**] Align output API `sourceText`
-> `code` with babel (#5398 ) (Boshen)
- 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
- 180b1a1 ast: Add `Function::name()` (#5361 ) (DonIsaac)
- 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)
- 292d162 codegen: Print missing fields for `AccessorProperty` (#5291 )
(Dunqing)
- 72740b3 isolated_declaration: Support sourcemap option (#5170 )
(dalaoshu)
- f81e8a1 linter: Add `oxc/no-async-endpoint-handlers` (#5364 )
(DonIsaac)
- 9c22ce9 linter: Add hyperlinks to diagnostic messages (#5318 )
(DonIsaac)
- d22bd20 module_lexer: Distinguish for types-only imports and exports
(#5184 ) (Kevin Deng 三咲智子)
- 7dfd51a parser: Report class properties that are both definite and
optional (#5181 ) (DonIsaac)
- a563968 parser: Report errors on optional accessor properties (#5180 )
(DonIsaac)
- 46b641b regular_expression: Validate max quantifier value (#5218 )
(leaysgur)
- be4642f semantic: Transform checker check child scope IDs (#5410 )
(overlookmotel)
- 6e969f9 semantic: Add `ScopeTree::delete_root_unresolved_reference`
(#5305 ) (overlookmotel)
- 1b20ceb span: Add `CompactStr::to_compact_string` method (#5385 )
(Boshen)
- 5a137f0 span/source-type: Add SourceType factory methods (#5242 )
(DonIsaac)
- f5e05db span/source-type: Impl `Display` and `Error` for
`UnknownExtension` (#5240 ) (DonIsaac)
- d04857b transformer: Support `Targets::from_query` method (#5336 )
(Dunqing)
- 3d4a64c transformer: Make `Targets` public (#5335 ) (Dunqing)
- 0eb7602 transformer: Support `TransformOptions::from_preset_env` API
(#5323 ) (Dunqing)
- 08dc0ad transformer: Add `object-spread` plugin (#3133 ) (magic-akari)
- 01c0c3e transformer: Add remaining options to transformer options
(#5169 ) (Boshen)
- 056c667 transformer/arrow-functions: The output that uses `this`
inside blocks doesn't match Babel (#5188 ) (Dunqing)
- 0abfc50 transformer/typescript: Support `rewrite_import_extensions`
option (#5399 ) (Dunqing)
### Bug Fixes
- 8ebc23f ast: Serialize `TSParenthesizedType` with camelCase (#5199 )
(Kevin Deng 三咲智子)
- 5c4c001 codegen: Print `export @decorator declare abstract class Foo`
correctly (#5303 ) (Boshen)
- 7b1546b codegen: Do not print comments when `--minify` (Boshen)
- ff7fa98 diagnostics: Improve "file is too long to fit on the screen"
(#5120 ) (Boshen)
- 8a17807 parser: Treat JSX element tags starting with `_` or `$` as
`IdentifierReference`s (#5343 ) (overlookmotel)
- 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)
- cffce11 regular_expression: Prevent panic on too large number (#5282 )
(leaysgur)
- 293413f semantic: Implicit return `UpdateExpression` in
`ArrowFunctionExpression` does not as read reference (#5161 ) (Dunqing)
- a6bb3b1 span/source-type: Consider `.cjs` and `.cts` files as
`ModuleKind::Script` (#5239 ) (DonIsaac)
- 35f03db transformer: `ArrowfunctionExpression`'s expression is true
but has more than one body statement (#5366 ) (Dunqing)
- 8d6b05c transformer: Class property with typescript value should not
be removed (#5298 ) (Boshen)
- 47e69a8 transformer-optional-catch-binding: The `unused` binding is
not in the correct scope (#5066 ) (Dunqing)
- 94ff94c transformer/arrow-functions: Reaches `unreachable` when
`<this.foo>` is inside an arrow function (#5356 ) (Dunqing)
- f8bb022 transformer/arrow-functions: Remove
`SymbolFlags::ArrowFunction` (#5190 ) (Dunqing)
- d9ba5ad transformer/arrow-functions: Correct scope for `_this` (#5189 )
(Dunqing)
- 3acb3f6 transformer/react: Mismatch output caused by incorrect
transformation ordering (#5255 ) (Dunqing)
- 5754c89 transformer/typescript: Remove accessibility from
`AccessorProperty` (#5292 ) (Dunqing)
- d594818 traverse: `insert_scope_below` update child scopes records
(#5409 ) (overlookmotel)
- 25d6e20 traverse: Add missing visitors to `ChildScopeCollector`
(#5118 ) (overlookmotel)
### Performance
- 292f217 ast: Optimize `JSXIdentifier::is_reference` (#5344 )
(overlookmotel)
- 12a7607 codegen: Inline `Codegen::print_list` (#5221 ) (overlookmotel)
- fb847bd codegen: Slightly faster `print_list` (#5192 ) (Boshen)
- a1523c6 transformer: Remove an allocation from arrow functions
transform (#5412 ) (overlookmotel)
### Documentation
- 8334bd4 transformer: Add documentation for `Targets::get_targets`
(#5337 ) (Dunqing)
- d51a954 transformer: Add documentation for arrow-functions plugin
(#5186 ) (Dunqing)
### Refactor
- c2d8c9e ast: Reduce allocations in
`AstBuilder::move_assignment_target` (#5367 ) (overlookmotel)
- 946c867 ast: Box `TSThisParameter` (#5325 ) (overlookmotel)
- 960e1d5 ast: Rename `IdentifierReference::new_with_reference_id`
(#5157 ) (overlookmotel)
- f63b568 ast: Remove `#[non_exhaustive]` attr from `AstBuilder` (#5130 )
(overlookmotel)
- d4c3778 codegen: Rename vars (#5222 ) (overlookmotel)
- 543cad6 codegen: Remove some pub APIs (Boshen)
- cd63336 diagnostic: Change how diagnostic codes are rendered (#5317 )
(DonIsaac)
- 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)
- 3ae94b8 semantic: Change `build_module_record` to accept &Path instead
of PathBuf (Boshen)
- 05d25e2 semantic: Combine add scope methods (#5262 ) (overlookmotel)
- fdedc0f semantic: Transform checker: rename `SemanticData` to
`Scoping` (#5261 ) (overlookmotel)
- 1086109 semantic: Transform checker do not output spans in errors
(#5260 ) (overlookmotel)
- af5713e semantic: Transform checker continue checks if missing IDs
(#5259 ) (overlookmotel)
- 943454f semantic: Update transform checker for no conditional scopes
(#5252 ) (overlookmotel)
- 892a7fa semantic: Replace `ref` syntax (#5253 ) (overlookmotel)
- cbb4725 semantic: Add comment to transform checker (#5250 )
(overlookmotel)
- a17cf33 semantic: Remove `ScopeTree::child_ids` (#5232 ) (Boshen)
- d5a4940 semantic: Rewrite handling of label statement errors (#5138 )
(Boshen)
- 94f60e7 span/source-type: Make `SourceType` factories `const` (#5241 )
(DonIsaac)
- 0de844d transformer: Remove unnecessary code from JSX transform
(#5339 ) (overlookmotel)
- 5136f01 transformer: Remove unnecessary type annotation (#5131 )
(overlookmotel)
- 260c9d2 transformer/es2015: Move all entry points to implementation of
Traverse trait (#5187 ) (Dunqing)
- 1645115 transformer/object-reset-spread: Make plugin initialization
unconditional (#5319 ) (Dunqing)
- d2666fe transformer/object-rest-spread: Move plugin-relates files to
`object_rest_spread` mod (#5320 ) (Dunqing)
- 7e2a7af transformer/react: Remove `CalculateSignatureKey`
implementation from refresh (#5289 ) (Dunqing)
- 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)
- b39c0d6 wasm: Add `source_type` for parser, replace class options with
plain object (#5217 ) (Kevin Deng 三咲智子)
### Testing
- 7009177 parser: Fix incorrect flow error test (Boshen)
- be7b8c6 semantic: Add `JSXIdentifierReference`-related tests (#5224 )
(Dunqing)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-09-03 10:36:02 +08:00
renovate[bot]
8cf9cf9919
chore(deps): update npm packages ( #5392 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [axios](https://axios-http.com )
([source](https://togithub.com/axios/axios )) | [`1.7.5` ->
`1.7.7`](https://renovatebot.com/diffs/npm/axios/1.7.5/1.7.7 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
| [pnpm](https://pnpm.io ) ([source](https://togithub.com/pnpm/pnpm )) |
[`9.8.0` -> `9.9.0`](https://renovatebot.com/diffs/npm/pnpm/9.8.0/9.9.0 )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>axios/axios (axios)</summary>
###
[`v1.7.7`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#177-2024-08-31 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.7.6...v1.7.7 )
##### Bug Fixes
- **fetch:** fix stream handling in Safari by fallback to using a stream
reader instead of an async iterator;
([#​6584](https://togithub.com/axios/axios/issues/6584 ))
([d198085](d1980854fe ))
- **http:** fixed support for IPv6 literal strings in url
([#​5731](https://togithub.com/axios/axios/issues/5731 ))
([364993f](364993f0d8 ))
##### Contributors to this release
- <img
src="https://avatars.githubusercontent.com/u/10539109?v=4&s=18 "
alt="avatar" width="18"/> [Rishi556](https://togithub.com/Rishi556
"+39/-1 (#​5731 )")
- <img
src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18 "
alt="avatar" width="18"/> [Dmitriy
Mozgovoy](https://togithub.com/DigitalBrainJS "+27/-7 (#​6584 )")
###
[`v1.7.6`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#176-2024-08-30 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.7.5...v1.7.6 )
##### Bug Fixes
- **fetch:** fix content length calculation for FormData payload;
([#​6524](https://togithub.com/axios/axios/issues/6524 ))
([085f568](085f56861a ))
- **fetch:** optimize signals composing logic;
([#​6582](https://togithub.com/axios/axios/issues/6582 ))
([df9889b](df9889b83c ))
##### Contributors to this release
- <img
src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18 "
alt="avatar" width="18"/> [Dmitriy
Mozgovoy](https://togithub.com/DigitalBrainJS "+98/-46 (#​6582 )")
- <img
src="https://avatars.githubusercontent.com/u/3534453?v=4&s=18 "
alt="avatar" width="18"/> [Jacques
Germishuys](https://togithub.com/jacquesg "+5/-1 (#​6524 )")
- <img
src="https://avatars.githubusercontent.com/u/53894505?v=4&s=18 "
alt="avatar" width="18"/> [kuroino721](https://togithub.com/kuroino721
"+3/-1 (#​6575 )")
</details>
<details>
<summary>pnpm/pnpm (pnpm)</summary>
### [`v9.9.0`](https://togithub.com/pnpm/pnpm/compare/v9.8.0...v9.9.0 )
[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.8.0...v9.9.0 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions ) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-01 19:31:44 +00:00
Kevin Deng 三咲智子
b39c0d6122
refactor(wasm): add source_type for parser, replace class options with plain object ( #5217 )
...
- Feat: add `source_type` to `ParserOptions`
- Refactor: use plain objects for options instead of `new
OxcRunOptions()` and `new OxcParserOptions()`, allowing easier
serialization.
2024-08-26 15:08:35 +08:00
Kevin Deng 三咲智子
bf49f339d0
chore: pin pnpm version & upgrade lockfile version ( #5200 )
2024-08-25 22:57:33 +08:00
oxc-bot
0b900110a2
Release crates v0.25.0 ( #5107 )
...
## [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)
- 5f4c9ab semantic: [**BREAKING**] Rename `SymbolTable::get_flag` to
`get_flags` (#5030 ) (overlookmotel)
- 58bf215 semantic: [**BREAKING**] Rename `Reference::flag` and
`flag_mut` methods to plural (#5025 ) (overlookmotel)
- c4c08a7 ast: [**BREAKING**] Rename
`IdentifierReference::reference_flags` field (#5024 ) (overlookmotel)
- d262a58 syntax: [**BREAKING**] Rename `ReferenceFlag` to
`ReferenceFlags` (#5023 ) (overlookmotel)
- c30e2e9 semantic: [**BREAKING**] `Reference::flag` method return
`ReferenceFlag` (#5019 ) (overlookmotel)
- ce4d469 codegen: [**BREAKING**] Remove const generic `MINIFY` (#5001 )
(Boshen)
- b2ff2df parser: [**BREAKING**] Remove builder pattern from `Parser`
struct (#5000 ) (Boshen)
- f88970b ast: [**BREAKING**] Change order of fields in CallExpression
(#4859 ) (Burlin)
### Features
- 714373d ast: `inherit_variants!` macro add `into_*` methods (#5005 )
(overlookmotel)
- 6800e69 oxc: Add `Compiler` and `CompilerInterface` (#4954 ) (Boshen)
- 2b21be3 oxc_minifier: Define plugin with postfix wildcard (#4979 )
(IWANABETHATGUY)
- afe728a parser: Parse regular expression with regex parser (#4998 )
(Boshen)
- 4b49cf8 transformer: Always pass in symbols and scopes (#5087 )
(Boshen)
- f51d3f9 transformer/nullish-coalescing-operator: Handles nullish
coalescing expression in the FormalParamter (#4975 ) (Dunqing)
- f794870 transformer/nullish-coalescing-operator: Generate the correct
binding name (#4974 ) (Dunqing)
- 72ff2c6 transformer/nullish-coalescing-operator: Add comments in top
of file (#4972 ) (Dunqing)
- 6b885fe traverse: Expose `generate_uid_based_on_node` and
`generate_uid_in_current_scope_based_on_node` from `TraverseCtx` (#4965 )
(Dunqing)
### Bug Fixes
- 7f3129e ast: Correct code comment (#5004 ) (overlookmotel)
- 1bd9365 coverage: Correctly check semantic data after transform
(#5035 ) (Boshen)
- 185eb20 isolated_declarations: Namespaces that are default exported
should be considered for expando functions (#4935 ) (michaelm)
- 2a5e15d npm: `libc` field should not be `null` (Boshen)
- efbdced parser: Only show flow error if it's a flow file (#5069 )
(Boshen)
- ad2be97 semantic: Incorrect semantic check for label has same name
(#5041 ) (heygsc)
- d5de97d semantic: Transform checker check reference flags (#5092 )
(overlookmotel)
- 90c74ee semantic: Transform checker check reference symbol IDs (#5090 )
(overlookmotel)
- a8005b9 semantic: Transform checker check symbol redeclarations
(#5089 ) (overlookmotel)
- 205bff7 semantic: Transform checker check symbol references (#5088 )
(overlookmotel)
- 4a57086 semantic: Transform checker check symbol IDs (#5078 )
(overlookmotel)
- ea7d216 semantic: Transform checker check symbol spans (#5076 )
(overlookmotel)
- 1b6b27a semantic: Transform checker check symbol flags (#5074 )
(overlookmotel)
- 6d87b0f semantic: Fix error message for duplicated label (#5071 )
(Boshen)
- 05fff16 semantic: Transform checker compare binding symbol IDs (#5057 )
(overlookmotel)
- f187b71 semantic: Transform checker compare scope children (#5056 )
(overlookmotel)
- b52c6a4 semantic: Transform checker compare scope parents (#5055 )
(overlookmotel)
- da64014 semantic: Transform checker catch more scope flags mismatches
(#5054 ) (overlookmotel)
- 67d1a96 semantic: Transform checker compare scope flags (#5052 )
(overlookmotel)
- 863b9cb semantic: Transform checker handle conditional scopes (#5040 )
(overlookmotel)
- 47029c4 semantic: Transform checker output symbol names in errors
(#5038 ) (overlookmotel)
- 6ffbd78 transformer: Remove an `AstBuilder::copy` call from TS
namespace transform (#4987 ) (overlookmotel)
- a8dfdda transformer: Remove an `AstBuilder::copy` call from TS module
transform (#4986 ) (overlookmotel)
- 1467eb3 transformer: Remove an `AstBuilder::copy` call from TS enum
transform (#4985 ) (overlookmotel)
- 1365feb transformer: Remove an `AstBuilder::copy` call for TS
`AssignmentTarget` transform (#4984 ) (overlookmotel)
- edacf93 transformer: Remove an `AstBuilder::copy` call (#4983 )
(overlookmotel)
- 3b35332 transformer/logical-assignment-operators: Fix semantic errors
(#5047 ) (Dunqing)- b7db235 Comments gen regression (#5003 )
(IWANABETHATGUY)
### Documentation
- 178d1bd transformer: Add documentation for exponentiation-operator
plugin (#5084 ) (Dunqing)
- d50eb72 transformer: Add documentation for `optional-catch-binding`
plugin (#5064 ) (Dunqing)
- 4425b17 transformer: Add documentation for
`logical-assignment-operators` plugin (#5012 ) (Dunqing)
- 1bd5853 transformer: Updated README re: order of methods (#4993 )
(overlookmotel)
### Refactor
- a4247e9 allocator: Move `Box` and `Vec` into separate files (#5034 )
(overlookmotel)
- cca7440 ast: Replace `AstBuilder::move_statement_vec` with `move_vec`
(#4988 ) (overlookmotel)
- 4012260 ast: `AstBuilder::move_identifier_reference` do not allocate
empty string (#4977 ) (overlookmotel)
- 96422b6 ast: Make AstBuilder non-exhaustive (#4925 ) (DonIsaac)
- ca70cc7 linter, mangler, parser, semantic, transformer, traverse,
wasm: Rename various `flag` vars to `flags` (#5028 ) (overlookmotel)
- 0f64d10 minifier: Remove duplicated helper `move_out_expression`
(#5007 ) (IWANABETHATGUY)
- cd9cf5e oxc: Remove `remove_whitespace` (Boshen)
- b4407c4 oxc,mangler: `oxc` crate add mangler; mangler use options API
(Boshen)
- 9da6a21 semantic: Rename transform checker output for reference symbol
mismatches (#5091 ) (overlookmotel)
- fb46eaf semantic: Add remap functions to transform checker (#5082 )
(overlookmotel)
- a00bf18 semantic: Add `IdMapping` to transform checker (#5079 )
(overlookmotel)
- b14a302 semantic: Transform checker: change symbol name mismatch error
(#5075 ) (overlookmotel)
- b8c6ce5 semantic: Rename vars in transform checker (#5072 )
(overlookmotel)
- 7156fd2 semantic: Transform checker `Pair` structure (#5053 )
(overlookmotel)
- 0ba6f50 semantic: Simplify raising errors in transform checker (#5051 )
(overlookmotel)
- ee7ac8b semantic: Store all data in `PostTransformChecker` in
transform checker (#5050 ) (overlookmotel)
- 4e1f4ab semantic: Add `SemanticIds` to transformer checker (#5048 )
(overlookmotel)
- c1da574 semantic: Add comments to transformer checker (#5045 )
(overlookmotel)
- 8cded08 semantic: Rename error labels in transformer checker snapshots
(#5044 ) (overlookmotel)
- 602244f semantic: Rename vars in transformer checker (#5043 )
(overlookmotel)
- ae94b9a semantic: Remove unused function params in transformer checker
(#5042 ) (overlookmotel)
- 586e15c semantic: Reformat transform checker errors (#5039 )
(overlookmotel)
- d69e34e semantic: Fix indentation (#5037 ) (overlookmotel)
- 4336a32 semantic: Rename fields in snapshots from `flag` to `flags`
(#5032 ) (overlookmotel)
- 83dfb14 semantic: Rename vars from `flag` to `flags` (#5031 )
(overlookmotel)
- 3b7de18 semantic: Rename `SemanticBuilder::current_reference_flags`
field (#5027 ) (overlookmotel)
- 0bacdd8 semantic: Rename `Reference::flag` field to `flags` (#5026 )
(overlookmotel)
- 896b92f semantic: Correct typo in doc comment (#5009 ) (overlookmotel)
- d677b8e semantic: Do not reserve space in `resolved_references`
(#4962 ) (overlookmotel)
- a7ef30d semantic: `UnresolvedReferencesStack` contain only
`ReferenceId` (#4960 ) (overlookmotel)
- 59d15c7 semantic: `root_unresolved_references` contain only
`ReferenceId` (#4959 ) (overlookmotel)
- 7706523 span: Clarify `Atom` conversion methods lifetimes (#4978 )
(overlookmotel)
- 4fdf26d transform_conformance: Add driver (#4969 ) (Boshen)
- 8d15e65 transformer: Use `into_member_expression` (#5006 )
(overlookmotel)
- 4796ece transformer: TS annotations transform use `move_expression`
(#4982 ) (overlookmotel)
- a9fcf29 transformer/es2016: Move all entry points to implementation of
Traverse trait (#5085 ) (Dunqing)
- deda6ac transformer/es2019: Move all entry points to implementation of
Traverse trait (#5065 ) (Dunqing)
- 9df2f80 transformer/es2020: Move all entry points to implementation of
Traverse trait (#4973 ) (Dunqing)
- 3f9433c transformer/es2021: Move all entry points to implementation of
Traverse trait (#5013 ) (Dunqing)
- c60a50d transformer/exponentiation-operator: Use built-in
`ctx.clone_identifier_reference` (#5086 ) (Dunqing)
- bcc8da9 transformer/logical-assignment-operator: Use
`ctx.clone_identifier_reference` (#5014 ) (Dunqing)
- 38d4434 transformer/nullish-coalescing-operator: Move internal methods
to bottom of the file (#4996 ) (Dunqing)
### Testing
- 0df1a94 semantic: Add more symbol and reference checks to
`PostTransformChecker` (Boshen)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-23 15:37:36 +08:00
oxc-bot
5d0fb979cb
Release crates v0.24.3 ( #4950 )
...
## [0.24.3] - 2024-08-18
### Features
- d49fb16 oxc_codegen: Support generate range leading comments (#4898 )
(IWANABETHATGUY)
- 80d0d1f semantic: Check for invalid interface heritage clauses (#4928 )
(DonIsaac)
- 48821c0 semantic,syntax: Add SymbolFlags::ArrowFunction (#4946 )
(DonIsaac)
- f1fcdde transformer: Support react fast refresh (#4587 ) (Dunqing)
- 0d79122 transformer: Support logical-assignment-operators plugin
(#4890 ) (Dunqing)
- ab1d08c transformer: Support `optional-catch-binding` plugin (#4885 )
(Dunqing)
- 69da9fd transformer: Support nullish-coalescing-operator plugin
(#4884 ) (Dunqing)
- 3a66e58 transformer: Support exponentiation operator plugin (#4876 )
(Dunqing)
- f88cbcd transformer: Add `BoundIdentifier::new_uid_in_current_scope`
method (#4903 ) (overlookmotel)
- 1e6d0fe transformer: Add methods to `BoundIdentifier` (#4897 )
(overlookmotel)
- fd34640 traverse: Support `generate_uid_based_on_node` method in
`TraverseCtx` (#4940 ) (Dunqing)
- 72a37fc traverse: Support `clone_identifier_reference` method in
`TraverseCtx` (#4880 ) (Dunqing)
### Bug Fixes
- c0b26f4 ast: Do not include `scope_id` fields in JSON AST (#4858 )
(overlookmotel)
- bbf9ec0 codegen: Add missing `declare` to `PropertyDefinition` (#4937 )
(Boshen)
- f210cf7 codegen: Print `TSSatisfiesExpression` and
`TSInstantiationExpression` (#4936 ) (Boshen)
- 21f5762 codegen: Minify large numbers (#4889 ) (Boshen)
- e8de4bd codegen: Fix whitespace issue when minifying `x in new
Error()` (#4886 ) (Boshen)
- a226962 codegen: Print `TSNonNullExpression` (#4869 ) (Boshen)
- 3da33d3 codegen: Missing parenthesis for `PrivateInExpression` (#4865 )
(Boshen)
- 1808529 codegen: Dedupe pure annotation comments (#4862 )
(IWANABETHATGUY)
- d3bbc62 isolated-declarations: Declare modifier of PropertyDefinition
should not be retained (#4941 ) (Dunqing)
- 8e80f59 isolated_declarations: Class properties should still be lifted
from private constructors (#4934 ) (michaelm)
- b3ec9e5 isolated_declarations: Always emit module declarations that
perform augmentation (#4919 ) (michaelm)
- 0fb0b71 isolated_declarations: Always emit module declarations (#4911 )
(michaelm)
- 4a16916 isolated_declarations: Support expando functions (#4910 )
(michaelm)
- 508644a linter/tree-shaking: Correct the calculation of `>>`, `<<` and
`>>>` (#4932 ) (mysteryven)
- 46cb1c1 minifier: Handle `Object.definedPropert(exports` for
@babel/types/lib/index.js (#4933 ) (Boshen)
- 81fd637 minifier: Do not fold `0 && (module.exports = {})` for
`cjs-module-lexer` (#4878 ) (Boshen)
- 879a271 minifier: Do not join `require` calls for `cjs-module-lexer`
(#4875 ) (Boshen)
- 1bdde2c parser: Detect @flow in `/** @flow */ comment (#4861 ) (Boshen)
- 2476dce transformer: Remove an `ast.copy` from
`NullishCoalescingOperator` transform (#4913 ) (overlookmotel)
- 248a757 transformer/typescript: Typescript syntax within
`SimpleAssignmentTarget` with `MemberExpressions` is not stripped
(#4920 ) (Dunqing)
### Documentation
- 47c9552 ast, ast_macros, ast_tools: Better documentation for `Ast`
helper attributes. (#4856 ) (rzvxa)
- 0a01a47 semantic: Improve documentation (#4850 ) (DonIsaac)
- 9c700ed transformer: Add README including style guide (#4899 )
(overlookmotel)
### Refactor
- a6967b3 allocator: Correct code comment (#4904 ) (overlookmotel)
- 90d0b2b allocator, ast, span, ast_tools: Use `allocator` as var name
for `Allocator` (#4900 ) (overlookmotel)
- 1eb59d2 ast, isolated_declarations, transformer: Mark
`AstBuilder::copy` as an unsafe function (#4907 ) (overlookmotel)
- 8e8fcd0 ast_tools: Rename `oxc_ast_codegen` to `oxc_ast_tools`.
(#4846 ) (rzvxa)
- 786bf07 index: Shorten code and correct comment (#4905 )
(overlookmotel)
- ea1e64a semantic: Make SemanticBuilder opaque (#4851 ) (DonIsaac)
- 5fd1701 sourcemap: Lower the `msrv`. (#4873 ) (rzvxa)
- 48a1c32 syntax: Inline trivial bitflags methods (#4877 )
(overlookmotel)
- 452187a transformer: Rename `BoundIdentifier::new_uid_in_root_scope`
(#4902 ) (overlookmotel)
- 707a01f transformer: Re-order `BoundIdentifier` methods (#4896 )
(overlookmotel)
- 117dff2 transformer: Improve comments for `BoundIdentifier` helper
(#4895 ) (overlookmotel)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-18 14:16:25 +08:00
oxc-bot
977b74af2d
Release crates v0.24.2 ( #4841 )
...
## [0.24.2] - 2024-08-12
### Features
- 8e10e25 allocator: Introduce `Address` (#4810 ) (overlookmotel)
### Bug Fixes
- 62f759c transformer/typescript: Generated assignment for constructor
arguments with access modifiers should be injected to the top of the
constructor (#4808 ) (Dunqing)
### Performance
- 504ac0b minifier: `InjectGlobalVariables` only add to
`replaced_dot_defines` once for each (#4803 ) (overlookmotel)
- 35f2742 minifier: Avoid repeated `Atom` creation in
`InjectGlobalVariables` (#4802 ) (overlookmotel)
### Documentation
- 8827659 ast: More doc comments for JSX nodes (#4830 ) (DonIsaac)
- 559baa5 parser: Clean up doc regarding performance; remove conformance
(Boshen)
### Refactor
- 0ea697b ast, ast_codegen: `CloneIn` implementations now initialize
semantic related cells with `Default` value. (#4819 ) (rzvxa)
- ecfa124 ast_codegen: Add line break to generated code (#4829 )
(overlookmotel)
- 096ac7b linter: Clean up jsx-a11y/anchor-is-valid (#4831 ) (DonIsaac)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-12 16:02:07 +08:00
oxc-bot
857bc73302
Release crates v0.24.1 ( #4798 )
...
## [0.24.1] - 2024-08-10
### Features
- b3c3125 linter: Overhaul unicorn/no-useless-spread (#4791 ) (DonIsaac)
- c519295 minifier: Add `InjectGlobalVariables` plugin
(`@rollup/plugin-inject`) (#4759 ) (Boshen)
### Bug Fixes
- fff9da3 ast, ast_codegen: Use `generate_derive` instead of visitable
for generating span derives. (#4747 ) (rzvxa)
- f5eeebd ast_macros: Raise compile error on invalid `generate_derive`
input. (#4766 ) (rzvxa)
- 4d0b40a napi/transform: Fix wrong isolated declarations emit (Boshen)
### Refactor
- daa0b2e ast: `oxc_ast` crate re-export AST types from other crates
(#4773 ) (overlookmotel)
- d4a3be8 ast_codegen: Line breaks between types in layout assertions
(#4781 ) (overlookmotel)
- dbb5f4c ast_codegen: Remove unnecessary imports from generated files
(#4774 ) (overlookmotel)
- 7ea058d ast_codegen: Replace Windows-style line breaks with Unix-style
(#4769 ) (overlookmotel)
- 2dea0ca ast_codegen: Consistent import order (#4761 ) (overlookmotel)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-10 15:26:40 +08:00
oxc-bot
69dc6c9cb1
Release crates v0.24.0 ( #4749 )
...
## [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)
### Features
- 23b0040 allocator: Introduce `CloneIn` trait. (#4726 ) (rzvxa)
- 51c1ca0 ast: Derive `CloneIn` for AST types, using `generate_derive`.
(#4732 ) (rzvxa)
- e12bd1e ast: Allow conversion from TSAccessibility into &'static str
(#4711 ) (DonIsaac)
- fd2d9da ast: Improve `AstKind::debug_name` (#4553 ) (DonIsaac)
- b3b7028 ast: Implement missing Clone, Hash, and Display traits for
literals (#4552 ) (DonIsaac)
- 54047e0 ast: `GetSpanMut` trait (#4609 ) (overlookmotel)
- eae401c ast, ast_macros: Apply stable repr to all `#[ast]` enums
(#4373 ) (rzvxa)
- ec0b4cb ast_codegen: Add `derive_clone_in` generator. (#4731 ) (rzvxa)
- 2e91ad6 ast_codegen: Support for `generate_derive` marker. (#4728 )
(rzvxa)
- 82e2f6b ast_codegen: Process AST-related `syntax` types. (#4694 )
(rzvxa)
- 0c52c0d ast_codegen: Add alignment and size data to the schema.
(#4615 ) (rzvxa)
- 07607d3 ast_codegen, span: Process `Span` through ast_codegen (#4703 )
(overlookmotel)
- 125c5fd ast_codegen, span: Process `SourceType` through ast_codegen.
(#4696 ) (rzvxa)
- eaddc8f linter: Add fixer for eslint/func_names (#4714 ) (DonIsaac)
- 229a0e9 minifier: Implement dot define for member expressions (#3959 )
(camc314)
- 33f1312 semantic: Impl GetSpan for AstNode (#4717 ) (DonIsaac)
- e42ac3a sourcemap: Add `ConcatSourceMapBuilder::from_sourcemaps`
(#4639 ) (overlookmotel)
- 2e63618 span: Implement `CloneIn` for the AST-related items. (#4729 )
(rzvxa)
- 6a36616 syntax: Derive `CloneIn` for the AST-related items. (#4730 )
(rzvxa)
### Bug Fixes
- 4a56954 codegen: Print raw if value is number is Infinity (#4676 )
(Boshen)
- 94d3c31 minifier: Avoid removing function declaration from `KeepVar`
(#4722 ) (Boshen)
- bf43148 minifier: Do not `remove_syntax` in dead_code_elimination
(Boshen)
- bf48c7f minifier: Fix `keep_var` keeping vars from arrow functions
(#4680 ) (Boshen)
- 9be29af minifier: Temporarily fix shadowed `undefined` variable
(#4678 ) (Boshen)
- e8b662a minifier: Various fixes to pass minifier conformance (#4667 )
(Boshen)
- 01d85de napi/transform: Update napi files (Boshen)
- f290191 oxc_ast_macros: Fix `syn` lacking features to build (Boshen)
- a40a217 parser: Parse `assert` keyword in `TSImportAttributes` (#4610 )
(Boshen)
- 03c643a semantic: Incorrect `scope_id` for catch parameter symbols
(#4659 ) (Dunqing)
- 6c612d1 semantic/jsdoc: Handle whitespace absence (#4642 ) (leaysgur)
- 0d2c41a semantic/jsdoc: Panic on parsing `type_name_comment`. (#4632 )
(rzvxa)
- 9f8f299 syntax: Prevent creating invalid u32 IDs (#4675 )
(overlookmotel)
- 4797eaa transformer: Strip TS statements from for in/of statement
bodies (#4686 ) (overlookmotel)
- 5327acd transformer/react: The `require` IdentifierReference does not
have a `reference_id` (#4658 ) (Dunqing)
- 3987665 transformer/typescript: Incorrect enum-related
`symbol_id`/`reference_id` (#4660 ) (Dunqing)
- 4efd54b transformer/typescript: Incorrect `SymbolFlags` for jsx
imports (#4549 ) (Dunqing)
### Performance
- 8dd76e4 codegen: Reduce size of `LineOffsetTable` (#4643 )
(overlookmotel)
- b8e6753 codegen: `u32` indexes in `LineOffsetTable` for source maps
(#4641 ) (overlookmotel)
- 6ff200d linter: Change react rules and utils to use `Cow` and
`CompactStr` instead of `String` (#4603 ) (DonIsaac)
- 0f5e982 minifier: Only visit arrow expression after dropping
`console.log` (#4677 ) (Boshen)
- ff43dff sourcemap: Speed up VLQ encoding (#4633 ) (overlookmotel)
- a330773 sourcemap: Reduce string copying in `ConcatSourceMapBuilder`
(#4638 ) (overlookmotel)
- 372316b sourcemap: `ConcatSourceMapBuilder` extend `source_contents`
in separate loop (#4634 ) (overlookmotel)
- c7f1d48 sourcemap: Keep local copy of previous token in VLQ encode
(#4596 ) (overlookmotel)
- 590d795 sourcemap: Shorten main loop encoding VLQ (#4586 )
(overlookmotel)
### Documentation
- c69ada4 ast: Improve AST node documentation (#4051 ) (Rintaro Itokawa)
### Refactor
- 579b797 ast: Use type identifier instead of `CloneIn::Cloned` GAT.
(#4738 ) (rzvxa)
- 475266d ast: Use correct lifetimes for name-related methods (#4712 )
(DonIsaac)
- 83b6ca9 ast: Add explicit enum discriminants. (#4689 ) (rzvxa)
- ba70001 ast: Put `assert_layouts.rs` behind `debug_assertions` (#4621 )
(rzvxa)
- 3f53b6f ast: Make AST structs `repr(C)`. (#4614 ) (rzvxa)
- 452e0ee ast: Remove defunct `visit_as` + `visit_args` attrs from
`#[ast]` macro (#4599 ) (overlookmotel)
- 2218340 ast, ast_codegen: Use `generate_derive` for implementing
`GetSpan` and `GetSpanMut` traits. (#4735 ) (rzvxa)
- fbfd852 minifier: Add `NodeUtil` trait for accessing symbols on ast
nodes (#4734 ) (Boshen)
- e0832f8 minifier: Use `oxc_traverse` for AST passes (#4725 ) (Boshen)
- 17602db minifier: Move tests and files around (Boshen)
- 3289477 minifier: Clean up tests (#4724 ) (Boshen)
- e78cba6 minifier: Ast passes infrastructure (#4625 ) (Boshen)
- d25dea7 parser: Use `ast_builder` in more places. (#4612 ) (rzvxa)
- 09d9822 semantic: Simplify setting scope flags (#4674 ) (overlookmotel)
- 6e453db semantic: Simplify inherit scope flags from parent scope
(#4664 ) (Dunqing)
- e1429e5 span: Reduce #[cfg_attr] boilerplate in type defs (#4702 )
(overlookmotel)
- e24fb5b syntax: Add explicit enum discriminants to AST related types.
(#4691 ) (rzvxa)
- 3f3cb62 syntax, span: Reduce #[cfg_attr] boilerplate in type defs
(#4698 ) (overlookmotel)
- 54f9897 traverse: Simpler code for entering/exiting unconditional
scopes (#4685 ) (overlookmotel)
- 83546d3 traverse: Enter node before entering scope (#4684 )
(overlookmotel)- 9b51e04 Overhaul napi transformer package (#4592 )
(DonIsaac)
### Testing
- 49d5196 ast: Fix `assert_layouts.rs` offset tests on 32bit platforms.
(#4620 ) (rzvxa)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-08 14:00:57 +08:00
oxc-bot
61337613da
Release crates v0.23.1 ( #4681 )
...
## [0.23.1] - 2024-08-06
### Features
- fd2d9da ast: Improve `AstKind::debug_name` (#4553 ) (DonIsaac)
- b3b7028 ast: Implement missing Clone, Hash, and Display traits for
literals (#4552 ) (DonIsaac)
- 54047e0 ast: `GetSpanMut` trait (#4609 ) (overlookmotel)
- eae401c ast, ast_macros: Apply stable repr to all `#[ast]` enums
(#4373 ) (rzvxa)
- 0c52c0d ast_codegen: Add alignment and size data to the schema.
(#4615 ) (rzvxa)
- 229a0e9 minifier: Implement dot define for member expressions (#3959 )
(camc314)
- e42ac3a sourcemap: Add `ConcatSourceMapBuilder::from_sourcemaps`
(#4639 ) (overlookmotel)
### Bug Fixes
- 4a56954 codegen: Print raw if value is number is Infinity (#4676 )
(Boshen)
- bf48c7f minifier: Fix `keep_var` keeping vars from arrow functions
(#4680 ) (Boshen)
- 9be29af minifier: Temporarily fix shadowed `undefined` variable
(#4678 ) (Boshen)
- e8b662a minifier: Various fixes to pass minifier conformance (#4667 )
(Boshen)
- a40a217 parser: Parse `assert` keyword in `TSImportAttributes` (#4610 )
(Boshen)
- 03c643a semantic: Incorrect `scope_id` for catch parameter symbols
(#4659 ) (Dunqing)
- 6c612d1 semantic/jsdoc: Handle whitespace absence (#4642 ) (leaysgur)
- 0d2c41a semantic/jsdoc: Panic on parsing `type_name_comment`. (#4632 )
(rzvxa)
- 9f8f299 syntax: Prevent creating invalid u32 IDs (#4675 )
(overlookmotel)
- 5327acd transformer/react: The `require` IdentifierReference does not
have a `reference_id` (#4658 ) (Dunqing)
- 3987665 transformer/typescript: Incorrect enum-related
`symbol_id`/`reference_id` (#4660 ) (Dunqing)
- 4efd54b transformer/typescript: Incorrect `SymbolFlags` for jsx
imports (#4549 ) (Dunqing)
### Performance
- 8dd76e4 codegen: Reduce size of `LineOffsetTable` (#4643 )
(overlookmotel)
- b8e6753 codegen: `u32` indexes in `LineOffsetTable` for source maps
(#4641 ) (overlookmotel)
- 6ff200d linter: Change react rules and utils to use `Cow` and
`CompactStr` instead of `String` (#4603 ) (DonIsaac)
- 0f5e982 minifier: Only visit arrow expression after dropping
`console.log` (#4677 ) (Boshen)
- ff43dff sourcemap: Speed up VLQ encoding (#4633 ) (overlookmotel)
- a330773 sourcemap: Reduce string copying in `ConcatSourceMapBuilder`
(#4638 ) (overlookmotel)
- 372316b sourcemap: `ConcatSourceMapBuilder` extend `source_contents`
in separate loop (#4634 ) (overlookmotel)
- c7f1d48 sourcemap: Keep local copy of previous token in VLQ encode
(#4596 ) (overlookmotel)
- 590d795 sourcemap: Shorten main loop encoding VLQ (#4586 )
(overlookmotel)
### Documentation
- c69ada4 ast: Improve AST node documentation (#4051 ) (Rintaro Itokawa)
### Refactor
- ba70001 ast: Put `assert_layouts.rs` behind `debug_assertions` (#4621 )
(rzvxa)
- 3f53b6f ast: Make AST structs `repr(C)`. (#4614 ) (rzvxa)
- 452e0ee ast: Remove defunct `visit_as` + `visit_args` attrs from
`#[ast]` macro (#4599 ) (overlookmotel)
- e78cba6 minifier: Ast passes infrastructure (#4625 ) (Boshen)
- d25dea7 parser: Use `ast_builder` in more places. (#4612 ) (rzvxa)
- 09d9822 semantic: Simplify setting scope flags (#4674 ) (overlookmotel)
- 6e453db semantic: Simplify inherit scope flags from parent scope
(#4664 ) (Dunqing)- 9b51e04 Overhaul napi transformer package (#4592 )
(DonIsaac)
### Testing
- 49d5196 ast: Fix `assert_layouts.rs` offset tests on 32bit platforms.
(#4620 ) (rzvxa)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-06 16:37:29 +08:00
oxc-bot
e02bac357a
Release crates v0.23.0 ( #4595 )
...
## [0.23.0] - 2024-08-01
- 27fd062 sourcemap: [**BREAKING**] Avoid passing `Result`s (#4541 )
(overlookmotel)
### Features
- a558492 codegen: Implement `BinaryExpressionVisitor` (#4548 ) (Boshen)
- 7446e98 codegen: Align more esbuild implementations (#4510 ) (Boshen)
- 35654e6 codegen: Align operator precedence with esbuild (#4509 )
(Boshen)
- b952942 linter: Add eslint/no-unused-vars (⭐ attempt 3.2) (#4445 )
(DonIsaac)
- 85e8418 linter: Add react/jsx-curly-brace-presence (#3949 ) (Don Isaac)
- cf1854b semantic: Remove `ReferenceFlags::Value` from non-type-only
exports that referenced type binding (#4511 ) (Dunqing)
### Bug Fixes
- b58ed80 codegen: Enable more test cases (#4585 ) (Boshen)
- 6a94e3f codegen: Fixes for esbuild test cases (#4503 ) (Boshen)
- d5c4b19 parser: Fix enum member parsing (#4543 ) (DonIsaac)
### Performance
- 4c6d19d allocator: Use capacity hint (#4584 ) (Luca Bruno)
- 7585e16 linter: Remove allocations for string comparisons (#4570 )
(DonIsaac)
- 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)
- d00014e sourcemap: Elide bounds checks in VLQ encoding (#4583 )
(overlookmotel)
- 1fd9dd0 sourcemap: Use simd to escape JSON string (#4487 )
(Brooooooklyn)
### Documentation
- 0914e47 ast: Add doc comments to literal nodes (#4551 ) (DonIsaac)
- c6a11be ast: Auto-generate doc comments for AstBuilder methods (#4471 )
(DonIsaac)
### 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)
- 16c7b98 semantic: Move CatchClause scope binding logic to
visit_block_statement (#4505 ) (Dunqing)
- d6974d4 semantic: `AstNodeParentIter` fetch nodes lazily (#4533 )
(overlookmotel)
- d914b14 semantic: Reusing the same reference (#4529 ) (Dunqing)
- 7b5e1f5 semantic: Use `is_empty()` instead of `len() == 0` (#4532 )
(overlookmotel)
- 9db4259 semantic: Inline trivial methods (#4531 ) (overlookmotel)
- 7c42ffc sourcemap: Align Base64 chars lookup table to cache line
(#4535 ) (overlookmotel)
- 96602bf transformer/typescript: Determine whether to remove
`ExportSpeicifer` by `ReferenceFlags` (#4513 ) (Dunqing)
- e6a8af6 traverse: Speed up tests (#4538 ) (overlookmotel)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-01 16:55:41 +08:00
oxc-bot
80118cbf3b
Release crates v0.22.1 ( #4508 )
...
## [0.22.1] - 2024-07-27
### Features
- 2477330 ast: Add `AstKind::TSExportAssignment` (#4501 ) (Dunqing)
- aaee07e ast: Add `AstKind::AssignmentTargetPattern`,
`AstKind::ArrayAssignmentTarget` and `AstKind::ObjectAssignmentTarget`
(#4456 ) (Dunqing)
- fd363d1 ast: Add AstKind::get_container_scope_id (#4450 ) (DonIsaac)
- e2735ca span: Add `contains_inclusive` method (#4491 ) (DonIsaac)
### Bug Fixes
- 368112c ast: Remove `#[visit(ignore)]` from
`ExportDefaultDeclarationKind`'s `TSInterfaceDeclaration` (#4497 )
(Dunqing)
- 36bb680 semantic: `TSExportAssignment` cannot reference type binding
(#4502 ) (Dunqing)
- cb2fa49 semantic: `typeof` operator cannot reference type-only import
(#4500 ) (Dunqing)
- ef0e953 semantic: Generic passed to typeof not counted as a reference
(#4499 ) (Dunqing)
- 40cafb8 semantic: Params in `export default (function() {})` flagged
as `SymbolFlags::Export` (#4480 ) (Dunqing)
- 2e01a45 semantic: Non-exported namespace member symbols flagged as
exported (#4493 ) (Don Isaac)
- e4ca06a semantic: Incorrect symbol’s scope_id after var hoisting
(#4458 ) (Dunqing)
- 77bd5f1 semantic: Use correct span for namespace symbols (#4448 ) (Don
Isaac)
- 5db7bed sourcemap: Fix pre-calculation of required segments for
building JSON (#4490 ) (overlookmotel)
- 1667491 syntax: Correct `is_reserved_keyword_or_global_object`'s
incorrect function calling. (#4484 ) (Ethan Goh)
- 82ba2a0 syntax: Fix unsound use of `NonZeroU32` (#4466 )
(overlookmotel)
- c04b9aa transformer: Add to `SymbolTable::declarations` for all
symbols (#4460 ) (overlookmotel)
- ecdee88 transformer/typescript: Incorrect eliminate exports when the
referenced symbol is both value and type (#4507 ) (Dunqing)
### Performance
- 963a2d1 mangler: Reduce unnecessary allocation (#4498 ) (Dunqing)
- 868fc87 parser: Optimize conditional advance on ASCII values (#4298 )
(lucab)
- 24beaeb semantic: Give `AstNodeId` a niche (#4469 ) (overlookmotel)
- 348c1ad semantic: Remove `span` field from `Reference` (#4464 )
(overlookmotel)
- 6a9f4db semantic: Reduce storage size for symbol redeclarations
(#4463 ) (overlookmotel)
- 705e19f sourcemap: Reduce memory copies encoding JSON (#4489 )
(overlookmotel)
- 4d10c6c sourcemap: Pre allocate String buf while encoding (#4476 )
(Brooooooklyn)
### Documentation
- f5f0ba8 ast: Add doc comments to more AST nodes (#4413 ) (Don Isaac)
- 871b3d6 semantic: Add doc comments for SymbolTester and SemanticTester
(#4433 ) (DonIsaac)
### Refactor
- 9c5d2f9 ast/builder: Use `Box::new_in` over `.into_in` (#4428 )
(overlookmotel)
- ccb1835 semantic: Methods take `Span` as param, not `&Span` (#4470 )
(overlookmotel)
- f17254a semantic: Populate `declarations` field in
`SymbolTable::create_symbol` (#4461 ) (overlookmotel)
- a49f491 semantic: Re-order `SymbolTable` fields (#4459 )
(overlookmotel)
- 7cd53f3 semantic: Var hoisting (#4379 ) (Dunqing)
- 4f5a7cb semantic: Mark SemanticTester and SymbolTester as must_use
(#4430 ) (DonIsaac)
- c958a55 sourcemap: `push_list` method for building JSON (#4486 )
(overlookmotel)
- c99b3eb syntax: Give `ScopeId` a niche (#4468 ) (overlookmotel)
- 96fc94f syntax: Use `NonMaxU32` for IDs (#4467 ) (overlookmotel)
### Testing
- 4b274a8 semantic: Add more test cases for symbol references (#4429 )
(DonIsaac)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-07-28 09:58:29 +08:00
oxc-bot
aa56eb4d1d
Release crates v0.22.0 ( #4434 )
...
## [0.22.0] - 2024-07-23
- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329 )
(Dunqing)
- f68b659 ast: [**BREAKING**] Reorder fields of
`ArrowFunctionExpression` (#4364 ) (Dunqing)
### Features
- d345b84 ast: Add `#[ast]` attribute to non-visited AST types. (#4309 )
(rzvxa)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357 )
(Jaden Rodriguez)
- 68efcd4 linter/react-perf: Handle new objects and arrays in prop
assignment patterns (#4396 ) (DonIsaac)
- 0deb027 minfier: Dce `if (xxx) else if (false) { REMOVE }` (#4407 )
(Boshen)
- e33ec18 minifier: Compress `typeof foo == "undefined"` into `typeof
foo > "u"` (#4412 ) (Boshen)- 6068e6b Add error codes to OxcDiagnostic
(#4334 ) (DonIsaac)
### Bug Fixes
- aece1df ast: Visit `Program`s `hashbang` field first (#4368 )
(overlookmotel)
- 44a10c4 codegen: Object shorthand with parens `({x: (x)})` -> `({ x
})` (#4391 ) (Boshen)
- 3d88f20 codegen: Print shorthand for all `{ x }` variants (#4374 )
(Boshen)
- e624dff codegen,mangler: Do not print shorthand for `ObjectProperty`
(#4350 ) (Boshen)
- ac08de8 linter/react_perf: Allow new objects, array, fns, etc in top
scope (#4395 ) (DonIsaac)
- 267f7c4 minifier: Skip `Object.defineProperty(exports, ...)` for
`cjs-module-lexer` (#4409 ) (Boshen)
- bc8d4e5 semantic: Correct comment (#4410 ) (overlookmotel)
- 6ffce86 semantic: Align `visit_arrow_function_expression` field visit
order with ast (#4366 ) (Dunqing)
- 4cd5df0 sourcemap: Avoid negative line if token_chunks has same
prev_dst_line (#4348 ) (underfin)
- f8565ae transformer/typescript: Unexpectedly removed class binding
from ExportNamedDeclaration (#4351 ) (Dunqing)- ea33f94 Impl
PartialEq<str> for CompactStr (#4352 ) (DonIsaac)
### Performance
- 1b51511 semantic: Use `Atom` instead of `CompactStr` for
`UnresolvedReferencesStack` (#4401 ) (Dunqing)
- 40f9356 semantic: Calculate number of nodes, scopes, symbols,
references before visiting AST (#4367 ) (Dunqing)
- da13d93 semantic: Remove bounds checks on unresolved references stack
(#4390 ) (overlookmotel)
- e70c67b semantic: Remove a branch from `add_scope` (#4384 )
(overlookmotel)
- 402006f semantic: Simplify logic in `enter_scope` + `leave_scope`
(#4383 ) (overlookmotel)
- 7469e01 semantic: Remove branch from `Nodes::add_node` (#4361 )
(overlookmotel)
- 7eb2864 traverse: Speed up finding UID binding name (#4356 )
(overlookmotel)- a207923 Replace some CompactStr usages with Cows
(#4377 ) (DonIsaac)
### Refactor
- 504daed allocator: Rename fn params for `Box::new_in` (#4431 )
(overlookmotel)
- d213773 ast: Replace serde rename "lowercase" with "camelCase" (#4376 )
(overlookmotel)
- abfccbd ast: Reduce `#[cfg_attr]` boilerplate in AST type defs (#4375 )
(overlookmotel)
- 5f1c7ec ast: Rename the `visited_node` marker to `ast`. (#4289 )
(rzvxa)
- 58f6ec2 ast: Enter node before scope (#4347 ) (Dunqing)
- 59aea73 ast: Scope is created only if CatchClause has param (#4346 )
(Dunqing)
- 7a3e925 ast_codegen: Better visit marker parsing. (#4371 ) (rzvxa)
- 0e1ea90 isolated-declarations: Remove useless code from scope (#4420 )
(Dunqing)
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349 ) (DonIsaac)
- a2eabe1 parser: Use error codes for ts diagnostics (#4335 ) (DonIsaac)
- 5d77b36 semantic: `visit_program` visit `hashbang` field (#4370 )
(overlookmotel)
- f7b9ada semantic: `Program` visitor leave scope before node (#4369 )
(overlookmotel)
- 729b288 semantic: Shorten code (#4358 ) (overlookmotel)
- 21d0eee semantic: Use error codes for ts diagnostics (#4336 )
(DonIsaac)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-07-24 08:23:27 +08:00
Dunqing
426016d1d6
Revert "Release crates v0.22.0" ( #4418 )
...
Still release failed. Reverts oxc-project/oxc#4417
2024-07-23 15:51:01 +08:00
github-actions[bot]
f76113cd8f
Release crates v0.22.0 ( #4417 )
...
## [0.22.0] - 2024-07-23
- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329 )
(Dunqing)
- f68b659 ast: [**BREAKING**] Reorder fields of
`ArrowFunctionExpression` (#4364 ) (Dunqing)
### Features
- d345b84 ast: Add `#[ast]` attribute to non-visited AST types. (#4309 )
(rzvxa)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357 )
(Jaden Rodriguez)
- 68efcd4 linter/react-perf: Handle new objects and arrays in prop
assignment patterns (#4396 ) (DonIsaac)
- 0deb027 minfier: Dce `if (xxx) else if (false) { REMOVE }` (#4407 )
(Boshen)
- e33ec18 minifier: Compress `typeof foo == "undefined"` into `typeof
foo > "u"` (#4412 ) (Boshen)- 6068e6b Add error codes to OxcDiagnostic
(#4334 ) (DonIsaac)
### Bug Fixes
- aece1df ast: Visit `Program`s `hashbang` field first (#4368 )
(overlookmotel)
- 44a10c4 codegen: Object shorthand with parens `({x: (x)})` -> `({ x
})` (#4391 ) (Boshen)
- 3d88f20 codegen: Print shorthand for all `{ x }` variants (#4374 )
(Boshen)
- e624dff codegen,mangler: Do not print shorthand for `ObjectProperty`
(#4350 ) (Boshen)
- ac08de8 linter/react_perf: Allow new objects, array, fns, etc in top
scope (#4395 ) (DonIsaac)
- 267f7c4 minifier: Skip `Object.defineProperty(exports, ...)` for
`cjs-module-lexer` (#4409 ) (Boshen)
- bc8d4e5 semantic: Correct comment (#4410 ) (overlookmotel)
- 6ffce86 semantic: Align `visit_arrow_function_expression` field visit
order with ast (#4366 ) (Dunqing)
- 4cd5df0 sourcemap: Avoid negative line if token_chunks has same
prev_dst_line (#4348 ) (underfin)
- f8565ae transformer/typescript: Unexpectedly removed class binding
from ExportNamedDeclaration (#4351 ) (Dunqing)- ea33f94 Impl
PartialEq<str> for CompactStr (#4352 ) (DonIsaac)
### Performance
- 1b51511 semantic: Use `Atom` instead of `CompactStr` for
`UnresolvedReferencesStack` (#4401 ) (Dunqing)
- 40f9356 semantic: Calculate number of nodes, scopes, symbols,
references before visiting AST (#4367 ) (Dunqing)
- da13d93 semantic: Remove bounds checks on unresolved references stack
(#4390 ) (overlookmotel)
- e70c67b semantic: Remove a branch from `add_scope` (#4384 )
(overlookmotel)
- 402006f semantic: Simplify logic in `enter_scope` + `leave_scope`
(#4383 ) (overlookmotel)
- 7469e01 semantic: Remove branch from `Nodes::add_node` (#4361 )
(overlookmotel)
- 7eb2864 traverse: Speed up finding UID binding name (#4356 )
(overlookmotel)- a207923 Replace some CompactStr usages with Cows
(#4377 ) (DonIsaac)
### Refactor
- d213773 ast: Replace serde rename "lowercase" with "camelCase" (#4376 )
(overlookmotel)
- abfccbd ast: Reduce `#[cfg_attr]` boilerplate in AST type defs (#4375 )
(overlookmotel)
- 5f1c7ec ast: Rename the `visited_node` marker to `ast`. (#4289 )
(rzvxa)
- 58f6ec2 ast: Enter node before scope (#4347 ) (Dunqing)
- 59aea73 ast: Scope is created only if CatchClause has param (#4346 )
(Dunqing)
- 7a3e925 ast_codegen: Better visit marker parsing. (#4371 ) (rzvxa)
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349 ) (DonIsaac)
- a2eabe1 parser: Use error codes for ts diagnostics (#4335 ) (DonIsaac)
- 5d77b36 semantic: `visit_program` visit `hashbang` field (#4370 )
(overlookmotel)
- f7b9ada semantic: `Program` visitor leave scope before node (#4369 )
(overlookmotel)
- 729b288 semantic: Shorten code (#4358 ) (overlookmotel)
- 21d0eee semantic: Use error codes for ts diagnostics (#4336 )
(DonIsaac)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-23 13:24:08 +08:00
Dunqing
c1cf0e6dd9
Revert "Release crates v0.22.0" ( #4415 )
...
Reverts oxc-project/oxc#4414
2024-07-23 09:59:38 +08:00
github-actions[bot]
00c7b7dad4
Release crates v0.22.0 ( #4414 )
...
## [0.22.0] - 2024-07-22
- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329 )
(Dunqing)
- f68b659 ast: [**BREAKING**] Reorder fields of
`ArrowFunctionExpression` (#4364 ) (Dunqing)
### Features
- d345b84 ast: Add `#[ast]` attribute to non-visited AST types. (#4309 )
(rzvxa)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357 )
(Jaden Rodriguez)
- 0deb027 minfier: Dce `if (xxx) else if (false) { REMOVE }` (#4407 )
(Boshen)
- e33ec18 minifier: Compress `typeof foo == "undefined"` into `typeof
foo > "u"` (#4412 ) (Boshen)- 6068e6b Add error codes to OxcDiagnostic
(#4334 ) (DonIsaac)
### Bug Fixes
- aece1df ast: Visit `Program`s `hashbang` field first (#4368 )
(overlookmotel)
- 44a10c4 codegen: Object shorthand with parens `({x: (x)})` -> `({ x
})` (#4391 ) (Boshen)
- 3d88f20 codegen: Print shorthand for all `{ x }` variants (#4374 )
(Boshen)
- e624dff codegen,mangler: Do not print shorthand for `ObjectProperty`
(#4350 ) (Boshen)
- 267f7c4 minifier: Skip `Object.defineProperty(exports, ...)` for
`cjs-module-lexer` (#4409 ) (Boshen)
- bc8d4e5 semantic: Correct comment (#4410 ) (overlookmotel)
- 6ffce86 semantic: Align `visit_arrow_function_expression` field visit
order with ast (#4366 ) (Dunqing)
- 4cd5df0 sourcemap: Avoid negative line if token_chunks has same
prev_dst_line (#4348 ) (underfin)
- f8565ae transformer/typescript: Unexpectedly removed class binding
from ExportNamedDeclaration (#4351 ) (Dunqing)- ea33f94 Impl
PartialEq<str> for CompactStr (#4352 ) (DonIsaac)
### Performance
- 1b51511 semantic: Use `Atom` instead of `CompactStr` for
`UnresolvedReferencesStack` (#4401 ) (Dunqing)
- 40f9356 semantic: Calculate number of nodes, scopes, symbols,
references before visiting AST (#4367 ) (Dunqing)
- da13d93 semantic: Remove bounds checks on unresolved references stack
(#4390 ) (overlookmotel)
- e70c67b semantic: Remove a branch from `add_scope` (#4384 )
(overlookmotel)
- 402006f semantic: Simplify logic in `enter_scope` + `leave_scope`
(#4383 ) (overlookmotel)
- 7469e01 semantic: Remove branch from `Nodes::add_node` (#4361 )
(overlookmotel)
- 7eb2864 traverse: Speed up finding UID binding name (#4356 )
(overlookmotel)- a207923 Replace some CompactStr usages with Cows
(#4377 ) (DonIsaac)
### Refactor
- d213773 ast: Replace serde rename "lowercase" with "camelCase" (#4376 )
(overlookmotel)
- abfccbd ast: Reduce `#[cfg_attr]` boilerplate in AST type defs (#4375 )
(overlookmotel)
- 5f1c7ec ast: Rename the `visited_node` marker to `ast`. (#4289 )
(rzvxa)
- 58f6ec2 ast: Enter node before scope (#4347 ) (Dunqing)
- 59aea73 ast: Scope is created only if CatchClause has param (#4346 )
(Dunqing)
- 7a3e925 ast_codegen: Better visit marker parsing. (#4371 ) (rzvxa)
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349 ) (DonIsaac)
- a2eabe1 parser: Use error codes for ts diagnostics (#4335 ) (DonIsaac)
- 5d77b36 semantic: `visit_program` visit `hashbang` field (#4370 )
(overlookmotel)
- f7b9ada semantic: `Program` visitor leave scope before node (#4369 )
(overlookmotel)
- 729b288 semantic: Shorten code (#4358 ) (overlookmotel)
- 21d0eee semantic: Use error codes for ts diagnostics (#4336 )
(DonIsaac)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-23 09:38:03 +08:00
github-actions[bot]
7d751898b3
Release crates v0.21.0 ( #4344 )
...
## [0.21.0] - 2024-07-18
- d7ab0b8 semantic: [**BREAKING**] Simplify node creation (#4226 )
(lucab)
### Features
- af4dc01 ast: Align ts ast scope with typescript (#4253 ) (Dunqing)
- 83c2c62 codegen: Add option for choosing quotes; remove slow
`choose_quot` method (#4219 ) (Boshen)
- 5d17675 mangler: Add debug mode (#4314 ) (Boshen)
- e3e663b mangler: Initialize crate and integrate into minifier (#4197 )
(Boshen)
- c818472 minifier: Dce conditional expression `&&` or `||` (#4190 )
(Boshen)
- 8a190eb oxc: Export `oxc_mangler` (Boshen)
- 20cdb1f semantic: Align class scope with typescript (#4195 ) (Dunqing)
- 92ee774 semantic: Add `ScopeFlags::CatchClause` for use in CatchClause
(#4205 ) (Dunqing)
- 205c259 sourcemap: Support SourceMapBuilder#token_chunks (#4220 )
(underfin)
- 7eb960d transformer: Decode xml character entity `&#xhhhh` and
`&#nnnn;` (#4235 ) (Boshen)
### Bug Fixes
- bf3d8d3 codegen: Print annotation comment inside parens for new and
call expressions (#4290 ) (Boshen)
- 084ab76 codegen: Use `ryu-js` for f64 to string (Boshen)
- e167ef7 codegen: Print parenthesis properly (#4245 ) (Boshen)
- c65198f codegen: Choose the right quote for jsx attribute string
(#4236 ) (Boshen)
- be82c28 codegen: Print `JSXAttributeValue::StringLiteral` directly
(#4231 ) (Boshen)
- 3df9e69 mangler: No shorthand `BindingProperty`; handle var hoisting
and export variables (#4319 ) (Boshen)
- f144082 minifier: RemoveDeadCode should visit nested expression
(#4268 ) (underfin)
- 66b455a oxc_codegen: Avoid print same pure comments multiple time
(#4230 ) (IWANABETHATGUY)
- 9a87e41 parser: Avoid crashing on invalid const modifier (#4267 )
(lucab)
- 641a78b parser: Fix tests for number parsing (#4254 ) (overlookmotel)
- 9badac0 semantic: Avoid var hosting insert the var variable to the
`CatchClause` scope (#4337 ) (Dunqing)
- 95e15b6 semantic: Incorrect resolve references for `ExportSpecifier`
(#4320 ) (Dunqing)
- c362bf7 semantic: Incorrect resolve references for
`TSInterfaceHeritage` (#4311 ) (Dunqing)
- 351ecf2 semantic: Incorrect resolve references for `TSTypeQuery`
(#4310 ) (Dunqing)
- 1108f2a semantic: Resolve references to the incorrect symbol (#4280 )
(Dunqing)
- 22d56bd semantic: Do not resolve references after `FormalParameters`
in TS type (#4241 ) (overlookmotel)- 1c117eb Avoid print extra semicolon
after accessor property (#4199 ) (IWANABETHATGUY)
### 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)
- f9d3f2e semantic: Inline ast record functions (#4272 ) (overlookmotel)
- 8fad7db semantic: Reduce `AstNodeId` to `u32` (#4264 ) (overlookmotel)
- 23743db semantic: Do not record ast nodes for cfg if cfg disabled
(#4263 ) (overlookmotel)
- da69076 semantic: Reduce overhead of cfg recording ast nodes (#4262 )
(overlookmotel)
- cb15303 semantic: Reduce memory copies (#4216 ) (overlookmotel)
- ef4c1f4 semantic: Reduce lookups (#4214 ) (overlookmotel)
- f23e54f semantic: Recycle unresolved references hash maps (#4213 )
(overlookmotel)
- 2602ce2 semantic: Reuse existing map of unresolved refs (#4206 )
(lucab)
### Refactor
- 2c7bb9f ast: Pass final `ScopeFlags` into `visit_function` (#4283 )
(overlookmotel)
- 3e099fe ast: Move `enter_scope` after `visit_binding_identifier`
(#4246 ) (Dunqing)
- aab7aaa ast/visit: Fire node events as the outermost one. (#4203 )
(rzvxa)
- d1c4be0 codegen: Clean up annotation_comment (Boshen)
- 06197b8 codegen: Separate tests (Boshen)
- aa22073 codegen: Improve print API (#4196 ) (Boshen)
- c5731a5 semantic: Remove defunct code setting ScopeFlags twice (#4286 )
(overlookmotel)
- 16698bc semantic: Move function/class-specific code into specific
visitors (#4278 ) (overlookmotel)
- ee16668 semantic: Rename function param (#4277 ) (overlookmotel)
- 25f0771 semantic: Alter syntax of `control_flow!` macro (#4275 )
(overlookmotel)
- 639fd48 semantic: Comment why extra CFG enabled check (#4274 )
(overlookmotel)
- 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)
- 8bfeabf semantic: Simplify adding `SymbolFlags::Export` (#4249 )
(Dunqing)
- dc2b3c4 semantic: Add strict mode in scope flags for class definitions
(#4156 ) (Dunqing)
- 81ed588 semantic: Convert scope fields to IndexVecs (#4208 ) (lucab)
- bbe5ded semantic: Set `current_scope_id` to `scope_id` in
`enter_scope` (#4193 ) (Dunqing)
- 7f1addd semantic: Correct scope in CatchClause (#4192 ) (Dunqing)
- fc0b17d syntax: Turn the `AstNodeId::dummy` into a constant field.
(#4308 ) (rzvxa)
- a197e01 transformer/typescript: Remove unnecessary code (#4321 )
(Dunqing)
- 1458d81 visit: Add `#[inline]` to empty functions (#4330 )
(overlookmotel)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-18 14:39:07 +08:00
Dunqing
fc39ffa009
Revert "Release crates v0.21.0" ( #4342 )
...
Reverts oxc-project/oxc#4338
https://github.com/oxc-project/oxc/actions/runs/9986290706/job/27598542089
Release failed
2024-07-18 14:11:42 +08:00
github-actions[bot]
0abcf499b7
Release crates v0.21.0 ( #4338 )
...
## [0.21.0] - 2024-07-18
- d7ab0b8 semantic: [**BREAKING**] Simplify node creation (#4226 )
(lucab)
### Features
- af4dc01 ast: Align ts ast scope with typescript (#4253 ) (Dunqing)
- 83c2c62 codegen: Add option for choosing quotes; remove slow
`choose_quot` method (#4219 ) (Boshen)
- 5d17675 mangler: Add debug mode (#4314 ) (Boshen)
- e3e663b mangler: Initialize crate and integrate into minifier (#4197 )
(Boshen)
- c818472 minifier: Dce conditional expression `&&` or `||` (#4190 )
(Boshen)
- 8a190eb oxc: Export `oxc_mangler` (Boshen)
- 20cdb1f semantic: Align class scope with typescript (#4195 ) (Dunqing)
- 92ee774 semantic: Add `ScopeFlags::CatchClause` for use in CatchClause
(#4205 ) (Dunqing)
- 205c259 sourcemap: Support SourceMapBuilder#token_chunks (#4220 )
(underfin)
- 7eb960d transformer: Decode xml character entity `&#xhhhh` and
`&#nnnn;` (#4235 ) (Boshen)
### Bug Fixes
- bf3d8d3 codegen: Print annotation comment inside parens for new and
call expressions (#4290 ) (Boshen)
- 084ab76 codegen: Use `ryu-js` for f64 to string (Boshen)
- e167ef7 codegen: Print parenthesis properly (#4245 ) (Boshen)
- c65198f codegen: Choose the right quote for jsx attribute string
(#4236 ) (Boshen)
- be82c28 codegen: Print `JSXAttributeValue::StringLiteral` directly
(#4231 ) (Boshen)
- 3df9e69 mangler: No shorthand `BindingProperty`; handle var hoisting
and export variables (#4319 ) (Boshen)
- f144082 minifier: RemoveDeadCode should visit nested expression
(#4268 ) (underfin)
- 66b455a oxc_codegen: Avoid print same pure comments multiple time
(#4230 ) (IWANABETHATGUY)
- 9a87e41 parser: Avoid crashing on invalid const modifier (#4267 )
(lucab)
- 641a78b parser: Fix tests for number parsing (#4254 ) (overlookmotel)
- 9badac0 semantic: Avoid var hosting insert the var variable to the
`CatchClause` scope (#4337 ) (Dunqing)
- 95e15b6 semantic: Incorrect resolve references for `ExportSpecifier`
(#4320 ) (Dunqing)
- c362bf7 semantic: Incorrect resolve references for
`TSInterfaceHeritage` (#4311 ) (Dunqing)
- 351ecf2 semantic: Incorrect resolve references for `TSTypeQuery`
(#4310 ) (Dunqing)
- 1108f2a semantic: Resolve references to the incorrect symbol (#4280 )
(Dunqing)
- 22d56bd semantic: Do not resolve references after `FormalParameters`
in TS type (#4241 ) (overlookmotel)- 1c117eb Avoid print extra semicolon
after accessor property (#4199 ) (IWANABETHATGUY)
### 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)
- f9d3f2e semantic: Inline ast record functions (#4272 ) (overlookmotel)
- 8fad7db semantic: Reduce `AstNodeId` to `u32` (#4264 ) (overlookmotel)
- 23743db semantic: Do not record ast nodes for cfg if cfg disabled
(#4263 ) (overlookmotel)
- da69076 semantic: Reduce overhead of cfg recording ast nodes (#4262 )
(overlookmotel)
- cb15303 semantic: Reduce memory copies (#4216 ) (overlookmotel)
- ef4c1f4 semantic: Reduce lookups (#4214 ) (overlookmotel)
- f23e54f semantic: Recycle unresolved references hash maps (#4213 )
(overlookmotel)
- 2602ce2 semantic: Reuse existing map of unresolved refs (#4206 )
(lucab)
### Refactor
- 2c7bb9f ast: Pass final `ScopeFlags` into `visit_function` (#4283 )
(overlookmotel)
- 3e099fe ast: Move `enter_scope` after `visit_binding_identifier`
(#4246 ) (Dunqing)
- aab7aaa ast/visit: Fire node events as the outermost one. (#4203 )
(rzvxa)
- d1c4be0 codegen: Clean up annotation_comment (Boshen)
- 06197b8 codegen: Separate tests (Boshen)
- aa22073 codegen: Improve print API (#4196 ) (Boshen)
- c5731a5 semantic: Remove defunct code setting ScopeFlags twice (#4286 )
(overlookmotel)
- 16698bc semantic: Move function/class-specific code into specific
visitors (#4278 ) (overlookmotel)
- ee16668 semantic: Rename function param (#4277 ) (overlookmotel)
- 25f0771 semantic: Alter syntax of `control_flow!` macro (#4275 )
(overlookmotel)
- 639fd48 semantic: Comment why extra CFG enabled check (#4274 )
(overlookmotel)
- 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)
- 8bfeabf semantic: Simplify adding `SymbolFlags::Export` (#4249 )
(Dunqing)
- dc2b3c4 semantic: Add strict mode in scope flags for class definitions
(#4156 ) (Dunqing)
- 81ed588 semantic: Convert scope fields to IndexVecs (#4208 ) (lucab)
- bbe5ded semantic: Set `current_scope_id` to `scope_id` in
`enter_scope` (#4193 ) (Dunqing)
- 7f1addd semantic: Correct scope in CatchClause (#4192 ) (Dunqing)
- fc0b17d syntax: Turn the `AstNodeId::dummy` into a constant field.
(#4308 ) (rzvxa)
- a197e01 transformer/typescript: Remove unnecessary code (#4321 )
(Dunqing)
- 1458d81 visit: Add `#[inline]` to empty functions (#4330 )
(overlookmotel)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-18 13:56:35 +08:00
github-actions[bot]
2a169d1969
Release crates v0.20.0 ( #4189 )
...
## [0.20.0] - 2024-07-11
- 5731e39 ast: [**BREAKING**] Store span details inside comment struct
(#4132 ) (Luca Bruno)
### Features
- 67fe75e ast, ast_codegen: Pass the `scope_id` to the `enter_scope`
event. (#4168 ) (rzvxa)
- 54cd04a minifier: Implement dce with var hoisting (#4160 ) (Boshen)
- 44a894a minifier: Implement return statement dce (#4155 ) (Boshen)
- 725571a napi/transformer: Add `jsx` option to force parsing with jsx
(#4133 ) (Boshen)
### Bug Fixes
- 48947a2 ast: Put `decorators` before everything else. (#4143 ) (rzvxa)
- 7a059ab cfg: Double resolution of labeled statements. (#4177 ) (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)
### Performance
- ddfa343 diagnostic: Use `Cow<'static, str>` over `String` (#4175 )
(DonIsaac)
- 2203143 semantic: Store unresolved refs in a stack (#4162 ) (lucab)
- fca9706 semantic: Faster search for leading comments (#4140 ) (Boshen)
### Documentation
- bdcc298 ast: Update the note regarding the `ast_codegen` markers.
(#4149 ) (rzvxa)
### Refactor
- 03ad1e3 semantic: Tweak comment argument type (#4157 ) (lucab)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-11 11:05:49 +08:00
github-actions[bot]
714bf1dd7f
Release crates v0.19.0 ( #4137 )
...
## [0.19.0] - 2024-07-09
- b936162 ast/ast_builder: [**BREAKING**] Shorter allocator utility
method names. (#4122 ) (rzvxa)
### Features
- 485c871 ast: Allow conversion from `Expression` into `Statement` with
`FromIn` trait. (#4124 ) (rzvxa)
### Refactor
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-09 20:32:06 +08:00
github-actions[bot]
e29cdbfe40
Release crates v0.18.0 ( #4136 )
...
## [0.18.0] - 2024-07-09
- d347aed ast: [**BREAKING**] Generate `ast_builder.rs`. (#3890 ) (rzvxa)
### Features
- c6c16a5 minifier: Dce all conditional expressions (#4135 ) (Boshen)
- 365d9ba oxc_codegen: Generate annotation comments before
`CallExpression` and `NewExpression` (#4119 ) (IWANABETHATGUY)
- 3a0f2aa parser: Check for illegal modifiers in modules and namespaces
(#4126 ) (DonIsaac)
- 2f53bdf semantic: Check for abstract ClassElements in non-abstract
classes (#4127 ) (DonIsaac)
- c4ee9f8 semantic: Check for abstract initializations and
implementations (#4125 ) (Don Isaac)
- 44c7fe3 span: Add various implementations of `FromIn` for `Atom`.
(#4090 ) (rzvxa)
### Bug Fixes
- cb1af04 isolated-declarations: Remove the `async` and `generator`
keywords from `MethodDefinition` (#4130 ) (Dunqing)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-09 19:56:10 +08:00
github-actions[bot]
c3f08ce8e0
Release crates v0.17.2 ( #4115 )
...
## [0.17.2] - 2024-07-08
### Features
- 115ac3b allocator: Introduce `FromIn` and `IntoIn` traits. (#4088 )
(rzvxa)
- 720983a napi/transform: Allow setting `sourceType` to `transform`
(#4113 ) (Boshen)
- e386b62 semantic: Check for invalid type import assignments (#4097 )
(DonIsaac)
### Bug Fixes
- 5472b7c codegen: 256 indentations level is not enough for codegen
(Boshen)
- 5c31236 isolated-declarations: Keep literal value for readonly
property (#4106 ) (Dunqing)
- e67c7d1 isolated-declarations: Do not infer type for private
parameters (#4105 ) (Dunqing)
- 3fcad5e isolated_declarations: Remove nested AssignmentPatterns from
inside parameters (#4077 ) (michaelm)
- f8d77e4 isolated_declarations: Infer type of template literal
expressions as string (#4068 ) (michaelm)
- 0f02608 semantic: Bind `TSImportEqualsDeclaration`s (#4100 ) (Don
Isaac)
- 4413e2d transformer: Missing initializer for readonly consructor
properties (#4103 ) (Don Isaac)
### Performance
- 7ed27b7 isolated-declarations: Use `FxHashSet` instead of `Vec` to
speed up the `contain` (#4074 ) (Dunqing)
- 9114c8e semantic: Keep a single map of unresolved references (#4107 )
(Luca Bruno)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-08 19:16:33 +08:00
renovate[bot]
57d821b93c
chore(deps): update npm packages ( #4092 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [pnpm](https://pnpm.io ) ([source](https://togithub.com/pnpm/pnpm )) |
[`9.4.0` -> `9.5.0`](https://renovatebot.com/diffs/npm/pnpm/9.4.0/9.5.0 )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
| [wasm-pack](https://togithub.com/rustwasm/wasm-pack ) | [`^0.12.1` ->
`^0.13.0`](https://renovatebot.com/diffs/npm/wasm-pack/0.12.1/0.13.0 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>pnpm/pnpm (pnpm)</summary>
###
[`v9.5.0`](https://togithub.com/pnpm/pnpm/compare/v9.5.0-beta.3...v9.5.0 )
[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.4.0...v9.5.0 )
</details>
<details>
<summary>rustwasm/wasm-pack (wasm-pack)</summary>
###
[`v0.13.0`](https://togithub.com/rustwasm/wasm-pack/blob/HEAD/CHANGELOG.md#-0130 )
[Compare
Source](https://togithub.com/rustwasm/wasm-pack/compare/v0.12.1...v0.13.0 )
- ### ✨ Features
- **Add option to skip optimization with wasm-opt - [sisou],
[pull/1321]**
This feature introduces the `--no-opt` option to wasm-pack, providing a
significant improvement in build efficiency for projects requiring
multiple wasm-pack executions.
[pull/1321]: https://togithub.com/rustwasm/wasm-pack/pull/1321
[sisou]: https://togithub.com/sisou
- **Add support geckodriver for linux-aarch64 - [EstebanBorai],
[pull/1371]**
Introduces support to download Geckodriver in Linux aarch64.
[pull/1371]: https://togithub.com/rustwasm/wasm-pack/pull/1371
[EstebanBorai]: https://togithub.com/EstebanBorai
- **Add wasm-opt linux aarch64 condition - [dkristia], [issue/1392],
[pull/1393]**
A linux aarch64 build for wasm-opt exists in the newest binaryen
versions.
[issue/1392]: https://togithub.com/rustwasm/wasm-pack/issues/1392
[pull/1393]: https://togithub.com/rustwasm/wasm-pack/pull/1393
[dkristia]: https://togithub.com/dkristia
- ### 🤕 Fixes
- **Fix passing relative paths to cargo - [dfaust], [issue/704],
[issue/1156], [issue/1252], [pull/1331]**
When building a crate located in a sub-directory, relative paths, passed
as extra options to cargo (like `--target-dir`), are now handled
correctly.
[issue/704]: https://togithub.com/rustwasm/wasm-pack/issues/704
[issue/1156]: https://togithub.com/rustwasm/wasm-pack/issues/1156
[issue/1252]: https://togithub.com/rustwasm/wasm-pack/issues/1252
[pull/1331]: https://togithub.com/rustwasm/wasm-pack/pull/1331
[dfaust]: https://togithub.com/dfaust
- **Rewrite wasm_target to use target-libdir - [daidoji], [issue/1342],
[pull/1343]**
Rewritten wasm_target to use target libdir from the rustc tool rather
than looking through sysroot. This is to accomodate non-rustup
installations.
[issue/1342]: https://togithub.com/rustwasm/wasm-pack/issues/1342
[pull/1343]: https://togithub.com/rustwasm/wasm-pack/pull/1343
[daidoji]: https://togithub.com/daidoji
- **Declare ES module in package.json - [gthb], [issue/1039],
[pull/1061]**
In bundler mode, generate package.json with "type": "module" and use the
"main" attribute instead of the "module" attribute.
This change makes the built ES module palatable to Node.js (when run
with --experimental-vm-modules --experimental-wasm-modules),
while it remains also palatable to webpack as illustrated in
[webpack/webpack#14313 ](https://togithub.com/webpack/webpack/issues/14313 )
(where the pkg subfolder is generated with wasm-pack built with this
change).
This resolves the headache of using a wasm-pack-built package in a
library that one needs to both run directly in Node and include in a
webpack build.
[issue/1039]: https://togithub.com/rustwasm/wasm-pack/issues/1039
[pull/1061]: https://togithub.com/rustwasm/wasm-pack/pull/1061
[gthb]: https://togithub.com/gthb
- **Use new chromdriver endpoint and fix CI - [Myriad-Dreamin],
[kade-robertson], [issue/1315], [issue/1390], [pull/1325], [pull/1391]**
[issue/1315]: https://togithub.com/rustwasm/wasm-pack/issues/1315
[issue/1390]: https://togithub.com/rustwasm/wasm-pack/issues/1390
[pull/1325]: https://togithub.com/rustwasm/wasm-pack/pull/1325
[pull/1391]: https://togithub.com/rustwasm/wasm-pack/pull/1391
[Myriad-Dreamin]: https://togithub.com/Myriad-Dreamin
[kade-robertson]: https://togithub.com/kade-robertson
- **Add mingw support to npm package - [nathaniel-daniel], [issue/1354],
[issue/1359], [pull/1363]**
Fixes the NPM package's platform detection for mingw.
[issue/1354]: https://togithub.com/rustwasm/wasm-pack/issues/1354
[issue/1359]: https://togithub.com/rustwasm/wasm-pack/issues/1359
[pull/1363]: https://togithub.com/rustwasm/wasm-pack/pull/1363
[nathaniel-daniel]: https://togithub.com/nathaniel-daniel
- **pkg-dir option for pack and publish commands - [danielronnkvist],
[issue/1369], [pull/1370]**
To be able to use these commands when the output directory option to the
build command isn't the default pkg.
[issue/1369]: https://togithub.com/rustwasm/wasm-pack/issues/1369
[pull/1370]: https://togithub.com/rustwasm/wasm-pack/pull/1370
[danielronnkvist]: https://togithub.com/danielronnkvist
- **Optimize out-dir display - [ahaoboy], [issue/1395], [pull/1396]**
Optimize out-dir display.
from:
`[INFO]: 📦 Your wasm pkg is ready to publish at
/root/code/fib-wasm/fib-rs/../fib-wasm/wasm.`
to:
`[INFO]: 📦 Your wasm pkg is ready to publish at
/root/code/fib-wasm/fib-wasm/wasm.`
[issue/1395]: https://togithub.com/rustwasm/wasm-pack/issues/1395
[pull/1396]: https://togithub.com/rustwasm/wasm-pack/pull/1396
[ahaoboy]: https://togithub.com/ahaoboy
- ### 🛠️ Maintenance
- **Fix error and warnings in install script - [lucashorward],
[issue/1159], [issue/1217], [issue/1283], [pull/1320]**
[issue/1159]: https://togithub.com/rustwasm/wasm-pack/issues/1159
[issue/1217]: https://togithub.com/rustwasm/wasm-pack/issues/1217
[issue/1283]: https://togithub.com/rustwasm/wasm-pack/issues/1283
[pull/1320]: https://togithub.com/rustwasm/wasm-pack/pull/1320
[lucashorward]: https://togithub.com/lucashorward
- **Bump follow-redirects from 1.14.9 to 1.15.6 in /npm - [dependabot],
[pull/1375]**
[pull/1375]: https://togithub.com/rustwasm/wasm-pack/pull/1375
- **Bump rustls-webpki from 0.100.1 to 0.100.2 - [dependabot],
[pull/1323]**
[pull/1341]: https://togithub.com/rustwasm/wasm-pack/pull/1341
- **Bump rustix from 0.37.20 to 0.37.25 - [dependabot], [pull/1341]**
[pull/1323]: https://togithub.com/rustwasm/wasm-pack/pull/1323
[dependabot]: https://togithub.com/apps/dependabot
- **Bump rustls from 0.21.9 to 0.21.11 - [dependabot], [pull/1385]**
[pull/1385]: https://togithub.com/rustwasm/wasm-pack/pull/1385
[dependabot]: https://togithub.com/apps/dependabot
- **Bump tar from 6.1.11 to 6.2.1 in /npm - [dependabot], [pull/1379]**
[pull/1379]: https://togithub.com/rustwasm/wasm-pack/pull/1379
[dependabot]: https://togithub.com/apps/dependabot
- ### 📖 Documentation
- **Fix typo in README - [Lionelf329], \[pull/1368]**
[pull/1268]: https://togithub.com/rustwasm/wasm-pack/pull/1368
[Lionelf329]: https://togithub.com/Lionelf329
- **Add a description of build --target deno - [puxiao], [pull/1344]**
[pull/1344]: https://togithub.com/rustwasm/wasm-pack/pull/1344
[puxiao]: https://togithub.com/puxiao
- **Document deno in build target - [sigmaSd], [pull/1348]**
[pull/1348]: https://togithub.com/rustwasm/wasm-pack/pull/1348
[sigmaSd]: https://togithub.com/sigmaSd
- **Fix local navigation backing one step too far in docs - [SamuSoft],
[pull/1387]**
[pull/1387]: https://togithub.com/rustwasm/wasm-pack/pull/1387
[SamuSoft]: https://togithub.com/SamuSoft
- **Add --target web to quick start build command - [josephrocca],
[pull/1367]**
[pull/1367]: https://togithub.com/rustwasm/wasm-pack/pull/1367
[josephrocca]: https://togithub.com/josephrocca
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions ) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuOSIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-07 18:33:47 +00:00
github-actions[bot]
51d56d37ff
Release crates v0.17.1 ( #4075 )
...
## [0.17.1] - 2024-07-06
### Bug Fixes
- aa585d3 ast_codegen, ast: Visit `ExpressionArrayElement` as
`Expression`. (#4061 ) (rzvxa)
- 564a75a codegen: Missing TypeParameters in TSConstructSignature
(#4063 ) (michaelm)
- adee728 isolated_declarations: Don't report an error for parameters if
they are ObjectPattern or ArrayPattern with an explicit type (#4065 )
(michaelm)
- 1b8f208 isolated_declarations: Correct emit for private static methods
(#4064 ) (michaelm)
- 719fb96 minifier: Omit dce `undefined` which can be a shadowed
variable (#4073 ) (Boshen)
- 150f4d9 napi/transform: Display error with spanned messages (Boshen)
### Performance
- 7fe2a2f parser: Do not copy comments (#4067 ) (overlookmotel)
### Refactor
- 8fa98e0 ast: Inline trivial functions and shorten code (#4066 )
(overlookmotel)
- 65aee19 isolated-declarations: Reorganize scope tree (#4070 ) (Luca
Bruno)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-07 01:29:52 +08:00
github-actions[bot]
224f5ef2cc
Release crates v0.17.0 ( #4059 )
...
## [0.17.0] - 2024-07-05
- e32b4bc ast: [**BREAKING**] Store trivia comments in a sorted slice
(#4045 ) (Luca Bruno)
- 1df6ac0 ast: [**BREAKING**] Rename `visit_enum_memeber` to
`visit_ts_enum_member`. (#4000 ) (rzvxa)
- 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)
### Features
- 1854a52 ast_codegen: Introduce the `#[span]` hint. (#4012 ) (rzvxa)
- 7538af1 ast_codegen: Add visit generator (#3954 ) (rzvxa)
- 7768d23 isolated-declarations: Support optional class methods (#4035 )
(Egor Blinov)
- 0da9dfb minifier: Add constant folding to remove dead code (#4058 )
(Boshen)
### Bug Fixes
- aaac2d8 codegen: Preserve parentheses from AST instead calculating
from operator precedence (#4055 ) (Boshen)
- 5e5b1b1 codegen: Correct accessibility emit for class
formal-parameters/methods/properties (#4042 ) (Egor Blinov)
- 7844734 codegen: Missing const keyword in TSTypeParamter (#4022 )
(Dunqing)
- 6254a41 codegen: Missing TypeParamters in TSCallSignature (#4021 )
(Dunqing)
- 3d29e9c isolated-declarations: Eliminate imports incorrectly when they
are used in `TSInferType` (#4043 ) (Dunqing)
- 02ea19a isolated-declarations: Should emit `export {}` when only
having `ImportDeclaration` (#4026 ) (Dunqing)
- 7c915f4 isolated-declarations: Binding elements with export should
report an error (#4025 ) (Dunqing)
- 05a047c isolated-declarations: Method following an abstract method
gets dropped (#4024 ) (Dunqing)
- c043bec isolated_declarations: Add mapped-type constraint to the scope
(#4037 ) (Egor Blinov)
- b007553 isolated_declarations: Fix readonly specifier on class
constructor params (#4030 ) (Egor Blinov)
- da62839 isolated_declarations: Inferring literal types for readonly
class fileds (#4027 ) (Egor Blinov)
### Refactor
- b51f75b ast_codegen: No longer outputs discard variable for empty
visitors. (#4008 ) (rzvxa)
- edb557c minifier: Add a folder struct for constant folding (#4057 )
(Boshen)
- 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)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-05 15:46:50 +08:00
github-actions[bot]
e2c9015ef6
Release crates v0.16.3 ( #4013 )
...
## [0.16.3] - 2024-07-02
### Features
- b257d53 linter: Support report
`@typescript-eslint/consistent-type-imports` (#3895 ) (mysteryven)
### Bug Fixes
- 23038ad codegen: Print `TSFunctionType` inside `TSTypeAssertion`
(#3999 ) (Boshen)
- d995f94 semantic: Resolve reference incorrectly when a parameter
references a parameter that hasn't been defined yet (#4004 ) (Dunqing)
- bdee156 transformer/typescript: `declare class` incorrectly preserved
as runtime class (#3997 ) (Dunqing)
- a50ce3d transformer/typescript: Missing initializer for class
constructor arguments with `private` and `protected` modifier (#3996 )
(Dunqing)
### Refactor
- 0fe22a8 ast: Reorder fields to reflect their visit order. (#3994 )
(rzvxa)
- d0eac46 parser: Use function instead of trait to parse normal lists
(#4003 ) (Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-02 12:47:29 +08:00
github-actions[bot]
3870ed5a24
Release crates v0.16.2 ( #3983 )
...
## [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)
### Bug Fixes
- dac617d codegen: Print some missing typescript attributes (#3980 )
(Boshen)
- bd1141d isolated-declarations: If declarations is referenced in
`declare global` then keep it (#3982 ) (Dunqing)
### Performance
- b234ddd semantic: Only check for jsdoc if jsdoc building is enabled
(Boshen)
- 1eac3d2 semantic: Use `Atom<'a>` for `Reference`s (#3972 ) (Don Isaac)
- 0c81fbe syntax: Use `NonZeroU32` for `SymbolId` and `ReferenceId`
(#3970 ) (Boshen)
### Refactor
- 5845057 transformer: Pass in symbols and scopes (#3978 ) (Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-30 19:59:15 +08:00
github-actions[bot]
fa50e9737e
Release crates v0.16.1 ( #3968 )
...
## [0.16.1] - 2024-06-29
### Features
- 7b38bde parser: Parse modifiers with `parse_modifiers` (#3948 )
(DonIsaac)
- f64ad4b semantic: Make jsdoc building optional (turned off by default)
(#3955 ) (Boshen)
### Bug Fixes
- 51e54f9 codegen: Should print `TSModuleDeclarationKind` instead of
just `module` (#3957 ) (Dunqing)
- 31e4c3b isolated-declarations: `declare global {}` should be kept even
if it is not exported (#3956 ) (Dunqing)
### Refactor
- 2705df9 linter: Improve diagnostic labeling (#3960 ) (DonIsaac)
- 15ec254 semantic: Remove the unused `Semantic::build2` function
(Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-29 16:53:09 +08:00
github-actions[bot]
4e3e1a39eb
Release crates v0.16.0 ( #3930 )
...
## [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
- 497769c ast: Add some visitor functions (#3785 ) (Dunqing)
- 4b06dc7 ast: Add TSType::TSIntrinsicKeyword to is_keyword (#3775 )
(Dunqing)
- 5847e16 ast,parser: Add `intrinsic` keyword (#3767 ) (Boshen)
- 2e026e1 ast_codegen: Generate `ast_kind.rs`. (#3888 ) (rzvxa)
- 09f4d3c ast_codegen: Add `ImplGetSpanGenerator`. (#3852 ) (rzvxa)
- 3e78f98 cfg: Add depth first search with hash sets. (#3771 ) (rzvxa)
- 01da2f7 codegen: Print TSThisParameter for TSCallSignatureDeclaration
and TSMethodSignature (#3792 ) (Dunqing)
- 2821e0e codegen: Print readonly keyword for TSIndexSignature (#3791 )
(Dunqing)
- 97575d8 codegen: Print TSClassImplements and TSThisParameter (#3786 )
(Dunqing)
- 5e2baf3 isolated-declarations: Report error for expando functions
(#3872 ) (Dunqing)
- 2cdb34f isolated-declarations: Support for class function overloads
(#3811 ) (Dunqing)
- 231b8f0 isolated-declarations: Support for export default function
overloads (#3809 ) (Dunqing)
- a37138f isolated-declarations: Improve the inference template literal
(#3797 ) (Dunqing)
- b0d7355 isolated-declarations: Transform const expression correctly
(#3793 ) (Dunqing)
- b38c34d isolated-declarations: Support inferring
ParenthesizedExpression (#3769 ) (Dunqing)
- 4134de8 isolated-declarations: Add ts error code to the error message
(#3755 ) (Dunqing)
- 94202de isolated-declarations: Add `export {}` when needed (#3754 )
(Dunqing)
- e95d8e3 isolated-declarations: Shrink span for arrow function that
needs an explicit return type (#3752 ) (Dunqing)
- df9971d isolated-declarations: Improve inferring the return type from
function (#3750 ) (Dunqing)
- 4aea2b1 isolated-declarations: Improve inferring the type of accessor
(#3749 ) (Dunqing)
- 9ea30c4 isolated-declarations: Treat AssignmentPattern as optional
(#3748 ) (Dunqing)
- dd540c8 minifier: Add skeleton for ReplaceGlobalDefines ast pass
(#3803 ) (Boshen)
- f3c3970 minifier: Add skeleton for RemoveDeadCode ast pass (#3802 )
(Boshen)
- 4fb90eb oxc: Export isolated-declarations (#3765 ) (Boshen)
- d5f6aeb semantic: Check for illegal symbol modifiers (#3838 ) (Don
Isaac)
- 01572f0 sourcemap: Impl `std::fmt::Display` for `Error` (#3902 )
(DonIsaac)
- 5501d5c transformer/typescript: Transform `import {} from "mod"` to
import `"mod"` (#3866 ) (Dunqing)
- 2a16ce0 traverse: Disable syntax check and disable build module record
(#3794 ) (Boshen)- d3cd3ea Oxc transform binding (#3896 ) (underfin)
### Bug Fixes
- 063cfde ast: Correct JSON serialization of `TSModuleBlock` (#3858 )
(overlookmotel)
- 66f404c ast: Fix JSON serialization of `BindingPattern` (#3856 )
(overlookmotel)
- 2766594 codegen: Print type parameters for MethodDefinition (#3922 )
(Dunqing)
- 27f0531 isolated-declarations: Private constructor reaching
unreachable (#3921 ) (Dunqing)
- 59ce38b isolated-declarations: Inferring of UnrayExpression
incorrectly (#3920 ) (Dunqing)
- 58e54f4 isolated-declarations: Report an error for parameters if they
are ObjectPattern or ArrayPattern without an explicit type (#3810 )
(Dunqing)
- cb8a272 isolated-declarations: Cannot infer nested `as const` (#3807 )
(Dunqing)
- d8ecce5 isolated-declarations: Infer BigInt number as `bigint` type
(#3806 ) (Dunqing)
- 4e241fc isolated-declarations: Missing `const` after transformed const
enum (#3805 ) (Dunqing)
- 683c7b0 isolated-declarations: Shouldn’t add declare in declaration
with export default (#3804 ) (Dunqing)
- 7d47fc3 isolated-declarations: Should stripe async and generator
keyword after transformed (#3790 ) (Dunqing)
- 8ce794d isolated-declarations: Inferring an incorrect return type when
there is an arrow function inside a function (#3768 ) (Dunqing)
- d29316a isolated-declarations: Transform incorrectly when there are
multiple functions with the same name (#3753 ) (Dunqing)
- bf1c250 isolated-declarations: False positives for non-exported
binding elements (#3751 ) (Dunqing)
- 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)
- 8c9fc63 semantic: Apply strict mode scope flag for strict mode TS
Modules (#3861 ) (overlookmotel)
- 99a40ce semantic: `export default foo` should have
`ExportLocalName::Default(NameSpan)` entry (#3823 ) (Boshen)
- 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)
- d76f34b transformer: TODO comments for missing scopes (#3837 )
(overlookmotel)
- e470731 transformer: TS transform handle when type exports first
(#3833 ) (overlookmotel)
- d774e54 transformer: TS transform generate do not copy statements
(#3832 ) (overlookmotel)
- ff1da27 transformer: Correct comment in example (#3831 )
(overlookmotel)
- 6dcc3f4 transformer: Fix TS annotation transform scopes (#3816 )
(overlookmotel)
- aea3e9a transformer: Correct spans for TS annotations transform
(#3782 ) (overlookmotel)
### Performance
- 92c21b2 diagnostics: Optimize string-buffer reallocations (#3897 )
(Luca Bruno)
- 4bf405d parser: Add a few more inline hints to cursor functions
(#3894 ) (Boshen)
- 10d1de5 semantic: Remove uneccessary allocation in builder (#3867 )
(DonIsaac)- 4f7ff7e Do not pass `&Atom` to functions (#3818 )
(overlookmotel)
### Refactor
- 6f26087 ast: Add comment about alternatives to `AstBuilder::copy`
(#3905 ) (overlookmotel)
- 442aca3 ast: Add comment not to use `AstBuilder::copy` (#3891 )
(overlookmotel)
- acf69fa ast: Refactor custom `Serialize` impls (#3859 ) (overlookmotel)
- 9e148e9 ast: Add line breaks (#3860 ) (overlookmotel)
- 363d3d5 ast: Add span field to the `BindingPattern` type. (#3855 )
(rzvxa)
- a648748 ast: Shorten code in AST builder (#3835 ) (overlookmotel)
- 1206967 ast: Reduce allocations in AST builder (#3834 ) (overlookmotel)
- 2f5d50e isolated-declarations: Remove `Modifiers` (#3847 ) (Boshen)
- 8027b1e minifier: Change prepass to ast_passes::remove_parens (#3801 )
(Boshen)
- 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)
- 5ef28b7 transformer: Shorten code (#3912 ) (overlookmotel)
- d9f268d transformer: Shorten TS transform code (#3836 ) (overlookmotel)
- 21b0d01 transformer: Pass ref to function (#3781 ) (overlookmotel)
- 7c44703 transformer: Remove needless `pub` on TS enum transform
methods (#3774 ) (overlookmotel)
- 22c56d7 transformer: Move TSImportEqualsDeclaration transform code
(#3764 ) (overlookmotel)
- cd56aa9 transformer: Simplify TS export assignment transform (#3762 )
(overlookmotel)
- 512740d transformer: Move and simplify TS enum transform entry point
(#3760 ) (overlookmotel)
- 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)- d6437fe Clean up some usages of `with_labels` (#3854 )
(Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-27 20:38:31 +08:00
github-actions[bot]
1b3cd6c24d
Release crates v0.15.0 ( #3743 )
...
## [0.15.0] - 2024-06-18
- 0537d29 cfg: [**BREAKING**] Move control flow to its own crate.
(#3728 ) (rzvxa)
- 5c38a0f codegen: [**BREAKING**] New code gen API (#3740 ) (Boshen)
- 4bce59d semantic/cfg: [**BREAKING**] Re-export `petgraph` as
`control_flow::graph`. (#3722 ) (rzvxa)
- 534242a codegen: [**BREAKING**] Remove
`CodegenOptions::enable_typescript` (#3674 ) (Boshen)
- 0578ece ast: [**BREAKING**] Remove
`ExportDefaultDeclarationKind::TSEnumDeclaration` (#3666 ) (Dunqing)
### Features
- 5a99d30 codegen: Improve codegen formatting (#3735 ) (Boshen)
- bf9b38a codegen: Improve codegen formatting (#3731 ) (Boshen)
- 4a004e2 codegen: Print TSImport remaining fields (#3695 ) (Dunqing)
- a56cb1b codegen: Print accessibility for MethodDefinition (#3690 )
(Dunqing)
- 38a75e5 coverage: Improve codegen (#3729 ) (Boshen)
- 750a534 coverage: Transformer idempotency test (#3691 ) (Boshen)
- ee627c3 isolated-declarations: Create unique name for `_default`
(#3730 ) (Dunqing)
- 81e9526 isolated-declarations: Inferring set accessor parameter type
from get accessor return type (#3725 ) (Dunqing)
- 77d5533 isolated-declarations: Report errors that are consistent with
typescript. (#3720 ) (Dunqing)
- 8f5655d linter: Add eslint/no-useless-constructor (#3594 ) (Don Isaac)
- 046ff3f linter/eslint: Add `no_unreachable` rule. (#3238 ) (rzvxa)
- 0b8098a napi: Isolated-declaration (#3718 ) (Boshen)
- 527bfc8 npm/oxc-transform: Setup npm/oxc-transform and publish
(Boshen)
- d65c652 parser: Display jsx mismatch error, e.g. `<Foo></Bar>` (#3696 )
(Boshen)
- 9c31ed9 semantic/cfg: Propagate unreachable edges through subgraphs.
(#3648 ) (rzvxa)
- d9c5b33 semantic/cfg: Add `Condition` instruction. (#3567 ) (Ali
Rezvani)
- f2dfd66 semantic/cfg: Add iteration instructions. (#3566 ) (rzvxa)
- 910193e transformer-dts: Report error for super class (#3711 )
(Dunqing)
- 413d7be transformer-dts: Transform enum support (#3710 ) (Dunqing)
- 35c382e transformer-dts: Remove type annotation from private field
(#3689 ) (Dunqing)
- 0e6d3ce transformer-dts: Report error for async function and generator
(#3688 ) (Dunqing)
- b22b59a transformer-dts: Transform namespace support (#3683 ) (Dunqing)
- 4f2db46 transformer-dts: `--isolatedDeclarations` dts transform
(#3664 ) (Dunqing)
### Bug Fixes
- 2158268 ast: Incorrect visit order in function (#3681 ) (Dunqing)
- da1e2d0 codegen: Improve typescript codegen (#3708 ) (Boshen)
- f1b793f isolated-declarations: Function overloads reaching unreachable
(#3739 ) (Dunqing)
- 0fbecdc isolated-declarations: Should be added to references, not
bindings (#3726 ) (Dunqing)
- 8f64d99 minifier: Respect `join_vars: false` option (#3724 )
(mysteryven)
- 70fc69b semantic: Add Eq to CtxFlags (#3651 ) (Yuji Sugiura)
- 7a58fec semantic/cfg: Issue in unlabeled `Ctx`s. (#3678 ) (rzvxa)
- abd6ac8 semantic/cfg: Discrete finalization path after `NewFunction`s.
(#3671 ) (rzvxa)
- e148a32 semantic/cfg: Correct unreachability propagation in
try-finally. (#3667 ) (Ali Rezvani)
- 59666e0 transformer: Do not rename accessible identifier references
(#3623 ) (Dunqing)
- 90743e2 traverse: Change visit order for `Function` (#3685 )
(overlookmotel)
### Performance
- 2717a1a semantic/cfg: Lower the visits in
`neighbors_filtered_by_edge_weight`. (#3676 ) (rzvxa)
### Refactor
- fa7a6ba codegen: Add `gen` method to ast nodes (#3687 ) (Boshen)
- 09b92b6 codegen: Move `gen_ts` into `gen` to make searching things
easier (#3680 ) (Boshen)
- 3c59735 isolated-declarations: Remove `TransformDtsCtx` (#3719 )
(Boshen)
- 815260e isolated-declarations: Decouple codegen (#3715 ) (Boshen)
- 7ec44f8 semantic: Rename `cfg` macro to `control_flow`. (#3742 )
(rzvxa)
- d8ad321 semantic: Make control flow generation optional. (#3737 )
(rzvxa)
- a94a72d semantic: Expose 1 checker function instead of 2 (#3694 )
(Boshen)
- bd8d115 semantic/cfg: Remove unused types. (#3677 ) (rzvxa)
- f702fb9 semantic/cfg: Cleanup control flow and it's builder. (#3650 )
(rzvxa)
- 4f16664 transformer_dts: Create a `Program` for codegen (#3679 )
(Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-19 01:15:55 +08:00
Boshen
051ceb6539
chore: improve some format by running cargo +nightly fmt
2024-06-19 00:48:30 +08:00
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
github-actions[bot]
6bdd74c476
Release crates v0.13.5 ( #3584 )
...
## [0.13.5] - 2024-06-08
### Bug Fixes
- 48bb97e traverse: Do not publish the build script (Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-08 16:44:50 +08:00
github-actions[bot]
d215e3d906
Release crates v0.13.4 ( #3582 )
...
## [0.13.4] - 2024-06-07
### Features
- 5c8e16c coverage: Second transformer build does not print typescript
(#3561 ) (Dunqing)
- 646b993 coverage/transformer: Handle @jsx option (#3553 ) (Dunqing)
- a939ddd transformer/typescript: Remove more typescript ast nodes
(#3563 ) (Dunqing)
- e8a20f8 transformer/typescript: Remove typescript ast nodes (#3559 )
(Dunqing)
- ee9a215 transformer/typescript: Handle namespace directive correctly
(#3532 ) (Dunqing)
### Bug Fixes
- affb2c8 codegen: Print indentation before directive (#3512 ) (Dunqing)
- f6939cb transformer: Store `react_importer` in `Bindings` in JSX
transform (#3551 ) (overlookmotel)
- 7982b93 transformer: Correct spans for JSX transform (#3549 )
(overlookmotel)
- c00598b transformer: JSX set `reference_id` on refs to imports (#3524 )
(overlookmotel)
### Performance
- 37cdc13 transformer: Faster checks if JSX plugin enabled (#3577 )
(overlookmotel)
- 9f467b8 transformer: Avoid fragment update where possible (#3535 )
(overlookmotel)
- ac394f0 transformer: JSX parse pragma only once (#3534 )
(overlookmotel)
### Documentation
- 1d3c0d7 span: Add doc comments to `oxc_span::Span` (#3543 ) (Don Isaac)
### Refactor
- f2113ae transformer: Reduce cloning and referencing `Rc`s (#3576 )
(overlookmotel)
- 0948124 transformer: Pass `Rc`s by value (#3550 ) (overlookmotel)
- e4d74ac transformer: Remove `update_fragment` from JSX transform
(#3541 ) (overlookmotel)
- 73b7864 transformer: Combine import and usage in JSX transform (#3540 )
(overlookmotel)
- 6978269 transformer/typescript: Replace reference collector with
symbols references (#3533 ) (Dunqing)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-07 17:41:11 +08:00
Boshen
1dbc23417d
chore: regenerate changelogs with commit id and author
2024-06-07 01:22:28 +08:00
Boshen
769227b7b4
chore: regenerate changelogs
2024-06-06 15:51:53 +08:00
Boshen
0674604d7a
chore: regenerate changelog
2024-06-06 01:29:38 +08:00
Boshen
dd42f279f7
chore: change website url to https://oxc.rs
2024-06-05 22:05:08 +08:00
github-actions[bot]
d48e62aca4
Publish crates v0.13.3 ( #3527 )
...
Automated Release
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-04 18:02:40 +08:00
renovate[bot]
4386eb3d68
chore(deps): lock file maintenance npm packages ( #3421 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change | Age | Adoption | Passing |
Confidence |
|---|---|---|---|---|---|---|---|
| | | lockFileMaintenance | All locks refreshed | | | | |
| [axios](https://axios-http.com )
([source](https://togithub.com/axios/axios )) | devDependencies | patch |
[`1.7.0` ->
`1.7.2`](https://renovatebot.com/diffs/npm/axios/1.7.0/1.7.2 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
| [pnpm](https://pnpm.io ) ([source](https://togithub.com/pnpm/pnpm )) |
packageManager | patch | [`9.1.1` ->
`9.1.2`](https://renovatebot.com/diffs/npm/pnpm/9.1.1/9.1.2 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
🔧 This Pull Request updates lock files to use the latest dependency
versions.
---
### Release Notes
<details>
<summary>axios/axios (axios)</summary>
###
[`v1.7.2`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#172-2024-05-21 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.7.1...v1.7.2 )
##### Bug Fixes
- **fetch:** enhance fetch API detection;
([#​6413](https://togithub.com/axios/axios/issues/6413 ))
([4f79aef](4f79aef81b ))
##### Contributors to this release
- <img
src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18 "
alt="avatar" width="18"/> [Dmitriy
Mozgovoy](https://togithub.com/DigitalBrainJS "+3/-3 (#​6413 )")
###
[`v1.7.1`](https://togithub.com/axios/axios/blob/HEAD/CHANGELOG.md#171-2024-05-20 )
[Compare
Source](https://togithub.com/axios/axios/compare/v1.7.0...v1.7.1 )
##### Bug Fixes
- **fetch:** fixed ReferenceError issue when TextEncoder is not
available in the environment;
([#​6410](https://togithub.com/axios/axios/issues/6410 ))
([733f15f](733f15fe5b ))
##### Contributors to this release
- <img
src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18 "
alt="avatar" width="18"/> [Dmitriy
Mozgovoy](https://togithub.com/DigitalBrainJS "+14/-9 (#​6410 )")
</details>
<details>
<summary>pnpm/pnpm (pnpm)</summary>
### [`v9.1.2`](https://togithub.com/pnpm/pnpm/releases/tag/v9.1.2 )
[Compare Source](https://togithub.com/pnpm/pnpm/compare/v9.1.1...v9.1.2 )
#### Patch Changes
- Reduced memory usage during peer dependencies resolution
[#​8084](https://togithub.com/pnpm/pnpm/pull/8084 ).
- Details in the `pnpm licenses` output are not misplaced anymore
[#​8071](https://togithub.com/pnpm/pnpm/pull/8071 ).
#### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank"><img src="https://pnpm.io/img/users/bit.svg "
width="80"></a>
</td>
<td align="center" valign="middle">
<a href="https://figma.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank"><img src="https://pnpm.io/img/users/figma.svg "
width="80"></a>
</td>
</tr>
</tbody>
</table>
#### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/discord.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/discord_light.svg " />
<img src="https://pnpm.io/img/users/discord.svg " width="220" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://prisma.io/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/prisma.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/prisma_light.svg " />
<img src="https://pnpm.io/img/users/prisma.svg " width="180" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://uscreen.de/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/uscreen.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/uscreen_light.svg " />
<img src="https://pnpm.io/img/users/uscreen.svg " width="180" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a
href="https://www.jetbrains.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/jetbrains.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/jetbrains.svg " />
<img src="https://pnpm.io/img/users/jetbrains.svg " width="85" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/nx.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/nx_light.svg " />
<img src="https://pnpm.io/img/users/nx.svg " width="120" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a
href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/coderabbit.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/coderabbit_light.svg " />
<img src="https://pnpm.io/img/users/coderabbit.svg " width="220" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
#### Our Silver Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a
href="https://leniolabs.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<img src="https://pnpm.io/img/users/leniolabs.jpg " width="80">
</a>
</td>
<td align="center" valign="middle">
<a href="https://vercel.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/vercel.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/vercel_light.svg " />
<img src="https://pnpm.io/img/users/vercel.svg " width="180" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://depot.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/depot.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/depot_light.svg " />
<img src="https://pnpm.io/img/users/depot.svg " width="200" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://moonrepo.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/moonrepo.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/moonrepo_light.svg " />
<img src="https://pnpm.io/img/users/moonrepo.svg " width="200" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://devowl.io/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/devowlio.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/devowlio.svg " />
<img src="https://pnpm.io/img/users/devowlio.svg " width="200" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://macpaw.com/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/macpaw.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/macpaw_light.svg " />
<img src="https://pnpm.io/img/users/macpaw.svg " width="200" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://cerbos.dev/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/cerbos.svg " />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/cerbos_light.svg " />
<img src="https://pnpm.io/img/users/cerbos.svg " width="180" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a
href="https://vpsserver.com/en-us/?utm_source=pnpm&utm_medium=release_notes "
target="_blank">
<img src="https://pnpm.io/img/users/vpsserver.svg " width="180" />
</a>
</td>
</tr>
</tbody>
</table>
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions ) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-26 18:29:48 +00:00
Boshen
2064ae9e0a
refactor(parser,diagnostic): one diagnostic struct to eliminate monomorphization of generic types ( #3214 )
...
part of #3213
We should only have one diagnostic struct instead 353 copies of them, so we don't end up choking LLVM with 50k lines of the same code due to monomorphization.
If the proposed approach is good, then I'll start writing a codemod to turn all the existing structs to plain functions.
---
Background:
Using `--timings`, we see `oxc_linter` is slow on codegen (the purple part).

The crate currently contains 353 miette errors. [cargo-llvm-lines](https://github.com/dtolnay/cargo-llvm-lines ) displays
```
cargo llvm-lines -p oxc_linter --lib --release
Lines Copies Function name
----- ------ -------------
830350 33438 (TOTAL)
29252 (3.5%, 3.5%) 808 (2.4%, 2.4%) <alloc::boxed::Box<T,A> as core::ops::drop::Drop>::drop
23298 (2.8%, 6.3%) 353 (1.1%, 3.5%) miette::eyreish::error::object_downcast
19062 (2.3%, 8.6%) 706 (2.1%, 5.6%) core::error::Error::type_id
12610 (1.5%, 10.1%) 65 (0.2%, 5.8%) alloc::raw_vec::RawVec<T,A>::grow_amortized
12002 (1.4%, 11.6%) 706 (2.1%, 7.9%) miette::eyreish::ptr::Own<T>::boxed
9215 (1.1%, 12.7%) 115 (0.3%, 8.2%) core::iter::traits::iterator::Iterator::try_fold
9150 (1.1%, 13.8%) 1 (0.0%, 8.2%) oxc_linter::rules::RuleEnum::read_json
8825 (1.1%, 14.9%) 353 (1.1%, 9.3%) <miette::eyreish::error::ErrorImpl<E> as core::error::Error>::source
8822 (1.1%, 15.9%) 353 (1.1%, 10.3%) miette::eyreish::error::<impl miette::eyreish::Report>::construct
8119 (1.0%, 16.9%) 353 (1.1%, 11.4%) miette::eyreish::error::object_ref
8119 (1.0%, 17.9%) 353 (1.1%, 12.5%) miette::eyreish::error::object_ref_stderr
7413 (0.9%, 18.8%) 353 (1.1%, 13.5%) <miette::eyreish::error::ErrorImpl<E> as core::fmt::Display>::fmt
7413 (0.9%, 19.7%) 353 (1.1%, 14.6%) miette::eyreish::ptr::Own<T>::new
6669 (0.8%, 20.5%) 39 (0.1%, 14.7%) alloc::raw_vec::RawVec<T,A>::try_allocate_in
6173 (0.7%, 21.2%) 353 (1.1%, 15.7%) miette::eyreish::error::<impl miette::eyreish::Report>::from_std
6027 (0.7%, 21.9%) 70 (0.2%, 16.0%) <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
6001 (0.7%, 22.7%) 353 (1.1%, 17.0%) miette::eyreish::error::object_drop
6001 (0.7%, 23.4%) 353 (1.1%, 18.1%) miette::eyreish::error::object_drop_front
5648 (0.7%, 24.1%) 353 (1.1%, 19.1%) <miette::eyreish::error::ErrorImpl<E> as core::fmt::Debug>::fmt
```
It's totalling more than 50k llvm lines, and is putting pressure on rustc codegen (the purple part on `oxc_linter` in the image above.
---
It's pretty obvious by looking at https://github.com/zkat/miette/blob/main/src/eyreish/error.rs , the generics can expand out to lots of code.
2024-05-11 04:56:22 +00:00
Boshen
79837bd410
Release @oxc-parser/wasm v0.1.0
2024-04-08 15:47:51 +08:00
Boshen
ab26099281
Publish @oxc-parser/wasm with web and node builds ( #2916 )
...
Co-authored-by: Saeid Zareie <saeid.za98@gmail.com>
2024-04-08 15:47:02 +08:00
renovate[bot]
e76d70ffbf
chore(deps): lock file maintenance ( #2880 )
2024-04-01 11:43:44 +08:00
overlookmotel
75226f3b4a
chore: silence erroneous RA warnings for Tsify ( #2731 )
2024-03-15 12:42:12 +00:00
Boshen
945265a33e
chore: format wasm/parser/Cargo.toml
2024-03-14 17:25:53 +08:00
Boshen
697b6b70c0
feat: merge features serde and wasm to serialize ( #2716 )
...
This PR merges the previous confusing features `serde` and `wasm` into a
single `serialize` feature.
We'll eventually do serialize + type information for both wasm and napi
targets.
`oxc_macros` is removed from `oxc_ast`'s dependency because it requires
`syn` and friends, which goes against our policy ["Third-party
dependencies should be
minimal."](https://oxc-project.github.io/docs/contribute/rules.html#development-policy )
2024-03-14 17:13:12 +08:00
Boshen
d9bea520ea
Release @oxc-parser/wasm v0.0.5
2024-02-05 21:10:11 +08:00