mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
agent/fix-react-compiler-numeric-object-keys
1214 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
81511b4568 |
chore(deps): update dependency oxfmt to ^0.58.0 (#24240)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [oxfmt](https://oxc.rs/docs/guide/usage/formatter) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt)) | [`^0.57.0` → `^0.58.0`](https://renovatebot.com/diffs/npm/oxfmt/0.57.0/0.58.0) |  |  |  |  | --- ### Release Notes <details> <summary>oxc-project/oxc (oxfmt)</summary> ### [`v0.58.0`](https://redirect.github.com/oxc-project/oxc/compare/oxfmt_v0.57.0...oxfmt_v0.58.0) [Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxfmt_v0.57.0...oxfmt_v0.58.0) </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, 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://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Cameron <cameron.clark@hey.com> |
||
|
|
69b2dfc181 |
release(crates): oxc v0.139.0 (#24218)
### 🚀 Features - |
||
|
|
4eb074e69d |
feat(mangler): add reserved option for names that must not be mangled (#24041)
Adds `MangleOptions::reserved` — equivalent to terser / uglify-js / swc `mangle.reserved`: names in the set are never used as mangled names, and bindings that already carry them keep them. Default empty; default output is byte-identical to main (minsize snapshot unchanged). ## Motivation Node's cjs-module-lexer detects a CommonJS module's named exports by **lexically** scanning for `exports.<name> =` / `module.exports` token patterns — no scope analysis ([its README documents renamed identifiers as "DETECTS: NO EXPORTS"](https://github.com/nodejs/cjs-module-lexer)). UMD / CommonJS wrappers bind `exports` / `module` as ordinary function parameters, and the mangler renames them, erasing every named export the lexer can see. Surfaced by the monitor-oxc mangler runtime test ([failing run](https://github.com/oxc-project/monitor-oxc/actions/runs/28569108563/job/84702922472), previously masked by #24033 / #24036): `archiver` does `import { queue } from "async"`, and `async`'s dist is a UMD bundle — mangled, the factory parameter `exports` became `e` and node fails with `Named export 'queue' not found`. With `reserved: ["exports", "module"]` the output imports correctly (verified end-to-end in node, including running a queue task). ## Why an opt-in list instead of always keeping these names Renaming them is ecosystem-standard. Verified empirically — minifying the same UMD sample and importing it in node: | minifier | renames `exports` param? | `import { queue }` from its output | escape hatch | | --- | --- | --- | --- | | terser 5.48 | yes | fails | `mangle.reserved` (verified working) | | uglify-js 3.19 | yes | fails | `reserved` (verified working) | | esbuild 0.28 `--minify` | yes | fails | none for identifier mangling | | swc | yes | fails | terser-style `mangle.reserved` ([swc#3424](https://github.com/swc-project/swc/issues/3424)) | An earlier revision of this PR kept `exports` / `module` unconditionally; the Minification Size check showed the real cost: ~1% minified on UMD-heavy files (d3: +3.3 kB from ~590 `exports` references, flipping it to *larger than esbuild*), because the point is keeping the literal 7-char token at every export site. No other minifier pays this by default — and rolldown bundles bind `exports` / `module` in every CJS interop wrapper, where node's lexer never looks. So oxc gets the same escape hatch as terser/swc, with the same name. `MangleOptions` loses `Copy` (it now holds the set); construction sites switch to `..MangleOptions::default()` / `clone()`. Exposed in `oxc-minify` NAPI options (`mangle.reserved: string[]`) and the mangler example (`--reserve-exports`). monitor-oxc will pass `["exports", "module"]` for its mangler runtime test (its corpus imports prebuilt CJS/UMD dists directly). For reference, esbuild solves this for its *own* node-platform CJS bundles differently — a dead-code annotation `0 && (module.exports = { a, b })` that cjs-module-lexer recognizes ([esbuild#960](https://github.com/evanw/esbuild/issues/960), [cjs-module-lexer#44](https://github.com/nodejs/cjs-module-lexer/issues/44)); verified that pattern also works appended to fully-mangled output. That could be a future zero-size-cost alternative at the minifier level. |
||
|
|
8bf69a3076 |
release(crates): oxc v0.138.0 (#23934)
### 💥 BREAKING CHANGES - |
||
|
|
2ab679af2b |
chore(napi/parser): enable noImplicitAny (#23830)
follow on from my other changes to this code earlier today |
||
|
|
14509acf61 |
chore(napi/parser): run matches parseSync test on all bench files (#23823)
**Stack** - https://github.com/oxc-project/oxc/pull/23823 👈 this PR - https://github.com/oxc-project/oxc/pull/23822 |
||
|
|
90e902eea2 |
chore(napi/parser): re-enable antd.js test cases (#23822)
the timeout should be fixed by https://github.com/oxc-project/oxc/pull/23820 so we can now re-enable the test **Stack** - https://github.com/oxc-project/oxc/pull/23823 - https://github.com/oxc-project/oxc/pull/23822 👈 this PR |
||
|
|
4b121ab396 |
test(napi/parser): run async tests sequentially (#23820)
A little breakdown of what was going on: - the failing test case was testing that raw transfer vs non raw transfer was the same. This was parsing checker.ts (a 3.2mb file) - this test was running concurrently (via vitest's describe.concurrently) with a memory exhaustion test that was running parse with raw transfer 10,000x concurrently - as a result of these concurrent tests, it resulted in a large number of JS objects being created (and hence needing to be GC-ed) - since CI is not deterministic, it caused a flakiness roughly 2% of the time - this can clearly be seen from the attached flamegraph - the readFile call (reading checker.ts from the disk) was sometimes taking up to 3 seconds to read the file from the disk This seems to be fixed by no longer using describe.concurrent, as it reduces the amount of concurrent work and reduces the chance of the timeout. <img width="4096" height="1724" alt="image" src="https://github.com/user-attachments/assets/0fd5bc59-8d28-4453-adda-bf33834aafa8" /> |
||
|
|
c9517f75aa | refactor(napi/parser): add some missing TS type annotations (#23817) | ||
|
|
5201522945 |
refactor(allocator): Vec construction methods take &GetAllocator (#23755)
Part of #23043. `Vec::new_in`, `Vec::with_capacity_in`, `Vec::from_array_in` etc previously took an `&'a Allocator`. Instead make them take an `&A where A: GetAllocator<'a>`. This makes them more flexible - you can pass a reference to any type which implements `GetAllocator` e.g. `ParserImpl`, `TraverseCtx` etc. ```rust // Before (`ctx` here is `&mut TraverseCtx`) let vec = ArenaVec::new_in(ctx.ast.allocator); // After let vec = ArenaVec::new_in(ctx); ``` The main motivation is to make them workable replacements for what are currently methods on `AstBuilder`, but will be removed in the new `AstBuilder`: ```rust // Before (`ctx` here is `&mut TraverseCtx`) let vec = ctx.ast.vec(); // After let vec = ArenaVec::new_in(ctx); // Instead of let vec = ArenaVec::new_in(ctx.ast.allocator); ``` This is still longer code than the original, which is not ideal, but it's as short as can make them. The main downside of this change is that when calling these methods with an `&Allocator`, you have to double reference: ```rust let allocator: &'a Allocator = get_allocator_somehow(); // Passing `&&Allocator` let vec = ArenaVec::new_in(&allocator); ``` This has no perf impact - these methods are inlined, and compiler collapses the double-reference like it wasn't there, but it's just ugly. Unfortunately, there's no way to implement `GetAllocator` so it'll accept both `&Allocator` and `&mut TraverseCtx`, and the latter is the much more common use case. |
||
|
|
d1f18cda21 |
refactor(all): import arena Box and Vec as ArenaBox / ArenaVec (#23747)
Pure refactor. Use `ArenaBox` and `ArenaVec` everywhere for the arena-allocated types from `oxc_allocator`, instead of plain `Box` and `Vec`. This disambiguates when `Vec` is `oxc_allocator::Vec` and when it's `std::vec::Vec`, making code clearer to follow. Previously it was easy to confuse the two, and such confusion led to UB in `Traverse` (fixed in #23745). Ditto other arena types - `ArenaHashMap`, `ArenaHashSet`, `ArenaStringBuilder`. The only exceptions are: 1. Inside `oxc_allocator` crate itself. 2. AST type definitions. 3. Generated code (migrated separately in #23749). |
||
|
|
8c6481bbf9 |
refactor(allocator): export ArenaBox and ArenaVec aliases (#23746)
Pure refactor.
It's a common pattern in repo to import `Vec` and `Box` etc from `oxc_allocator` and alias them to `ArenaBox` / `ArenaVec`.
```rust
use oxc_allocator::{Box as ArenaBox, Vec as ArenaVec};
```
Make this pattern less verbose by re-exporting `Box` and `Vec` as these aliases from `oxc_allocator`.
Ditto other arena types: `ArenaHashMap`, `ArenaHashSet`, `ArenaStringBuilder`.
Use those aliases in all other crates to shorten code.
```rust
use oxc_allocator::{ArenaBox, ArenaVec};
```
|
||
|
|
3cdd18f557 |
chore(deps): update npm packages (#23690)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [@codspeed/vitest-plugin](https://codspeed.io) ([source](https://redirect.github.com/CodSpeedHQ/codspeed-node)) | [`5.5.0` → `5.6.0`](https://renovatebot.com/diffs/npm/@codspeed%2fvitest-plugin/5.5.0/5.6.0) |  |  |  |  | | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`8.61.0` → `8.61.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.61.0/8.61.1) |  |  |  |  | | [@typescript-eslint/scope-manager](https://typescript-eslint.io/packages/scope-manager) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/scope-manager)) | [`8.61.0` → `8.61.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fscope-manager/8.61.0/8.61.1) |  |  |  |  | | [@typescript-eslint/visitor-keys](https://typescript-eslint.io) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/visitor-keys)) | [`8.61.0` → `8.61.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fvisitor-keys/8.61.0/8.61.1) |  |  |  |  | | [@vitest/browser](https://vitest.dev/guide/browser/) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser)) | [`4.1.8` → `4.1.9`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/4.1.8/4.1.9) |  |  |  |  | | [@vitest/browser-playwright](https://vitest.dev/config/browser/playwright) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright)) | [`4.1.8` → `4.1.9`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser-playwright/4.1.8/4.1.9) |  |  |  |  | | [eslint](https://eslint.org) ([source](https://redirect.github.com/eslint/eslint)) | [`10.4.1` → `10.5.0`](https://renovatebot.com/diffs/npm/eslint/10.4.1/10.5.0) |  |  |  |  | | [playwright](https://playwright.dev) ([source](https://redirect.github.com/microsoft/playwright)) | [`1.60.0` → `1.61.0`](https://renovatebot.com/diffs/npm/playwright/1.60.0/1.61.0) |  |  |  |  | | [serialize-javascript](https://redirect.github.com/yahoo/serialize-javascript) | [`7.0.5` → `7.0.6`](https://renovatebot.com/diffs/npm/serialize-javascript/7.0.5/7.0.6) |  |  |  |  | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`4.1.8` → `4.1.9`](https://renovatebot.com/diffs/npm/vitest/4.1.8/4.1.9) |  |  |  |  | --- ### Release Notes <details> <summary>CodSpeedHQ/codspeed-node (@​codspeed/vitest-plugin)</summary> ### [`v5.6.0`](https://redirect.github.com/CodSpeedHQ/codspeed-node/releases/tag/v5.6.0) [Compare Source](https://redirect.github.com/CodSpeedHQ/codspeed-node/compare/v5.5.0...v5.6.0) #### What's Changed - feat: add MacOS support by [@​not-matthias](https://redirect.github.com/not-matthias) in [#​81](https://redirect.github.com/CodSpeedHQ/codspeed-node/pull/81) **Full Changelog**: <https://github.com/CodSpeedHQ/codspeed-node/compare/v5.5.0...v5.6.0> </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v8.61.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8611-2026-06-15) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.61.0...v8.61.1) This was a version bump only for parser to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.61.1) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/scope-manager)</summary> ### [`v8.61.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/scope-manager/CHANGELOG.md#8611-2026-06-15) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.61.0...v8.61.1) This was a version bump only for scope-manager to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.61.1) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/visitor-keys)</summary> ### [`v8.61.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/visitor-keys/CHANGELOG.md#8611-2026-06-15) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.61.0...v8.61.1) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.61.1) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>vitest-dev/vitest (@​vitest/browser)</summary> ### [`v4.1.9`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v4.1.9) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.8...v4.1.9) ##### 🐞 Bug Fixes - Fix `importOriginal` with optimizer and query import \[backport to v4] - by **Hiroshi Ogawa**, **David Harris**, **Codex**and **Vladimir** in [#​10546](https://redirect.github.com/vitest-dev/vitest/issues/10546) [<samp>(a5180)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a5180190c) - **browser**: - Wait for orchestrator readiness before resolving browser sessions \[backport to v4] - by **Vladimir** and **Séamus O'Connor** in [#​10555](https://redirect.github.com/vitest-dev/vitest/issues/10555) [<samp>(7fb29)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7fb29651a) - Wait for iframe tester readiness before preparing \[backport to v4] - by **Vladimir** and **Séamus O'Connor** in [#​10497](https://redirect.github.com/vitest-dev/vitest/issues/10497) and [#​10556](https://redirect.github.com/vitest-dev/vitest/issues/10556) [<samp>(fbc62)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fbc626c40) - **mocker**: - Hoist vi.mock() for vite-plus/test imports \[backport to v4] - by **Hiroshi Ogawa**, **LongYinan**, **Claude Opus 4.8** and **Vladimir** in [#​10548](https://redirect.github.com/vitest-dev/vitest/issues/10548) [<samp>(2c955)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2c9559c02) - **pool**: - Prevent test run hang on worker crash \[backport to v4] - by **Ari Perkkiö** and **Jattioui Ismail** in [#​10543](https://redirect.github.com/vitest-dev/vitest/issues/10543) and [#​10564](https://redirect.github.com/vitest-dev/vitest/issues/10564) [<samp>(934b0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/934b0f587) ##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.8...v4.1.9) </details> <details> <summary>eslint/eslint (eslint)</summary> ### [`v10.5.0`](https://redirect.github.com/eslint/eslint/releases/tag/v10.5.0) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v10.4.1...v10.5.0) #### Features - [`5ca8c52`](https://redirect.github.com/eslint/eslint/commit/5ca8c5278edea1fd84d3ba83d8ea3f52fb3831ad) feat: correct stack tracking in max-nested-callbacks ([#​20973](https://redirect.github.com/eslint/eslint/issues/20973)) (Pixel998) - [`b565783`](https://redirect.github.com/eslint/eslint/commit/b5657837604fa5e8cf1278074782025cadd34b6c) feat: report no-with violations at the with keyword ([#​20971](https://redirect.github.com/eslint/eslint/issues/20971)) (Pixel998) - [`2ce032f`](https://redirect.github.com/eslint/eslint/commit/2ce032fbc72a1a80c024c084a4f382fb6dece684) feat: report max-lines-per-function violations at function head ([#​20966](https://redirect.github.com/eslint/eslint/issues/20966)) (Pixel998) - [`732cb3e`](https://redirect.github.com/eslint/eslint/commit/732cb3e09d5b8b809b5f461d118a5d9fdcd6427f) feat: report max-nested-callbacks violations at function head ([#​20967](https://redirect.github.com/eslint/eslint/issues/20967)) (Pixel998) - [`f9c138a`](https://redirect.github.com/eslint/eslint/commit/f9c138a0ba7d8e37aed39aef4a3ff1cae8c669f7) feat: report max-depth violations on keywords ([#​20943](https://redirect.github.com/eslint/eslint/issues/20943)) (Pixel998) - [`bdb496c`](https://redirect.github.com/eslint/eslint/commit/bdb496cc0d54b6d0a023aef9abd5f040ccff2101) feat: correct max-depth handling for else-if chains ([#​20944](https://redirect.github.com/eslint/eslint/issues/20944)) (Pixel998) - [`c296873`](https://redirect.github.com/eslint/eslint/commit/c29687354a7f96093f57f7d73eecb866ad5e2953) feat: update error loc in `max-statements` to function header ([#​20907](https://redirect.github.com/eslint/eslint/issues/20907)) (Taejin Kim) #### Documentation - [`8ae1b5b`](https://redirect.github.com/eslint/eslint/commit/8ae1b5b856dc031cd6c701d89a4df7da4772cd56) docs: Update README (GitHub Actions Bot) - [`ca7eb90`](https://redirect.github.com/eslint/eslint/commit/ca7eb90127dcad917188bb1342623f02a272e781) docs: update Node.js prerequisites to include ICU support ([#​20962](https://redirect.github.com/eslint/eslint/issues/20962)) (Francesco Trotta) - [`f99b47a`](https://redirect.github.com/eslint/eslint/commit/f99b47a6799be25321552402a49303bb06a43fe4) docs: Update README (GitHub Actions Bot) - [`acf03d4`](https://redirect.github.com/eslint/eslint/commit/acf03d4eed31d259c7dc62af5b9640629784f7cc) docs: clarify precedence of parserOptions over languageOptions ([#​20926](https://redirect.github.com/eslint/eslint/issues/20926)) (sethamus) #### Chores - [`b18bf58`](https://redirect.github.com/eslint/eslint/commit/b18bf58c5ac748415ffffdff2d96980fbd6a57e8) chore: update ecosystem plugins ([#​20959](https://redirect.github.com/eslint/eslint/issues/20959)) (ESLint Bot) - [`c2d1444`](https://redirect.github.com/eslint/eslint/commit/c2d1444df77cb42e5a0b89ab70496879d180a54d) refactor: replace areAllSegmentsUnreachable with !isAnySegmentReachable ([#​20951](https://redirect.github.com/eslint/eslint/issues/20951)) (Taejin Kim) - [`243b8c5`](https://redirect.github.com/eslint/eslint/commit/243b8c56014bbbe63771185b0731d8dd4d1316e9) chore: enhance config-rule to support oneOf, anyOf, and nested schemas ([#​20788](https://redirect.github.com/eslint/eslint/issues/20788)) (kuldeep kumar) - [`217b2a9`](https://redirect.github.com/eslint/eslint/commit/217b2a91f46137c5ffd693965e71306c4c15ea6b) test: add unit tests for ParserService ([#​20949](https://redirect.github.com/eslint/eslint/issues/20949)) (Taejin Kim) - [`72003e7`](https://redirect.github.com/eslint/eslint/commit/72003e781d76bd4ee0d98a6601730d0b829070f9) test: add location information to error messages in `max-statements` ([#​20945](https://redirect.github.com/eslint/eslint/issues/20945)) (lumir) - [`7797c26`](https://redirect.github.com/eslint/eslint/commit/7797c266977b0bc4971aa79721813d480de72cd1) refactor: deduplicate isAnySegmentReachable across rules ([#​20890](https://redirect.github.com/eslint/eslint/issues/20890)) (Taejin Kim) - [`67c46fa`](https://redirect.github.com/eslint/eslint/commit/67c46fa6e4f34e88cc6bc82f8a0dcc917c65d257) chore: update ecosystem plugins ([#​20938](https://redirect.github.com/eslint/eslint/issues/20938)) (ESLint Bot) - [`95d8c7a`](https://redirect.github.com/eslint/eslint/commit/95d8c7a99f991abd8ab618d0ee2cbd4f58effc29) chore: update dependency [@​eslint/json](https://redirect.github.com/eslint/json) to v2 ([#​20934](https://redirect.github.com/eslint/eslint/issues/20934)) (renovate\[bot]) - [`cf9e496`](https://redirect.github.com/eslint/eslint/commit/cf9e496205142cd4971b9f98aed85866d1010b9c) chore: update [@​arethetypeswrong/cli](https://redirect.github.com/arethetypeswrong/cli) to 0.18.3 ([#​20933](https://redirect.github.com/eslint/eslint/issues/20933)) (Pixel998) - [`fb6d396`](https://redirect.github.com/eslint/eslint/commit/fb6d3960cacc51fc12383fa5ded2382adbf90c1c) test: run type tests with TypeScript 7 ([#​20868](https://redirect.github.com/eslint/eslint/issues/20868)) (sethamus) </details> <details> <summary>microsoft/playwright (playwright)</summary> ### [`v1.61.0`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.61.0) [Compare Source](https://redirect.github.com/microsoft/playwright/compare/v1.60.0...v1.61.0) ##### 🔑 WebAuthn passkeys New [Credentials](https://playwright.dev/docs/api/class-credentials) virtual authenticator, available via [browserContext.credentials](https://playwright.dev/docs/api/class-browsercontext#browser-context-credentials), lets tests register passkeys and answer `navigator.credentials.create()` / `navigator.credentials.get()` ceremonies in the page — no real hardware key required, works in all browsers: ```js const context = await browser.newContext(); // Seed a passkey your backend provisioned for a test user. await context.credentials.create('example.com', { id: credentialId, userHandle, privateKey, publicKey, }); await context.credentials.install(); const page = await context.newPage(); await page.goto('https://example.com/login'); // The page's navigator.credentials.get() is answered with the seeded passkey. ``` You can also let the app register a passkey once in a setup test, read it back with [credentials.get()](https://playwright.dev/docs/api/class-credentials#credentials-get), and seed it into later tests — see [Credentials](https://playwright.dev/docs/api/class-credentials) for details. ##### 🗃️ Web Storage New [WebStorage](https://playwright.dev/docs/api/class-webstorage) API, available via [page.localStorage](https://playwright.dev/docs/api/class-page#page-local-storage) and [page.sessionStorage](https://playwright.dev/docs/api/class-page#page-session-storage), reads and writes the page's storage for the current origin: ```js await page.localStorage.setItem('token', 'abc'); const token = await page.localStorage.getItem('token'); const items = await page.sessionStorage.items(); ``` ##### New APIs ##### Network - [apiResponse.securityDetails()](https://playwright.dev/docs/api/class-apiresponse#api-response-security-details) and [apiResponse.serverAddr()](https://playwright.dev/docs/api/class-apiresponse#api-response-server-addr) mirror the browser-side [response.securityDetails()](https://playwright.dev/docs/api/class-response#response-security-details) and [response.serverAddr()](https://playwright.dev/docs/api/class-response#response-server-addr). ##### Browser and Screencast - New option `artifactsDir` in [browserType.connectOverCDP()](https://playwright.dev/docs/api/class-browsertype#browser-type-connect-over-cdp) controls where artifacts such as traces and downloads are stored when attached to an existing browser. - New option `cursor` in [screencast.showActions()](https://playwright.dev/docs/api/class-screencast#screencast-show-actions) controls the cursor decoration rendered for pointer actions. - The `onFrame` callback in [screencast.start()](https://playwright.dev/docs/api/class-screencast#screencast-start) now receives a `timestamp` of when the frame was presented by the browser. ##### Test runner - The [testOptions.video](https://playwright.dev/docs/api/class-testoptions#test-options-video) option now supports the same set of modes as `trace`: new `'on-all-retries'`, `'retain-on-first-failure'` and `'retain-on-failure-and-retries'` values. See the [video modes table](https://playwright.dev/docs/test-use-options#video-modes) for which runs are recorded and kept in each mode. - Supported `expect.soft.poll(...)`. - New [fullConfig.argv](https://playwright.dev/docs/api/class-fullconfig#full-config-argv) — a snapshot of `process.argv` from the runner process, handy for reading custom arguments passed after the `--` separator. - New [fullConfig.failOnFlakyTests](https://playwright.dev/docs/api/class-fullconfig#full-config-fail-on-flaky-tests) mirrors the config option, so reporters can explain why a flaky run failed. - [testInfo.errors](https://playwright.dev/docs/api/class-testinfo#test-info-errors) now lists each sub-error of an `AggregateError` as a separate entry. - New `-G` command line shorthand for `--grep-invert`. ##### 🛠️ Other improvements - Playwright now supports Ubuntu 26.04. - HAR and trace recordings now include WebSocket requests. ##### Browser Versions - Chromium 149.0.7827.55 - Mozilla Firefox 151.0 - WebKit 26.5 This version was also tested against the following stable channels: - Google Chrome 149 - Microsoft Edge 149 </details> <details> <summary>yahoo/serialize-javascript (serialize-javascript)</summary> ### [`v7.0.6`](https://redirect.github.com/yahoo/serialize-javascript/releases/tag/v7.0.6) [Compare Source](https://redirect.github.com/yahoo/serialize-javascript/compare/v7.0.5...v7.0.6) ##### What's Changed - build(deps-dev): bump lodash from 4.17.23 to 4.18.1 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​215](https://redirect.github.com/yahoo/serialize-javascript/pull/215) - fix: reject spoofed URL objects with non-string toString() result by [@​redonkulus](https://redirect.github.com/redonkulus) in [#​217](https://redirect.github.com/yahoo/serialize-javascript/pull/217) - release: v7.0.6 by [@​okuryu](https://redirect.github.com/okuryu) in [#​221](https://redirect.github.com/yahoo/serialize-javascript/pull/221) **Full Changelog**: <https://github.com/yahoo/serialize-javascript/compare/v7.0.5...v7.0.6> </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - "before 10am on monday" - 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://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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cameron Clark <cameron.clark@hey.com> |
||
|
|
6d56d57535 |
release(crates): oxc v0.137.0 (#23591)
### 💥 BREAKING CHANGES - |
||
|
|
28d36c69c1 |
refactor(napi/transform)!: remove the React Compiler option (#23590)
## Summary Removes React Compiler from the `oxc-transform` napi binding entirely. It was previously exposed as a `reactCompiler` transform option (added in #22942, shipped in 0.135.0 / 0.136.0). **Why not feature-gate it instead?** Gating React Compiler in the binding can't produce a consistent `index.d.ts`: - Keep the option types unconditionally → the published `.d.ts` advertises a `reactCompiler` option that a default (feature-off) build silently ignores. - Gate the type surface too → CI's `build-test` (which would enable the feature) regenerates a `.d.ts` that no longer matches the checked-in lean one, breaking `git diff --exit-code`. Removing it from the binding sidesteps both. React Compiler stays available to the Rust `oxc_transformer` crate behind its own `react_compiler` feature — only the napi binding loses it. ## Changes - Drop the `reactCompiler` option and the `ReactCompilerOptions` / `ReactCompilerGating` / `ReactCompilerDynamicGating` types. - Remove the `oxc_react_compiler` dependency and stop enabling `oxc`'s `react_compiler` feature. - Delete `src/react_compiler.rs` and `test/reactCompiler.test.ts`. - Regenerate `index.d.ts` (drops the three interfaces + the field; `index.js` is unchanged — they were type-only). ## Breaking change `oxc-transform` no longer accepts the `reactCompiler` option. It shipped in 0.135.0 and 0.136.0. ## Verification - `cargo check` + `cargo clippy --all-targets`: clean. - `cargo shear`: no issues; `Cargo.lock` drops only the `oxc_transform_napi → oxc_react_compiler` edge. - No remaining `reactCompiler` / `ReactCompilerOptions` references anywhere else in the repo. - `pnpm build-test` + `pnpm test`: 53/53 pass (the React Compiler test is removed). 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
7a76cd3dc3 |
feat(estree)!: make whether to include TS fields a runtime option (#23574)
Previously, whether to serialize AST to ESTree JSON with/without TS fields was a compile-time option - via 2 different configs `CompactTSSerializer` and `CompactJSSerializer` (and their pretty-printing and with-fixes counterparts). Turn this into a runtime option instead - This make serialization a little slower (more branches in either mode, and dead code in JS-only mode) but reduces the size of `oxc-parser` binary as only one `ESTreeSerializer` is generated, instead of 2 (JS-only, and with-TS). |
||
|
|
53509a85df |
feat(minifier): treeshake pure typed arrays and Set/Map array literals (#23469)
## Summary Mark side-effect-free `new` constructions pure so they are dropped when unused (and annotated for downstream tree-shaking): - **TypedArrays** with a non-negative numeric-literal length (`new Int8Array(8)`, `new Uint8Array(1024)`). The buffer allocation runs no user code; a valid length is pure and a too-large length only throws a maximum-length `RangeError`, which the minifier is allowed to drop (see `docs/ASSUMPTIONS.md`). `new Int8Array(-1)` (negative-length `RangeError`), `new Int8Array(0n)` (BigInt `TypeError`), object, and non-literal arguments are kept. - **`new Set([...])` / `new Map([[..], ..])`** with array-literal arguments; element side effects are preserved when the construction is dropped. `WeakSet`/`WeakMap` are excluded (their keys must be objects, so `new WeakSet([1])` throws), and `Map` entries must be array literals (`new Map([1])` throws). This matches esbuild's per-constructor handling — the only other minifier that keeps every throwing form; Rollup, Terser (`unsafe`), and SWC drop some of these incorrectly. Cross-verified against the ES spec, esbuild, Terser, Rollup, and SWC. Minified-size impact: react.development.js −0.04 kB; size-neutral elsewhere (real code uses dynamic buffer lengths, not numeric literals). |
||
|
|
ae02b4e7a0 |
fix(ci/parser): use minimal for vitest reporter (#23457)
The large output from the dot reporter (caused by `RUN_LAZY_TESTS`, `RUN_RAW_TESTS`, `RUN_RAW_RANGE_TESTS` and `RUN_RAW_TOKENS_TESTS`) sometimes causes CI to fail. This PR switches to the [`minimal` reporter ](https://vitest.dev/guide/reporters.html#minimal-reporter) which should only log on failed test cases. |
||
|
|
827248a7fb |
release(crates): oxc v0.136.0 (#23443)
### 💥 BREAKING CHANGES - |
||
|
|
7a24911846 |
perf(codegen)!: borrow sourcemaps from codegen (#23422)
Summary: - Upgrade oxc_sourcemap to 8.0.1. - Return borrowed SourceMap from CodegenReturn. - Support no-sourcemap feature builds used by benchmarks. AI-assisted: yes |
||
|
|
e745892d4c |
chore(deps): update napi (#23394)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | Type | Update | |---|---|---|---|---|---|---|---| | [@napi-rs/cli](https://napi.rs/) ([source](https://redirect.github.com/napi-rs/napi-rs)) | [`3.7.1` → `3.7.2`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.7.1/3.7.2) |  |  |  |  | pnpm.catalog.default | patch | | [napi](https://crates.io/crates/napi) | `3.9.1` → `3.9.2` |  |  |  |  | workspace.dependencies | patch | --- ### Release Notes <details> <summary>napi-rs/napi-rs (@​napi-rs/cli)</summary> ### [`v3.7.2`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.7.1...@napi-rs/cli@3.7.2) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.7.1...@napi-rs/cli@3.7.2) </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - At any time (no schedule defined) - 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMTkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIxOS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cameron Clark <cameron.clark@hey.com> |
||
|
|
c782419c3e |
refactor(transformer): order transform options by evaluation order (#23241)
Reorders the option struct fields in `oxc_transformer` and the napi transform binding to match the order their transforms are evaluated, and documents that order on each struct. Behavior-neutral; the only externally visible change is field order and docs in the generated `index.d.ts`. - **`TransformOptions`** (`oxc_transformer`): `react_compiler` (separate pass before the traversal) → `typescript` → `decorator` → `plugins` → `jsx` → `env`, with `helper_loader` last (not a transform). Previously `plugins` sat after `env` and `react_compiler` was last despite running first. - **`EnvOptions`**: was ascending `es2015`→`es2026`; now `module` (consumed by the TypeScript transform), then `es2026` down to `es2015`, then `regexp` last. - **`ES2020Options`**: `optional_chaining` moved next to `nullish_coalescing_operator`, matching their `enter_expression` order. - **napi `TransformOptions`**: follows the full compiler pipeline — `lang`/`sourceType` (parse) → `assumptions` → `reactCompiler` → `typescript` → `decorator` → `plugins` → `jsx` → `target` → `helpers` → `inject` → `define` → `sourcemap` (codegen). Two things this surfaced: `inject` runs **before** `define` (the struct listed them reversed), and `sourcemap` is a codegen option so it belongs at the end. `index.d.ts` regenerated. The canonical order is `TransformerImpl`'s field order in `lib.rs` (and `CompilerInterface::compile` for the napi pipeline stages); a note on `TransformerImpl` now reminds maintainers to keep `TransformOptions` in sync. Verified: `cargo check`/`clippy --all-features --all-targets` (CI profile), `cargo test -p oxc_transformer`, napi vitest 62/62, transform conformance with zero snapshot diffs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
777f02ae10 |
refactor(diagnostics)!: return a Diagnostics type instead of Vec<OxcDiagnostic> (#23217)
## Summary Introduces `oxc_diagnostics::Diagnostics` — a `Vec<OxcDiagnostic>` newtype that knows the difference between errors and warnings — and makes it the standard diagnostics return value across oxc. - **New type**: `Diagnostics` with `has_errors()`, `has_warnings()`, `errors()`, `warnings()`, plus `Vec`-like ergonomics (Deref, `IntoIterator`, `Extend`, `From`/`Into<Vec>`) so most call sites are unchanged. - **Return types**: `ParserReturn`, `SemanticBuilderReturn`, `IsolatedDeclarationsReturn`, the React Compiler `TransformResult`/`LintResult`, and `TransformerReturn` now expose `diagnostics: Diagnostics` instead of `errors: Vec<OxcDiagnostic>` (the React Compiler's separate `errors`/`warnings` are merged into one severity-tagged list). - **Behaviour**: a React Compiler **error** now stops the transform (no output), while **warnings** flow through and the transform continues. `compile()` aborts codegen only when `diagnostics.has_errors()` — warnings alone no longer abort (previously any diagnostic did). ## Breaking change Consumers reading `*.errors` on these return values must read `*.diagnostics`. React Compiler consumers that read `.errors`/`.warnings` separately should use `diagnostics.has_errors()` / `diagnostics.errors()` / `diagnostics.warnings()`. Parser/semantic/isolated-declarations fatality is otherwise unchanged. Builds on the React Compiler transform feature (#23201). 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
ec266bb733 |
feat(transformer): run React Compiler as a feature-gated transform pass (#23201)
## Summary Exposes the React Compiler from `oxc_transformer` behind a Cargo feature so callers no longer need a separate `oxc_react_compiler::transform` + scoping-rebuild step before transforming. - **`oxc_transformer`**: new `react_compiler` Cargo feature (off by default) + `TransformOptions::react_compiler` field. When set, `Transformer::build_with_scoping` runs the React Compiler first (via a private `run_react_compiler` method), replacing the program and rebuilding scoping for the downstream transforms. - **Opt-in**: the feature is **not** enabled by `oxc_transformer`'s defaults, nor by `oxc`'s `transformer`/`full` features — enabling the transformer does not pull the heavy `oxc_react_compiler` dependency. It is a separate `react_compiler` feature on `oxc` (which implies `transformer`); the napi transform binding opts in explicitly. - **Dedupe**: removes the inline React-Compiler orchestration (and the `react_compiler_options()` hook) from `oxc`'s `CompilerInterface` and the napi transform binding; both now drive it through `TransformOptions::react_compiler`. - **Diagnostics**: the compiler's errors and warnings are merged into `TransformerReturn::errors` (each keeps its severity; downstream filters). `compile()` reports them but no longer aborts codegen — the transformer always leaves a valid program, matching the documented "code may still be available even if there are errors" behaviour. - **Links**: updates the React Compiler references to the merged upstream location (`react/react/tree/main/compiler`). ## Notes Transform/codegen output is unchanged when the feature is off (the field defaults to `None` everywhere). The diagnostics behaviour change (no codegen abort) is conformance-safe — the transform-conformance harness keys off reported diagnostics, not printed output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
bb0ed44541 |
feat(transformer)!: disable styled-components transpileTemplateLiterals by default (#23171)
## Summary Closes #13398. The styled-components transform's `transpileTemplateLiterals` option rewrites tagged template literals into the array-call form: ```js // in styled.div`width: 100%;` // out — transpileTemplateLiterals: true styled.div(["width: 100%;"]) ``` This form is only more compact when template literals are *also* down-levelled to ES5 — which is why `babel-plugin-styled-components` enables it by default, to pre-empt Babel's verbose `_taggedTemplateLiteral` output. Oxc does not down-level template literals below ES6, so the array-call form is strictly *larger* than leaving the tagged template untouched. This PR flips the default to `false`, as agreed with @Dunqing in #13398. ## Changes - `StyledComponentsOptions::transpile_template_literals` now defaults to `false` (both the `serde` field default and the `Default` impl), with docs explaining why. - napi: `transpileTemplateLiterals` is documented `@default false` (`transformer.rs` + `index.d.ts`), and the styled-components napi test snapshot now reflects the non-transpiled default output. - Conformance fixtures that relied on the old default and whose reference output is transpiled now pin `transpileTemplateLiterals: true`, so they keep matching `babel-plugin-styled-components`' reference output. The conformance snapshot is unchanged — `plugin-styled-components` stays at 25/40. ## Breaking change `transpileTemplateLiterals` now defaults to `false`. Pass `transpileTemplateLiterals: true` to restore the previous behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
1260f03b4f |
refactor(semantic): don't build the AstNodes store by default (#23005)
## What Make the full `AstNodes` store **opt-in**, so the compiler pipeline (transformer / codegen / minifier) can run semantic analysis without building it at all. Previously every `SemanticBuilder` run allocated and populated the full `AstNodes` store, even for consumers that only need scoping + the syntax checker. This separates the node-related builder state into three independent pieces: - a standalone `NodeId` counter — the source of truth for node ids, valid in either mode; - an **ancestry stack** — an upward-walk-only stack of the current node's ancestors, the only ancestry the syntax checker and binder actually read; - the full **`AstNodes`** store — random access to every node, needed by the linter and mangler. ## How - A new `AstNodeStore` (in `crates/oxc_semantic/src/node/store.rs`) bundles the node-id counter, the current-node cursor/flags, and the storage. The storage is an enum (`AstNodeStoreKind`) with two variants — `Full(AstNodes)` and `Ancestry(AncestryStack)` — so the full store and the ancestry stack are **mutually exclusive by construction**; they can never both be maintained at once. - The checker and binder read ancestry through an `Ancestry` view (`node/ancestry.rs`) that dispatches between the full store (linter / mangler) and the stack (compiler pipeline). They no longer do random `NodeId` access into the store — all ancestry access is upward-walk-only. - `SemanticBuilder` gains `with_build_nodes(bool)`. The default is **off** (ancestry stack only). `new_linter()` turns it on (the linter needs the full store); `new_compiler()` leaves it off. - `CompilerInterface::build_semantic_nodes()` lets `oxc::Compiler` consumers opt back in if their `after_semantic` hook reads `Semantic::nodes`. ## Notes - Behaviour-neutral: semantic conformance snapshots are unchanged. - Allocation snapshots updated — the default (ancestry) path allocates slightly less (the growing `Stack` trades a couple of fixed allocations for a few reallocs). - Builds on the already-merged `SymbolFlags`-based redeclaration checks (#23060) and the `new_linter`/`new_compiler` preset adoption (#23057), which removed the last random node reads from the redeclaration path so the checker works without the store. |
||
|
|
da1a6c6e2a |
perf(diagnostics): migrate to allocation-optimized oxc-miette (#23094)
## Summary Adopts the allocation-optimized oxc-miette diagnostic APIs (oxc-miette v3): - `OxcDiagnostic` stores labels in `miette::Labels` (1–2 inline, no `Vec`); **drops the `smallvec` dependency**. - `Diagnostic::labels`/`related` return owned inline containers; `code`/`help`/`note`/`url` return `Cow<str>`; `SourceCode::read_span` returns the concrete `MietteSpanContents` — all consumer call sites updated (linter `fixer`/`lib`/`runtime`/`tsgolint`, `oxc_napi`, napi/parser, oxlint LSP, coverage). - `usize → u32` span conversions for the u32 `SourceSpan`. ## Allocation impact (parser benchmark) `just allocs` — **~33% fewer sys allocations, no change in reallocations**: | File | Sys allocs (before → after) | Sys reallocs | |------|---|---| | checker.ts | 5303 → 3543 | 10 (unchanged) | | antd.js | 5392 → 3720 | 221 (unchanged) | | App.tsx | 632 → 444 | 13 (unchanged) | | pdf.mjs | 518 → 356 | 67 (unchanged) | | binder.ts | 281 → 169 | 0 (unchanged) | (The inline `Labels` removes the per-diagnostic `Vec`; an earlier `Box<str>` realloc regression was fixed in oxc-miette before this snapshot was taken.) |
||
|
|
e9b8fd595c |
release(crates): oxc v0.135.0 (#23117)
### 💥 BREAKING CHANGES - |
||
|
|
b846ab2d9a |
feat(react_compiler): integrate the Rust port of the React Compiler (#22942)
Closes https://github.com/oxc-project/oxc/issues/10048 Integrates the Rust port of the React Compiler ([facebook/react#36173](https://github.com/facebook/react/pull/36173)) into oxc. ## Notes (resolved) - Published crates can't reference Git URLs, so using this from Rolldown needs the React Compiler crates on crates.io. ✅ Published as a fork at https://crates.io/crates/forked_react_compiler; this PR depends on those `forked_react_compiler*` crates so people can get earlier access. - The React Compiler crates had no license field. ✅ The published fork carries `license = "MIT"` (per the React repo's MIT license), so Cargo Deny and Security Analysis pass. ## Benchmark **Wall-clock overhead vs plain transform** (release `transformSync`, same `jsx: automatic`, toggling only `reactCompiler`): | fixture | without | with | overhead | | --- | --- | --- | --- | | RadixUIAdoptionSection.jsx (2.5 KiB) | 0.03 ms | 1.81 ms | +1.8 ms | | excalidraw `App.tsx` (406 KiB) | 4.09 ms | 14.49 ms | +10.4 ms (3.5×) | So roughly a fixed ~1.8 ms floor per file plus a per-size cost — about **3.5× the transform time** on a large real-world component. ## Binary size Linking the React Compiler pulls the whole compiler pipeline (HIR, lowering, inference, SSA, optimization, reactive scopes, validation) plus the oxc⇄Babel AST conversion into the binding. Release build of the napi transform addon (`transform.darwin-arm64.node`, `--release`, stripped), darwin-arm64: | build | size | | --- | --- | | baseline (`main`) | 3.51 MiB | | with React Compiler | 8.66 MiB | | **delta** | **+5.14 MiB (+146%, 2.46×)** | |
||
|
|
275d318e5d |
docs(napi/minifier): point target to oxc docs (#23102)
|
||
|
|
cdc0ac4aef |
chore(deps): update npm packages (#23087)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [@arethetypeswrong/core](https://redirect.github.com/arethetypeswrong/arethetypeswrong.github.io) ([source](https://redirect.github.com/arethetypeswrong/arethetypeswrong.github.io/tree/HEAD/packages/core)) | [`0.18.2` → `0.18.3`](https://renovatebot.com/diffs/npm/@arethetypeswrong%2fcore/0.18.2/0.18.3) |  |  |  |  | | [@codspeed/vitest-plugin](https://codspeed.io) ([source](https://redirect.github.com/CodSpeedHQ/codspeed-node)) | [`5.4.0` → `5.5.0`](https://renovatebot.com/diffs/npm/@codspeed%2fvitest-plugin/5.4.0/5.5.0) |  |  |  |  | | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`8.60.0` → `8.60.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.60.0/8.60.1) |  |  |  |  | | [@typescript-eslint/scope-manager](https://typescript-eslint.io/packages/scope-manager) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/scope-manager)) | [`8.60.0` → `8.60.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fscope-manager/8.60.0/8.60.1) |  |  |  |  | | [@typescript-eslint/visitor-keys](https://typescript-eslint.io) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/visitor-keys)) | [`8.60.0` → `8.60.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fvisitor-keys/8.60.0/8.60.1) |  |  |  |  | | [@vitest/browser](https://vitest.dev/guide/browser/) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser)) | [`4.1.7` → `4.1.8`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/4.1.7/4.1.8) |  |  |  |  | | [@vitest/browser-playwright](https://vitest.dev/config/browser/playwright) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright)) | [`4.1.7` → `4.1.8`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser-playwright/4.1.7/4.1.8) |  |  |  |  | | [degit](https://redirect.github.com/Rich-Harris/degit) | [`3.3.2` → `3.4.1`](https://renovatebot.com/diffs/npm/degit/3.3.2/3.4.1) |  |  |  |  | | [eslint](https://eslint.org) ([source](https://redirect.github.com/eslint/eslint)) | [`10.4.0` → `10.4.1`](https://renovatebot.com/diffs/npm/eslint/10.4.0/10.4.1) |  |  |  |  | | [prettier-plugin-svelte](https://redirect.github.com/sveltejs/prettier-plugin-svelte) | [`4.0.1` → `4.1.0`](https://renovatebot.com/diffs/npm/prettier-plugin-svelte/4.0.1/4.1.0) |  |  |  |  | | [svelte](https://svelte.dev) ([source](https://redirect.github.com/sveltejs/svelte/tree/HEAD/packages/svelte)) | [`5.55.10` → `5.56.1`](https://renovatebot.com/diffs/npm/svelte/5.55.10/5.56.1) |  |  |  |  | | [tsx](https://tsx.hirok.io) ([source](https://redirect.github.com/privatenumber/tsx)) | [`4.22.3` → `4.22.4`](https://renovatebot.com/diffs/npm/tsx/4.22.3/4.22.4) |  |  |  |  | | [type-fest](https://redirect.github.com/sindresorhus/type-fest) | [`5.6.0` → `5.7.0`](https://renovatebot.com/diffs/npm/type-fest/5.6.0/5.7.0) |  |  |  |  | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`4.1.7` → `4.1.8`](https://renovatebot.com/diffs/npm/vitest/4.1.7/4.1.8) |  |  |  |  | | [vscode-languageserver-protocol](https://redirect.github.com/Microsoft/vscode-languageserver-node) ([source](https://redirect.github.com/Microsoft/vscode-languageserver-node/tree/HEAD/protocol)) | [`3.17.5` → `3.18.0`](https://renovatebot.com/diffs/npm/vscode-languageserver-protocol/3.17.5/3.18.0) |  |  |  |  | --- ### Release Notes <details> <summary>arethetypeswrong/arethetypeswrong.github.io (@​arethetypeswrong/core)</summary> ### [`v0.18.3`](https://redirect.github.com/arethetypeswrong/arethetypeswrong.github.io/blob/HEAD/packages/core/CHANGELOG.md#0183) ##### Patch Changes - [`14e61d5`](https://redirect.github.com/arethetypeswrong/arethetypeswrong.github.io/commit/14e61d5): Update [@​types/node](https://redirect.github.com/types/node), use [@​typescript/native-preview](https://redirect.github.com/typescript/native-preview) for local build/check - [`25031aa`](https://redirect.github.com/arethetypeswrong/arethetypeswrong.github.io/commit/25031aa): - Fix "Cannot read properties of undefined (reading 'filename')" caused by fflate 0.8.3 ([#​258](https://redirect.github.com/arethetypeswrong/arethetypeswrong.github.io/issues/258)) - Bump fflate to ^0.8.3 </details> <details> <summary>CodSpeedHQ/codspeed-node (@​codspeed/vitest-plugin)</summary> ### [`v5.5.0`](https://redirect.github.com/CodSpeedHQ/codspeed-node/releases/tag/v5.5.0) [Compare Source](https://redirect.github.com/CodSpeedHQ/codspeed-node/compare/v5.4.0...v5.5.0) ### Highlights We are introducing `@codspeed/playwright`, for walltime benchmarking and profiling of end to end browser applications through playwright. Here's an example usage, but head to the [docs](https://codspeed.io/docs/benchmarks/nodejs/playwright) for more information ```typescript import { bench, type Page } from "@​codspeed/playwright-plugin"; import electronExecutable from "electron"; import path from "node:path"; import { fileURLToPath } from "node:url"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const appRoot = path.resolve(__dirname, ".."); async function waitUntilSettled(page: Page): Promise<void> { await page.waitForFunction(() => { const main = document.getElementById("main"); return !!main && !main.classList.contains("loading"); }); } await bench( "inbox-search-archive-threads", async ({ page }) => { await page.fill("#search", "update"); await waitUntilSettled(page); await page.click("#select-visible-btn"); await page.click("#archive-btn"); await waitUntilSettled(page); await page.click('#sidebar nav button[data-view="threads"]'); await waitUntilSettled(page); }, { target: { kind: "electron", appPath: path.join(appRoot, "out/main/index.js"), cwd: appRoot, }, beforeRound: async ({ page }) => { page.setDefaultTimeout(180_000); await page.waitForSelector("#main"); await waitUntilSettled(page); }, }, ); ``` Note: this plugin is only compatible with the walltime instrument. #### What's Changed - Add playwright profiling package by [@​GuillaumeLagrange](https://redirect.github.com/GuillaumeLagrange) in [#​80](https://redirect.github.com/CodSpeedHQ/codspeed-node/pull/80) **Full Changelog**: <https://github.com/CodSpeedHQ/codspeed-node/compare/v5.4.0...v5.5.0> </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v8.60.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8601-2026-06-01) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.60.0...v8.60.1) This was a version bump only for parser to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.60.1) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/scope-manager)</summary> ### [`v8.60.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/scope-manager/CHANGELOG.md#8601-2026-06-01) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.60.0...v8.60.1) This was a version bump only for scope-manager to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.60.1) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/visitor-keys)</summary> ### [`v8.60.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/visitor-keys/CHANGELOG.md#8601-2026-06-01) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.60.0...v8.60.1) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.60.1) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>vitest-dev/vitest (@​vitest/browser)</summary> ### [`v4.1.8`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v4.1.8) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.7...v4.1.8) ##### 🐞 Bug Fixes - **browser**: - Disable client `cdp` API when `allowWrite/allowExec: false` \[backport to v4] - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) and **Codex** in [#​10450](https://redirect.github.com/vitest-dev/vitest/issues/10450) [<samp>(e4067)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e4067b3b1) - Remove orphaned Playwright route when same module is mocked via multiple ids \[backport to v4] - by [@​toxik](https://redirect.github.com/toxik) and [@​Zelys-DFKH](https://redirect.github.com/Zelys-DFKH) in [#​10474](https://redirect.github.com/vitest-dev/vitest/issues/10474) [<samp>(675b4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/675b4343f) ##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.7...v4.1.8) </details> <details> <summary>Rich-Harris/degit (degit)</summary> ### [`v3.4.1`](https://redirect.github.com/Rich-Harris/degit/compare/v3.4.0...v3.4.1) [Compare Source](https://redirect.github.com/Rich-Harris/degit/compare/v3.4.0...v3.4.1) ### [`v3.4.0`](https://redirect.github.com/Rich-Harris/degit/compare/v3.3.2...v3.4.0) [Compare Source](https://redirect.github.com/Rich-Harris/degit/compare/v3.3.2...v3.4.0) </details> <details> <summary>eslint/eslint (eslint)</summary> ### [`v10.4.1`](https://redirect.github.com/eslint/eslint/releases/tag/v10.4.1) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v10.4.0...v10.4.1) #### Bug Fixes - [`e557467`](https://redirect.github.com/eslint/eslint/commit/e557467db7496220eebcbe2ac5ea6d38c12bb1ec) fix: update `@eslint/plugin-kit` version to 0.7.2 ([#​20930](https://redirect.github.com/eslint/eslint/issues/20930)) (Francesco Trotta) - [`d4ce898`](https://redirect.github.com/eslint/eslint/commit/d4ce898796ca22c3b96aa70d3014cb85f4bac1cd) fix: propagate failures from delegated commands ([#​20917](https://redirect.github.com/eslint/eslint/issues/20917)) (Minh Vu) - [`f4f3507`](https://redirect.github.com/eslint/eslint/commit/f4f3507460bc016b5be979c05d2969793f570cbf) fix: prefer-arrow-callback invalid autofix with newline after `async` ([#​20916](https://redirect.github.com/eslint/eslint/issues/20916)) (kuldeep kumar) - [`c5bc78b`](https://redirect.github.com/eslint/eslint/commit/c5bc78b37e08b9054a11f0cc2d81808bb24acb85) fix: false positive for reference in `finally` block ([#​20655](https://redirect.github.com/eslint/eslint/issues/20655)) (Tanuj Kanti) - [`27538c0`](https://redirect.github.com/eslint/eslint/commit/27538c01f5df4e9306f6f4ba867b2dd6307fae59) fix: add missing CodePath and CodePathSegment types ([#​20853](https://redirect.github.com/eslint/eslint/issues/20853)) (Pixel998) #### Documentation - [`61b0add`](https://redirect.github.com/eslint/eslint/commit/61b0add61ffc52665562be7bb96f526690a78b30) docs: remove deprecated rule from related rules of `max-params` ([#​20921](https://redirect.github.com/eslint/eslint/issues/20921)) (Tanuj Kanti) - [`305d5b9`](https://redirect.github.com/eslint/eslint/commit/305d5b91aeac24d36fde42f75625a8f183d4ce43) docs: remove deprecated rules from related rules section ([#​20911](https://redirect.github.com/eslint/eslint/issues/20911)) (Tanuj Kanti) - [`49b0202`](https://redirect.github.com/eslint/eslint/commit/49b0202d01918b8061720d586dffd7c68047090c) docs: fix `display: none` of ad ([#​20901](https://redirect.github.com/eslint/eslint/issues/20901)) (Tanuj Kanti) - [`9067f94`](https://redirect.github.com/eslint/eslint/commit/9067f9492ec998afc5b4f057a477ecf6ebd45e44) docs: switch build to Node.js 24 ([#​20893](https://redirect.github.com/eslint/eslint/issues/20893)) (Milos Djermanovic) - [`c91b041`](https://redirect.github.com/eslint/eslint/commit/c91b0417e3420c76807ce1fa2aea76e2de87ab86) docs: Update README (GitHub Actions Bot) - [`e349265`](https://redirect.github.com/eslint/eslint/commit/e349265cb37f3ebc837e178e48a725bb782bd870) docs: clarify semver strings in rule deprecation objects ([#​20885](https://redirect.github.com/eslint/eslint/issues/20885)) (Milos Djermanovic) #### Chores - [`b0e466b`](https://redirect.github.com/eslint/eslint/commit/b0e466b6ab47bfc7de43d8de0c315d8ee83aa584) test: add `data` property to invalid tests cases for rules ([#​20924](https://redirect.github.com/eslint/eslint/issues/20924)) (Tanuj Kanti) - [`f78838b`](https://redirect.github.com/eslint/eslint/commit/f78838bc4c86d487e1bcc7cede260c4467721c46) test: add CodePath type coverage ([#​20904](https://redirect.github.com/eslint/eslint/issues/20904)) (Pixel998) - [`1daa4bd`](https://redirect.github.com/eslint/eslint/commit/1daa4bd734b79a62e317d0394394a6b38cff49f9) chore: update `eslint-plugin-eslint-comments` test data to latest commit ([#​20922](https://redirect.github.com/eslint/eslint/issues/20922)) (Francesco Trotta) - [`002942c`](https://redirect.github.com/eslint/eslint/commit/002942ce988ea28b78e0a2f3b074081e638b552c) ci: declare contents:read on update-readme workflow ([#​20919](https://redirect.github.com/eslint/eslint/issues/20919)) (Arpit Jain) - [`64bca24`](https://redirect.github.com/eslint/eslint/commit/64bca24e7bed35bc3c864fc625cb2d89eca87d5b) chore: update ecosystem plugins ([#​20912](https://redirect.github.com/eslint/eslint/issues/20912)) (ESLint Bot) - [`6d7c832`](https://redirect.github.com/eslint/eslint/commit/6d7c832950d5e92499d88e504080661f888f8f56) chore: ignore fflate updates in renovate ([#​20908](https://redirect.github.com/eslint/eslint/issues/20908)) (Pixel998) - [`b2c8638`](https://redirect.github.com/eslint/eslint/commit/b2c86382164d87c6203b78d52068cd6a2a6ffe30) ci: bump pnpm/action-setup from 6.0.7 to 6.0.8 ([#​20889](https://redirect.github.com/eslint/eslint/issues/20889)) (dependabot\[bot]) - [`a9b8d7f`](https://redirect.github.com/eslint/eslint/commit/a9b8d7f74c50211701cfc49710fa541fd91b2aa5) chore: increase maxBuffer for ecosystem tests ([#​20881](https://redirect.github.com/eslint/eslint/issues/20881)) (sethamus) - [`b702ead`](https://redirect.github.com/eslint/eslint/commit/b702ead5e1ed7cb9f28238a454797662efb37396) chore: update ecosystem update PR settings ([#​20884](https://redirect.github.com/eslint/eslint/issues/20884)) (Pixel998) - [`507f60e`](https://redirect.github.com/eslint/eslint/commit/507f60e9a78c9a902bc8759f066ae17a1ea6cd81) chore: update ecosystem plugins ([#​20882](https://redirect.github.com/eslint/eslint/issues/20882)) (ESLint Bot) - [`92f5c5b`](https://redirect.github.com/eslint/eslint/commit/92f5c5bb6bf3a5d167c8ee53a430833410295c6d) test: add unit test for message-count ([#​20878](https://redirect.github.com/eslint/eslint/issues/20878)) (kuldeep kumar) - [`df32108`](https://redirect.github.com/eslint/eslint/commit/df321080af5758b1fa25e4b9a40e26135642dd6e) chore: add [@​eslint/markdown](https://redirect.github.com/eslint/markdown) and typescript-eslint ecosystem tests ([#​20837](https://redirect.github.com/eslint/eslint/issues/20837)) (sethamus) - [`327f91d`](https://redirect.github.com/eslint/eslint/commit/327f91d36aa49f2a50ded931d841a16374fd875f) chore: use includeIgnoreFile internally ([#​20876](https://redirect.github.com/eslint/eslint/issues/20876)) (Kirk Waiblinger) - [`f0dc4bd`](https://redirect.github.com/eslint/eslint/commit/f0dc4bd893fb3a9f44e4ddc3ad7063ffb0beacd3) chore: pin fflate\@​0.8.2 ([#​20877](https://redirect.github.com/eslint/eslint/issues/20877)) (Milos Djermanovic) - [`0f4bd25`](https://redirect.github.com/eslint/eslint/commit/0f4bd257a67a082b756de746d9e0c4842ab764ca) ci: run Discord alert for ecosystem test failures ([#​20873](https://redirect.github.com/eslint/eslint/issues/20873)) (Copilot) </details> <details> <summary>sveltejs/prettier-plugin-svelte (prettier-plugin-svelte)</summary> ### [`v4.1.0`](https://redirect.github.com/sveltejs/prettier-plugin-svelte/blob/HEAD/CHANGELOG.md#410) [Compare Source](https://redirect.github.com/sveltejs/prettier-plugin-svelte/compare/prettier-plugin-svelte@4.0.1...prettier-plugin-svelte@4.1.0) ##### Minor Changes - feat: support Svelte 5 declaration tags ([#​533](https://redirect.github.com/sveltejs/prettier-plugin-svelte/pull/533)) </details> <details> <summary>sveltejs/svelte (svelte)</summary> ### [`v5.56.1`](https://redirect.github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#5561) [Compare Source](https://redirect.github.com/sveltejs/svelte/compare/svelte@5.56.0...svelte@5.56.1) ##### Patch Changes - fix: error at compile time on duplicate snippet/declaration tag definitions ([#​18351](https://redirect.github.com/sveltejs/svelte/pull/18351)) - fix: parse declaration tag contents more robustly ([#​18353](https://redirect.github.com/sveltejs/svelte/pull/18353)) - fix: correctly transform references to earlier declarators in a declaration tag (e.g. `{let a = $state(0), b = $derived(a * 2)}`) ([#​18348](https://redirect.github.com/sveltejs/svelte/pull/18348)) - fix: avoid spurious `state_referenced_locally` warnings for `$derived` declarations in declaration tags ([#​18348](https://redirect.github.com/sveltejs/svelte/pull/18348)) - fix: tolerate whitespace before `let`/`const` in declaration tags ([#​18348](https://redirect.github.com/sveltejs/svelte/pull/18348)) - fix: prevent infinite loop when a tag's expression ends with a trailing `/` at the end of the input ([#​18350](https://redirect.github.com/sveltejs/svelte/pull/18350)) - fix: more robust parsing of declaration tags with regards to `type` ([#​18330](https://redirect.github.com/sveltejs/svelte/pull/18330)) - fix: preserve newlines in spread input values when the `type` attribute is applied after `value` ([#​18345](https://redirect.github.com/sveltejs/svelte/pull/18345)) - fix: update `SvelteURLSearchParams` when setting duplicate keys to the same joined value ([#​18336](https://redirect.github.com/sveltejs/svelte/pull/18336)) - fix: check references for blockers on server, too ([#​18352](https://redirect.github.com/sveltejs/svelte/pull/18352)) ### [`v5.56.0`](https://redirect.github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#5560) [Compare Source](https://redirect.github.com/sveltejs/svelte/compare/svelte@5.55.10...svelte@5.56.0) ##### Minor Changes - feat: allow declarations in the template ([#​18282](https://redirect.github.com/sveltejs/svelte/pull/18282)) ##### Patch Changes - perf: use `createElement` instead of `createElementNS` for HTML elements ([#​18262](https://redirect.github.com/sveltejs/svelte/pull/18262)) - perf: store `current_sources` as a `Set` for O(1) membership checks ([#​18278](https://redirect.github.com/sveltejs/svelte/pull/18278)) - perf: deduplicate identical hoisted templates within a component ([#​18320](https://redirect.github.com/sveltejs/svelte/pull/18320)) - perf: hoist `rest_props` exclude list as a module-scope `Set` ([#​18252](https://redirect.github.com/sveltejs/svelte/pull/18252)) </details> <details> <summary>privatenumber/tsx (tsx)</summary> ### [`v4.22.4`](https://redirect.github.com/privatenumber/tsx/releases/tag/v4.22.4) [Compare Source](https://redirect.github.com/privatenumber/tsx/compare/v4.22.3...v4.22.4) ##### Bug Fixes - resolve CommonJS directory requires inside dependencies ([#​803](https://redirect.github.com/privatenumber/tsx/issues/803)) ([1ce8463](https://redirect.github.com/privatenumber/tsx/commit/1ce846335b7c445a3328c7d27f06424949356d97)) *** This release is also available on: - [npm package (@​latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.22.4) </details> <details> <summary>sindresorhus/type-fest (type-fest)</summary> ### [`v5.7.0`](https://redirect.github.com/sindresorhus/type-fest/releases/tag/v5.7.0) [Compare Source](https://redirect.github.com/sindresorhus/type-fest/compare/v5.6.0...v5.7.0) ##### New types - [`RemoveSuffix`](https://redirect.github.com/sindresorhus/type-fest/blob/main/source/remove-suffix.d.ts) ([#​1439](https://redirect.github.com/sindresorhus/type-fest/issues/1439)) [`d685b77`](https://redirect.github.com/sindresorhus/type-fest/commit/d685b77) - [`UnwrapRequired`](https://redirect.github.com/sindresorhus/type-fest/blob/main/source/unwrap-required.d.ts) ([#​1410](https://redirect.github.com/sindresorhus/type-fest/issues/1410)) [`3bfee8e`](https://redirect.github.com/sindresorhus/type-fest/commit/3bfee8e) ##### Improvements - `ExtendsStrict`: Add `distributiveUnions`, `strictNever` & `strictAny` options ([#​1408](https://redirect.github.com/sindresorhus/type-fest/issues/1408)) [`9ea810b`](https://redirect.github.com/sindresorhus/type-fest/commit/9ea810b) - `TupleOf`: Improve implementation ([#​1441](https://redirect.github.com/sindresorhus/type-fest/issues/1441)) [`391e1bb`](https://redirect.github.com/sindresorhus/type-fest/commit/391e1bb) ##### Fixes - `RemovePrefix`: Fix: Remove incorrect optimization and always fallback to `string` for non-literal prefixes ([#​1438](https://redirect.github.com/sindresorhus/type-fest/issues/1438)) [`9f35398`](https://redirect.github.com/sindresorhus/type-fest/commit/9f35398) - `DelimiterCase`: Fix behavior with non-single character delimiters ([#​1424](https://redirect.github.com/sindresorhus/type-fest/issues/1424)) [`9b36590`](https://redirect.github.com/sindresorhus/type-fest/commit/9b36590) - `RemovePrefix`: Fix `any` prefix behavior in non-strict mode ([#​1423](https://redirect.github.com/sindresorhus/type-fest/issues/1423)) [`c49cb75`](https://redirect.github.com/sindresorhus/type-fest/commit/c49cb75) - `DelimiterCase`: Fix behavior with union delimiters ([#​1422](https://redirect.github.com/sindresorhus/type-fest/issues/1422)) [`96172c0`](https://redirect.github.com/sindresorhus/type-fest/commit/96172c0) - `ApplyDefaultOptions`: Fix behavior with generic instantiations & `any` values ([#​1411](https://redirect.github.com/sindresorhus/type-fest/issues/1411)) [`c46020d`](https://redirect.github.com/sindresorhus/type-fest/commit/c46020d) - `ApplyDefaultOptions`: Fix behavior with explicit `undefined` ([#​1407](https://redirect.github.com/sindresorhus/type-fest/issues/1407)) [`60bfd3f`](https://redirect.github.com/sindresorhus/type-fest/commit/60bfd3f) *** </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - "before 10am on monday" - 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDkuNCIsInVwZGF0ZWRJblZlciI6IjQzLjIwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cameron Clark <cameron.clark@hey.com> |
||
|
|
963146f4b6 |
refactor(semantic): use SemanticBuilder presets at remaining call sites (#23057)
Use the `SemanticBuilder::new_linter()` preset at linter call sites that built semantic with ad-hoc `new().with_cfg(true)`-style chains, so they build semantic the same way the linter does instead of replicating its options by hand.
- linter test helpers: `disable_directives`, `utils/{regex,comment,jest,react}`
- playground's lint path
Behaviour-neutral; all linter tests pass.
|
||
|
|
336413bf5d |
refactor(semantic): use new_linter/new_compiler presets at callsites (#23037)
Replaces ad-hoc `SemanticBuilder::new().with_*()` chains with the `new_linter()` / `new_compiler()` presets where the preset already expands to the exact same option set, so the config lives in one place. - linter example + linter benchmark → `new_linter()` (cfg + class table + syntax) - semantic benchmark, cfg example, integration test util → `new_compiler()` (syntax) Behavior-neutral — each preset matches the options the callsite set by hand. Carved out of the larger store-optional refactor so it can land independently on `main` first. |
||
|
|
324c8ae137 |
refactor(semantic): add SemanticBuilder::new_compiler / new_linter presets (#23019)
## Summary Adds two named constructor presets to `SemanticBuilder` that bake in the options each use case needs, so the configuration lives in one place instead of being repeated at call sites: - **`SemanticBuilder::new_compiler()`** — compiler pipeline. Enables syntax-error checking; leaves linter-only analyses (control flow graph, class table) off. - **`SemanticBuilder::new_linter()`** — linter. Enables syntax-error checking, the control flow graph, and the class table. The presets are applied at the real pipeline entry points: - `new_linter()` → the linter service build. - `new_compiler()` → `oxc::Compiler`, and the napi parser/transform bindings. Everywhere else keeps `SemanticBuilder::new()` and turns on only the features it needs (mangler, minifier, formatter, transformer plugins, examples, tests, ...). Individual options can still be overridden after a preset (e.g. the linter service overrides `check_syntax_error` with its runtime flag). Behavior is preserved at every migrated site. Node-store access is intentionally untouched in this PR. ## Verified - Builds across the affected crates + napi; clippy clean; `oxc_linter` tests pass; full `cargo coverage` with no snapshot changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
5778a2dfb5 |
refactor(formatter_core): purify core and define rules (#22952)
The Printer never consumes these; they belong with each language formatter. - Evict `Quote` (each formatter owns `QuoteStyle`) - `normalize_string` takes a quote byte - Evict `Expand` / `BracketSpacing` / `TrailingCommas` into oxc_formatter and oxc_formatter_json - JSON's `TrailingCommas` is now two-variant (`Always`/`Never`) - collapse Prettier's `all`/`es5` at each translation layer - Rename `util/` -> `spec/` (pure shared helpers) - Split `SourceText`: mechanical access stays in core, JS/TS lexis moves to `SourceTextExt` - Drop the `oxc_syntax` dependency from core All behaviros, Prettier conformance are unchanged. |
||
|
|
85efabfe0a |
feat(semantic): make building the class table optional, off by default (#22862)
Rolldown runs semantic multiple times, some runs do not require building the class table. |
||
|
|
6c30f81eca |
release(crates): oxc v0.134.0 (#22882)
### 🚀 Features - |
||
|
|
188b9e6b43 |
chore(bench): swap cal.com.tsx for excalidraw App.tsx everywhere (#22895)
## Summary Follow-up to #22590. That PR replaced the synthetic `cal.com.tsx` fixture — a concatenation of Next.js pages that declares top-level names 70–113× and emits thousands of redeclaration diagnostics, inflating semantic `sys_allocs` — with excalidraw's real, single-file `App.tsx`. But it only touched `TestFiles::complicated()` (used by `track_memory_allocations`). This applies the same swap to every remaining benchmark that still used `cal.com.tsx`, and unifies **all** excalidraw `App.tsx` references on one pin (`f6d85bc8`): | File | Change | | --- | --- | | `tasks/common/src/test_file.rs` | `minimal()` (feeds every `tasks/benchmark` criterion bench): `cal.com.tsx` → `App.tsx@f6d85bc8`. `formatter()` re-pinned `@v0.18.0` → `@f6d85bc8` | | `napi/parser/bench.bench.js` | parser benchmark fixture → `App.tsx@f6d85bc8` | | `napi/parser/test/parse-raw.test.ts` | bench-fixture list + size comment → `App.tsx@f6d85bc8` | | `tasks/benchmark/benches/semantic.rs` | rewrote the now-false "`cal.com.tsx` has many errors" comment | | `crates/oxc_ast/src/serialize/mod.rs` | removed the stale `cal.com.tsx` row from the capacity-ratio doc table | ## Why a single pin `get_source_text` caches downloads by the last URL segment only (`App.tsx`). With two different pins live, a single `cargo bench` run would download both into the same `target/App.tsx` and silently bench whichever landed first. Re-pinning `formatter()` to `f6d85bc8` removes that collision — and the pre-existing latent one between `cargo bench` (`@v0.18.0`) and `cargo allocs` (`@f6d85bc8`). ## Notes No committed snapshots change: these fixtures feed only timing benches and a `programRaw.toEqual(programStandard)` self-consistency test; the snapshotted `complicated()` / `minifier()` sets are untouched. --- This PR was prepared with AI assistance; I reviewed, tested, and verified the changes. |
||
|
|
705c0e969b |
refactor(formatter): introduce text-in public APIs (#22872)
Align `oxc_formatter` with `oxc_formatter_json`, both now expose `format(...) -> Result<Formatted<'a, _>, OxcDiagnostic>`. - Add text-in `format` and `format_fragment`, also `format_program`, `parse_for_format` and the `FragmentContext` enum - Parse options, JSX enabling, js-in-xxx context aware handlings are applied internally - Make the `Formatter` struct and AST/IR primitives crate-internal - Fold `get_parse_options` / `enable_jsx_source_type` and the `service` module into `parse_for_format` |
||
|
|
5733868456 |
refactor(formatter_core,formatter,formatter_json): share Expand and BracketSpacing options (#22821)
We chose `core` as the location for duplicate `struct`s, but the final options will continue to be built by each formatter. |
||
|
|
c323187f37 |
refactor(formatter): Split oxc_formatter and oxc_formatter_core (#22611)
Split `oxc_formatter` into: - `oxc_formatter(_js)`: JS/TS specific formatter, comment handling, sortImports, jsdoc, etc - `oxc_formatter_core`: Language agnostic IR, printer, etc The naming convention is different from Biome or Ruff (they do not have `_core`, and `_formatter` is equivalent to the core), but this is because in Oxc, items without `_js` are the default. As a basic task, I have added `Context` as a generic to all relevant parts to ensure support for multiple languages. There might still be other components that could be refactored into the core, but I would like to finish them as I implement support for other languages. Also moved some shared utilities to the core in advance. |
||
|
|
b7568d54d7 |
chore(deps): update dependency @napi-rs/cli to v3.7.0 (#22771)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [@napi-rs/cli](https://napi.rs/) ([source](https://redirect.github.com/napi-rs/napi-rs)) | [`3.6.2` → `3.7.0`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.6.2/3.7.0) |  |  |  |  | --- ### Release Notes <details> <summary>napi-rs/napi-rs (@​napi-rs/cli)</summary> ### [`v3.7.0`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.6.2...@napi-rs/cli@3.7.0) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.6.2...@napi-rs/cli@3.7.0) </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, 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://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTQuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE5NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cameron Clark <cameron.clark@hey.com> |
||
|
|
83328b65ce |
release(crates): oxc v0.133.0 (#22734)
### 🚀 Features - |
||
|
|
e857b0cfe5 |
feat(napi/minify): expose legalComments option and result (#20370)
## Summary - Add `legalComments` and `legalCommentsPath` fields to the NAPI `CodegenOptions` struct, accepting `"none"`, `"inline"`, `"eof"`, `"linked"`, `"external"` - Add `legalComments: Vec<String>` to `MinifyResult`, populated from `CodegenReturn::legal_comments` when using `"linked"` or `"external"` mode - Replace the `From<&CodegenOptions>` impl with a `to_codegen_options()` method that validates and maps string values to `oxc_codegen::LegalComment` variants This enables downstream consumers (e.g. `oxc-webpack-plugin`) to use oxc's built-in legal comment extraction instead of regex-based post-processing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
aa3de22643 |
chore(deps): update npm packages (#22699)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`8.59.3` → `8.59.4`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.59.3/8.59.4) |  |  |  |  | | [@typescript-eslint/scope-manager](https://typescript-eslint.io/packages/scope-manager) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/scope-manager)) | [`8.59.3` → `8.59.4`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fscope-manager/8.59.3/8.59.4) |  |  |  |  | | [@typescript-eslint/visitor-keys](https://typescript-eslint.io) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/visitor-keys)) | [`8.59.3` → `8.59.4`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fvisitor-keys/8.59.3/8.59.4) |  |  |  |  | | [@vitest/browser](https://vitest.dev/guide/browser/) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser)) | [`4.1.6` → `4.1.7`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/4.1.6/4.1.7) |  |  |  |  | | [@vitest/browser-playwright](https://vitest.dev/config/browser/playwright) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright)) | [`4.1.6` → `4.1.7`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser-playwright/4.1.6/4.1.7) |  |  |  |  | | [eslint](https://eslint.org) ([source](https://redirect.github.com/eslint/eslint)) | [`10.3.0` → `10.4.0`](https://renovatebot.com/diffs/npm/eslint/10.3.0/10.4.0) |  |  |  |  | | [svelte](https://svelte.dev) ([source](https://redirect.github.com/sveltejs/svelte/tree/HEAD/packages/svelte)) | [`5.55.7` → `5.55.9`](https://renovatebot.com/diffs/npm/svelte/5.55.7/5.55.9) |  |  |  |  | | [tsx](https://tsx.hirok.io) ([source](https://redirect.github.com/privatenumber/tsx)) | [`4.22.0` → `4.22.3`](https://renovatebot.com/diffs/npm/tsx/4.22.0/4.22.3) |  |  |  |  | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`4.1.6` → `4.1.7`](https://renovatebot.com/diffs/npm/vitest/4.1.6/4.1.7) |  |  |  |  | --- ### Release Notes <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v8.59.4`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8594-2026-05-18) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.59.3...v8.59.4) This was a version bump only for parser to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.59.4) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/scope-manager)</summary> ### [`v8.59.4`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/scope-manager/CHANGELOG.md#8594-2026-05-18) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.59.3...v8.59.4) This was a version bump only for scope-manager to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.59.4) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/visitor-keys)</summary> ### [`v8.59.4`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/visitor-keys/CHANGELOG.md#8594-2026-05-18) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.59.3...v8.59.4) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.59.4) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>vitest-dev/vitest (@​vitest/browser)</summary> ### [`v4.1.7`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v4.1.7) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.6...v4.1.7) ##### 🐞 Bug Fixes - **runner**: Limit concurrency per task branch in addition to per leaf callbacks (backport) - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​10384](https://redirect.github.com/vitest-dev/vitest/issues/10384) [<samp>(4f0f2)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4f0f2a1ee) ##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.6...v4.1.7) </details> <details> <summary>eslint/eslint (eslint)</summary> ### [`v10.4.0`](https://redirect.github.com/eslint/eslint/compare/v10.3.0...452c4010c07dc2e36fe6ec6a8c48298878e86887) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v10.3.0...v10.4.0) </details> <details> <summary>sveltejs/svelte (svelte)</summary> ### [`v5.55.9`](https://redirect.github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#5559) [Compare Source](https://redirect.github.com/sveltejs/svelte/compare/svelte@5.55.8...svelte@5.55.9) ##### Patch Changes - fix: don't unset batch when calling `{#await ...}` promise ([#​18243](https://redirect.github.com/sveltejs/svelte/pull/18243)) - fix: promise-ify `{#await await ...}` expressions on the server and correctly hydrate them on the client ([#​18243](https://redirect.github.com/sveltejs/svelte/pull/18243)) - fix: deduplicate dependencies that are added outside the init/update cycle ([#​18243](https://redirect.github.com/sveltejs/svelte/pull/18243)) - fix: avoid false-positive batch invariant error ([#​18246](https://redirect.github.com/sveltejs/svelte/pull/18246)) - fix: inline primitive constants in attribute values during SSR ([#​18232](https://redirect.github.com/sveltejs/svelte/pull/18232)) ### [`v5.55.8`](https://redirect.github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#5558) [Compare Source](https://redirect.github.com/sveltejs/svelte/compare/svelte@5.55.7...svelte@5.55.8) ##### Patch Changes - fix(print): handle `svelte:body` and fix keyframe percentage double-printing ([#​18234](https://redirect.github.com/sveltejs/svelte/pull/18234)) - fix: execute uninitialized derived even if it's destroyed ([#​18228](https://redirect.github.com/sveltejs/svelte/pull/18228)) - fix: use named symbols everywhere ([#​18238](https://redirect.github.com/sveltejs/svelte/pull/18238)) - fix: don't run teardown effects when deriveds are unfreezed ([#​18227](https://redirect.github.com/sveltejs/svelte/pull/18227)) - fix: unset context synchronously in `run` ([#​18236](https://redirect.github.com/sveltejs/svelte/pull/18236)) </details> <details> <summary>privatenumber/tsx (tsx)</summary> ### [`v4.22.3`](https://redirect.github.com/privatenumber/tsx/compare/v4.22.2...dce02fc3b8b64a58d24560714902b16f89332f1f) [Compare Source](https://redirect.github.com/privatenumber/tsx/compare/v4.22.2...v4.22.3) ### [`v4.22.2`](https://redirect.github.com/privatenumber/tsx/compare/v4.22.1...v4.22.2) [Compare Source](https://redirect.github.com/privatenumber/tsx/compare/v4.22.1...v4.22.2) ### [`v4.22.1`](https://redirect.github.com/privatenumber/tsx/compare/v4.22.0...6979f28810829dc79ec9baf406e162a18b65ab4b) [Compare Source](https://redirect.github.com/privatenumber/tsx/compare/v4.22.0...v4.22.1) </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - "before 10am on monday" - 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://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:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTQuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE5NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> |
||
|
|
ee659b6785 |
feat(transformer/legacy-decorator): add strictNullChecks option for nullable-union design:type (#22266)
## Summary
Adds a `strictNullChecks` field to `DecoratorOptions` (default `true`)
that
controls whether `null` and `undefined` are elided from union
`design:type`
metadata. The default preserves tsc strict semantics (`T | null` →
`Object`);
setting `strictNullChecks: false` matches
babel-plugin-transform-typescript-metadata
and tsc with `--strictNullChecks=false`, emitting the underlying
primitive
(`T | null` → `String` when `T = string`).
Originally this PR unconditionally elided null/undefined. Per @Dunqing's
review, it's now opt-in so the default-strict behaviour is preserved.
## Motivation
When `strictNullChecks` is off, tsc emits the constructor of the
underlying
primitive. babel-plugin-transform-typescript-metadata always elides null
and
undefined regardless of tsconfig. Downstream consumers (NestJS Swagger,
class-validator, TypeORM, AutoMapper) treat `Object` as "no metadata"
and
silently drop fields, so users with `strictNullChecks: false` (common in
older codebases) get worse behaviour under OXC than under tsc/babel.
## Implementation
```rust
pub struct DecoratorOptions {
pub legacy: bool,
pub emit_decorator_metadata: bool,
#[serde(default = "default_as_true")]
pub strict_null_checks: bool, // default true
}
```
Threaded through `Decorator::new(options) →
LegacyDecorator::new(&options) →
LegacyDecoratorMetadata::new(&options)` (matching the established
`TypeScript::new(&TypeScriptOptions)` precedent), and gated in
`serialize_union_or_intersection_constituents`:
```rust
TSType::TSNullKeyword(_) | TSType::TSUndefinedKeyword(_)
if !is_intersection && !self.strict_null_checks => continue,
```
Mirrored at the napi binding (`napi/transform/src/transformer.rs`) so
direct
Node consumers can flip it the day this lands. Consumers that wire
tsconfig
(rolldown, bundlers) can forward `compilerOptions.strictNullChecks` to
it.
## Behaviour matrix
| Source | `strictNullChecks: true` (default) | `strictNullChecks:
false` |
|---|---|---|
| `string \| null` | `Object` (matches tsc strict, current behaviour) |
`String` (matches babel, tsc non-strict) |
| `number \| undefined` | `Object` | `Number` |
| `boolean \| null \| undefined` | `Object` | `Boolean` |
| `null \| undefined` | `void 0` | `void 0` |
| `string \| number` | `Object` | `Object` (distinct primitives) |
| `string & null` | `Object` | `Object` (intersection unchanged) |
## Test plan
- [x] 7 unit tests in `tests/integrations/decorator_metadata.rs`
covering
`T | null` under both `strictNullChecks: true` (emits `Object`, current
behaviour) and `strictNullChecks: false` (emits primitive), plus
`T | undefined`, `T | null | undefined`, the `null | undefined`
void-only
case, the `string | number` distinct-primitive case (still `Object`),
and
the intersection-with-null regression
- [x] New conformance fixture `oxc/metadata/nullable-union/` with its
own
`options.json` setting `strictNullChecks: false`
- [x] `cargo test -p oxc_transformer` passes (31 unit + 11 integration)
- [x] `cargo run -p oxc_transform_conformance` shows 0 regressions;
baseline
fixtures still pass plus the new `nullable-union`
- [x] `cargo fmt -p oxc_transformer -p oxc_transform_napi` and
`cargo clippy --tests --no-deps` clean
AI assistance was used in writing this patch and tests; the contributor
has
reviewed and tested locally.
---------
Co-authored-by: Dunqing <dengqing0821@gmail.com>
|
||
|
|
63b129182d |
release(crates): oxc v0.132.0 (#22527)
### 🐛 Bug Fixes - |
||
|
|
03b7ac5b55 |
chore(deps): update npm packages (#22504)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`8.59.2` → `8.59.3`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.59.2/8.59.3) |  |  |  |  | | [@typescript-eslint/scope-manager](https://typescript-eslint.io/packages/scope-manager) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/scope-manager)) | [`8.59.2` → `8.59.3`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fscope-manager/8.59.2/8.59.3) |  |  |  |  | | [@typescript-eslint/visitor-keys](https://typescript-eslint.io) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/visitor-keys)) | [`8.59.2` → `8.59.3`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fvisitor-keys/8.59.2/8.59.3) |  |  |  |  | | [@vitest/browser](https://vitest.dev/guide/browser/) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser)) | [`4.1.5` → `4.1.6`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/4.1.5/4.1.6) |  |  |  |  | | [@vitest/browser-playwright](https://vitest.dev/config/browser/playwright) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright)) | [`4.1.5` → `4.1.6`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser-playwright/4.1.5/4.1.6) |  |  |  |  | | [playwright](https://playwright.dev) ([source](https://redirect.github.com/microsoft/playwright)) | [`1.59.1` → `1.60.0`](https://renovatebot.com/diffs/npm/playwright/1.59.1/1.60.0) |  |  |  |  | | [publint](https://publint.dev) ([source](https://redirect.github.com/publint/publint/tree/HEAD/packages/publint)) | [`0.3.19` → `0.3.21`](https://renovatebot.com/diffs/npm/publint/0.3.19/0.3.21) |  |  |  |  | | [tsx](https://tsx.hirok.io) ([source](https://redirect.github.com/privatenumber/tsx)) | [`4.21.0` → `4.22.0`](https://renovatebot.com/diffs/npm/tsx/4.21.0/4.22.0) |  |  |  |  | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`4.1.5` → `4.1.6`](https://renovatebot.com/diffs/npm/vitest/4.1.5/4.1.6) |  |  |  |  | --- ### Release Notes <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v8.59.3`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8593-2026-05-11) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.59.2...v8.59.3) This was a version bump only for parser to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.59.3) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/scope-manager)</summary> ### [`v8.59.3`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/scope-manager/CHANGELOG.md#8593-2026-05-11) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.59.2...v8.59.3) This was a version bump only for scope-manager to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.59.3) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/visitor-keys)</summary> ### [`v8.59.3`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/visitor-keys/CHANGELOG.md#8593-2026-05-11) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.59.2...v8.59.3) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.59.3) for more information. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>vitest-dev/vitest (@​vitest/browser)</summary> ### [`v4.1.6`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v4.1.6) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.5...v4.1.6) ##### 🐞 Bug Fixes - **browser**: Provide project reference in `ToMatchScreenshotResolvePath` - by [@​macarie](https://redirect.github.com/macarie) and [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​10138](https://redirect.github.com/vitest-dev/vitest/issues/10138) [<samp>(31882)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/31882607c) - Global `sequence.concurrent: true` with top-level `test(..., { concurrent: false })` + depreacte `sequential` test API and options - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa), **Codex** and [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​10196](https://redirect.github.com/vitest-dev/vitest/issues/10196) [<samp>(2847d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2847dfa2a) - **browser**: Simplify orchestrator otel carrier - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​10285](https://redirect.github.com/vitest-dev/vitest/issues/10285) [<samp>(18af9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/18af98cee) ##### 🏎 Performance - Stringify diff objects only once - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​10276](https://redirect.github.com/vitest-dev/vitest/issues/10276) [<samp>(9f7b1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9f7b1528c) ##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.5...v4.1.6) </details> <details> <summary>microsoft/playwright (playwright)</summary> ### [`v1.60.0`](https://redirect.github.com/microsoft/playwright/releases/tag/v1.60.0) [Compare Source](https://redirect.github.com/microsoft/playwright/compare/v1.59.1...v1.60.0) #### 🌐 HAR recording on Tracing [tracing.startHar()](https://playwright.dev/docs/api/class-tracing#tracing-start-har) / [tracing.stopHar()](https://playwright.dev/docs/api/class-tracing#tracing-stop-har) expose HAR recording as a first-class tracing API, with the same `content`, `mode` and `urlFilter` options as `recordHar`. The returned [Disposable](https://playwright.dev/docs/api/class-disposable) makes it easy to scope a recording with `await using`: ```js await using har = await context.tracing.startHar('trace.har'); const page = await context.newPage(); await page.goto('https://playwright.dev'); // HAR is finalized when `har` goes out of scope. ``` #### 🪝 Drop API New [locator.drop()](https://playwright.dev/docs/api/class-locator#locator-drop) simulates an external drag-and-drop of files or clipboard-like data onto an element. Playwright dispatches `dragenter`, `dragover`, and `drop` with a synthetic \[DataTransfer] in the page context — works cross-browser and is great for testing upload zones: ```js await page.locator('#dropzone').drop({ files: { name: 'note.txt', mimeType: 'text/plain', buffer: Buffer.from('hello') }, }); await page.locator('#dropzone').drop({ data: { 'text/plain': 'hello world', 'text/uri-list': 'https://example.com', }, }); ``` #### 🎯 Aria snapshots - [expect(page).toMatchAriaSnapshot()](https://playwright.dev/docs/api/class-pageassertions#page-assertions-to-match-aria-snapshot) now works on a [Page](https://playwright.dev/docs/api/class-page), in addition to a [Locator](https://playwright.dev/docs/api/class-locator) — equivalent to asserting against `page.locator('body')`. - New `boxes` option on [locator.ariaSnapshot()](https://playwright.dev/docs/api/class-locator#locator-aria-snapshot) / [page.ariaSnapshot()](https://playwright.dev/docs/api/class-page#page-aria-snapshot) appends each element's bounding box as `[box=x,y,width,height]`, useful for AI consumption. #### 🛑 test.abort() New [test.abort()](https://playwright.dev/docs/api/class-test#test-abort) aborts the currently running test from a fixture, hook, or route handler with an optional message. Use it when you have detected an unrecoverable misuse and want to fail the test right away: ```js test('does not publish to the shared page', async ({ page }) => { await page.route('**/publish', route => { test.abort('Tests must not publish to the shared page. Use the `clone` option.'); return route.abort(); }); // ... }); ``` #### New APIs ##### Browser, Context and Page - Event [browser.on('context')](https://playwright.dev/docs/api/class-browser#browser-event-context) — fired when a new context is created on the browser. - [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) now mirrors lifecycle events from its pages: [browserContext.on('download')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-download), [browserContext.on('frameattached')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-frame-attached), [browserContext.on('framedetached')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-frame-detached), [browserContext.on('framenavigated')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-frame-navigated), [browserContext.on('pageclose')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page-close), [browserContext.on('pageload')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page-load). ##### Locators and Assertions - New option `description` in [page.getByRole()](https://playwright.dev/docs/api/class-page#page-get-by-role) / [locator.getByRole()](https://playwright.dev/docs/api/class-locator#locator-get-by-role) / [frame.getByRole()](https://playwright.dev/docs/api/class-frame#frame-get-by-role) / [frameLocator.getByRole()](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role) for matching the [accessible description](https://www.w3.org/TR/wai-aria-1.2/#dfn-accessible-description). - New option `pseudo` in [expect(locator).toHaveCSS()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-css) reads computed styles from `::before` or `::after`. - New option `style` in [locator.highlight()](https://playwright.dev/docs/api/class-locator#locator-highlight) applies extra inline CSS to the highlight overlay, plus new [page.hideHighlight()](https://playwright.dev/docs/api/class-page#page-hide-highlight) to clear all highlights. ##### Network - [webSocketRoute.protocols()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-protocols) returns the WebSocket subprotocols requested by the page. - New option `noDefaults` in [browserType.connectOverCDP()](https://playwright.dev/docs/api/class-browsertype#browser-type-connect-over-cdp) disables Playwright's default overrides on the default context (download behavior, focus emulation, media emulation), so attaching to a user's daily-driver browser doesn't disturb its state. ##### Errors and Reporting - New [webError.location()](https://playwright.dev/docs/api/class-weberror#web-error-location) mirrors [consoleMessage.location()](https://playwright.dev/docs/api/class-consolemessage#console-message-location). - [consoleMessage.location()](https://playwright.dev/docs/api/class-consolemessage#console-message-location) now exposes `line` / `column` properties (`lineNumber` / `columnNumber` are deprecated). - New [testInfoError.errorContext](https://playwright.dev/docs/api/class-testinfoerror#test-info-error-error-context) surfaces additional diagnostic context, such as the aria snapshot of the receiver at the time of an `expect(...)` matcher failure. - [reporter.onError()](https://playwright.dev/docs/api/class-reporter#reporter-on-error) now receives a `workerInfo` argument with details about the worker for fixture teardown errors. ##### Test runner - New `{testFileBaseName}` token in [testProject.snapshotPathTemplate](https://playwright.dev/docs/api/class-testproject#test-project-snapshot-path-template) — file name without extension. - Test runner now errors when a config tries to override a non-option fixture, and rejects `workers: 0` or negative values. #### 🛠️ Other improvements - HTML reporter: - `npx playwright show-report` accepts `.zip` files directly — no need to unzip first. - Steps that contain attachments inside nested children show an indicator on the parent step. - The `repeatEachIndex` is shown in the test header when non-zero. - Trace Viewer adds a pretty-print toggle for JSON / form request and response bodies in the network details panel. #### Breaking Changes ⚠️ - Removed long-deprecated APIs: - `Locator.ariaRef()` — use the standard [locator.ariaSnapshot()](https://playwright.dev/docs/api/class-locator#locator-aria-snapshot) pipeline. - `handle` option on `BrowserContext.exposeBinding` and `Page.exposeBinding`. - `logger` option on `BrowserType.connect` and `BrowserType.connectOverCDP` — use [tracing](https://playwright.dev/docs/trace-viewer) instead. - Context options `videosPath` / `videoSize` — use `recordVideo` instead. #### Browser Versions - Chromium 148.0.7778.96 - Mozilla Firefox 150.0.2 - WebKit 26.4 This version was also tested against the following stable channels: - Google Chrome 147 - Microsoft Edge 147 </details> <details> <summary>publint/publint (publint)</summary> ### [`v0.3.21`](https://redirect.github.com/publint/publint/blob/HEAD/packages/publint/CHANGELOG.md#0321) [Compare Source](https://redirect.github.com/publint/publint/compare/publint@0.3.20...publint@0.3.21) ##### Patch Changes - Suggest adding `"sideEffects": false` when bundler-oriented package fields or conditions are detected and the field is missing. ([#​228](https://redirect.github.com/publint/publint/pull/228)) ### [`v0.3.20`](https://redirect.github.com/publint/publint/blob/HEAD/packages/publint/CHANGELOG.md#0320) [Compare Source](https://redirect.github.com/publint/publint/compare/publint@0.3.19...publint@0.3.20) ##### Patch Changes - Suggest adding `engines.node` when it is missing from detected Node.js packages ([#​226](https://redirect.github.com/publint/publint/pull/226)) - Loosen "breaking change" wording in lint messages ([`7bb3f4f`](https://redirect.github.com/publint/publint/commit/7bb3f4fd03415d0c860dda0c252d7029144b9f94)) </details> <details> <summary>privatenumber/tsx (tsx)</summary> ### [`v4.22.0`](https://redirect.github.com/privatenumber/tsx/compare/v4.21.1...b29f6ee4d6872fdef474eb0a89c6d4e982478a77) [Compare Source](https://redirect.github.com/privatenumber/tsx/compare/v4.21.1...v4.22.0) ### [`v4.21.1`](https://redirect.github.com/privatenumber/tsx/releases/tag/v4.21.1) [Compare Source](https://redirect.github.com/privatenumber/tsx/compare/v4.21.0...v4.21.1) ##### Bug Fixes - support Node 20.11/21.2 import.meta paths ([acf3d8f](https://redirect.github.com/privatenumber/tsx/commit/acf3d8ffee39fcb4655956fc052b78666aacbc3d)) - support Node.js 24.15.0 ([c1d2d45](https://redirect.github.com/privatenumber/tsx/commit/c1d2d45432eba7c6ff0785a43b0aeae85b5a3391)) - support Node.js 26.1.0 and 25.9.0 ([1d7e528](https://redirect.github.com/privatenumber/tsx/commit/1d7e528762a7e4f801175fd7d7d6082b00df3e5c)) *** This release is also available on: - [npm package (@​latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.21.1) </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - "before 10am on monday" - 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:eyJjcmVhdGVkSW5WZXIiOiI0My4xNzkuMyIsInVwZGF0ZWRJblZlciI6IjQzLjE3OS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> |
||
|
|
564ebbf46f |
release(crates): oxc v0.131.0 (#22459)
### 🚀 Features - |
||
|
|
e3b0d54556 |
refactor(napi/parser, linter/plugins): improve safety of raw transfer interface (#22424)
Add a check that the input passed to raw transfer parser implementations is valid - both in `napi/parser` and in the raw transfer implementation used in Oxlint's `RuleTester`. Check that `source_start` and `source_len` which are passed from JS side are within bounds of the active region of the `Arena`. This check is not strictly necessary - it's part of the safety contract, and is enforced on JS side - but it's critical as the setup of the `Arena` on Rust side depends on the accuracy of these values. If they were wrong, it could lead to reading/writing out of bounds. The check is cheap, so it seems worthwhile - safety trumps the tiny perf impact here. The 3rd invariant of these functions is that the bytes in the buffer between `source_start` and `source_start + source_len` represent a valid UTF-8 string. Here a full runtime check isn't appropriate, as it would involve scanning and validating the whole source text string (expensive). But _do_ enable the full check in debug builds (used by raw transfer parser tests, and Oxlint conformance tests). |