oxc-bot
5f4f6d140b
release(oxlint): v0.14.1 ( #7692 )
2024-12-06 13:06:54 +08:00
oxc-bot
fee2143f4c
release(crates): v0.39.0 ( #7643 )
2024-12-04 19:43:22 +08:00
Boshen
771c698a81
feat(oxc): remove oxc_napi crate ( #7634 )
...
napi has a limitation, it cannot feature gate type exposure.
closes #7623
2024-12-04 10:07:32 +08:00
Boshen
9b803d95d0
chore: bump deps ( #7616 )
2024-12-04 07:51:53 +08:00
Boshen
b4f3812c4a
refactor(oxc_napi): remove source_map - moved to its crate ( #7614 )
2024-12-03 14:42:34 +00:00
Boshen
bd977cf742
feat(oxc): add oxc_napi crate ( #7612 )
2024-12-03 14:02:47 +00:00
Boshen
348d4f451a
feat(sourcemap): move oxc_sourcemap to github.com/oxc-project/oxc-sourcemap ( #7604 )
...
It's mostly stable so we can v1.0.0 it.
And we will create cyclic dependency with StringWizard soon.
2024-12-03 11:59:43 +00:00
Boshen
943462f22c
feat(module_lexer)!: remove oxc_module_lexer ( #7595 )
...
This crate will no longer be relevant after we export esm information
directly from the parser.
Besides, `ex-module-lexer`'s output data is too limited for plugin
authors to use.
2024-12-03 04:22:51 +00:00
overlookmotel
e62153bdd7
chore(deps): remove memoffset dependency ( #7573 )
...
`offset_of!` macro [became stable in Rust 1.77.0](https://doc.rust-lang.org/nightly/core/mem/macro.offset_of.html ) which is now within our MSRV. Remove the `memoffset` crate, and use `std::mem::offset_of` instead.
2024-12-01 23:39:27 +00:00
oxc-bot
c61a383e8c
release(oxlint): v0.14.0 ( #7563 )
...
## [0.14.0] - 2024-12-01
### Features
- 32f860d linter: Add support for ignorePatterns property within config
file (#7092 ) (Nicholas Rayburn)
- 053bc08 linter: Implement typescript/no-unused-expressions (#7498 )
(camc314)
- 60b28fc linter: Implement typescript/consistent-generic-constructors
(#7497 ) (camc314)
- bd0693b linter: Allow lint rules with the same name (#7496 ) (camc314)
- 2ac9f96 linter: Typescript/no-inferrable-types (#7438 ) (camc314)
- 8d89fdc linter: Add eslint/prefer-spread (#7112 ) (tbashiyy)
### Bug Fixes
- 123b5b7 linter: False positive in
`typescript/consistent-type-definitions` (#7560 ) (dalaoshu)
- cc078d6 linter: Add missing error message prefix to
`eslint/no-const-assign` (Boshen)
- 17c0dd8 linter: Fix `jsx_no_script_url` doc failed to build (Boshen)
### Performance
- 6cc7a48 linter: Use `OsString` for module cache hash (#7558 ) (Boshen)
- 6655345 linter: Use `FxDashMap` for module cache (#7522 )
(overlookmotel)
### Documentation
- a6b0100 linter: Fix config example headings (#7562 ) (Boshen)
### Refactor
- 0f3f67a linter: Add capability of adding semantic data to module
record (#7561 ) (Boshen)
- 8392177 linter: Clean up the runtime after the module record change
(#7557 ) (Boshen)
- 823353a linter: Clean up APIs for `ModuleRecord` (#7556 ) (Boshen)
- f847d0f linter: Call `str::ends_with` with array not slice (#7526 )
(overlookmotel)
- 2077ff9 linter: Remove `once_cell` (#7510 ) (Boshen)
- 169b8bf linter, syntax: Introduce type alias `FxDashMap` (#7520 )
(overlookmotel)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-12-01 16:47:21 +08:00
Boshen
c2ced15dfd
feat(parser,linter)!: use a different ModuleRecord for linter ( #7554 )
...
The parser returns a simple `ModuleRecord` that is allocated in the arena for performance reasons.
The linter uses a more complicated, `Send` + `Sync` `ModuleRecord` that will hold more cross-module information.
The next step is to return more esm information from the parser to eliminated the need of the `oxc_module_lexer` crate.
2024-11-30 16:02:01 +00:00
Boshen
7e42e71f34
deps: bump wasm-bindgen to 0.2.96 ( #7551 )
2024-11-30 10:47:03 +08:00
Boshen
b24beeb0f5
refactor(parser): use PropName trait from oxc_ecmascript ( #7543 )
2024-11-29 09:18:47 +00:00
Boshen
9d6e14bb67
test(ecmascript): move tests to oxc_minifier due to cyclic dependency with oxc_parser ( #7542 )
2024-11-29 09:18:45 +00:00
Boshen
2077ff9269
refactor(linter): remove once_cell ( #7510 )
2024-11-28 10:30:52 +08:00
oxc-bot
861ae1581a
release(oxlint): v0.13.2 ( #7489 )
2024-11-26 15:25:31 +08:00
oxc-bot
00a7372eaf
release(crates): v0.38.0 ( #7490 )
2024-11-26 14:38:47 +08:00
renovate
17fb7e5303
chore(deps): update rust crates ( #7467 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [allocator-api2](https://redirect.github.com/zakarumych/allocator-api2 ) | workspace.dependencies | patch | `0.2.18` -> `0.2.20` |
| [flate2](https://redirect.github.com/rust-lang/flate2-rs ) | workspace.dependencies | patch | `1.0.34` -> `1.0.35` |
| [itoa](https://redirect.github.com/dtolnay/itoa ) | workspace.dependencies | patch | `1.0.11` -> `1.0.13` |
| [oxc_resolver](https://redirect.github.com/oxc-project/oxc-resolver ) | workspace.dependencies | minor | `2.0.0` -> `2.1.1` |
| [proc-macro2](https://redirect.github.com/dtolnay/proc-macro2 ) | workspace.dependencies | patch | `1.0.89` -> `1.0.92` |
| [serde](https://serde.rs ) ([source](https://redirect.github.com/serde-rs/serde )) | workspace.dependencies | patch | `1.0.214` -> `1.0.215` |
| [serde_json](https://redirect.github.com/serde-rs/json ) | workspace.dependencies | patch | `1.0.132` -> `1.0.133` |
| [tempfile](https://stebalien.com/projects/tempfile-rs/ ) ([source](https://redirect.github.com/Stebalien/tempfile )) | workspace.dependencies | minor | `3.13.0` -> `3.14.0` |
| [tokio](https://tokio.rs ) ([source](https://redirect.github.com/tokio-rs/tokio )) | workspace.dependencies | patch | `1.41.0` -> `1.41.1` |
| [url](https://redirect.github.com/servo/rust-url ) | workspace.dependencies | patch | `2.5.3` -> `2.5.4` |
---
### Release Notes
<details>
<summary>rust-lang/flate2-rs (flate2)</summary>
### [`v1.0.35`](https://redirect.github.com/rust-lang/flate2-rs/releases/tag/1.0.35 ): - security update to zlib-rs
[Compare Source](https://redirect.github.com/rust-lang/flate2-rs/compare/1.0.34...1.0.35 )
#### What's Changed
- Upgrade actions/upload-artifact by [@​jdno](https://redirect.github.com/jdno ) in [https://github.com/rust-lang/flate2-rs/pull/438 ](https://redirect.github.com/rust-lang/flate2-rs/pull/438 )
- upgrade zlib-rs to version `0.4.0` by [@​folkertdev](https://redirect.github.com/folkertdev ) in [https://github.com/rust-lang/flate2-rs/pull/439 ](https://redirect.github.com/rust-lang/flate2-rs/pull/439 )
#### New Contributors
- [@​jdno](https://redirect.github.com/jdno ) made their first contribution in [https://github.com/rust-lang/flate2-rs/pull/438 ](https://redirect.github.com/rust-lang/flate2-rs/pull/438 )
**Full Changelog**: https://github.com/rust-lang/flate2-rs/compare/1.0.34...1.0.35
</details>
<details>
<summary>dtolnay/itoa (itoa)</summary>
### [`v1.0.13`](https://redirect.github.com/dtolnay/itoa/releases/tag/1.0.13 )
[Compare Source](https://redirect.github.com/dtolnay/itoa/compare/1.0.12...1.0.13 )
- Code cleanup ([#​48](https://redirect.github.com/dtolnay/itoa/issues/48 ), [#​49](https://redirect.github.com/dtolnay/itoa/issues/49 ), [#​50](https://redirect.github.com/dtolnay/itoa/issues/50 ), [#​51](https://redirect.github.com/dtolnay/itoa/issues/51 ), [#​52](https://redirect.github.com/dtolnay/itoa/issues/52 ), [#​53](https://redirect.github.com/dtolnay/itoa/issues/53 ), [#​54](https://redirect.github.com/dtolnay/itoa/issues/54 ), [#​55](https://redirect.github.com/dtolnay/itoa/issues/55 ))
### [`v1.0.12`](https://redirect.github.com/dtolnay/itoa/releases/tag/1.0.12 )
[Compare Source](https://redirect.github.com/dtolnay/itoa/compare/1.0.11...1.0.12 )
- Add itoa::Integer::MAX_STR_LEN associated constant ([#​45](https://redirect.github.com/dtolnay/itoa/issues/45 ), thanks [@​SUPERCILEX](https://redirect.github.com/SUPERCILEX ))
</details>
<details>
<summary>oxc-project/oxc-resolver (oxc_resolver)</summary>
### [`v2.1.1`](https://redirect.github.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#211---2024-11-22 )
[Compare Source](https://redirect.github.com/oxc-project/oxc-resolver/compare/oxc_resolver-v2.1.0...oxc_resolver-v2.1.1 )
##### Performance
- reduce hash while resolving package.json ([#​319](https://redirect.github.com/oxc-project/oxc-resolver/pull/319 ))
- reduce memory allocation while normalizing package path ([#​318](https://redirect.github.com/oxc-project/oxc-resolver/pull/318 ))
- reduce memory allocation while resolving package.json ([#​317](https://redirect.github.com/oxc-project/oxc-resolver/pull/317 ))
- use `path.as_os_str().hash()` instead of `path.hash()` ([#​316](https://redirect.github.com/oxc-project/oxc-resolver/pull/316 ))
- reduce memory allocation by using a thread_local path for path methods ([#​315](https://redirect.github.com/oxc-project/oxc-resolver/pull/315 ))
##### Other
- remove the deprecated simdutf8 aarch64\_neon feature
- mention extension must start with a `.` in `with_extension` ([#​313](https://redirect.github.com/oxc-project/oxc-resolver/pull/313 ))
### [`v2.1.0`](https://redirect.github.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#210---2024-11-20 )
[Compare Source](https://redirect.github.com/oxc-project/oxc-resolver/compare/oxc_resolver-v2.0.1...oxc_resolver-v2.1.0 )
##### Added
- add `Resolver::resolve_tsconfig` API ([#​312](https://redirect.github.com/oxc-project/oxc-resolver/pull/312 ))
##### Fixed
- don't panic when resolving `/` with `roots` ([#​310](https://redirect.github.com/oxc-project/oxc-resolver/pull/310 ))
- use same UNC path normalization logic with libuv ([#​306](https://redirect.github.com/oxc-project/oxc-resolver/pull/306 ))
##### Other
- *(deps)* update rust crates to v1.0.215
- fix symlink test init on windows ([#​307](https://redirect.github.com/oxc-project/oxc-resolver/pull/307 ))
### [`v2.0.1`](https://redirect.github.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#201---2024-11-08 )
[Compare Source](https://redirect.github.com/oxc-project/oxc-resolver/compare/oxc_resolver-v2.0.0...oxc_resolver-v2.0.1 )
##### Other
- `cargo upgrade` && `pnpm upgrade`
- bring back the symlink optimization ([#​298](https://redirect.github.com/oxc-project/oxc-resolver/pull/298 ))
- *(deps)* update rust crate criterion2 to v2
</details>
<details>
<summary>dtolnay/proc-macro2 (proc-macro2)</summary>
### [`v1.0.92`](https://redirect.github.com/dtolnay/proc-macro2/releases/tag/1.0.92 )
[Compare Source](https://redirect.github.com/dtolnay/proc-macro2/compare/1.0.91...1.0.92 )
- Improve compiler/fallback mismatch panic message ([#​487](https://redirect.github.com/dtolnay/proc-macro2/issues/487 ))
### [`v1.0.91`](https://redirect.github.com/dtolnay/proc-macro2/releases/tag/1.0.91 )
[Compare Source](https://redirect.github.com/dtolnay/proc-macro2/compare/1.0.90...1.0.91 )
- Fix panic *"compiler/fallback mismatch 949"* when using TokenStream::from_str from inside a proc macro to parse a string containing doc comment ([#​484](https://redirect.github.com/dtolnay/proc-macro2/issues/484 ))
### [`v1.0.90`](https://redirect.github.com/dtolnay/proc-macro2/releases/tag/1.0.90 )
[Compare Source](https://redirect.github.com/dtolnay/proc-macro2/compare/1.0.89...1.0.90 )
- Improve error recovery in TokenStream's and Literal's FromStr implementations to work around [https://github.com/rust-lang/rust/issues/58736 ](https://redirect.github.com/rust-lang/rust/issues/58736 ) such that rustc does not poison compilation on codepaths that should be recoverable errors ([#​477](https://redirect.github.com/dtolnay/proc-macro2/issues/477 ), [#​478](https://redirect.github.com/dtolnay/proc-macro2/issues/478 ), [#​479](https://redirect.github.com/dtolnay/proc-macro2/issues/479 ), [#​480](https://redirect.github.com/dtolnay/proc-macro2/issues/480 ), [#​481](https://redirect.github.com/dtolnay/proc-macro2/issues/481 ), [#​482](https://redirect.github.com/dtolnay/proc-macro2/issues/482 ))
</details>
<details>
<summary>serde-rs/serde (serde)</summary>
### [`v1.0.215`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.215 )
[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.214...v1.0.215 )
- Produce warning when multiple fields or variants have the same deserialization name ([#​2855](https://redirect.github.com/serde-rs/serde/issues/2855 ), [#​2856](https://redirect.github.com/serde-rs/serde/issues/2856 ), [#​2857](https://redirect.github.com/serde-rs/serde/issues/2857 ))
</details>
<details>
<summary>serde-rs/json (serde_json)</summary>
### [`v1.0.133`](https://redirect.github.com/serde-rs/json/releases/tag/v1.0.133 )
[Compare Source](https://redirect.github.com/serde-rs/json/compare/v1.0.132...v1.0.133 )
- Implement From<\[T; N]> for serde_json::Value ([#​1215](https://redirect.github.com/serde-rs/json/issues/1215 ))
</details>
<details>
<summary>Stebalien/tempfile (tempfile)</summary>
### [`v3.14.0`](https://redirect.github.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3140 )
[Compare Source](https://redirect.github.com/Stebalien/tempfile/compare/v3.13.0...v3.14.0 )
- Make the wasip2 target work (requires tempfile's "nightly" feature to be enabled). [#​305](https://redirect.github.com/Stebalien/tempfile/pull/305 ).
- Allow older windows-sys versions [#​304](https://redirect.github.com/Stebalien/tempfile/pull/304 ).
</details>
<details>
<summary>tokio-rs/tokio (tokio)</summary>
### [`v1.41.1`](https://redirect.github.com/tokio-rs/tokio/releases/tag/tokio-1.41.1 ): Tokio v1.41.1
[Compare Source](https://redirect.github.com/tokio-rs/tokio/compare/tokio-1.41.0...tokio-1.41.1 )
### 1.41.1 (Nov 7th, 2024)
##### Fixed
- metrics: fix bug with wrong number of buckets for the histogram ([#​6957])
- net: display `net` requirement for `net::UdpSocket` in docs ([#​6938])
- net: fix typo in `TcpStream` internal comment ([#​6944])
[#​6957]: https://redirect.github.com/tokio-rs/tokio/pull/6957
[#​6938]: https://redirect.github.com/tokio-rs/tokio/pull/6938
[#​6944]: https://redirect.github.com/tokio-rs/tokio/pull/6944
</details>
<details>
<summary>servo/rust-url (url)</summary>
### [`v2.5.4`](https://redirect.github.com/servo/rust-url/releases/tag/v2.5.4 )
[Compare Source](https://redirect.github.com/servo/rust-url/compare/v2.5.3...v2.5.4 )
##### What's Changed
- Revert "Normalize URL paths: convert /.//p, /..//p, and //p to p ([#​943](https://redirect.github.com/servo/rust-url/issues/943 ))" by [@​valenting](https://redirect.github.com/valenting ) in [https://github.com/servo/rust-url/pull/999 ](https://redirect.github.com/servo/rust-url/pull/999 )
- Updates the MSRV to 1.63 required though the libc v0.2.164 dependency
**Full Changelog**: https://github.com/servo/rust-url/compare/v2.5.3...v2.5.4
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions ) if that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
2024-11-25 16:10:34 +00:00
Boshen
5d65656517
refactor(oxc_index)!: move to own repo github.com/oxc-project/oxc-index-vec ( #7464 )
...
closes #7454
2024-11-25 08:36:44 +00:00
IWANABETHATGUY
e9f9e8242a
feat(oxc_transformer): replace_global_define ThisExpression ( #7443 )
...
Test from d34e79e2a9/internal/bundler_tests/bundler_default_test.go (L5195-L5260) ,
esbuild snapshot:
d34e79e2a9/internal/bundler_tests/snapshots/snapshots_default.txt (L1081-L1108)
2024-11-25 04:13:52 +00:00
oxc-bot
88d17b96e3
release(oxlint): v0.13.1 ( #7441 )
...
## [0.13.1] - 2024-11-23
### Features
- 4ad26b9 linter: Add `no-promise-in-callback` (#7307 ) (no-yan)
- 9558087 oxlint: Auto detect config file in CLI (#7348 ) (Alexander S.)
### Bug Fixes
- 8507464 linter: Hanging when source has syntax/is flow (#7432 )
(Cameron)
- e88cf1b linter: Make `overrides` globs relative to config path (#7407 )
(camchenry)
- 9002e97 linter: Add proper support for findIndex and findLastIndex for
`unicorn/prefer-array-some` (#7405 ) (Dmitry Zakharov)
### Documentation
- 6730e3e linter: Add more examples for `unicorn/prefer-array-some`
(#7411 ) (Dmitry Zakharov)
### Refactor
- 6c0d31b linter: Remove useless `const` declaration (#7430 ) (Song Gao)
- c8adc46 linter/no-unused-vars: Improve implementation to remove using
SymbolFlags::Export (#7412 ) (Dunqing)
- c90537f linter/only-used-in-recursion: Improve implementation to
remove using SymbolFlags::Export (#7413 ) (Dunqing)
### Testing
- 779f479 editor: Check if workspace configuration is updated (#7403 )
(Alexander S.)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-23 23:46:16 +08:00
oxc-bot
0918e520cf
release(crates): v0.37.0 ( #7399 )
2024-11-21 22:27:55 +08:00
oxc-bot
4b5a176630
release(oxlint): v0.13.0 ( #7398 )
...
## [0.13.0] - 2024-11-21
- 7bf970a linter: [**BREAKING**] Remove tree_shaking plugin (#7372 )
(Boshen)
- 7f8747d linter: Implement `react/no-array-index-key` (#6960 )
(BitterGourd)
### Features
- be152c0 linter: Add `typescript/no-require-imports` rule (#7315 )
(Dmitry Zakharov)
- 849489e linter: Add suggestion for no-console (#4312 ) (DonIsaac)
- 8cebdc8 linter: Allow appending plugins in override (#7379 )
(camchenry)
- 8cfea3c oxc_cfg: Add implicit return instruction (#5568 )
(IWANABETHATGUY)
- e6922df parser: Fix incorrect AST for `x?.f<T>()` (#7387 ) (Boshen)
### Bug Fixes
- e91c287 linter: Fix panic in react/no-array-index-key (#7395 ) (Boshen)
- a32f5a7 linter/no-array-index-key: Compile error due to it uses a
renamed API (#7391 ) (Dunqing)
- 666b6c1 parser: Add missing `ChainExpression` in optional
`TSInstantiationExpression` (#7371 ) (Boshen)
### Documentation
- df143ca linter: Add docs for config settings (#4827 ) (DonIsaac)
- ad44cfa linter: Import/first options (#7381 ) (Zak)
### Refactor
- c34d649 linter: Use `scope_id` etc methods (#7394 ) (overlookmotel)
- 466f395 vscode: Split `ConfigService` and `Config` (#7376 ) (Alexander
S.)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-21 22:21:32 +08:00
Hiroshi Ogawa
3d66929fa2
fix(sourcemap): improve source map visualizer ( #7386 )
...
- Related https://github.com/rolldown/rolldown/issues/2737
Probably this is still an approximation of what
https://github.com/evanw/source-map-visualization does, but I tried to
get some ideas from it.
For comparison, I added an example from their site
https://evanw.github.io/source-map-visualization/ as a snapshot in
`crates/oxc_sourcemap/tests/fixtures/esbuild/visualizer.snap`. I'll
mention a few notable changes in the comments.
Snapshot change in rolldown repo can be found in
- https://github.com/rolldown/rolldown/pull/2829
2024-11-21 14:35:56 +08:00
oxc-bot
b6d5c0f33e
release(oxlint): v0.12.0 ( #7366 )
...
## [0.12.0] - 2024-11-20
- 20d9080 linter: [**BREAKING**] Override plugins array when passed in
config file (#7303 ) (camchenry)
### Features
- 1d9f528 linter: Implement `unicorn/prefer-string-raw` lint rule
(#7335 ) (Ryan Walker)
- d445e0f linter: Implement `unicorn/consistent-existence-index-check`
(#7262 ) (Ryan Walker)
- 01ddf37 linter: Add `allowReject` option to
`no-useless-promise-resolve-reject` (#7274 ) (no-yan)
- 755a31b linter: Support bind function case for compatibility with
`promise/no-return-wrap` (#7232 ) (no-yan)
- 428770e linter: Add `import/no-namespace` rule (#7229 ) (Dmitry
Zakharov)
- 9c91151 linter: Implement typescript/no-empty-object-type (#6977 )
(Orenbek)
- 2268a0e linter: Support `overrides` config field (#6974 ) (DonIsaac)
- 3dcac1a linter: React/exhaustive-deps (#7151 ) (camc314)
- d3a0119 oxlint: Add `cwd` property to `LintRunner` (#7352 ) (Alexander
S.)
### Bug Fixes
- ba0b2ff editor: Reload workspace configuration after change (#7302 )
(Alexander S.)
- bc0e72c linter: Handle user variables correctly for import/no_commonjs
(#7316 ) (Dmitry Zakharov)
- bf839c1 linter: False positive in `jest/expect-expect` (#7341 )
(dalaoshu)
- ff2a1d4 linter: Move `exhaustive-deps` to `react` (#7251 ) (camc314)
- df5c535 linter: Revert unmatched rule error (#7257 ) (Cameron A
McHenry)
- c4ed230 linter: Fix false positive in eslint/no-cond-assign (#7241 )
(camc314)
- ef847da linter: False positive in `jsx-a11y/iframe-has-title` (#7253 )
(dalaoshu)
- 62b6327 linter: React/exhaustive-deps update span for unknown deps
diagnostic (#7249 ) (camc314)
### Documentation
- 4c124a8 editor/vscode: Update VS Code readme with installation
instructions and available features (#7306 ) (Nicholas Rayburn)
### Refactor
- c6a4868 linter: Temporarily remove unknown rules checking (#7260 )
(camchenry)
### Testing
- 5190b7f editor: Add test setup (#7361 ) (Alexander S.)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-20 15:45:24 +08:00
overlookmotel
e09d2df448
perf(transformer/arrow-function): create super method binding names lazily ( #7313 )
...
Key `super` getter/setter hash map with original property name `&str`, instead of generated binding name. This allows a couple of improvements:
* Generate binding names for `super` getters/setters lazily, only when they're created, rather than every time you encounter a `super`.
* Don't allocate strings into arena which are never used as part of AST. Use `CompactString` for building those strings instead.
2024-11-17 10:07:34 +00:00
Dmitry Zakharov
428770edee
feat(linter): add import/no-namespace rule ( #7229 )
2024-11-14 19:23:56 +08:00
DonIsaac
2268a0ef90
feat(linter): support overrides config field ( #6974 )
...
Part of #5653
2024-11-13 05:40:59 +00:00
oxc-bot
de107246c8
release(crates): v0.36.0 ( #7227 )
...
## [0.36.0] - 2024-11-09
- b11ed2c ast: [**BREAKING**] Remove useless `ObjectProperty::init`
field (#7220 ) (Boshen)
- 0e4adc1 ast: [**BREAKING**] Remove invalid expressions from
`TSEnumMemberName` (#7219 ) (Boshen)
- 846711c transformer: [**BREAKING**] Change API to take a
`&TransformOptions` instead of `TransformOptions` (#7213 ) (Boshen)
- 092de67 types: [**BREAKING**] Append `rest` field into `elements` for
objects and arrays to align with estree (#7212 ) (ottomated)
- d1d1874 ast: [**BREAKING**] Change `comment.span` to real position
that contain `//` and `/*` (#7154 ) (Boshen)
- 843bce4 ast: [**BREAKING**] `IdentifierReference::reference_id` return
`ReferenceId` (#7126 ) (overlookmotel)
### Features
- cc8a191 ast: Methods on AST nodes to get `scope_id` etc (#7127 )
(overlookmotel)
- dc0215c ast_tools: Add #[estree(append_to)], remove some custom
serialization code (#7149 ) (ottomated)
- 9d6cc9d estree: ESTree compatibility for all literals (#7152 )
(ottomated)
- b74686c isolated-declarations: Support transform TSExportAssignment
declaration (#7204 ) (Dunqing)
- ad3a2f5 tasks/compat_data: Generate our own compat table (#7176 )
(Boshen)
- b4258ee transformer: Add defaulted `Module::Preserve` option (#7225 )
(Boshen)
- 324c3fe transformer: Add `TransformOptions::module` option (#7188 )
(Boshen)
- a166a4a transformer: Add esbuild comma separated target API
`--target=es2020,chrome58` (#7210 ) (Boshen)
- 3a20b90 transformer: Add es target to `engineTargets` (#7193 ) (Boshen)
- 22898c8 transformer: Warn BigInt when targeting < ES2020 (#7184 )
(Boshen)
- a579011 transformer: Add features `ES2018NamedCapturingGroupsRegex`
and `ES2018LookbehindRegex` (#7182 ) (Boshen)
- 8573f79 transformer: Turn on async_to_generator and
async_generator_functions plugins in enable_all (#7135 ) (Dunqing)
- df77241 transformer: Enable `ArrowFunctionConverter` in
`async-to-generator` and `async-generator-functions` plugins (#7113 )
(Dunqing)
- b6a5750 transformer/arrow-function-converter: Move scope to changed
scope for `this_var` if scope have changed (#7125 ) (Dunqing)
- 1910227 transformer/async-to-generator: Support inferring the function
name from the ObjectPropertyValue's key (#7201 ) (Dunqing)
- ffa8604 transformer/async-to-generator: Do not transform await
expression if is not inside async function (#7138 ) (Dunqing)
- e536d47 transformer/babel: Add support for trying to get the `Module`
from `BabelPlugins` (#7218 ) (Dunqing)
- 5cfdc05 transformer/typescript: Support transform `export =` and
`import = require(...)` when module is commonjs (#7206 ) (Dunqing)
### Bug Fixes
- c82b273 transformer/async-generator-functions: Only transform object
method in exit_function (#7200 ) (Dunqing)
- b2a888d transformer/async-generator-functions: Incorrect
transformation for `for await` if it's not placed in a block (#7148 )
(Dunqing)
- 19892ed transformer/async-generator-functions: Transform incorrectly
for `for await` if it's in LabeledStatement (#7147 ) (Dunqing)
- ede10dc transformer/async-to-generator: Incorrect transform when super
expression is inside async method (#7171 ) (Dunqing)
- 293d072 transformer/async-to-generator: Only transform object method
in exit_function (#7199 ) (Dunqing)
- ae692d7 transformer/async_to_generator: Fix checking if function is
class method (#7117 ) (overlookmotel)
- eea4ab8 transformer/helper-loader: Incorrect `SymbolFlags` for default
import when `SourceType` is script (#7226 ) (Dunqing)
### Refactor
- d27e14f ast: `AstKind::as_*` methods take `self` (#5546 )
(overlookmotel)
- fac5042 ast: Use `scope_id` etc methods (#7130 ) (overlookmotel)
- a297765 minifier: Use `map` and `and_then` instead of let else (#7178 )
(7086cmd)
- fc86703 napi/transform: Change test files to TypeScript (#7221 )
(Boshen)
- c5485ae semantic: Add `ancestor_kinds` iterator function (#7217 )
(camchenry)
- abf1602 semantic: Rename `iter_parents` to `ancestors` (#7216 )
(camchenry)
- 42171eb semantic: Rename `ancestors` to `ancestor_ids` (#7215 )
(camchenry)
- de56083 transformer: Add `impl TryFrom<EngineTargets> for EnvOptions`
(#7191 ) (Boshen)
- 0a43c64 transformer: Move `ESTarget` to its own file (#7189 ) (Boshen)
- 0e1f12c transformer: Remove unimplemented `EnvOptions::bugfixes`
(#7162 ) (Boshen)
- a981caf transformer: Add `Engine` enum for `EngineTargets` (#7161 )
(Boshen)
- 8340243 transformer: Rename `Query` to `BrowserslistQuery` (#7143 )
(Boshen)
- 481f7e6 transformer: Change `Targets` to `EngineTargets` (#7142 )
(Boshen)
- 55e6989 transformer: Deserialize engine target strings to specific
keys (#7139 ) (Boshen)
- fdfd9a4 transformer: Use `scope_id` etc methods (#7128 )
(overlookmotel)
- ff8bd50 transformer: Move implementation of ArrowFunction to
common/ArrowFunctionConverter (#7107 ) (Dunqing)
- 4a515be transformer/arrow-function-coverter: Rename function name and
add some comments to explain confusing parts. (#7203 ) (Dunqing)
- c307e1b transformer/arrow-functions: Pass `ArenaBox` as function param
(#7169 ) (overlookmotel)
- 217d433 transformer/arrow-functions: Remove unused `&mut self`
function param (#7165 ) (overlookmotel)
- 426df71 transformer/arrow-functions: Use `scope_id` method (#7164 )
(overlookmotel)
- 11c5e12 transformer/arrow-functions: Correct comments (#7163 )
(overlookmotel)
- 1238506 transformer/async-generator-function: Remove inactive
`#[allow(clippy::unused_self)]` attrs (#7167 ) (overlookmotel)
- 84ee581 transformer/async-generator-functions: Simplify identifying
whether within an async generator function (#7170 ) (overlookmotel)
- 1b12328 transformer/async-generator-functions: Use `clone` not
`clone_in` on `LabelIdentifier` (#7172 ) (overlookmotel)
- cd1006f transformer/async-generator-functions: Do not transform yield
expression where inside generator function (#7134 ) (Dunqing)
- 2c5734d transformer/async-generator-functions: Do not transform await
expression where inside ArrowFunctionExpression (#7132 ) (Dunqing)
- 5ce83bd transformer/async-generator-functions: Remove dead code for
handle await expression (#7131 ) (Dunqing)
- e04ee97 transformer/async-generator-functions: Move handling of
`MethodDefinition`'s value to `exit_function` (#7106 ) (Dunqing)
- b57d5a5 transformer/async-to-generator: Remove unused `&self` function
param (#7166 ) (overlookmotel)
- f80085c transformer/async-to-generator: Move handling of
`MethodDefinition`'s value to `exit_function` (#7105 ) (Dunqing)
- e2241e6 transformer/jsx-self: Remove unused `&self` function params
(#7159 ) (overlookmotel)
- 1dfd241 transformer/optional-catch-binding: Remove inactive
`#[allow(clippy::unused_self)]` attr (#7158 ) (overlookmotel)
- fd9b44c transformer/typescript: Remove inactive
`#[allow(clippy::unused_self)]` attr (#7160 ) (overlookmotel)
- cacfb9b traverse: Use `symbol_id` etc methods (#7129 ) (overlookmotel)
### Styling
- 38a6df6 transformer/arrow-functions: Semicolon after return statements
(#7168 ) (overlookmotel)
- 64b7e3a transformer/async-generator-functions: Import
`oxc_allocator::Vec` as `ArenaVec` (#7173 ) (overlookmotel)
### Testing
- be819dd napi/transform: Add test for not default es transform (Boshen)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-10 00:31:14 +08:00
oxc-bot
68dc899887
release(oxlint): v0.11.1 ( #7224 )
...
## [0.11.1] - 2024-11-09
### Features
- 4dd9b60 editor/vscode: Replace existing output channel and trace
output channel with a single LogOutputChannel (#7196 ) (Nicholas Rayburn)
- 1fcd709 linter: Add jsx support for only-used-in-recursion (#7120 )
(no-yan)
- 4d577cf linter: Add `import/first` rule (#7180 ) (Dmitry Zakharov)
- 9b8973f linter: Add `import/unambiguous` rule (#7187 ) (Dmitry
Zakharov)
- 5ab1ff6 linter: Implement @typescript-eslint/no-unsafe-function-type
(#6989 ) (Orenbek)
### Bug Fixes
- eea8879 editor/vscode: Update language client id to fix the resolution
of the oxc.trace.server setting (#7181 ) (Nicholas Rayburn)
- b73cfd9 linter: Fix `is_method_call` with parentheses and chain
expression (#7095 ) (tbashiyy)
### Refactor
- 8c0a362 linter: Use `ctx.source_range(comment.content_span())` API
(#7155 ) (Boshen)
- c5485ae semantic: Add `ancestor_kinds` iterator function (#7217 )
(camchenry)
- abf1602 semantic: Rename `iter_parents` to `ancestors` (#7216 )
(camchenry)
- 42171eb semantic: Rename `ancestors` to `ancestor_ids` (#7215 )
(camchenry)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2024-11-09 19:57:08 +08:00
Boshen
ad3a2f518e
feat(tasks/compat_data): generate our own compat table ( #7176 )
2024-11-07 07:39:33 +00:00
Boshen
14ce0eef44
feat(tasks/compat_data): init compat data task ( #7156 )
2024-11-07 07:39:32 +00:00
ottomated
9d6cc9d3af
feat(estree): ESTree compatibility for all literals ( #7152 )
...
Adds some new estree macro directives:
- `#[estree(via = foo::Foo)`: Uses From to convert this struct to foo::Foo before serialization
- `#[estree(add_ts = "foo: string")]`: Adds additional fields to the typescript definitions
Used these to make all different literals estree-compatible.
2024-11-06 21:25:41 +00:00
ottomated
dc0215c906
feat(ast_tools): Add #[estree(append_to)], remove some custom serialization code ( #7149 )
...
Removed custom logic for ObjectPattern, ArrayPattern, etc. in favor of a custom attribute macro `#[estree(append_to = "foo")]` as part of #6347
2024-11-06 21:09:45 +00:00
Boshen
0b32951637
chore(deps): update rust crate criterion2 to v2 ( #7144 )
2024-11-05 14:01:09 +00:00
renovate[bot]
8e90790a60
chore(deps): update rust crates ( #7115 )
2024-11-04 23:34:51 +08:00
Boshen
50646a49ea
refactor(tasks/website): remove scraper dependency ( #7116 )
2024-11-04 14:16:11 +00:00
oxc-bot
12a6952782
release(crates): v0.35.0 ( #7110 )
...
## [0.35.0] - 2024-11-04
- f543a8d ast: [**BREAKING**] Remove `AstBuilder::*_from_*` methods
(#7073 ) (overlookmotel)
- b8daab3 transformer: [**BREAKING**] API to `TryFrom<&EnvOptions> for
TransformOptions` and `TryFrom<&BabelOptions> TransformOptions` (#7020 )
(Boshen)
- 9a6a2f9 semantic: [**BREAKING**] Remove
`SymbolTable::get_symbol_id_from_span` API (#6955 ) (Boshen)
### Features
- 854870e ast: Label AST fields with #[ts] (#6987 ) (ottomated)
- ce5b609 ast: Remove explicit untagged marker on enums (#6915 )
(ottomated)
- 9725e3c ast_tools: Add #[estree(always_flatten)] to Span (#6935 )
(ottomated)
- fbc297e ast_tools: Move tsify custom types to estree attribute macro
(#6934 ) (ottomated)
- 169fa22 ast_tools: Default enums to rename_all = "camelCase" (#6933 )
(ottomated)
- caa4b1f codegen: Improve printing of comments (#7108 ) (Boshen)
- 001058a codegen: Always print legal comments on its own line (#7089 )
(Boshen)
- 413973d codegen: Print linked and external legal comment (#7059 )
(Boshen)
- ee27b92 codegen: Print eof legal comments (#7058 ) (Boshen)
- 6516f9e codegen: Print inline legal comments (#7054 ) (Boshen)
- 1e2f012 linter: Add `oxc/no-map-spread` (#6751 ) (DonIsaac)
- 6d97af4 rust: Use `oxc-miette` (#6938 ) (Boshen)
- bfdbcf1 transformer: Add `EnvOptions::from_browerslist_query` API
(#7098 ) (Boshen)
- 21b8e49 transformer: Add `ESTarget` (#7091 ) (Boshen)
- fcaba4a transformer: Add `TransformerOptions::env` with `EnvOptions`
(#7037 ) (Boshen)
- 1d906c6 transformer: Class properties transform skeleton (#7038 )
(overlookmotel)
- 934cb5e transformer: Add `async_generator_functions` plugin (#6573 )
(Dunqing)
### Bug Fixes
- 0601271 ast: Fix `StaticMemberExpression.get_first_object` (#6969 )
(tomoya yanagibashi)
- da199c7 ecmascript: Allow getting PropName for object methods (#6967 )
(camchenry)
- f5a7134 linter/no-unused-vars: False positive for discarded reads
within sequences (#6907 ) (DonIsaac)
- 9ed9501 module_lexer: Add missing `export * from 'foo';` case (#7103 )
(Boshen)
- d15e408 napi/transform: Fix 'typescript.declaration' option not
working (#7012 ) (Boshen)
- dcdb9ea napi/transform: Fix test (Boshen)
- caaf00e parser: Fix incorrect parsed `TSIndexSignature` (#7016 )
(Boshen)
- b188b4a transformer: Fix typescript globals being recognized as
globals (#7100 ) (Boshen)
- a2244ff transformer/async-to-generator: Output is incorrect when arrow
function without params (#7052 ) (Dunqing)
- 7d12669 types: Move @oxc-project/types to dependencies (#6909 )
(ottomated)
### Performance
- 6ca01b9 ast: Reduce size of `Comment` (#6921 ) (overlookmotel)
- c58ec89 data_structures: Optimize `NonEmptyStack::pop` (#7021 )
(overlookmotel)
- fa9a4ec parser: Check `.` before `[` in `parse_member_expression_rest`
(#6979 ) (Boshen)
### Refactor
- b0211a1 ast: `StaticMemberExpression::get_first_object` use loop
instead of recursion (#7065 ) (overlookmotel)
- fc07458 ast: Move custom types `.d.ts` file (#6931 ) (overlookmotel)
- c41c013 ast: Rename lifetime (#6922 ) (overlookmotel)
- 335eb38 ast_tools: Faster formatting Rust code (#6972 ) (overlookmotel)
- 4cf0085 ast_tools: Reorder imports in generated code (#6926 )
(overlookmotel)
- dd79c1b codegen: Replace `daachorse` with string match for annotation
comment (#7064 ) (Boshen)
- 0bb1aa4 codegen: Move options to its own file (#7053 ) (Boshen)
- b021147 data_structures: Make all methods of `NonNull` shim
`#[inline(always)]` (#7024 ) (overlookmotel)
- fb1710a data_structures: Add `#[repr(transparent)]` to `NonNull` shim
(#7023 ) (overlookmotel)
- f1fc8db data_structures: Add `read` method to `NonNull` shim (#7022 )
(overlookmotel)
- cea0e6b isolated_declarations: Do not use `AstBuilder::*_from_*`
methods (#7071 ) (overlookmotel)
- 97caae1 minifier: Do not use `AstBuilder::*_from_*` methods (#7072 )
(overlookmotel)
- 2c7ac29 minifier: Remove `Tri`, use `Option<bool>` instead (#6912 )
(Boshen)
- 9926990 napi: Move custom types to bottom of file (#6930 )
(overlookmotel)
- 23157bd napi: Types file in root of types package (#6929 )
(overlookmotel)
- 953b051 parser: Remove `oxc_ecmascript` crate (#7109 ) (Boshen)
- fdd480d parser: Do not use `AstBuilder::*_from_*` methods (#7068 )
(overlookmotel)
- 9e85b10 parser: Add `ParserImpl::alloc` method (#7063 ) (overlookmotel)
- 17a938e parser: Use function `parse_type_member_semicolon` (#7018 )
(Boshen)
- aa1b29c parser: Remove `parse_ts_index_signature_member` function
(#7017 ) (Boshen)
- 7f1d1fe transform: Deserialize `BabelPreests::env` directly (#7051 )
(Boshen)
- 76947e2 transform: Refactor Babel Targets (#7026 ) (Boshen)
- d03e622 transformer: Do not use `AstBuilder::*_from_*` methods (#7070 )
(overlookmotel)
- 9d384ad transformer: Use `identifier_reference_with_reference_id`
builder method (#7056 ) (overlookmotel)
- 4688a06 transformer: Use `*_with_scope_id` builder methods where
possible (#7055 ) (overlookmotel)
- 7122e00 transformer: Use `ctx.alloc` over `ctx.ast.alloc` where
possible (#7066 ) (overlookmotel)
- a3b68b4 transformer: Flatten dir structure of options/babel/env
(#7049 ) (Boshen)
- 6d92f36 transformer: Deserialize `BabelOptions::compiler_assumptions`
(#7048 ) (Boshen)
- f83a760 transformer: Deserialize `BabelOptions::presets` (#7047 )
(Boshen)
- 52c20d6 transformer: Deserialize `BabelOptions::plugins` (#7045 )
(Boshen)
- e921df6 transformer: Rename `EnvOptions` to `BabelEnvOptions` (#7036 )
(Boshen)
- af5140f transformer: Isolate babel options logic (#7034 ) (Boshen)
- 12aa910 transformer: Clean up `env/targets/query.rs` (#7033 ) (Boshen)
- 3d174bb transformer: Clean up `BabelOptions` (#7029 ) (Boshen)
- 6284f84 transformer: Use `Browserslist::Version` (#7028 ) (Boshen)
- 5b11cdf transformer: Clean up TransformerOptions (#7005 ) (Boshen)
- f0c87d4 transformer: Mark all EnvOptions as not implemented (#7004 )
(Boshen)
- d9edef6 transformer: Combine ObjectRestSpread into a single file
(#7002 ) (Boshen)
- c945fe7 transformer: Import `oxc_allocator::Box` as `ArenaBox` (#6999 )
(overlookmotel)
- fc1af2e transformer: Import `oxc_allocator::Vec` as `ArenaVec` (#6998 )
(overlookmotel)
- 63e8bfe transformer: Rename `AString` to `ArenaString` (#6997 )
(overlookmotel)
- 562bb9a transformer/async-to-generator: Move transform methods to
`AsyncGeneratorExecutor` and make it public (#6992 ) (Dunqing)
- e23f7e6 transformer/common: `VarDeclarations` insert either `var` or
`let` statements (#7043 ) (overlookmotel)
- e5ecbb9 transformer/jsx: Return `&mut T` not `&mut ArenaBox<T>`
(#7001 ) (overlookmotel)
- 9e66c29 transformer/react-refresh: Small refactor (#6973 )
(overlookmotel)
- 1ca8cd2 transformer/react-refresh: Avoid panic for `init` of
`VariableDeclarator` isn't a `BindingIdentifier` (#6937 ) (Dunqing)
- 5f153ac transformer/react-refresh: Use `VarDeclarations` to insert
declarators (#6884 ) (Dunqing)
- df3b089 transformer/react-refresh: Use `StatementInjector` to insert
statements (#6881 ) (Dunqing)
- ae22671 transformer/typescript: Pass `&mut T` not `&mut ArenaBox<T>`
(#7000 ) (overlookmotel)
- 938ee87 traverse: Do not use `AstBuilder::*_from_*` methods (#7069 )
(overlookmotel)
### Styling
- 86ab091 transformer/common: Split up `StatementInjectorStore` methods
into blocks (#7042 ) (overlookmotel)
### Testing
- 64e2499 module_lexer: Use a single integration test for faster
compilation (#7097 ) (Boshen)
- 6133a50 transformer: Use a single integration test for faster
compilation (#7099 ) (Boshen)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-04 17:40:05 +08:00
Boshen
953b0516e8
refactor(parser): remove oxc_ecmascript crate ( #7109 )
2024-11-04 16:29:26 +08:00
Boshen
b8104a2dc4
chore : bump oxc-miette to v1.0.2
2024-11-03 21:06:43 +08:00
Boshen
21b8e4988f
feat(transformer): add ESTarget ( #7091 )
...
closes #6982
2024-11-03 12:21:53 +00:00
oxc-bot
2d40b073cb
release(oxlint): v0.11.0 ( #7094 )
...
## [0.11.0] - 2024-11-03
- 9fd9f4f linter: [**BREAKING**] Sync sindresorhus/globals; removed
Object.prototype properties from builtin and es* globals (#6991 )
(Boshen)
### Features
- 6b619da editor: Listen to config file changes and trigger a
didChangeConfiguration update (#6964 ) (Nicholas Rayburn)
- 7872927 editor/vscode: Support window/showMessage event (#7085 )
(Nicholas Rayburn)
- 2184588 linter: Do not bail for unmatched rules yet (#7093 ) (Boshen)
- a6fcd81 linter: Add `import/no-commonjs` rule (#6978 ) (Dmitry
Zakharov)
- 1691cab linter: Support user-configurable secrets for
`oxc-security/api-keys` (#5938 ) (DonIsaac)
- 610621c linter: Implement `react/style-prop-object` (#6342 ) (Albert
Kaaman)
- 1e2f012 linter: Add `oxc/no-map-spread` (#6751 ) (DonIsaac)
- 1c66473 linter: Implement `eslint/prefer-object-has-own` (#6905 )
(tomoya yanagibashi)
### Bug Fixes
- ebf3753 editor: Fix onConfigChange to send the correct config for
didChangeConfiguration notification (#6962 ) (Nicholas Rayburn)
- 79bf74a linter: Check is_reference_to_global_variable in
`no-array-constructor` (#7067 ) (Naoya Yoshizawa)
- 38d1f78 linter: Remove confusing help text for now (#7081 ) (Cam
McHenry)
- 147e2e4 linter: Allow replacing rule when none are enabled yet (#7014 )
(camchenry)
- 7aa496a linter: Remove unsafe fixer of `no-useless-spread` (#6655 )
(dalaoshu)
- f5a7134 linter/no-unused-vars: False positive for discarded reads
within sequences (#6907 ) (DonIsaac)
### Documentation
- 4551baa linter: Document `rules` (#6983 ) (Boshen)
### Refactor
- a8dc75d linter: Remove unused CLI result types (#7088 ) (camchenry)
- 8f1460e linter: Move `LintPlugins` from `LintOptions` to `LintConfig`
(#6932 ) (DonIsaac)
### Testing
- c35d3f2 linter: Improve test failure output (#6975 ) (camchenry)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-03 11:27:30 +08:00
Boshen
dd79c1bfb3
refactor(codegen): replace daachorse with string match for annotation comment ( #7064 )
2024-11-02 14:16:10 +08:00
Boshen
6284f84f58
refactor(transformer): use Browserslist::Version ( #7028 )
2024-10-30 14:32:50 +00:00
camchenry
da199c7476
fix(ecmascript): allow getting PropName for object methods ( #6967 )
...
Working on some lint rules and noticed that PropName didn't seem to be working as intended. According to the spec, we should definitely allow get/set/methods to have prop names:
https://tc39.es/ecma262/#sec-static-semantics-propname
<img width="694" alt="image" src="https://github.com/user-attachments/assets/60fdfeec-2320-4cd9-a786-901728e459b2 ">
However, we still need to retain this logic for checking `__proto__` because it has special rules.
2024-10-28 09:34:27 +00:00
renovate
56f5506ca9
chore(deps): update rust crates ( #6961 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [encoding_rs](https://docs.rs/encoding_rs/ ) ([source](https://redirect.github.com/hsivonen/encoding_rs )) | workspace.dependencies | patch | `0.8.34` -> `0.8.35` |
| [handlebars](https://redirect.github.com/sunng87/handlebars-rust ) | workspace.dependencies | minor | `6.1.0` -> `6.2.0` |
| [insta](https://insta.rs/ ) ([source](https://redirect.github.com/mitsuhiko/insta )) | workspace.dependencies | minor | `1.40.0` -> `1.41.0` |
| [prettyplease](https://redirect.github.com/dtolnay/prettyplease ) | workspace.dependencies | patch | `0.2.24` -> `0.2.25` |
| [regex](https://redirect.github.com/rust-lang/regex ) | workspace.dependencies | patch | `1.11.0` -> `1.11.1` |
| [saphyr](https://redirect.github.com/saphyr-rs/saphyr ) | workspace.dependencies | patch | `0.0.1` -> `0.0.3` |
| [serde](https://serde.rs ) ([source](https://redirect.github.com/serde-rs/serde )) | workspace.dependencies | patch | `1.0.210` -> `1.0.213` |
| [tokio](https://tokio.rs ) ([source](https://redirect.github.com/tokio-rs/tokio )) | workspace.dependencies | minor | `1.40.0` -> `1.41.0` |
---
### Release Notes
<details>
<summary>hsivonen/encoding_rs (encoding_rs)</summary>
### [`v0.8.35`](https://redirect.github.com/hsivonen/encoding_rs/compare/v0.8.34...v0.8.35 )
[Compare Source](https://redirect.github.com/hsivonen/encoding_rs/compare/v0.8.34...v0.8.35 )
</details>
<details>
<summary>sunng87/handlebars-rust (handlebars)</summary>
### [`v6.2.0`](https://redirect.github.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#620---2024-10-26 )
[Compare Source](https://redirect.github.com/sunng87/handlebars-rust/compare/v6.1.0...v6.2.0 )
- \[Added] `@index` variable for object iteration \[[#​682](https://redirect.github.com/sunng87/handlebars-rust/issues/682 )]
- \[Changed] improve number comparison between different types \[[#​679](https://redirect.github.com/sunng87/handlebars-rust/issues/679 )]
</details>
<details>
<summary>mitsuhiko/insta (insta)</summary>
### [`v1.41.0`](https://redirect.github.com/mitsuhiko/insta/blob/HEAD/CHANGELOG.md#1410 )
[Compare Source](https://redirect.github.com/mitsuhiko/insta/compare/1.40.0...1.41.0 )
- Experimental support for binary snapshots. [#​610](https://redirect.github.com/mitsuhiko/insta/issues/610 ) (Florian Plattner)
- `--force-update-snapshots` now causes `cargo-insta` to write every snapshot, regardless of whether
snapshots fully match, and now implies `--accept`. This
allows for `--force-update-snapshots` to update inline snapshots'
delimiters and indentation.
For the previous behavior of `--force-update-snapshots`, which limited writes to
snapshots which didn't fully match, use `--require-full-match`.
The main difference between `--require-full-match` and the existing behavior of `--force-update-snapshots`
is a non-zero exit code on any snapshots which don't fully match.
Like the previous behavior or `--force-update-snapshots`, `--require-full-match`
doesn't track inline snapshots' delimiters or
indentation, so can't update if those don't match. [#​644](https://redirect.github.com/mitsuhiko/insta/issues/644 )
- Inline snapshots only use `#` characters as delimiters when required. [#​603](https://redirect.github.com/mitsuhiko/insta/issues/603 )
- Warnings for undiscovered snapshots are more robust, and include files with
custom snapshot extensions. [#​637](https://redirect.github.com/mitsuhiko/insta/issues/637 )
- Insta runs correctly on packages which reference rust files in a parent path. [#​626](https://redirect.github.com/mitsuhiko/insta/issues/626 )
- Warnings are printed when any snapshot uses a legacy format. [#​599](https://redirect.github.com/mitsuhiko/insta/issues/599 )
- `cargo insta --version` now prints a version. [#​665](https://redirect.github.com/mitsuhiko/insta/issues/665 )
- `insta` now internally uses `INSTA_UPDATE=force` rather than
`INSTA_FORCE_UPDATE=1`. (This doesn't affect users of `cargo-insta`, which
handles this internally.) [#​482](https://redirect.github.com/mitsuhiko/insta/issues/482 )
- `cargo-insta`'s integration tests continue to grow over the past couple of versions,
and now offer coverage of most of `cargo-insta`'s interface.
</details>
<details>
<summary>dtolnay/prettyplease (prettyplease)</summary>
### [`v0.2.25`](https://redirect.github.com/dtolnay/prettyplease/releases/tag/0.2.25 )
[Compare Source](https://redirect.github.com/dtolnay/prettyplease/compare/0.2.24...0.2.25 )
- Print safe and explicitly unsafe foreign items ([#​85](https://redirect.github.com/dtolnay/prettyplease/issues/85 ), [https://github.com/rust-lang/rust/issues/123743 ](https://redirect.github.com/rust-lang/rust/issues/123743 ))
</details>
<details>
<summary>rust-lang/regex (regex)</summary>
### [`v1.11.1`](https://redirect.github.com/rust-lang/regex/blob/HEAD/CHANGELOG.md#1111-2024-10-24 )
[Compare Source](https://redirect.github.com/rust-lang/regex/compare/1.11.0...1.11.1 )
\===================
This is a new patch release of `regex` that fixes compilation on nightly
Rust when the unstable `pattern` crate feature is enabled. Users on nightly
Rust without this feature enabled are unaffected.
Bug fixes:
- [BUG #​1231](https://redirect.github.com/rust-lang/regex/issues/1231 ):
Fix the `Pattern` trait implementation as a result of nightly API breakage.
</details>
<details>
<summary>saphyr-rs/saphyr (saphyr)</summary>
### [`v0.0.3`](https://redirect.github.com/saphyr-rs/saphyr/compare/v0.0.1...v0.0.3 )
[Compare Source](https://redirect.github.com/saphyr-rs/saphyr/compare/v0.0.1...v0.0.3 )
</details>
<details>
<summary>serde-rs/serde (serde)</summary>
### [`v1.0.213`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.213 )
[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.212...v1.0.213 )
- Fix support for macro-generated `with` attributes inside a newtype struct ([#​2847](https://redirect.github.com/serde-rs/serde/issues/2847 ))
### [`v1.0.212`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.212 )
[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.211...v1.0.212 )
- Fix hygiene of macro-generated local variable accesses in serde(with) wrappers ([#​2845](https://redirect.github.com/serde-rs/serde/issues/2845 ))
### [`v1.0.211`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.211 )
[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.210...v1.0.211 )
- Improve error reporting about mismatched signature in `with` and `default` attributes ([#​2558](https://redirect.github.com/serde-rs/serde/issues/2558 ), thanks [@​Mingun](https://redirect.github.com/Mingun ))
- Show variant aliases in error message when variant deserialization fails ([#​2566](https://redirect.github.com/serde-rs/serde/issues/2566 ), thanks [@​Mingun](https://redirect.github.com/Mingun ))
- Improve binary size of untagged enum and internally tagged enum deserialization by about 12% ([#​2821](https://redirect.github.com/serde-rs/serde/issues/2821 ))
</details>
<details>
<summary>tokio-rs/tokio (tokio)</summary>
### [`v1.41.0`](https://redirect.github.com/tokio-rs/tokio/releases/tag/tokio-1.41.0 ): Tokio v1.41.0
[Compare Source](https://redirect.github.com/tokio-rs/tokio/compare/tokio-1.40.0...tokio-1.41.0 )
##### 1.41.0 (Oct 22th, 2024)
##### Added
- metrics: stabilize `global_queue_depth` ([#​6854], [#​6918])
- net: add conversions for unix `SocketAddr` ([#​6868])
- sync: add `watch::Sender::sender_count` ([#​6836])
- sync: add `mpsc::Receiver::blocking_recv_many` ([#​6867])
- task: stabilize `Id` apis ([#​6793], [#​6891])
##### Added (unstable)
- metrics: add H2 Histogram option to improve histogram granularity ([#​6897])
- metrics: rename some histogram apis ([#​6924])
- runtime: add `LocalRuntime` ([#​6808])
##### Changed
- runtime: box futures larger than 16k on release mode ([#​6826])
- sync: add `#[must_use]` to `Notified` ([#​6828])
- sync: make `watch` cooperative ([#​6846])
- sync: make `broadcast::Receiver` cooperative ([#​6870])
- task: add task size to tracing instrumentation ([#​6881])
- wasm: enable `cfg_fs` for `wasi` target ([#​6822])
##### Fixed
- net: fix regression of abstract socket path in unix socket ([#​6838])
##### Documented
- io: recommend `OwnedFd` with `AsyncFd` ([#​6821])
- io: document cancel safety of `AsyncFd` methods ([#​6890])
- macros: render more comprehensible documentation for `join` and `try_join` ([#​6814], [#​6841])
- net: fix swapped examples for `TcpSocket::set_nodelay` and `TcpSocket::nodelay` ([#​6840])
- sync: document runtime compatibility ([#​6833])
[#​6793]: https://redirect.github.com/tokio-rs/tokio/pull/6793
[#​6808]: https://redirect.github.com/tokio-rs/tokio/pull/6808
[#​6810]: https://redirect.github.com/tokio-rs/tokio/pull/6810
[#​6814]: https://redirect.github.com/tokio-rs/tokio/pull/6814
[#​6821]: https://redirect.github.com/tokio-rs/tokio/pull/6821
[#​6822]: https://redirect.github.com/tokio-rs/tokio/pull/6822
[#​6826]: https://redirect.github.com/tokio-rs/tokio/pull/6826
[#​6828]: https://redirect.github.com/tokio-rs/tokio/pull/6828
[#​6833]: https://redirect.github.com/tokio-rs/tokio/pull/6833
[#​6836]: https://redirect.github.com/tokio-rs/tokio/pull/6836
[#​6838]: https://redirect.github.com/tokio-rs/tokio/pull/6838
[#​6840]: https://redirect.github.com/tokio-rs/tokio/pull/6840
[#​6841]: https://redirect.github.com/tokio-rs/tokio/pull/6841
[#​6846]: https://redirect.github.com/tokio-rs/tokio/pull/6846
[#​6854]: https://redirect.github.com/tokio-rs/tokio/pull/6854
[#​6867]: https://redirect.github.com/tokio-rs/tokio/pull/6867
[#​6868]: https://redirect.github.com/tokio-rs/tokio/pull/6868
[#​6870]: https://redirect.github.com/tokio-rs/tokio/pull/6870
[#​6881]: https://redirect.github.com/tokio-rs/tokio/pull/6881
[#​6890]: https://redirect.github.com/tokio-rs/tokio/pull/6890
[#​6891]: https://redirect.github.com/tokio-rs/tokio/pull/6891
[#​6897]: https://redirect.github.com/tokio-rs/tokio/pull/6897
[#​6918]: https://redirect.github.com/tokio-rs/tokio/pull/6918
[#​6924]: https://redirect.github.com/tokio-rs/tokio/pull/6924
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions ) if that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-10-28 06:22:28 +00:00
overlookmotel
83d1f69f75
refactor(ast_tools): replace str::replace with CowUtils::cow_replace ( #6954 )
...
Obey our clippy-enforced policy to prefer `CowUtils::cow_replace`.
2024-10-28 00:23:34 +00:00
Boshen
6d97af46c7
feat(rust): use oxc-miette ( #6938 )
2024-10-27 13:30:20 +00:00
oxc-bot
1ea0be1b6a
release(oxlint): v0.10.3 ( #6911 )
...
## [0.10.3] - 2024-10-26
- 90c786c regular_expression: [**BREAKING**] Support ES2025 Duplicated
named capture groups (#6847 ) (leaysgur)
- 8032813 regular_expression: [**BREAKING**] Migrate to new regexp
parser API (#6741 ) (leaysgur)
### Features
- a73c5af linter: Add fixer for `jsx-a11y/no-access-key` rule (#6781 )
(Tapan Prakash)
- 2aa763c linter: Warn unmatched rule names (#6782 ) (Tapan Prakash)
- 0acca58 linter: Support `--print-config all` to print config file for
project (#6579 ) (mysteryven)
### Bug Fixes
- f49b3e2 linter: `react/iframe-missing-sandbox` ignores vanilla JS APIs
(#6872 ) (DonIsaac)
- 54a5032 linter: Correct false positive in `no-duplicates` (#6748 )
(dalaoshu)
- a47c70e minifier: Fix remaining runtime bugs (#6855 ) (Boshen)
### Documentation
- 3923e63 linter: Add schema to config examples (#6838 ) (Dmitry
Zakharov)
### Refactor
- a148023 linter: Dereference IDs as soon as possible (#6821 )
(overlookmotel)
- 423d54c rust: Remove the annoying `clippy::wildcard_imports` (#6860 )
(Boshen)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-26 17:13:06 +08:00
oxc-bot
238e0866cb
release(crates): v0.34.0 ( #6908 )
...
## [0.34.0] - 2024-10-26
- 4618aa2 transformer: [**BREAKING**] Rename `TransformerOptions::react`
to `jsx` (#6888 ) (Boshen)
- 90c786c regular_expression: [**BREAKING**] Support ES2025 Duplicated
named capture groups (#6847 ) (leaysgur)
- 67a7bde napi/parser: [**BREAKING**] Add typings to napi/parser (#6796 )
(ottomated)
### Features
- 1145341 ast_tools: Output typescript to a separate package (#6755 )
(ottomated)
- 4429754 ecmascript: Constant eval `null` to number (#6879 ) (Boshen)
- fd57e00 ecmascript: Add abstract_relational_comparison to dce (#6846 )
(Boshen)
- 8bcaf59 minifier: Late peeophole optimization (#6882 ) (Boshen)
- 860cbca minifier: Implement folding simple arrow fns (#6875 ) (camc314)
- c26020e minifier: Implement folding String.prototype.replaceAll
(#6871 ) (camc314)
- 50744f3 minifier: Implement folding String.prototype.replace (#6870 )
(camc314)
- fccf82e minifier: Implement folding `substring` string fns (#6869 )
(camc314)
- e6a5a1b minifier: Implement folding `charCodeAt` string fns (#6475 )
(camc314)
- 0d0bb17 transformer: Complete the async-to-generator plugin (#6658 )
(Dunqing)
- 419343b traverse: Implement `GetAddress` for `Ancestor` (#6877 )
(overlookmotel)
### Bug Fixes
- a47c70e minifier: Fix remaining runtime bugs (#6855 ) (Boshen)
- 686727f minifier: Reference read has side effect (#6851 ) (Boshen)
- c658d93 minifier: Keep template literals with expressions (#6849 )
(Boshen)
- 4dc5e51 transformer: Only run typescript plugin for typescript source
(#6889 ) (Boshen)
- 076f5c3 transformer/typescript: Retain ExportNamedDeclaration without
specifiers and declaration (#6848 ) (Dunqing)
- b075982 types: Change @oxc/types package name (#6874 ) (ottomated)
### Documentation
- 6eeb0e6 ast: Mention typescript-eslint, field ordering and shape
(#6863 ) (Boshen)
- 99e3b32 napi: Remove JSON.parse from example (#6836 ) (ottomated)
### Refactor
- adb5039 allocator: Add `impl GetAddress for Address` (#6891 )
(overlookmotel)
- 3e7507f ast_tools: Reduce macro usage (#6895 ) (overlookmotel)
- 423d54c rust: Remove the annoying `clippy::wildcard_imports` (#6860 )
(Boshen)
- 2d95009 transformer: Implement `Debug` on `StatementInjector` internal
types (#6886 ) (overlookmotel)
- c383c34 transformer: Make `StatementInjectorStore` methods generic
over `GetAddress` (#6885 ) (overlookmotel)
- 1f29523 transformer: Rename ReactJsx to Jsx (#6883 ) (Boshen)
- 333b758 transformer: `StatementInjectorStore` methods take
`&Statement` as target (#6858 ) (overlookmotel)
- c19996c transformer: Add `StatementInjectorStore::insert_many_before`
method (#6857 ) (overlookmotel)
- 7339dde transformer: `StatementInjectorStore::insert_many_after` take
an iterator (#6856 ) (overlookmotel)
- 4348eae transformer/typescript: Re-order visitor methods (#6864 )
(overlookmotel)
- 3a56d59 transformer/typescript: Insert assignments after super by
`StatementInjector` (#6654 ) (Dunqing)
- a366fae traverse: Rename
`TraverseScoping::generate_binding_in_current_scope` (#6832 )
(overlookmotel)
- 3b99fe6 traverse: Move `generate_binding` to `TraverseScoping` (#6831 )
(overlookmotel)
- 60f487a traverse: `TraverseCtx::generate_binding` take an `Atom`
(#6830 ) (overlookmotel)
### Styling
- 262b2ed ast: Move crate doc comment to top of file (#6890 )
(overlookmotel)
---------
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-26 09:39:53 +08:00