Commit graph

574 commits

Author SHA1 Message Date
Billy Levin
a6e97690a7
feat(linter/jsx-a11y): add label-has-associated-control (#5163) 2024-08-26 23:33:55 -04:00
overlookmotel
b479afdafc ci: transformer benchmark measure transformer itself only (#5193)
Transformer benchmark measure only the transformer itself. Parse, generate `Semantic`, and drop `Semantic` outside of the measured section.

This should:

1. Give us greater visibility of how changes to transformer affect its performance.
2. Reduce variance in transformer benchmarks, since they will no longer include the variance introduced by `SemanticBuilder`.

Not ready to merge yet. We should first add an "end to end" benchmark testing the entire compilation process (parse - semantic - transform - minify - codegen).

This PR depends on https://github.com/Boshen/criterion2.rs/pull/49. This PR currently makes Oxc's dependency on `criterion2` a git dependency on that PR's branch. That can be changed once the upstream PR is merged.
2024-08-27 01:53:27 +00:00
Kevin Deng 三咲智子
1af7f04a36
feat(wasm): output panic info to console (#5238)
Playground Preview:
<img width="1769" alt="image"
src="https://github.com/user-attachments/assets/12143fb5-f6a6-48bc-8dee-cf85b6c52392">
2024-08-27 09:12:15 +08:00
oxc-bot
2a001a043c
Release oxlint v0.9.0 (#5219)
## [0.9.0] - 2024-08-26

- 5946748 linter: [**BREAKING**] Parse and display syntax errors for
regular expressions (#5214) (Boshen)

- b894d3b linter: [**BREAKING**] Make `no-unused-vars` correctness
(#5081) (DonIsaac)

### Features

- 1ce9630 linter/config: Implement FromIterator for LintPluginOptions
(#5102) (DonIsaac)
- 34bfaf6 linter/react: Add fixer to `jsx-props-no-spread-multi` (#5145)
(camc314)
- 982bd6e linter/unicorn: Add fixer to `require-array-join-separator`
(#5152) (camc314)
- a6704bd linter/unicorn: Add fixer to `prefer-set-size` (#5149)
(camc314)
- ac7edcc linter/unicorn: Add fixer to `prefer-array-some` (#5153)
(camc314)
- 1d01aa3 linter/unicorn: Add partial fixer for `prefer-array-flat`
(#5143) (camc314)
- 22d57f9 linter/unicorn: Add fixer to `prefer-string-slice` (#5150)
(Cameron)
- 2fe4415 linter/unicorn: Add fixer to `no-redundant-roles` (#5146)
(Cameron)
- d35c6f5 linter/unicorn: Add fixer to `prefer-regexp-test` (#5151)
(Cameron)
- 27db769 linter/unicorn: Add fixer to `text-encoding-identifier-case`
(#5154) (Cameron)
- f7958c4 linter/unicorn: Add prefer-structured-clone (#5095) (Jelle van
der Waa)
- 004ffa0 linter/vitest: Implement `prefer-each` (#5203) (dalaoshu)

### Bug Fixes

- aaaf26c linter: Error in fixer for prefer-to-have-length (#5197)
(dalaoshu)
- 1f5b6b6 linter: Bug in fixer for prefer-to-have-length (#5164)
(dalaoshu)
- 7eb052e linter: `no-hex-escape` fixer removing regex flags (#5137)
(Cameron)
- 76c66b4 linter/max-lines: Point span to end of file for disable
directive to work (#5117) (Boshen)
- 8ff6f2c linter/no-unused-vars: Panic on UsingDeclarations (#5206)
(DonIsaac)
- d29042e linter/no-unused-vars: Function expression in implicit arrow
function return (#5155) (DonIsaac)
- 36e4a28 linter/no-unused-vars: Panic in variable declarator usage
checks (#5160) (DonIsaac)
- ba62a71 linter/react: Fixed false positive with missing key inside
React.Children.toArray() for fragments (#5133) (Earl Chase)
- fd1031a linter/unicorn: Breaking fixer in case statements for
`no-null` (#5176) (DonIsaac)
- 7b86ed6 linter/unicorn: Handle type casts and parens in `no-null`
(#5175) (Don Isaac)
- b629e16 linter/unicorn: Improve diagnostic message for `no-null`
(#5172) (DonIsaac)

### Performance
- ce454cf Use simdutf8 to validate UTF-8 when reading files (#5196)
(dalaoshu)

### Refactor

- 543cad6 codegen: Remove some pub APIs (Boshen)
- 0d3661a linter: Remove meaningless `span0` (#5209) (dalaoshu)
- 2a91ef1 linter: `eslint/no_redeclare` rule use `run_on_symbol` not
`run_once` (#5201) (overlookmotel)
- 33599b0 linter: Split options into multiple files (#5101) (DonIsaac)
- 7ab6152 linter/unicorn: Clean up `no-null` (#5174) (DonIsaac)

### Testing

- a877e5a linter/no-unused-vars: Ensure type annotations on property
accessors are considered used (#5183) (DonIsaac)
- 7886618 linter/unicorn: Add fixer tests for `no-null` (#5173)
(DonIsaac)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-26 16:50:15 +08:00
renovate[bot]
04c5ca2ceb
chore(deps): update rust crates (#5208)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](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.31` -> `1.0.33` |
| [prettyplease](https://togithub.com/dtolnay/prettyplease) |
workspace.dependencies | patch | `0.2.20` -> `0.2.22` |
| [quote](https://togithub.com/dtolnay/quote) | workspace.dependencies |
patch | `1.0.36` -> `1.0.37` |
| [serde](https://serde.rs)
([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies
| patch | `1.0.208` -> `1.0.209` |
| [serde_json](https://togithub.com/serde-rs/json) |
workspace.dependencies | patch | `1.0.125` -> `1.0.127` |

---

### Release Notes

<details>
<summary>rust-lang/flate2-rs (flate2)</summary>

###
[`v1.0.33`](https://togithub.com/rust-lang/flate2-rs/releases/tag/1.0.33):
- fix minimal manifest versions

[Compare
Source](https://togithub.com/rust-lang/flate2-rs/compare/1.0.32...1.0.33)

#### What's Changed

- Fix msrv: Run msrv checks with minimal versions by
[@&#8203;NobodyXu](https://togithub.com/NobodyXu) in
[https://github.com/rust-lang/flate2-rs/pull/425](https://togithub.com/rust-lang/flate2-rs/pull/425)

#### New Contributors

- [@&#8203;NobodyXu](https://togithub.com/NobodyXu) made their first
contribution in
[https://github.com/rust-lang/flate2-rs/pull/425](https://togithub.com/rust-lang/flate2-rs/pull/425)

**Full Changelog**:
https://github.com/rust-lang/flate2-rs/compare/1.0.32...1.0.33

###
[`v1.0.32`](https://togithub.com/rust-lang/flate2-rs/releases/tag/1.0.32):
- turn panic into error

[Compare
Source](https://togithub.com/rust-lang/flate2-rs/compare/1.0.31...1.0.32)

#### What's Changed

##### Fix

- Return error instead of packing on Z_MEM_ERROR by
[@&#8203;crazymerlyn](https://togithub.com/crazymerlyn) in
[https://github.com/rust-lang/flate2-rs/pull/423](https://togithub.com/rust-lang/flate2-rs/pull/423)

##### Other

- prepare new release by [@&#8203;Byron](https://togithub.com/Byron) in
[https://github.com/rust-lang/flate2-rs/pull/416](https://togithub.com/rust-lang/flate2-rs/pull/416)
- update miniz_oxide dependency to 0.8.x by
[@&#8203;oyvindln](https://togithub.com/oyvindln) in
[https://github.com/rust-lang/flate2-rs/pull/420](https://togithub.com/rust-lang/flate2-rs/pull/420)
- update maintenance guide with recent news by
[@&#8203;Byron](https://togithub.com/Byron) in
[https://github.com/rust-lang/flate2-rs/pull/419](https://togithub.com/rust-lang/flate2-rs/pull/419)
- Check minimal version of Rust that compiles by
[@&#8203;jongiddy](https://togithub.com/jongiddy) in
[https://github.com/rust-lang/flate2-rs/pull/421](https://togithub.com/rust-lang/flate2-rs/pull/421)
- Remove non-existent build in CI by
[@&#8203;jongiddy](https://togithub.com/jongiddy) in
[https://github.com/rust-lang/flate2-rs/pull/422](https://togithub.com/rust-lang/flate2-rs/pull/422)

#### New Contributors

- [@&#8203;crazymerlyn](https://togithub.com/crazymerlyn) made their
first contribution in
[https://github.com/rust-lang/flate2-rs/pull/423](https://togithub.com/rust-lang/flate2-rs/pull/423)

**Full Changelog**:
https://github.com/rust-lang/flate2-rs/compare/1.0.31...1.0.32

</details>

<details>
<summary>dtolnay/prettyplease (prettyplease)</summary>

###
[`v0.2.22`](https://togithub.com/dtolnay/prettyplease/releases/tag/0.2.22)

[Compare
Source](https://togithub.com/dtolnay/prettyplease/compare/0.2.21...0.2.22)

- Support formatting precise capture `use<>` syntax
([#&#8203;80](https://togithub.com/dtolnay/prettyplease/issues/80))

###
[`v0.2.21`](https://togithub.com/dtolnay/prettyplease/releases/tag/0.2.21)

[Compare
Source](https://togithub.com/dtolnay/prettyplease/compare/0.2.20...0.2.21)

- Support formatting tail-call `become` expressions
([#&#8203;79](https://togithub.com/dtolnay/prettyplease/issues/79))

</details>

<details>
<summary>dtolnay/quote (quote)</summary>

### [`v1.0.37`](https://togithub.com/dtolnay/quote/releases/tag/1.0.37)

[Compare
Source](https://togithub.com/dtolnay/quote/compare/1.0.36...1.0.37)

- Implement ToTokens for CStr and CString
([#&#8203;283](https://togithub.com/dtolnay/quote/issues/283))

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

###
[`v1.0.209`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.209)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.208...v1.0.209)

- Fix deserialization of empty structs and empty tuples inside of
untagged enums
([#&#8203;2805](https://togithub.com/serde-rs/serde/issues/2805), thanks
[@&#8203;Mingun](https://togithub.com/Mingun))

</details>

<details>
<summary>serde-rs/json (serde_json)</summary>

###
[`v1.0.127`](https://togithub.com/serde-rs/json/releases/tag/1.0.127)

[Compare
Source](https://togithub.com/serde-rs/json/compare/1.0.126...1.0.127)

- Add more removal methods to OccupiedEntry
([#&#8203;1179](https://togithub.com/serde-rs/json/issues/1179), thanks
[@&#8203;GREsau](https://togithub.com/GREsau))

###
[`v1.0.126`](https://togithub.com/serde-rs/json/releases/tag/1.0.126)

[Compare
Source](https://togithub.com/serde-rs/json/compare/1.0.125...1.0.126)

- Improve string parsing on targets that use 32-bit pointers but also
have fast 64-bit integer arithmetic, such as
aarch64-unknown-linux-gnu_ilp32 and x86\_64-unknown-linux-gnux32
([#&#8203;1182](https://togithub.com/serde-rs/json/issues/1182), thanks
[@&#8203;CryZe](https://togithub.com/CryZe))

</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-26 03:19:54 +00:00
dalaoshu
ce454cf426
perf: use simdutf8 to validate UTF-8 when reading files (#5196)
closes #5191

---------

Co-authored-by: overlookmotel <j@dummett.org>
2024-08-26 10:14:21 +08:00
Boshen
dd3ad4d68e
chore(regular_expression): remove circular dependency
Error: Circular dependency detected: oxc_parser -> oxc_regular_expression
2024-08-23 16:16:10 +08:00
Boshen
fc4eba5096
chore: publish oxc_regular_expression 2024-08-23 16:16:10 +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
8ef85a43c0
Release oxlint v0.8.0 (#5104)
## [0.8.0] - 2024-08-23

- 5f4c9ab semantic: [**BREAKING**] Rename `SymbolTable::get_flag` to
`get_flags` (#5030) (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

- 2292606 linter: Typescript-eslint/no-wrapper-object-types (#5022)
(camc314)
- a0effab linter: Support more flexible config.globals values (#4990)
(Don Isaac)
- cdbfcfb linter: Start import fixer for eslint/no-unused-vars (#4849)
(DonIsaac)
- 915cb4d linter: Add dangerous fixer for oxc only used in recursion
(#4805) (camc314)
- 3f28c77 linter/eslint: Improve no-dupe-keys (#4943) (DonIsaac)
- e1582a5 linter/eslint: Improve no-duplicate-case rule (#4942)
(DonIsaac)
- f1e4611 linter/eslint-plugin-vitest: Implement no-conditional-in-test
(#4971) (dalaoshu)
- 14bf5d5 linter/eslint-plugin-vitest: Implement
no-restricted-vi-methods (#4956) (dalaoshu)
- ed9a1c4 linter/eslint-plugin-vitest: Implement
require-local-test-context-for-concurrent-snapshots (#4951) (dalaoshu)
- 7859f58 linter/eslint-plugin-vitest: Implement no-conditional-tests
(#4955) (dalaoshu)
- 841174f linter/no-unused-vars: Delete non-root arrows, skip `await`
(#5083) (Don Isaac)

### Bug Fixes

- 86d0c0c linter: Change consistent-function-scoping to suspicious
(#5010) (DonIsaac)
- 7b99386 linter: Missing closing ticks in some example blocks (#4994)
(DonIsaac)
- 9c64b12 linter: Improve no-zero-fractions rule for member expressions
and scientific notation (#4793) (Burlin)
- c43945c linter/consistent-function-scoping: Allow functions passed as
arguments (#5011) (Don Isaac)
- 9354779 linter/no-unused-vars: Give `argsIgnorePattern` the same
default behavior as `varsIgnorePattern` (#5018) (DonIsaac)
- 5a55dcf linter/no-unused-vars: `type` specifier not deleted for type
imports (#5029) (DonIsaac)
- 4081293 linter/no-unused-vars: Panic in fixer when removing
destructures (#4923) (Don Isaac)
- ddf83ff linter/react: Fixed false positive with missing key inside
React.Children.toArray() (#4945) (Earl Chase)
- 508644a linter/tree-shaking: Correct the calculation of `>>`, `<<` and
`>>>` (#4932) (mysteryven)
- e99836d linter/unicorn: Allow set spreading in no-useless-spread
(#4944) (Don Isaac)
- 5f8a7c2 oxlint: Rules in the configuration file are not being
correctly … (#4949) (dalaoshu)

### Documentation

- e331ca0 linter: Improve documentation for several rules (#4997)
(DonIsaac)
- cd9f1cd linter/consistent-function-scoping: Improve rule documentation
(#5015) (DonIsaac)

### Refactor

- eca6fdb linter: Move plugin options into separate struct (#5100)
(DonIsaac)
- 06f2d81 linter: Avoid unnecessary temp `Vec`s (#4963) (overlookmotel)
- 4cb8c37 linter: Move default_true to utils (#4947) (Don Isaac)
- ca70cc7 linter, mangler, parser, semantic, transformer, traverse,
wasm: Rename various `flag` vars to `flags` (#5028) (overlookmotel)
- 59d15c7 semantic: `root_unresolved_references` contain only
`ReferenceId` (#4959) (overlookmotel)

### Testing

- c21d735 linter/no-unused-vars: Add ignored destructuring test cases
(#4922) (Don Isaac)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-23 11:09:14 +08:00
Boshen
4b49cf8ce4 feat(transformer): always pass in symbols and scopes (#5087)
We no longer need to build semantic data inside the transformer.

The caller should be responsible for handling semantic data and its
errors.

The best way to achieve this in via `CompilerInterface`.

closes #3565
2024-08-22 16:06:31 +00:00
leaysgur
96f57984eb refactor(regular_expression): Misc refactoring for body_parser (#5062)
- Add examples to list all `RegExp`s in source code
- Refactor `MayContainStrings` related part
2024-08-22 11:21:41 +00:00
Boshen
afe728a73a feat(parser): parse regular expression with regex parser (#4998)
Many false positives and incorrect errors. @leaysgur Enjoy 😁

Run `just conformance` to update the snapshot.
2024-08-22 03:09:55 +00:00
IWANABETHATGUY
b7db235065
fix: comments gen regression (#5003)
try to fix: https://github.com/rolldown/rolldown/issues/2013
1. Before we only considering the ast is untouched, but considering the
scenario.
```js

const a = /*__PURE__*/ test(),
//    ^^^              ^^^^^^ is removed during transform
	b = a();

```
Then according to the previous algorithm, `PURE` will attach to `b =
a()`
2. Now, we try to attach comments as much as possible unless the
comments are separated by comments, for the case above, `PURE` will not
be attached to `a()` since the content between `b = a()` and `/*
__PURE__*/` is not all whitespace.
3. we added back `MoveMap`, for the special case 
```js
/*__NODE_SIDE_EFFECTS__*/ export const c = 100;
// ^^^^^^^^^^^^^^^^^^^^^         should be attached to first declarator,
//                        ^^^^^^ are not whitespace

```
2024-08-20 18:57:12 +08:00
Boshen
8d3f61bb54
chore(oxc_regular_expression): rename crate 2024-08-20 10:59:00 +08:00
leaysgur
368364d47b feat(regex_parser): Implement RegExp parser (#3824)
Part of #1164

## Progress updates 🗞️

Waiting for the review and advice, while thinking how to handle escaped string when `new RegExp(pat)`.

## TODOs

- [x] `RegExp(Literal = Body + Flags)#parse()` structure
- [x] Base `Reader` impl to handle both unicode(u32) and utf-16(u16) units
- [x] Global `Span` and local offset conversion
- [x] Design AST shapes
  - [x] Keep `enum` size small by `Box<'a, T>`
  - [x] Rework AST shapes
- [x] Split body and flags w/ validating literal
- [x] Parse `RegExpFlags`
- [x] Parse `RegExpBody` = `Pattern`
- [x] Parse `Pattern` > `Disjunction`
- [x] Parse `Disjunction` > `Alternative`
- [x] Parse `Alternative` > `Term`
- [x] Parse `Term` > `Assertion`
	- [x] Parse `BoundaryAssertion`
	- [x] Parse `LookaroundAssertion`
- [x] Parse `Term` > `Quantifier`
- [x] Parse `Term` > `Atom`
	- [x] Parse `Atom` > `PatternCharacter`
	- [x] Parse `Atom` > `.`
	- [x] Parse `Atom` > `\AtomEscape`
		- [x] Parse `\AtomEscape` > `DecimalEscape`
		- [x] Parse `\AtomEscape` > `CharacterClassEscape`
			- [x] Parse `CharacterClassEscape` > `\d, \D, \s, \S, \w, \W`
			- [x] Parse `CharacterClassEscape` > `\p{UnicodePropertyValueExpression}, \P{UnicodePropertyValueExpression}`
		- [x] Parse `\AtomEscape` > `CharacterEscape`
			- [x] Parse `CharacterEscape` > `ControlEscape`
			- [x] Parse `CharacterEscape` > `c AsciiLetter`
			- [x] Parse `CharacterEscape` > `0`
			- [x] Parse `CharacterEscape` > `HexEscapeSequence`
			- [x] Parse `CharacterEscape` > `RegExpUnicodeEscapeSequence`
			- [x] Parse `CharacterEscape` > `IdentityEscape`
		- [x] Parse `\AtomEscape` > `kGroupName`
	- [x] Parse `Atom` > `[CharacterClass]`
    	- [x] Parse `[CharacterClass]` > `ClassContents` > `[~UnicodeSetsMode] NonemptyClassRanges`
    	- [x] Parse `[CharacterClass]` > `ClassContents` > `[+UnicodeSetsMode] ClassSetExpression`
          - [x] Parse `ClassSetExpression` > `ClassUnion`
          - [x] Parse `ClassSetExpression` > `ClassIntersection`
          - [x] Parse `ClassSetExpression` > `ClassSubtraction`
          - [x] Parse `ClassSetExpression` > `ClassSetOperand`
          - [x] Parse `ClassSetExpression` > `ClassSetRange`
          - [x] Parse `ClassSetExpression` > `ClassSetCharacter`
	- [x] Parse `Atom` > `(GroupSpecifier)`
	- [x] Parse `Atom` > `(?:Disjunction)`
- [x] Annex B
    - [x] Parse `QuantifiableAssertion`
	- [x] Parse `ExtendedAtom`
      - [x] Parse `ExtendedAtom` > `\ [lookahead = c]`
      - [x] Parse `ExtendedAtom` > `InvalidBracedQuantifier`
      - [x] Parse `ExtendedAtom` > `ExtendedPatternCharacter`
      - [x] Parse `ExtendedAtom` > `\AtomEscape` > `CharacterEscape` > `LegacyOctalEscapeSequence`
- [x] Early errors
	- [x] Pattern :: Disjunction(1/2)
	- [x] Pattern :: Disjunction(2/2)
	- [x] QuantifierPrefix :: { DecimalDigits , DecimalDigits }
	- [x] ExtendedAtom :: InvalidBracedQuantifier (Annex B)
	- [x] AtomEscape :: k GroupName
	- [x] AtomEscape :: DecimalEscape
	- [x] NonemptyClassRanges :: ClassAtom - ClassAtom ClassContents(1/2)
	- [x] NonemptyClassRanges :: ClassAtom - ClassAtom ClassContents(2/2)
	- [x] NonemptyClassRanges :: ClassAtom - ClassAtom ClassContents(Annex B)
	- [x] NonemptyClassRangesNoDash :: ClassAtomNoDash - ClassAtom ClassContents(1/2)
	- [x] NonemptyClassRangesNoDash :: ClassAtomNoDash - ClassAtom ClassContents(2/2)
	- [x] NonemptyClassRangesNoDash :: ClassAtomNoDash - ClassAtom ClassContents(Annex B)
	- [x] RegExpIdentifierStart :: \ RegExpUnicodeEscapeSequence
	- [x] RegExpIdentifierStart :: UnicodeLeadSurrogate UnicodeTrailSurrogate
	- [x] RegExpIdentifierPart :: \ RegExpUnicodeEscapeSequence
	- [x] RegExpIdentifierPart :: UnicodeLeadSurrogate UnicodeTrailSurrogate
	- [x] UnicodePropertyValueExpression :: UnicodePropertyName = UnicodePropertyValue(1/2)
	- [x] UnicodePropertyValueExpression :: UnicodePropertyName = UnicodePropertyValue(2/2)
	- [x] UnicodePropertyValueExpression :: LoneUnicodePropertyNameOrValue(1/2)
	- [x] UnicodePropertyValueExpression :: LoneUnicodePropertyNameOrValue(2/2)
	- [x] CharacterClassEscape :: P{ UnicodePropertyValueExpression }
	- [x] CharacterClass :: [^ ClassContents ]
	- [x] NestedClass :: [^ ClassContents ]
	- [x] ClassSetRange :: ClassSetCharacter - ClassSetCharacter
- [x] Add `Span` to `Err(OxcDiagnostic::error())` calls
- [x] Perf improvement
	- [x] `Reader#peek()` should avoid `iter.next()` equivalent
	- [x] ~~Use `char` everywhere and split and push 2 surrogates(pair) for `Character`?~~
	- [x] ~~Try 1(+1) loop parsing for capturing groups?~~

## Follow up

- [x] @Boshen Test suite > #4242
  - [x] Investigate CI errors...
- Next...
  - Support ES2025 Duplicate named capturing groups?
  - Support ES20XX Stage3 Modifiers?
2024-08-20 02:19:24 +00:00
DonIsaac
7c6bae2d65 feat(website): add link to rule source on docs page (#4995)
![image](https://github.com/user-attachments/assets/70e02c73-5d28-443e-91b0-f32d0623a1ca)
2024-08-19 20:40:14 +00:00
Boshen
4fdf26dac8 refactor(transform_conformance): add driver (#4969) 2024-08-19 07:27:39 +00:00
renovate[bot]
5f074d03c9
chore(deps): update rust crates (#4961)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [indexmap](https://togithub.com/indexmap-rs/indexmap) |
workspace.dependencies | minor | `2.3.0` -> `2.4.0` |
| [markdown](https://togithub.com/wooorm/markdown-rs) | dev-dependencies
| patch | `1.0.0-alpha.19` -> `1.0.0-alpha.20` |
| [serde](https://serde.rs)
([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies
| patch | `1.0.206` -> `1.0.208` |
| [serde_json](https://togithub.com/serde-rs/json) |
workspace.dependencies | patch | `1.0.124` -> `1.0.125` |
| [tokio](https://tokio.rs)
([source](https://togithub.com/tokio-rs/tokio)) | workspace.dependencies
| patch | `1.39.2` -> `1.39.3` |
| [wasm-bindgen](https://rustwasm.github.io/)
([source](https://togithub.com/rustwasm/wasm-bindgen)) |
workspace.dependencies | patch | `0.2.92` -> `0.2.93` |

---

### Release Notes

<details>
<summary>indexmap-rs/indexmap (indexmap)</summary>

###
[`v2.4.0`](https://togithub.com/indexmap-rs/indexmap/blob/HEAD/RELEASES.md#240)

[Compare
Source](https://togithub.com/indexmap-rs/indexmap/compare/2.3.0...2.4.0)

- Added methods `IndexMap::append` and `IndexSet::append`, moving all
items from
one map or set into another, and leaving the original capacity for
reuse.

</details>

<details>
<summary>wooorm/markdown-rs (markdown)</summary>

###
[`v1.0.0-alpha.20`](https://togithub.com/wooorm/markdown-rs/releases/tag/1.0.0-alpha.20)

[Compare
Source](https://togithub.com/wooorm/markdown-rs/compare/1.0.0-alpha.19...1.0.0-alpha.20)

- [`6144c58`](https://togithub.com/wooorm/markdown-rs/commit/6144c58)
Fix padded code (text) in mdast
by [@&#8203;yshavit](https://togithub.com/yshavit) in
[https://github.com/wooorm/markdown-rs/pull/123](https://togithub.com/wooorm/markdown-rs/pull/123)

**Full Changelog**:
https://github.com/wooorm/markdown-rs/compare/1.0.0-alpha.19...1.0.0-alpha.20

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

###
[`v1.0.208`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.208)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.207...v1.0.208)

- Support serializing and deserializing unit structs in a `flatten`
field ([#&#8203;2802](https://togithub.com/serde-rs/serde/issues/2802),
thanks [@&#8203;jonhoo](https://togithub.com/jonhoo))

###
[`v1.0.207`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.207)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.206...v1.0.207)

- Improve interactions between `flatten` attribute and
`skip_serializing`/`skip_deserializing`
([#&#8203;2795](https://togithub.com/serde-rs/serde/issues/2795), thanks
[@&#8203;Mingun](https://togithub.com/Mingun))

</details>

<details>
<summary>serde-rs/json (serde_json)</summary>

###
[`v1.0.125`](https://togithub.com/serde-rs/json/releases/tag/1.0.125)

[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.124...1.0.125)

- Speed up \uXXXX parsing and improve handling of unpaired surrogates
when deserializing to bytes
([#&#8203;1172](https://togithub.com/serde-rs/json/issues/1172),
[#&#8203;1175](https://togithub.com/serde-rs/json/issues/1175), thanks
[@&#8203;purplesyringa](https://togithub.com/purplesyringa))

</details>

<details>
<summary>tokio-rs/tokio (tokio)</summary>

###
[`v1.39.3`](https://togithub.com/tokio-rs/tokio/releases/tag/tokio-1.39.3):
Tokio v1.39.3

[Compare
Source](https://togithub.com/tokio-rs/tokio/compare/tokio-1.39.2...tokio-1.39.3)

### 1.39.3 (August 17th, 2024)

This release fixes a regression where the unix socket api stopped
accepting the abstract socket namespace. ([#&#8203;6772])

[#&#8203;6772]: https://togithub.com/tokio-rs/tokio/pull/6772

</details>

<details>
<summary>rustwasm/wasm-bindgen (wasm-bindgen)</summary>

###
[`v0.2.93`](https://togithub.com/rustwasm/wasm-bindgen/blob/HEAD/CHANGELOG.md#0293)

[Compare
Source](https://togithub.com/rustwasm/wasm-bindgen/compare/0.2.92...0.2.93)

Released 2024-08-13

##### Added

- Allow exporting functions named `default`. Throw error in
wasm-bindgen-cli if --target web and
    an exported symbol is named `default`.
    [#&#8203;3930](https://togithub.com/rustwasm/wasm-bindgen/pull/3930)

- Added support for arbitrary expressions when using
`#[wasm_bindgen(typescript_custom_section)]`.
    [#&#8203;3901](https://togithub.com/rustwasm/wasm-bindgen/pull/3901)

-   Implement `From<NonNull<T>>` for `JsValue`.
    [#&#8203;3877](https://togithub.com/rustwasm/wasm-bindgen/pull/3877)

- Add method `copy_within` for TypedArray, add methods
`find_last`,`find_last_index` for Array.
    [#&#8203;3888](https://togithub.com/rustwasm/wasm-bindgen/pull/3888)

-   Added support for returning `Vec`s from async functions.
    [#&#8203;3630](https://togithub.com/rustwasm/wasm-bindgen/pull/3630)

-   Added bindings for `InputDeviceInfo` and `MediaTrackCapabilities`.
    [#&#8203;3935](https://togithub.com/rustwasm/wasm-bindgen/pull/3935)

-   Add bindings for `RTCRtpReceiver.getCapabilities(DOMString)` method.
    [#&#8203;3941](https://togithub.com/rustwasm/wasm-bindgen/pull/3941)

-   Add bindings for `VisualViewport`.
    [#&#8203;3931](https://togithub.com/rustwasm/wasm-bindgen/pull/3931)

-   Add bindings for `queueMicrotask`.
    [#&#8203;3981](https://togithub.com/rustwasm/wasm-bindgen/pull/3981)

-   Add experimental bindings for User Agent Client Hints API
    [#&#8203;3989](https://togithub.com/rustwasm/wasm-bindgen/pull/3989)

-   Add bindings for `FocusOptions`.
    [#&#8203;3996](https://togithub.com/rustwasm/wasm-bindgen/pull/3996)

-   Add bindings for `RTCRtpReceiver.jitterBufferTarget`.
    [#&#8203;3968](https://togithub.com/rustwasm/wasm-bindgen/pull/3968)

-   Generate getters for all WebIDL dictionary types.
    [#&#8203;3993](https://togithub.com/rustwasm/wasm-bindgen/pull/3993)

- Support for iterable in WebIDL. Gives `entries`, `keys`, `values`
methods for regular and asynchronous, as well as `for_each` for regular,
iterables.
    [#&#8203;3962](https://togithub.com/rustwasm/wasm-bindgen/pull/3962)

-   Add bindings for `HTMLTableCellElement.abbr` and `scope` properties.
    [#&#8203;3972](https://togithub.com/rustwasm/wasm-bindgen/pull/3972)

-   Add WebIDL definitions relating to `Popover API`.
    [#&#8203;3977](https://togithub.com/rustwasm/wasm-bindgen/pull/3977)

- Added the `thread_stack_size` property to the object parameter of
`default()` (`init()`) and `initSync()`, making it possible to set the
stack size of spawned threads. `__wbindgen_thread_destroy()` now has a
third optional parameter for the stack size, the default stack size is
assumed when not passing it. When calling from the thread to be
destroyed, by passing no parameters, the correct stack size is
determined internally.
    [#&#8203;3995](https://togithub.com/rustwasm/wasm-bindgen/pull/3995)

-   Added bindings to the Device Memory API.
    [#&#8203;4011](https://togithub.com/rustwasm/wasm-bindgen/pull/4011)

- Added support for WebIDL records. This added new methods to various
APIs, notably `ClipboardItem()`, `GPUDeviceDescriptor.requiredLimits`
and `Header()`.
    [#&#8203;4030](https://togithub.com/rustwasm/wasm-bindgen/pull/4030)

- Added an official MSRV policy. Library MSRV changes will be
accompanied by a minor version bump. CLI tool MSRV can change with any
version bump.
    [#&#8203;4038](https://togithub.com/rustwasm/wasm-bindgen/pull/4038)

-   Added bindings to `NavigatorOptions.vibrate`.
    [#&#8203;4041](https://togithub.com/rustwasm/wasm-bindgen/pull/4041)

- Added an experimental Node.JS ES module target, in comparison the
current `node` target uses CommonJS, with `--target
experimental-nodejs-module` or when testing with
`wasm_bindgen_test_configure!(run_in_node_experimental)`.
    [#&#8203;4027](https://togithub.com/rustwasm/wasm-bindgen/pull/4027)

- Added importing strings as `JsString` through
`#[wasm_bindgen(thread_local, static_string)] static STRING: JsString =
"a string literal";`.
    [#&#8203;4055](https://togithub.com/rustwasm/wasm-bindgen/pull/4055)

- Added experimental test coverage support for
`wasm-bindgen-test-runner`, see the guide for more information.
    [#&#8203;4060](https://togithub.com/rustwasm/wasm-bindgen/pull/4060)

##### Changed

-   Stabilize Web Share API.
    [#&#8203;3882](https://togithub.com/rustwasm/wasm-bindgen/pull/3882)

- Generate JS bindings for WebIDL dictionary setters instead of using
`Reflect`. This increases the size of the Web API bindings but should be
more performant. Also, importing getters/setters from JS now supports
specifying the JS attribute name as a string, e.g.
`#[wasm_bindgen(method, setter = "x-cdm-codecs")]`.
    [#&#8203;3898](https://togithub.com/rustwasm/wasm-bindgen/pull/3898)

- Greatly improve the performance of sending WebIDL 'string enums'
across the JavaScript boundary by converting the enum variant string
to/from an int.
    [#&#8203;3915](https://togithub.com/rustwasm/wasm-bindgen/pull/3915)

-   Use `table.fill` when appropriate.
    [#&#8203;3446](https://togithub.com/rustwasm/wasm-bindgen/pull/3446)

-   Annotated methods in WebCodecs that throw.
    [#&#8203;3970](https://togithub.com/rustwasm/wasm-bindgen/pull/3970)

-   Update and stabilize the Clipboard API.
    [#&#8203;3992](https://togithub.com/rustwasm/wasm-bindgen/pull/3992)

- Deprecate builder-pattern type setters for WebIDL dictionary types and
introduce non-mutable setters instead.
    [#&#8203;3993](https://togithub.com/rustwasm/wasm-bindgen/pull/3993)

- Allow imported async functions to return any type that can be
converted from a `JsValue`.
    [#&#8203;3919](https://togithub.com/rustwasm/wasm-bindgen/pull/3919)

-   Update Web Authentication API to level 3.
    [#&#8203;4000](https://togithub.com/rustwasm/wasm-bindgen/pull/4000)

- Deprecate `AudioBufferSourceNode.onended` and
`AudioBufferSourceNode.stop()`.
    [#&#8203;4020](https://togithub.com/rustwasm/wasm-bindgen/pull/4020)

-   Increase default stack size for spawned threads from 1 to 2 MB.
    [#&#8203;3995](https://togithub.com/rustwasm/wasm-bindgen/pull/3995)

- Deprecated parameters to `default` (`init`) and `initSync` in favor of
an object.
    [#&#8203;3995](https://togithub.com/rustwasm/wasm-bindgen/pull/3995)

- Update `AbortSignal` and `AbortController` according to the WHATWG
specification.
    [#&#8203;4026](https://togithub.com/rustwasm/wasm-bindgen/pull/4026)

-   Update the Indexed DB API.
    [#&#8203;4027](https://togithub.com/rustwasm/wasm-bindgen/pull/4027)

- `UnwrapThrowExt for Result` now makes use of the required `Debug`
bound to display the error as well.
    [#&#8203;4035](https://togithub.com/rustwasm/wasm-bindgen/pull/4035)
    [#&#8203;4049](https://togithub.com/rustwasm/wasm-bindgen/pull/4049)

- MSRV of CLI tools bumped to v1.76. This does not affect libraries like
`wasm-bindgen`, `js-sys` and `web-sys`!
    [#&#8203;4037](https://togithub.com/rustwasm/wasm-bindgen/pull/4037)

- Filtered files in published crates, significantly reducing the package
size and notably excluding any bash files.
    [#&#8203;4046](https://togithub.com/rustwasm/wasm-bindgen/pull/4046)

- Deprecated `JsStatic` in favor of `#[wasm_bindgen(thread_local)]`,
which creates a `std:🧵:LocalKey`. The syntax is otherwise the
same.
    [#&#8203;4057](https://togithub.com/rustwasm/wasm-bindgen/pull/4057)

- Removed `impl Deref for JsStatic` when compiling with
`cfg(target_feature = "atomics")`, which was unsound.
    [#&#8203;4057](https://togithub.com/rustwasm/wasm-bindgen/pull/4057)

-   Updated the WebGPU WebIDL to the current draft as of 2024-08-05.
    [#&#8203;4062](https://togithub.com/rustwasm/wasm-bindgen/pull/4062)

-   Use object URLs for linked modules without `--split-linked-modules`.
    [#&#8203;4067](https://togithub.com/rustwasm/wasm-bindgen/pull/4067)

##### Fixed

- Copy port from headless test server when using
`WASM_BINDGEN_TEST_ADDRESS`.
    [#&#8203;3873](https://togithub.com/rustwasm/wasm-bindgen/pull/3873)

-   Fix `catch` not being thread-safe.
    [#&#8203;3879](https://togithub.com/rustwasm/wasm-bindgen/pull/3879)

-   Fix MSRV compilation.
    [#&#8203;3927](https://togithub.com/rustwasm/wasm-bindgen/pull/3927)

-   Fix `clippy::empty_docs` lint.
    [#&#8203;3946](https://togithub.com/rustwasm/wasm-bindgen/pull/3946)

- Fix missing target features in module when enabling reference types or
multi-value transformation.
    [#&#8203;3967](https://togithub.com/rustwasm/wasm-bindgen/pull/3967)

-   Fixed Rust values getting GC'd while still borrowed.
    [#&#8203;3940](https://togithub.com/rustwasm/wasm-bindgen/pull/3940)

- Fixed Rust values not getting GC'd if they were created via. a
constructor.
    [#&#8203;3940](https://togithub.com/rustwasm/wasm-bindgen/pull/3940)

-   Fix triggering `clippy::mem_forget` lint in exported structs.
    [#&#8203;3985](https://togithub.com/rustwasm/wasm-bindgen/pull/3985)

-   Fix MDN links to static interface methods.
    [#&#8203;4010](https://togithub.com/rustwasm/wasm-bindgen/pull/4010)

-   Fixed Deno support.
    [#&#8203;3990](https://togithub.com/rustwasm/wasm-bindgen/pull/3990)

-   Fix `__wbindgen_thread_destroy()` ignoring parameters.
    [#&#8203;3995](https://togithub.com/rustwasm/wasm-bindgen/pull/3995)

- Fix `no_std` support and therefor compiling with `default-features =
false`.
    [#&#8203;4005](https://togithub.com/rustwasm/wasm-bindgen/pull/4005)

-   Fix byte order for big-endian platforms.
    [#&#8203;4015](https://togithub.com/rustwasm/wasm-bindgen/pull/4015)

- Allow ex/importing structs, functions and parameters named with raw
identifiers.
    [#&#8203;4025](https://togithub.com/rustwasm/wasm-bindgen/pull/4025)

-   Implement a more reliable way to detect the stack pointer.
    [#&#8203;4036](https://togithub.com/rustwasm/wasm-bindgen/pull/4036)

- `#[track_caller]` is now always applied on `UnwrapThrowExt` methods
when not targetting `wasm32-unknown-unknown`.
    [#&#8203;4042](https://togithub.com/rustwasm/wasm-bindgen/pull/4042)

- Fixed linked modules emitting snippet files when not using
`--split-linked-modules`.
    [#&#8203;4066](https://togithub.com/rustwasm/wasm-bindgen/pull/4066)

***

</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 00:07:21 +00: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
Boshen
873d502993
refactor(coverage): use the oxc crate 2024-08-17 22:40:08 +08:00
Boshen
4c989d0fda
chore(parser): remove multi-thread example
because `ouroboros` has a few heavy dependencies, including an older
version of itertools.
2024-08-16 22:57:10 +08:00
Boshen
c220730779 feat(coverage): check symbols and scopes after transformation (#4917)
closes https://github.com/oxc-project/oxc/issues/4790

@overlookmotel enjoy ... take a look at the snapshots and probably nothing else.

The snapshots are minimal right now, but it's already showing symbols from import specifiers are not being removed. We can iterate on the snapshot representation to aid debugging later.

I'll extend this to `transformer_conformance` and `oxc-monitor` in an up coming PR.
2024-08-16 07:05:11 +00:00
oxc-bot
b3e189764f
Release oxlint v0.7.2 (#4909)
## [0.7.2] - 2024-08-15

### Features

- 97e38cd linter: Add fixer for unicorn/prefer-optional-catch-binding
(#4867) (heygsc)
- 93ae1c7 linter: Eslint-plugin-react jsx-props-no-spread-multi (#4866)
(keita hino)
- 0a23610 linter: Add fixer for unicorn/prefer-array-flat-map (#4844)
(heygsc)
- 13c7b1b linter/jsx-a11y: Add fixer for aria-unsupported-elements
(#4854) (DonIsaac)
- a6195a6 linter/jsx-a11y: Add fixer for anchor-has-content (#4852)
(DonIsaac)
- 4d28d03 task/website: Support render `subschemas.all_of` (#4800)
(mysteryven)

### Bug Fixes

- 21f5762 codegen: Minify large numbers (#4889) (Boshen)
- a08d7a7 linter/jsx-a11y: Reduce false negatives for html-has-lang
(#4855) (DonIsaac)
- a81ce3a linter/no-unused-vars: Do not delete function expressions when
fixing (#4848) (DonIsaac)

### Documentation

- 955a4b4 oxlint: Improve cli doc regarding fix and `-D all` (Boshen)

### Refactor

- 56f033c linter: Improve diagnostics for several jsx-a11y rules (#4853)
(DonIsaac)
- c53c210 linter/no-unused-vars: Split fixer logic into multiple files
(#4847) (DonIsaac)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-15 14:56:34 +08:00
IWANABETHATGUY
d49fb160e3 feat(oxc_codegen): support generate range leading comments (#4898)
1. Support print range leading comments for specific expr or stmt
2024-08-15 04:20:48 +00:00
rzvxa
c164bb8b64 chore(deps): remove static_assertions dependency. (#4883) 2024-08-14 02:18:06 +00:00
rzvxa
8e8fcd0584 refactor(ast_tools): rename oxc_ast_codegen to oxc_ast_tools. (#4846)
This PR renames the `oxc_ast_codegen` crate to `oxc_ast_tools`, It improves the readability and organization of the codebase by giving the crate a name that better reflects its purpose and contents.

It also improves the error message in CI.
2024-08-12 14:33:58 +00: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
Boshen
1965aa6b63 chore(deps): update rust crate criterion2 to v1 (#4838) 2024-08-12 06:32:39 +00:00
oxc-bot
972492cc4d
Release oxlint v0.7.1 (#4835)
## [0.7.1] - 2024-08-12

### Features

- 3d40528 linter: Add fix emoji to rules table and doc pages (#4715)
(DonIsaac)
- d2734f3 linter: Start fixer for no-unused-vars (#4718) (DonIsaac)
- 070ae53 linter: Add fixer for unicorn prefer-string-replace-all
(#4801) (camc314)
- b3c3125 linter: Overhaul unicorn/no-useless-spread (#4791) (DonIsaac)
- 5992b75 linter: Implement `eslint-plugin-promise/no-return-in-finally,
prefer-await-to-then` rule (#4318) (Jelle van der Waa)
- b259f47 linter: Add fixer for unicorn/no-length-as-slice-end (#4780)
(heygsc)
- abd83fa linter: Add fixer for jsx_ally/no_aria_hidden_on_focusable
(#4772) (heygsc)
- b20e335 linter: Add fixer for eslint/no-eq-null (#4758) (heygsc)
- 2f6c3b9 linter: Add fixer for eslint/no-compare-neg-zero (#4748)
(heygsc)
- eaddc8f linter: Add fixer for eslint/func_names (#4714) (DonIsaac)
- 80557a9 linter: Add fixer for eslint/for-direction (#4679) (heygsc)
- c3c5766 linter/eslint-plugin-promise: Implement valid-params (#4598)
(Jelle van der Waa)
- c509a21 linter/eslint-plugin-vitest: Implement prefer-to-be-falsy
(#4770) (dalaoshu)
- 41f861f linter/eslint-plugin-vitest: Implement prefer-to-be-truthy
(#4755) (dalaoshu)
- cc922f4 vscode: Provide config's schema to oxlint config files (#4826)
(Don Isaac)
- f629514 website: Auto-generate rule docs pages (#4640) (DonIsaac)

### Bug Fixes

- b22ed45 linter: Improve prefer_namespace_keyword rule (#4751) (Burlin)
- db68a6c linter: Fixer for eslint/for-direction (#4727) (heygsc)
- 6273994 linter: Block in eslint/no_cond_assign (#4721) (heygsc)
- b9d6aa5 linter: Fix false positives in no-confusing-non-null-assertion
(#4665) (Renée)
- cbf08d2 linter: Skip no-multi-str on jsx attributes (#4666) (heygsc)
- a6f9f96 linter: No unused errors should be warnings (Boshen)
- 7345bc9 linter/func-names: Handle ts accessibility when reporting
missing names (#4713) (DonIsaac)

### Performance

- d191823 linter: Optmize allocations in jest fn parsing (#4787) (lucab)
- e3abdfa linter: Reduce String allocations and clones (#4673)
(DonIsaac)

### Documentation

- 4b7dfd6 linter: Correct docs for no-unused-vars (#4716) (Don Isaac)

### Refactor

- 096ac7b linter: Clean up jsx-a11y/anchor-is-valid (#4831) (DonIsaac)
- 15a0fd4 linter: Use Option to reduce nested level in
`eslint/getter-return` (#4814) (IWANABETHATGUY)
- 63f274c linter: Simplify NoObjCalls resolution logic (#4765) (lucab)
- 6708680 linter: Replace Windows-style line breaks with Unix-style in
test fixture (#4768) (overlookmotel)
- e285903 linter: Clean up eslint/func_names (#4710) (DonIsaac)

### Testing

- 8f2a566 linter: Ensure rule docs have valid syntax (#4644) (DonIsaac)
- 4dd29db linter: Add fixer test for unicorn/no-zero-fractions (#4783)
(heygsc)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-08-12 13:36:37 +08:00
Boshen
505d39ba0a
chore: bump deps 2024-08-12 10:12:34 +08:00
Boshen
89b1886403
chore: update deny.toml 2024-08-12 10:12:03 +08:00
renovate[bot]
89712f5a24
chore(deps): update rust crate serde_json to v1.0.124 (#4833)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](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.122` -> `1.0.124` |

---

### Release Notes

<details>
<summary>serde-rs/json (serde_json)</summary>

###
[`v1.0.124`](https://togithub.com/serde-rs/json/releases/tag/v1.0.124)

[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.123...v1.0.124)

- Fix a bug in processing string escapes in big-endian architectures
([#&#8203;1173](https://togithub.com/serde-rs/json/issues/1173), thanks
[@&#8203;purplesyringa](https://togithub.com/purplesyringa))

###
[`v1.0.123`](https://togithub.com/serde-rs/json/releases/tag/v1.0.123)

[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.122...v1.0.123)

- Optimize string parsing by applying SIMD-within-a-register: 30.3%
improvement on
[twitter.json](https://togithub.com/miloyip/nativejson-benchmark/blob/v1.0.0/data/twitter.json)
from 613 MB/s to 799 MB/s
([#&#8203;1161](https://togithub.com/serde-rs/json/issues/1161), thanks
[@&#8203;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:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMC4xIiwidXBkYXRlZEluVmVyIjoiMzguMjAuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-12 00:05:48 +00:00
renovate[bot]
54592fb95b
chore(deps): update rust crates (#4828)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [markdown](https://togithub.com/wooorm/markdown-rs) | dev-dependencies
| patch | `1.0.0-alpha.18` -> `1.0.0-alpha.19` |
| [serde](https://serde.rs)
([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies
| patch | `1.0.204` -> `1.0.206` |
| [tempfile](https://stebalien.com/projects/tempfile-rs/)
([source](https://togithub.com/Stebalien/tempfile)) |
workspace.dependencies | minor | `3.11.0` -> `3.12.0` |

---

### Release Notes

<details>
<summary>wooorm/markdown-rs (markdown)</summary>

###
[`v1.0.0-alpha.19`](https://togithub.com/wooorm/markdown-rs/releases/tag/1.0.0-alpha.19)

[Compare
Source](https://togithub.com/wooorm/markdown-rs/compare/1.0.0-alpha.18...1.0.0-alpha.19)

- [`2c83b0d`](https://togithub.com/wooorm/markdown-rs/commit/2c83b0d)
Fix panic on incomplete closing frontmatter fence
by [@&#8203;nokome](https://togithub.com/nokome) in
[https://github.com/wooorm/markdown-rs/pull/121](https://togithub.com/wooorm/markdown-rs/pull/121)
- [`d0788c9`](https://togithub.com/wooorm/markdown-rs/commit/d0788c9)
Update dev-dependencies
by [@&#8203;wooorm](https://togithub.com/wooorm) in
[https://github.com/wooorm/markdown-rs/pull/120](https://togithub.com/wooorm/markdown-rs/pull/120)

**Full Changelog**:
https://github.com/wooorm/markdown-rs/compare/1.0.0-alpha.18...1.0.0-alpha.19

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

###
[`v1.0.206`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.206)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.205...v1.0.206)

- Improve support for `flatten` attribute inside of enums
([#&#8203;2567](https://togithub.com/serde-rs/serde/issues/2567), thanks
[@&#8203;Mingun](https://togithub.com/Mingun))

###
[`v1.0.205`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.205)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.204...v1.0.205)

- Use serialize_entry instead of serialize_key + serialize_value when
serialize flattened newtype enum variants
([#&#8203;2785](https://togithub.com/serde-rs/serde/issues/2785), thanks
[@&#8203;Mingun](https://togithub.com/Mingun))
- Avoid triggering a collection_is_never_read lint in the
deserialization of enums containing flattened fields
([#&#8203;2791](https://togithub.com/serde-rs/serde/issues/2791))

</details>

<details>
<summary>Stebalien/tempfile (tempfile)</summary>

###
[`v3.12.0`](https://togithub.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3120)

- Add a `keep(keep: bool)` function to builder that suppresses
delete-on-drop behavior (thanks to
[@&#8203;RalfJung](https://togithub.com/RalfJung)).
-   Update `windows-sys` from 0.52 to 0.59.

</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMC4xIiwidXBkYXRlZEluVmVyIjoiMzguMjAuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-11 17:18:59 +00: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
DonIsaac
8f2a566f9f test(linter): ensure rule docs have valid syntax (#4644)
Adds tests for rule documentation by
1. Compiling doc markdown into HTML, which ensures docs use valid markdown syntax
2. Converts the generated HTML into JSX and parses the results with the parser, ensuring the generated HTML is valid

Has the added benefit of adding a lot of JSX test cases to the parser. I've also fixed all violations for these tests in this PR.
2024-08-10 05:03:09 +00: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
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)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](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 #&#8203;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
([#&#8203;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