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
rzvxa
6a36616289
feat(syntax): derive CloneIn for the AST-related items. ( #4730 )
...
Follow-on after #4276 , related to #4284 .
2024-08-07 17:38:08 +00:00
Boshen
e0832f8e18
refactor(minifier): use oxc_traverse for AST passes ( #4725 )
2024-08-07 13:26:29 +00:00
Boshen
17602db6de
refactor(minifier): move tests and files around
2024-08-07 20:01:55 +08:00
rzvxa
125c5fd8ed
feat(ast_codegen, span): process SourceType through ast_codegen. ( #4696 )
2024-08-06 17:42:12 +00:00
rzvxa
82e2f6b924
feat(ast_codegen): process AST-related syntax types. ( #4694 )
2024-08-06 17:14:35 +00: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
Boshen
0f5e982d19
perf(minifier): only visit arrow expression after dropping console.log ( #4677 )
2024-08-06 04:20:41 +00:00
DonIsaac
9b51e045c7
refactor: overhaul napi transformer package ( #4592 )
...
## What This PR Does
- Support declaration emit with `transform()`
- Consolidate shared parsing and error reporting logic into a `TransformContext`
- Add JSDoc comments to options
I'm getting this package ready for consumption in [oxc-jest](https://github.com/oxc-project/oxc-jest ).
2024-08-06 01:14:10 +00:00
overlookmotel
8dd76e4780
perf(codegen): reduce size of LineOffsetTable ( #4643 )
...
`LineOffsetTables` records mappings from byte offset to line and column numbers (with column number in UTF-16 characters).
Most lines do not contain any Unicode characters, and for these lines there is an exact correspondence between number of bytes from start of line and UTF-16 column number, so no column lookup table is required.
Reduce the data stored for each line from 32 bytes to 8 bytes by storing column offset lookup tables for the rare lines which do contain Unicode chars separately.
Additionally, store column lookup tables as a `Box<[u32]>` instead of `Vec<u32>` to reduce the size of `ColumnOffsets` by 8 bytes.
2024-08-06 01:08:12 +00:00
oxc-bot
3ac02fd838
Release oxlint v0.7.0 ( #4657 )
...
## [0.7.0] - 2024-08-05
- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329 )
(Dunqing)
### Features
- aaee07e ast: Add `AstKind::AssignmentTargetPattern`,
`AstKind::ArrayAssignmentTarget` and `AstKind::ObjectAssignmentTarget`
(#4456 ) (Dunqing)
- 9df7b56 jsx-a11y/no-autofocus: Implement fixer support (#4171 ) (Jelle
van der Waa)
- b87bf70 linter: Add fix capabilties to existing lint rules (#4560 )
(DonIsaac)
- ddd8b27 linter: Support conditional fix capabilities (#4559 )
(DonIsaac)
- b952942 linter: Add eslint/no-unused-vars (⭐ attempt 3.2) (#4445 )
(DonIsaac)
- 6543958 linter: Add auto-fix metadata to RuleMeta (#4557 ) (Don Isaac)
- 85e8418 linter: Add react/jsx-curly-brace-presence (#3949 ) (Don Isaac)
- 4c4da56 linter: Add typescript-eslint/prefer-keyword-namespce (#4438 )
(Aza Walker)
- d8c2a83 linter: Eslint-plugin-vitest/no-import-node-test (#4440 )
(cinchen)
- e3b0c40 linter: Eslint-plugin-vitest/no-identical-title (#4422 )
(cinchen)
- c936782 linter: Eslint-plugin-vitest/no-conditional-expect (#4425 )
(cinchen)
- 27fdd69 linter: Eslint-plugin-vitest/no-commented-out-tests (#4424 )
(cinchen)
- 51f5025 linter: Add fixer for unicorn/prefer-string-starts-ends-with
(#4378 ) (DonIsaac)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357 )
(Jaden Rodriguez)
- 7afa1f0 linter: Support suggestions and dangerous fixes (#4223 )
(DonIsaac)
- acc5729 linter: Eslint-plugin-vitest/expect-expect (#4299 ) (cinchen)
- 2213f93 linter: Eslint-plugin-vitest/no-alias-methods (#4301 )
(cinchen)
- c296bc3 linter/eslint: Implement func-names (#4618 ) (Alexander S.)
- e116ae0 linter/eslint: Implement fixer for prefer-numeric-literals
(#4591 ) (Jelle van der Waa)
- eaf834f linter/eslint: Implement prefer-numeric-literals (#4109 )
(Jelle van der Waa)
- db2fd70 linter/eslint-plugin-promise: Implement
no-webpack-loader-syntax (#4331 ) (Jelle van der Waa)
- 5f1e070 linter/eslint-plugin-unicorn: Add fixer for prefer-code-point
(#4353 ) (Jelle van der Waa)
- ed49e16 linter/eslint-plugin-unicorn: Implement fixer for
prefer-dom-node-append (#4306 ) (Jelle van der Waa)
- e2b15ac linter/react: Implement react-jsx-boolean-value (#4613 ) (Jelle
van der Waa)
- 68efcd4 linter/react-perf: Handle new objects and arrays in prop
assignment patterns (#4396 ) (DonIsaac)
### Bug Fixes
- 368112c ast: Remove `#[visit(ignore)]` from
`ExportDefaultDeclarationKind`'s `TSInterfaceDeclaration` (#4497 )
(Dunqing)
- d384f60 ci: Remove unused(?) .html file (#4545 ) (Yuji Sugiura)
- 06aec77 linter: Invalid binary expression with overflow (#4647 )
(DonIsaac)
- b2da22b linter: Invalid tags in rule docs (#4646 ) (DonIsaac)
- 94440ad linter: Panic on invalid lang in `a11y/lang`. (#4630 ) (rzvxa)
- e0b03f8 linter: Improve the boundary for eslint/for-direction (#4590 )
(heygsc)
- 70b8cfa linter: Missing return in no-obj-calls recursion (#4594 )
(DonIsaac)
- fe1356d linter: Change no-unused-vars to nursery (#4588 ) (DonIsaac)
- 72337b1 linter: Change typescript-eslint/no-namespace to restriction
(#4539 ) (Don Isaac)
- 732f4e2 linter: Fix `oxlint` allocator cfg (#4527 ) (overlookmotel)
- 289dc39 linter: Overflow in no-obj-calls (#4397 ) (DonIsaac)
- a664715 linter/eslint: Fix invalid regexp in no_regex_spaces test
(#4605 ) (Yuji Sugiura)
- 74fa75a linter/eslint: Drop quotes around max-params lint warning
(#4608 ) (Jelle van der Waa)
- 9fcd9ae linter/eslint: Fix invalid regexp in no_control_regex test
(#4544 ) (leaysgur)
- ac08de8 linter/react_perf: Allow new objects, array, fns, etc in top
scope (#4395 ) (DonIsaac)
- 0fba738 npm: SyntaxError caused by optional chaining in low version
node (#4650 ) (heygsc)
- 73d2558 oxlint: Fix oxlint failed to build due to missing feature
(Boshen)
### Performance
- 6ff200d linter: Change react rules and utils to use `Cow` and
`CompactStr` instead of `String` (#4603 ) (DonIsaac)
- f259df0 linter: Make img-redundant-alt only build a regex once (#4604 )
(DonIsaac)
- 7585e16 linter: Remove allocations for string comparisons (#4570 )
(DonIsaac)
- b60bdf1 linter: `no_shadow_restricted_names` only look up name in
hashmap once (#4472 ) (overlookmotel)
- 81384f5 linter: Avoid unnecessary work in `nextjs:no_duplicate_head`
rule (#4465 ) (overlookmotel)
- f7da22d linter: Disable lint rules by file type (#4380 ) (DonIsaac)
- 348c1ad semantic: Remove `span` field from `Reference` (#4464 )
(overlookmotel)
- 6a9f4db semantic: Reduce storage size for symbol redeclarations
(#4463 ) (overlookmotel)- a207923 Replace some CompactStr usages with
Cows (#4377 ) (DonIsaac)
### Refactor
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349 ) (DonIsaac)
- ccb1835 semantic: Methods take `Span` as param, not `&Span` (#4470 )
(overlookmotel)
- 7cd53f3 semantic: Var hoisting (#4379 ) (Dunqing)
- c99b3eb syntax: Give `ScopeId` a niche (#4468 ) (overlookmotel)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-05 13:46:06 +08:00
renovate[bot]
b8e2d9c7ac
chore(deps): update rust crates ( #4645 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [flate2](https://togithub.com/rust-lang/flate2-rs ) |
workspace.dependencies | patch | `1.0.30` -> `1.0.31` |
| [indexmap](https://togithub.com/indexmap-rs/indexmap ) |
workspace.dependencies | minor | `2.2.6` -> `2.3.0` |
| [regex](https://togithub.com/rust-lang/regex ) | workspace.dependencies
| patch | `1.10.5` -> `1.10.6` |
| [serde_json](https://togithub.com/serde-rs/json ) |
workspace.dependencies | patch | `1.0.121` -> `1.0.122` |
| [tempfile](https://stebalien.com/projects/tempfile-rs/ )
([source](https://togithub.com/Stebalien/tempfile )) |
workspace.dependencies | minor | `3.10.1` -> `3.11.0` |
---
### Release Notes
<details>
<summary>indexmap-rs/indexmap (indexmap)</summary>
###
[`v2.3.0`](https://togithub.com/indexmap-rs/indexmap/blob/HEAD/RELEASES.md#230 )
[Compare
Source](https://togithub.com/indexmap-rs/indexmap/compare/2.2.6...2.3.0 )
- Added trait `MutableEntryKey` for opt-in mutable access to map entry
keys.
- Added method `MutableKeys::iter_mut2` for opt-in mutable iteration of
map
keys and values.
</details>
<details>
<summary>rust-lang/regex (regex)</summary>
###
[`v1.10.6`](https://togithub.com/rust-lang/regex/blob/HEAD/CHANGELOG.md#1106-2024-08-02 )
[Compare
Source](https://togithub.com/rust-lang/regex/compare/1.10.5...1.10.6 )
\===================
This is a new patch release with a fix for the `unstable` crate feature
that
enables `std::str::Pattern` trait integration.
Bug fixes:
- [BUG #​1219](https://togithub.com/rust-lang/regex/pull/1219 ):
Fix the `Pattern` trait implementation as a result of nightly API
breakage.
</details>
<details>
<summary>serde-rs/json (serde_json)</summary>
###
[`v1.0.122`](https://togithub.com/serde-rs/json/releases/tag/v1.0.122 )
[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.121...v1.0.122 )
- Support using `json!` in no-std crates
([#​1166](https://togithub.com/serde-rs/json/issues/1166 ))
</details>
<details>
<summary>Stebalien/tempfile (tempfile)</summary>
###
[`v3.11.0`](https://togithub.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3110 )
[Compare
Source](https://togithub.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0 )
- Add the ability to override the default temporary directory. This API
shouldn't be used in general, but there are some cases where it's
unavoidable.
</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 was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 02:12:16 +00:00
Boshen
e78cba6464
refactor(minifier): ast passes infrastructure ( #4625 )
...
After studying google closure compiler, I'm leaning towards a multi-ast-pass infrastructure for the minifier.
This is one of the few places where we are going to trade maintainability over performance, given the goal of the minifier is compression size not performance.
All of the terminologies and separation of concerns are aligned with google closure compiler.
Infrastructure of `terser` and `esbuild` are not suitable for us to study nor pursuit. Their code are so tightly coupled - I failed to comprehend any of them every time I try to walk through a piece of optmization. Google closure compiler despite being written in Java, it's actually the most readable minifier out there.
To improve performance between ast passes, I envision a change detection system over a portion of the code.
The benchmark will demonstrate the performance regression of running 5 ast passes instead of 2.
To complete this PR, I need to figure out "fix-point" and order of these ast passes.
2024-08-04 11:58:39 +00:00
Dunqing
3a6e4d91cf
feat(transformer_conformance): test ScopeTree and SymbolTable for correctness after transformation ( #4581 )
...
part of #4549
This test verifies that the correct symbols and scopes were added/changed during the transformation. From the snapshots, most of them are incorrect currently
2024-08-04 11:45:10 +00:00
DonIsaac
6ff200d072
perf(linter): change react rules and utils to use Cow and CompactStr instead of String ( #4603 )
2024-08-03 21:26:08 +00:00
rzvxa
eae401c90b
feat(ast, ast_macros): apply stable repr to all #[ast] enums ( #4373 )
...
closes #4296
2024-08-02 00:07:46 +00: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
overlookmotel
e6a8af6112
refactor(traverse): speed up tests ( #4538 )
...
Closes #4537 .
`oxc_traverse`'s tests to ensure code which would be undefined behavior will not compile were using `trybuild`. This is a thorough way to run these tests, but requires running a lengthy compilation each time tests run.
Implement these tests as `compile_fail` doc tests instead. This is not quite as thorough - now only testing that they don't compile, rather than also *why* they don't compile - but acceptable given the outsized cost of doing it "properly".
2024-07-29 21:30:13 +00:00
renovate[bot]
6f42c55fbe
chore(deps): update rust crate trybuild to v1.0.98 ( #4524 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [trybuild](https://togithub.com/dtolnay/trybuild ) |
workspace.dependencies | patch | `1.0.97` -> `1.0.98` |
---
### Release Notes
<details>
<summary>dtolnay/trybuild (trybuild)</summary>
###
[`v1.0.98`](https://togithub.com/dtolnay/trybuild/releases/tag/1.0.98 )
[Compare
Source](https://togithub.com/dtolnay/trybuild/compare/1.0.97...1.0.98 )
- Fix enabling of default features for workspace dependencies
([#​282](https://togithub.com/dtolnay/trybuild/issues/282 ), thanks
[@​gui1117](https://togithub.com/gui1117 ))
</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.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-29 01:48:51 +00:00
renovate[bot]
bb6b7bc593
chore(deps): update rust crate serde_json to v1.0.121 ( #4520 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [serde_json](https://togithub.com/serde-rs/json ) |
workspace.dependencies | patch | `1.0.120` -> `1.0.121` |
---
### Release Notes
<details>
<summary>serde-rs/json (serde_json)</summary>
###
[`v1.0.121`](https://togithub.com/serde-rs/json/releases/tag/v1.0.121 )
[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.120...v1.0.121 )
- Optimize position search in error path
([#​1160](https://togithub.com/serde-rs/json/issues/1160 ), thanks
[@​purplesyringa](https://togithub.com/purplesyringa ))
</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.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-28 23:10:24 +00:00
renovate[bot]
ee94daee42
chore(deps): update rust crates ( #4517 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [env_logger](https://togithub.com/rust-cli/env_logger ) |
workspace.dependencies | patch | `0.11.3` -> `0.11.5` |
|
[json-strip-comments](https://togithub.com/oxc-project/json-strip-comments )
| workspace.dependencies | patch | `1.0.2` -> `1.0.4` |
| [oxc_resolver](https://togithub.com/oxc-project/oxc-resolver ) |
workspace.dependencies | patch | `1.10.0` -> `1.10.2` |
| [similar](https://togithub.com/mitsuhiko/similar ) |
workspace.dependencies | minor | `2.5.0` -> `2.6.0` |
| [tokio](https://tokio.rs )
([source](https://togithub.com/tokio-rs/tokio )) | workspace.dependencies
| minor | `1.38.0` -> `1.39.2` |
---
### Release Notes
<details>
<summary>rust-cli/env_logger (env_logger)</summary>
###
[`v0.11.5`](https://togithub.com/rust-cli/env_logger/blob/HEAD/CHANGELOG.md#0115---2024-07-25 )
[Compare
Source](https://togithub.com/rust-cli/env_logger/compare/v0.11.4...v0.11.5 )
###
[`v0.11.4`](https://togithub.com/rust-cli/env_logger/blob/HEAD/CHANGELOG.md#0114---2024-07-23 )
[Compare
Source](https://togithub.com/rust-cli/env_logger/compare/v0.11.3...v0.11.4 )
</details>
<details>
<summary>oxc-project/oxc-resolver (oxc_resolver)</summary>
###
[`v1.10.2`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#1102---2024-07-16 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.10.1...oxc_resolver-v1.10.2 )
##### Chore
- Release FreeBSD
###
[`v1.10.1`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#1101---2024-07-15 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.10.0...oxc_resolver-v1.10.1 )
##### Fixed
- resolve module `ipaddr.js` correctly when `extensionAlias` is provided
([#​228](https://togithub.com/oxc-project/oxc_resolver/pull/228 ))
</details>
<details>
<summary>mitsuhiko/similar (similar)</summary>
###
[`v2.6.0`](https://togithub.com/mitsuhiko/similar/blob/HEAD/CHANGELOG.md#260 )
[Compare
Source](https://togithub.com/mitsuhiko/similar/compare/2.5.0...2.6.0 )
- Bump bstr dependency to 1.5.
[#​69](https://togithub.com/mitsuhiko/similar/issues/69 )
</details>
<details>
<summary>tokio-rs/tokio (tokio)</summary>
###
[`v1.39.2`](https://togithub.com/tokio-rs/tokio/releases/tag/tokio-1.39.2 ):
Tokio v1.39.2
[Compare
Source](https://togithub.com/tokio-rs/tokio/compare/tokio-1.39.1...tokio-1.39.2 )
### 1.39.2 (July 27th, 2024)
This release fixes a regression where the `select!` macro stopped
accepting expressions that make use of temporary lifetime extension.
([#​6722])
[#​6722]: https://togithub.com/tokio-rs/tokio/pull/6722
###
[`v1.39.1`](https://togithub.com/tokio-rs/tokio/releases/tag/tokio-1.39.1 ):
Tokio v1.39.1
[Compare
Source](https://togithub.com/tokio-rs/tokio/compare/tokio-1.39.0...tokio-1.39.1 )
##### 1.39.1 (July 23rd, 2024)
This release reverts "time: avoid traversing entries in the time wheel
twice" because it contains a bug. ([#​6715])
[#​6715]: https://togithub.com/tokio-rs/tokio/pull/6715
###
[`v1.39.0`](https://togithub.com/tokio-rs/tokio/releases/tag/tokio-1.39.0 ):
Tokio v1.39.0
[Compare
Source](https://togithub.com/tokio-rs/tokio/compare/tokio-1.38.1...tokio-1.39.0 )
### 1.39.0 (July 23rd, 2024)
- This release bumps the MSRV to 1.70. ([#​6645])
- This release upgrades to mio v1. ([#​6635])
- This release upgrades to windows-sys v0.52 ([#​6154])
##### Added
- io: implement `AsyncSeek` for `Empty` ([#​6663])
- metrics: stabilize `num_alive_tasks` ([#​6619], [#​6667])
- process: add `Command::as_std_mut` ([#​6608])
- sync: add `watch::Sender::same_channel` ([#​6637])
- sync: add
`{Receiver,UnboundedReceiver}::{sender_strong_count,sender_weak_count}`
([#​6661])
- sync: implement `Default` for `watch::Sender` ([#​6626])
- task: implement `Clone` for `AbortHandle` ([#​6621])
- task: stabilize `consume_budget` ([#​6622])
##### Changed
- io: improve panic message of `ReadBuf::put_slice()` ([#​6629])
- io: read during write in `copy_bidirectional` and `copy`
([#​6532])
- runtime: replace `num_cpus` with `available_parallelism`
([#​6709])
- task: avoid stack overflow when passing large future to `block_on`
([#​6692])
- time: avoid traversing entries in the time wheel twice
([#​6584])
- time: support `IntoFuture` with `timeout` ([#​6666])
- macros: support `IntoFuture` with `join!` and `select!`
([#​6710])
##### Fixed
- docs: fix docsrs builds with the fs feature enabled ([#​6585])
- io: only use short-read optimization on known-to-be-compatible
platforms ([#​6668])
- time: fix overflow panic when using large durations with `Interval`
([#​6612])
##### Added (unstable)
- macros: allow `unhandled_panic` behavior for `#[tokio::main]` and
`#[tokio::test]` ([#​6593])
- metrics: add `spawned_tasks_count` ([#​6114])
- metrics: add `worker_park_unpark_count` ([#​6696])
- metrics: add worker thread id ([#​6695])
##### Documented
- io: update `tokio::io::stdout` documentation ([#​6674])
- macros: typo fix in `join.rs` and `try_join.rs` ([#​6641])
- runtime: fix typo in `unhandled_panic` ([#​6660])
- task: document behavior of `JoinSet::try_join_next` when all tasks are
running ([#​6671])
[#​6114]: https://togithub.com/tokio-rs/tokio/pull/6114
[#​6154]: https://togithub.com/tokio-rs/tokio/pull/6154
[#​6532]: https://togithub.com/tokio-rs/tokio/pull/6532
[#​6584]: https://togithub.com/tokio-rs/tokio/pull/6584
[#​6585]: https://togithub.com/tokio-rs/tokio/pull/6585
[#​6593]: https://togithub.com/tokio-rs/tokio/pull/6593
[#​6608]: https://togithub.com/tokio-rs/tokio/pull/6608
[#​6612]: https://togithub.com/tokio-rs/tokio/pull/6612
[#​6619]: https://togithub.com/tokio-rs/tokio/pull/6619
[#​6621]: https://togithub.com/tokio-rs/tokio/pull/6621
[#​6622]: https://togithub.com/tokio-rs/tokio/pull/6622
[#​6626]: https://togithub.com/tokio-rs/tokio/pull/6626
[#​6629]: https://togithub.com/tokio-rs/tokio/pull/6629
[#​6635]: https://togithub.com/tokio-rs/tokio/pull/6635
[#​6637]: https://togithub.com/tokio-rs/tokio/pull/6637
[#​6641]: https://togithub.com/tokio-rs/tokio/pull/6641
[#​6645]: https://togithub.com/tokio-rs/tokio/pull/6645
[#​6660]: https://togithub.com/tokio-rs/tokio/pull/6660
[#​6661]: https://togithub.com/tokio-rs/tokio/pull/6661
[#​6663]: https://togithub.com/tokio-rs/tokio/pull/6663
[#​6666]: https://togithub.com/tokio-rs/tokio/pull/6666
[#​6667]: https://togithub.com/tokio-rs/tokio/pull/6667
[#​6668]: https://togithub.com/tokio-rs/tokio/pull/6668
[#​6671]: https://togithub.com/tokio-rs/tokio/pull/6671
[#​6674]: https://togithub.com/tokio-rs/tokio/pull/6674
[#​6692]: https://togithub.com/tokio-rs/tokio/pull/6692
[#​6695]: https://togithub.com/tokio-rs/tokio/pull/6695
[#​6696]: https://togithub.com/tokio-rs/tokio/pull/6696
[#​6709]: https://togithub.com/tokio-rs/tokio/pull/6709
[#​6710]: https://togithub.com/tokio-rs/tokio/pull/6710
###
[`v1.38.1`](https://togithub.com/tokio-rs/tokio/releases/tag/tokio-1.38.1 ):
Tokio v1.38.1
[Compare
Source](https://togithub.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1 )
### 1.38.1 (July 16th, 2024)
This release fixes the bug identified as ([#​6682]), which caused
timers not
to fire when they should.
##### Fixed
- time: update `wake_up` while holding all the locks of sharded time
wheels ([#​6683])
[#​6682]: https://togithub.com/tokio-rs/tokio/pull/6682
[#​6683]: https://togithub.com/tokio-rs/tokio/pull/6683
</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 was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View the
[repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-28 17:17:46 +00: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
overlookmotel
c99b3eb464
refactor(syntax): give ScopeId a niche ( #4468 )
...
Make `ScopeId` a type with a niche, like `SymbolId` and `ReferenceId`. This makes `Option<ScopeId>` 4 bytes instead of 8, and shrinks various AST types e.g. `ArrowFunctionExpression` by 8 bytes, and halves the size of the `Vec` in `ScopeTree::parent_ids`.
The snapshot change on `prefer-hooks-in-order` lint rule appears incidental - it doesn't alter what errors are reported, only the order they're reported in. This appears to be because it changes the order of keys in a hashmap keyed by `ScopeId` that [the rule uses](a49f4915de/crates/oxc_linter/src/rules/jest/prefer_hooks_in_order.rs (L143) ).
2024-07-26 00:14:50 +00:00
overlookmotel
96fc94f61e
refactor(syntax): use NonMaxU32 for IDs ( #4467 )
...
`SymbolId` and `ReferenceId` are stored as `NonZeroU32`, but with a wrapper to make `u32::MAX` the illegal value, instead of `0`.
Use the existing `nonmax` crate for this. Our current implementation uses `idx + 1` to avoid the zero value, whereas `nonmax` crate uses XOR `idx ^ u32::MAX`, which is a cheaper operation.
Initially I made this change manually instead of pulling in a dependency, but it's a pain because it requires implementing `Debug` and `PartialOrd` by hand to handle the difference between the "actual" value and its stored representation. So I thought better to use a crate which does this for us.
2024-07-26 00:14:47 +00:00
cinchen
e3b0c4066a
feat(linter): eslint-plugin-vitest/no-identical-title ( #4422 )
...
support
[eslint-plugin-vitest/no-identical-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md )
---------
Co-authored-by: Don Isaac <donald.isaac@gmail.com>
2024-07-25 00:24:19 -04: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
Boshen
fb15a19040
chore: fix cyclic dependencies by moving mangler tests to oxc_minifier
2024-07-23 22:13:13 +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
renovate[bot]
910f2a0a0a
chore(deps): update rust crate handlebars to v6 ( #4402 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [handlebars](https://togithub.com/sunng87/handlebars-rust ) |
workspace.dependencies | major | `5.1.2` -> `6.0.0` |
---
### Release Notes
<details>
<summary>sunng87/handlebars-rust (handlebars)</summary>
###
[`v6.0.0`](https://togithub.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#600---2024-07-20 )
[Compare
Source](https://togithub.com/sunng87/handlebars-rust/compare/v5.1.2...v6.0.0 )
- \[Fixed] Various indent issue with partials, empty lines and helpers
\[[#​646](https://togithub.com/sunng87/handlebars-rust/issues/646 )]
\[[#​654](https://togithub.com/sunng87/handlebars-rust/issues/654 )]
\[[#​658](https://togithub.com/sunng87/handlebars-rust/issues/658 )]
- \[Fixed] Bug when accessing nested path
\[[#​651](https://togithub.com/sunng87/handlebars-rust/issues/651 )]
- \[Added] New public access to `PathSeg`
\[[#​656](https://togithub.com/sunng87/handlebars-rust/issues/656 )]
- \[Added] New API to set single block params in `BlockContext`
\[[#​655](https://togithub.com/sunng87/handlebars-rust/issues/655 )]
- \[Added] `From<RenderError>` for `RenderErrorReason`
\[[#​644](https://togithub.com/sunng87/handlebars-rust/issues/644 )]
- \[Changed] Add `non_exhaustive` attribute to all public memebers
\[[#​647](https://togithub.com/sunng87/handlebars-rust/issues/647 )]
- \[Changed] `RenderContext` API and improved performance for partial
rendering
\[[#​661](https://togithub.com/sunng87/handlebars-rust/issues/661 )]
\[[#​662](https://togithub.com/sunng87/handlebars-rust/issues/662 )]
- \[Changed] Improved error messsage for template parsing
\[[#​638](https://togithub.com/sunng87/handlebars-rust/issues/638 )]
</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.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-22 05:04:02 +00:00
renovate[bot]
79eb662f3f
chore(deps): update rust crates ( #4399 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
|
[json-strip-comments](https://togithub.com/oxc-project/json-strip-comments )
| workspace.dependencies | patch | `1.0.2` -> `1.0.4` |
| [oxc_resolver](https://togithub.com/oxc-project/oxc-resolver ) |
workspace.dependencies | patch | `1.10.0` -> `1.10.2` |
| [similar](https://togithub.com/mitsuhiko/similar ) |
workspace.dependencies | minor | `2.5.0` -> `2.6.0` |
| [tokio](https://tokio.rs )
([source](https://togithub.com/tokio-rs/tokio )) | workspace.dependencies
| patch | `1.38.0` -> `1.38.1` |
---
### Release Notes
<details>
<summary>oxc-project/oxc-resolver (oxc_resolver)</summary>
###
[`v1.10.2`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#1102---2024-07-16 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.10.1...oxc_resolver-v1.10.2 )
##### Chore
- Release FreeBSD
###
[`v1.10.1`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#1101---2024-07-15 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.10.0...oxc_resolver-v1.10.1 )
##### Fixed
- resolve module `ipaddr.js` correctly when `extensionAlias` is provided
([#​228](https://togithub.com/oxc-project/oxc_resolver/pull/228 ))
</details>
<details>
<summary>mitsuhiko/similar (similar)</summary>
###
[`v2.6.0`](https://togithub.com/mitsuhiko/similar/blob/HEAD/CHANGELOG.md#260 )
[Compare
Source](https://togithub.com/mitsuhiko/similar/compare/2.5.0...2.6.0 )
- Bump bstr dependency to 1.5.
[#​69](https://togithub.com/mitsuhiko/similar/issues/69 )
</details>
<details>
<summary>tokio-rs/tokio (tokio)</summary>
###
[`v1.38.1`](https://togithub.com/tokio-rs/tokio/releases/tag/tokio-1.38.1 ):
Tokio v1.38.1
[Compare
Source](https://togithub.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1 )
### 1.38.1 (July 16th, 2024)
This release fixes the bug identified as ([#​6682]), which caused
timers not
to fire when they should.
##### Fixed
- time: update `wake_up` while holding all the locks of sharded time
wheels ([#​6683])
[#​6682]: https://togithub.com/tokio-rs/tokio/pull/6682
[#​6683]: https://togithub.com/tokio-rs/tokio/pull/6683
</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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-22 00:05:23 +00:00
overlookmotel
da13d9338f
perf(semantic): remove bounds checks on unresolved references stack ( #4390 )
...
`SemanticBuilder` keeps a stack of hashmaps to track unresolved references. This stack only grows, never shrinks. Use that invariant to remove bounds checks.
2024-07-21 15:49:52 +00:00
Boshen
3d88f20cbb
fix(codegen): print shorthand for all { x } variants ( #4374 )
...
closes #4340
2024-07-21 19:54:21 +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
1f7ec62d44
chore: move mangler example to minifier ( #4343 )
...
```
Error: Circular dependency detected: oxc_codegen -> oxc_mangler
```
2024-07-18 06:27:16 +00: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
DonIsaac
7afa1f06c3
feat(linter): support suggestions and dangerous fixes ( #4223 )
2024-07-18 02:20:30 +00:00
github-actions[bot]
697c0efdef
Release oxlint v0.6.1 ( #4326 )
...
## [0.6.1] - 2024-07-17
### Features
- 83c2c62 codegen: Add option for choosing quotes; remove slow
`choose_quot` method (#4219 ) (Boshen)
- 1f8968a linter: Add eslint-plugin-promise rules: avoid-new,
no-new-statics, params-names (#4293 ) (Jelle van der Waa)
- a4dc56c linter: Add fixer for
unicorn/no_useless_promise_resolve_reject (#4244 ) (Burlin)
- 6fb808f linter: Add typescript-eslint/no-confusing-non-null-assertion
(#4224 ) (Jaden Rodriguez)
- 126b66c linter: Support eslint-plugin-vitest/valid-describe-callback
(#4185 ) (cinchen)
- 05b9a73 linter: Support eslint-plugin-vitest/valid-expect (#4183 )
(cinchen)
- 3e56b2b linter: Support eslint-plugin-vitest/no-test-prefixes (#4182 )
(cinchen)
- 3016f03 linter: Let fixer functions return a `None` fix (#4210 )
(DonIsaac)
- bbe6137 linter: Implement unicorn/no-useless-undefined (#4079 )
(Burlin)
- 20cdb1f semantic: Align class scope with typescript (#4195 ) (Dunqing)
### Bug Fixes
- 9df60da linter: Correct find first non whitespace logic in
@typescript-eslint/consistent-type-imports (#4198 ) (mysteryven)
- 67240dc linter: Not ignore adjacent spans when fixing (#4217 )
(mysteryven)
- dd07a54 linter: Global variables should always check the builtin
variables (#4209 ) (Jelle van der Waa)
- 351ecf2 semantic: Incorrect resolve references for `TSTypeQuery`
(#4310 ) (Dunqing)
- 1108f2a semantic: Resolve references to the incorrect symbol (#4280 )
(Dunqing)
### Performance
- 0fdc88b linter: Optimize no-dupe-keys (#4292 ) (lucab)
### Refactor
- 2c7bb9f ast: Pass final `ScopeFlags` into `visit_function` (#4283 )
(overlookmotel)
- aa22073 codegen: Improve print API (#4196 ) (Boshen)
- b5a8f3c linter: Use get_first_parameter_name from unicorn utils
(#4255 ) (Jelle van der Waa)
- 7089a3d linter: Split up fixer code into separate files (#4222 )
(DonIsaac)
- ace4f1f semantic: Update the order of `visit_function` and `Visit`
fields in the builder to be consistent (#4248 ) (Dunqing)
- 7f1addd semantic: Correct scope in CatchClause (#4192 ) (Dunqing)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-17 21:18:28 +08:00
Boshen
5d17675cde
feat(mangler): add debug mode ( #4314 )
...
closes #4303
2024-07-17 04:59:23 +00:00
Dunqing
48724a0d44
chore(semantic): copy tests from typescript-eslint’s scope-manager ( #3990 )
...
close: #2947
These fixtures were copied from a5b652da1e/packages/scope-manager/tests/fixtures . We used them to test out semantic `ScopeTree` and `SymbolTable`
2024-07-17 02:50:50 +00:00
renovate[bot]
d3df3c20d9
chore(deps): update rust crates ( #4261 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [compact_str](https://togithub.com/ParkMyCar/compact_str ) |
workspace.dependencies | minor | `0.7.1` -> `0.8.0` |
| [napi](https://togithub.com/napi-rs/napi-rs ) | workspace.dependencies
| patch | `3.0.0-alpha.3` -> `3.0.0-alpha` |
| [napi-derive](https://togithub.com/napi-rs/napi-rs ) |
workspace.dependencies | patch | `3.0.0-alpha.2` -> `3.0.0-alpha` |
| [oxc_resolver](https://togithub.com/oxc-project/oxc-resolver ) |
workspace.dependencies | minor | `1.9.3` -> `1.10.0` |
---
### Release Notes
<details>
<summary>ParkMyCar/compact_str (compact_str)</summary>
###
[`v0.8.0`](https://togithub.com/ParkMyCar/compact_str/blob/HEAD/CHANGELOG.md#080 )
##### July 8, 2024
#### Breaking Changes 💥
- Consolidate `CompactString::new_inline(...)` and
`CompactString::from_static_str(...)` into
`CompactString::const:new(...)`. Methods are currently marked as
deprecated and will be removed in `v0.9.0`.
- Implemented in [`Add const_new(); remove new_inline() and
from_static_str()`](https://togithub.com/ParkMyCar/compact_str/pull/336 )
- Minimum supported Rust version (MSRV) was bumped to `v1.60`
- Implemented in [`fix: MSRV check and change MSRV to
1.60`](https://togithub.com/ParkMyCar/compact_str/pull/395 )
#### Changes
- Add support for [`borsh`](https://crates.io/crates/borsh ) under an
optional feature.
- Implemented in [`Add borsh
support`](https://togithub.com/ParkMyCar/compact_str/pull/393 )
- Add additial `PartialEq` impls for `CompactString`
- Implemented in [`fix: More PartialEq
impls`](https://togithub.com/ParkMyCar/compact_str/pull/381 )
- Match alignment of internal `InlineBuffer` and `Repr`.
- Implemeneted in [`Align InlineBuffer same as
Repr`](https://togithub.com/ParkMyCar/compact_str/pull/358 )
- Fix conflict between `serde` and `no_std` features.
- Implemented in [`fix serde no-std
issue`](https://togithub.com/ParkMyCar/compact_str/pull/347 )
- Improve performance of `CompactString::is_empty`.
- Implemented in [`Simplify
is_empty()`](https://togithub.com/ParkMyCar/compact_str/pull/330 )
- Implement additional `From` impls that `std::string::String` has.
- Implemented in [`Add missing From impls that String
has`](https://togithub.com/ParkMyCar/compact_str/pull/328 )
- Implement
[`Clone::clone_from`](https://doc.rust-lang.org/std/clone/trait.Clone.html#method.clone_from )
for `CompactString`.
- Implemented in [`Impl Clone::clone_from for
CompactString`](https://togithub.com/ParkMyCar/compact_str/pull/325 )
- Make re-allocations of a heap-based `CompactString` fallible.
- Implemented in [`Make (re)allocations
fallible`](https://togithub.com/ParkMyCar/compact_str/pull/323 )
- Inline short `&'static str`s
- Implemented in [`Inline short static
strings`](https://togithub.com/ParkMyCar/compact_str/pull/321 )
- Add support for serializing a `CompactString` from
[`diesel`](https://crates.io/crates/diesel ) and
[`sqlx`](https://crates.io/crates/sqlx )
- Implemented in [`Implement diesel
compatibility`](https://togithub.com/ParkMyCar/compact_str/pull/318 )
- Implemented in [`Implement for
sqlx`](https://togithub.com/ParkMyCar/compact_str/pull/329 )
... and everything from `v0.8.0-beta`
#### Fixed Issues
- Re-enabled specialization for `String` in `trait ToCompactString` by
upgrading to `castaway v0.2.3`
- Implemented in [`deps: Upgrade to castaway
v0.2.3`](https://togithub.com/ParkMyCar/compact_str/pull/394 )
</details>
<details>
<summary>napi-rs/napi-rs (napi)</summary>
###
[`v3.0.0-alpha.7`](https://togithub.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.6...napi@3.0.0-alpha.7 )
[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.6...napi@3.0.0-alpha.7 )
</details>
<details>
<summary>oxc-project/oxc-resolver (oxc_resolver)</summary>
###
[`v1.10.0`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#1100---2024-07-11 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.9.4...oxc_resolver-v1.10.0 )
##### Added
- *(napi)* expose module type info in ResolveResult
([#​223](https://togithub.com/oxc-project/oxc_resolver/pull/223 ))
##### Fixed
- remove `#[cfg(target_os = "windows")]` logic in `canonicalize`
([#​221](https://togithub.com/oxc-project/oxc_resolver/pull/221 ))
##### Other
- update `cargo deny`
([#​222](https://togithub.com/oxc-project/oxc_resolver/pull/222 ))
- pin crate-ci/typos version
###
[`v1.9.4`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#194---2024-07-10 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.9.3...oxc_resolver-v1.9.4 )
##### Other
- use custom canonicalize impl to avoid useless syscall
([#​220](https://togithub.com/oxc-project/oxc_resolver/pull/220 ))
- add symlink fixtures
([#​219](https://togithub.com/oxc-project/oxc_resolver/pull/219 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: rzvxa <rzvxa@protonmail.com>
2024-07-15 10:49:08 +08:00
Boshen
9a094e861e
chore(codegen): add ts snapshot test
2024-07-14 20:46:22 +08:00
Boshen
e167ef79c6
fix(codegen): print parenthesis properly ( #4245 )
...
`TSParenthesizedType` handles parenthesis in ts types.
It should be considered a bug if parenthesis is not printed correctly after this PR.
2024-07-14 04:13:10 +00:00
Boshen
8a190eb166
feat(oxc): export oxc_mangler
2024-07-11 21:15:32 +08:00
Boshen
e3e663bae4
feat(mangler): initialize crate and integrate into minifier ( #4197 )
2024-07-11 10:35:13 +00:00
github-actions[bot]
4f26e51b74
Release oxlint v0.6.0 ( #4194 )
...
## [0.6.0] - 2024-07-11
- 5731e39 ast: [**BREAKING**] Store span details inside comment struct
(#4132 ) (Luca Bruno)
### Features
- fb549e1 linter: Add vitest/no-focused-tests rule (#4178 ) (mysteryven)
- 6c49007 linter: Add fixer for
@typescript-eslint/consistent-type-imports (#3984 ) (mysteryven)
- 278c3e9 linter: Add fixer for jsx-a11y/aria-props (#4176 ) (DonIsaac)
- 2188144 linter: Eslint-plugin-jest/prefer-hooks-in-order (#4052 )
(cinchen)
- cc58614 linter: Better schemas for allow/warn/deny (#4150 ) (DonIsaac)
- c5b4be0 linter: Add fixer for prefer-node-protocol (#4129 ) (DonIsaac)
- 7ec0c0b linter/eslint: Implement no-label-var (#4087 ) (Jelle van der
Waa)
### Bug Fixes
- ed4c54c eslint/radix: Detect yield Number.parseInt variant (#4110 )
(Jelle van der Waa)
- e9ad03b linter: Fixer for no-debugger creates incorrect code (#4184 )
(DonIsaac)
- bd69571 linter: Fix top level return panic in
eslint/array_callback_return (#4167 ) (Boshen)
- c8f5664 linter: Fix panic with unicode in
unicorn/prefer_dom_node_dataset (#4166 ) (Boshen)
- f2b3273 linter: Fix fixer panic in
typescript/consistent_indexed_object_style (#4165 ) (Boshen)
- 2334515 linter: Panic in `get_enclosing_function` (#4121 ) (DonIsaac)
- 1b91d40 linter: Incorrect fixer for `no-unused-labels` (#4123 ) (Don
Isaac)
- 1729249 linter: Incorrect fix in
`no-single-promise-in-promise-methods` rule; (#4094 ) (DonIsaac)
- cc7e893 linter/tree-shaking: Avoid recursive function stackoverflow
(#4191 ) (mysteryven)
- 28eeee0 parser: Fix asi error diagnostic pointing at invalid text
causing crash (#4163 ) (Boshen)
- 0f02608 semantic: Bind `TSImportEqualsDeclaration`s (#4100 ) (Don
Isaac)
### Performance
- ddfa343 diagnostic: Use `Cow<'static, str>` over `String` (#4175 )
(DonIsaac)
### Refactor
- 2687ebc react: Use find_binding helper for finding React binding
(#4108 ) (Jelle van der Waa)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-11 14:38:41 +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