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
412 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
65cda29177 |
fix(transform_conformance): record missing expected errors (#25306)
Fix the transformer conformance runner incorrectly marking a fixture as passed that specified `throws` when Oxc produces no error. Failed conformance cases now always record a diagnostic. This exposes previously hidden failures in the Babel snapshot, including the nested ambient-module fixtures. |
||
|
|
7ebbdddce7 |
chore(submodules): update submodule SHAs to latest commits (#25505)
Updates submodule dependencies to their latest commits. ## Changes - test262: `b363f29` → `be13516` - babel: `06b6eae` → `1eac448` - estree-conformance: `f7a4e0c` → `8d4e1fa` This PR is automatically generated by the [update_submodules workflow](https://github.com/oxc-project/oxc/blob/main/.github/workflows/update_submodules.yml). |
||
|
|
4d723caaff |
fix(parser): report TS1035 for quoted module names (#25305)
Quoted module names are only valid in ambient contexts in TypeScript, but we were accepting them in regular TypeScript files. This reports TS1035 when a quoted module name appears outside a declaration file or ambient declaration. The conformance snapshots now cover both TypeScript cases, and the old invalid codegen fixture has been replaced with a valid internal module declaration. |
||
|
|
4e7007118d |
chore(submodules): update submodule SHAs to latest commits (#25261)
Updates submodule dependencies to their latest commits. ## Changes - test262: `d1d583d` → `b363f29` - babel: `c86e9e4` → `06b6eae` - TypeScript: `637d574` → `b465fdb` - estree-conformance: `e8fd120` → `f7a4e0c` This PR is automatically generated by the [update_submodules workflow](https://github.com/oxc-project/oxc/blob/main/.github/workflows/update_submodules.yml). Co-authored-by: oxc-guard[bot] <276638029+oxc-guard[bot]@users.noreply.github.com> |
||
|
|
76ec104498 |
fix(semantic): resolve import-equals namespaces (#22696)
Fixes `import =` semantic reference resolution so internal module references are resolved as namespace lookups instead of ordinary value reads. TypeScript treats the RHS of an internal `import =` specially. In the checker, `getTargetOfImportEqualsDeclaration` delegates internal module references to `getSymbolOfPartOfRightHandSideOfImportEquals`, which resolves bare RHS names and intermediate qualified names with `SymbolFlags.Namespace` rather than value meaning: - `getTargetOfImportEqualsDeclaration`: https://github.com/microsoft/TypeScript/blob/f350b52331494b68c90ab02e2b6d0828d2a22a74/src/compiler/checker.ts#L3708-L3733 - `getSymbolOfPartOfRightHandSideOfImportEquals`: https://github.com/microsoft/TypeScript/blob/f350b52331494b68c90ab02e2b6d0828d2a22a74/src/compiler/checker.ts#L4480-L4499 - `getSymbolOfNameOrPropertyAccessExpression` also routes names on the RHS of import/export assignments through that same helper: https://github.com/microsoft/TypeScript/blob/f350b52331494b68c90ab02e2b6d0828d2a22a74/src/compiler/checker.ts#L50014-L50019 Before this change, Oxc could count plain values as references from `import =`: ```ts const x = 1; import foo = x; ``` Before: ```text x references: 1 ``` After: ```text x references: 0 ``` That matches TypeScript’s behavior because `x` is only a value symbol, not a namespace-capable symbol. The same applies to qualified names: ```ts const x = { y: 1 }; import foo = x.y; ``` Before: ```text x references: 1 ``` After: ```text x references: 0 ``` But namespace-capable declarations still resolve: ```ts namespace x {} import foo = x; ``` After: ```text x references: 1 ``` and: ```ts namespace x { export namespace y {} } import foo = x.y; ``` After: ```text x references: 1 ``` This updates the semantic snapshots to reflect the corrected reference/declaration matching. |
||
|
|
6ea3e0620c |
chore(deps): update Node.js to 26.5.0 (#24507)
## Summary - update .node-version from 24.14.0 to 26.5.0 - verify v26.5.0 as the latest v26 release in the official Node.js distribution index (released 2026-07-08) |
||
|
|
17cb5c13c5 |
chore(submodules): update submodule SHAs to latest commits (#24463)
Updates submodule dependencies to their latest commits. ## Changes - test262: `de8e621` → `d1d583d` - babel: `1fb0b77` → `c86e9e4` - TypeScript: `7964e22` → `637d574` - estree-conformance: `6514ad7` → `e8fd120` This PR is automatically generated by the [update_submodules workflow](https://github.com/oxc-project/oxc/blob/main/.github/workflows/update_submodules.yml). Co-authored-by: oxc-guard[bot] <276638029+oxc-guard[bot]@users.noreply.github.com> |
||
|
|
bb629d8fd4 |
chore(deps): update npm packages (#24418)
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.4` → `0.18.5`](https://renovatebot.com/diffs/npm/@arethetypeswrong%2fcore/0.18.4/0.18.5) |  |  |  |  | | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`8.62.1` → `8.63.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.62.1/8.63.0) |  |  |  |  | | [@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.62.1` → `8.63.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fscope-manager/8.62.1/8.63.0) |  |  |  |  | | [@typescript-eslint/visitor-keys](https://typescript-eslint.io) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/visitor-keys)) | [`8.62.1` → `8.63.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fvisitor-keys/8.62.1/8.63.0) |  |  |  |  | | [@vitest/browser](https://vitest.dev/guide/browser/) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser)) | [`4.1.9` → `4.1.10`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/4.1.9/4.1.10) |  |  |  |  | | [@vitest/browser-playwright](https://vitest.dev/config/browser/playwright) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright)) | [`4.1.9` → `4.1.10`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser-playwright/4.1.9/4.1.10) |  |  |  |  | | [tsx](https://tsx.hirok.io) ([source](https://redirect.github.com/privatenumber/tsx)) | [`4.22.5` → `4.23.0`](https://renovatebot.com/diffs/npm/tsx/4.22.5/4.23.0) |  |  |  |  | | [type-fest](https://redirect.github.com/sindresorhus/type-fest) | [`5.7.0` → `5.8.0`](https://renovatebot.com/diffs/npm/type-fest/5.7.0/5.8.0) |  |  |  |  | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`4.1.9` → `4.1.10`](https://renovatebot.com/diffs/npm/vitest/4.1.9/4.1.10) |  |  |  |  | --- ### Release Notes <details> <summary>arethetypeswrong/arethetypeswrong.github.io (@​arethetypeswrong/core)</summary> ### [`v0.18.5`](https://redirect.github.com/arethetypeswrong/arethetypeswrong.github.io/blob/HEAD/packages/core/CHANGELOG.md#0185) ##### Patch Changes - [`c4be7e8`](https://redirect.github.com/arethetypeswrong/arethetypeswrong.github.io/commit/c4be7e8): Detect default exports in webpack-bundled CommonJS libraries. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v8.63.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8630-2026-07-06) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.62.1...v8.63.0) 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.63.0) 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.63.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/scope-manager/CHANGELOG.md#8630-2026-07-06) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.62.1...v8.63.0) ##### 🩹 Fixes - **scope-manager:** export ClassStaticBlockScope ([#​12460](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/12460)) ##### ❤️ Thank You - 송재욱 See [GitHub Releases](https://redirect.github.com/typescript-eslint/typescript-eslint/releases/tag/v8.63.0) 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.63.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/visitor-keys/CHANGELOG.md#8630-2026-07-06) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.62.1...v8.63.0) 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.63.0) 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.10`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v4.1.10) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.9...v4.1.10) ##### 🐞 Bug Fixes - **browser**: Check fs access in builtin commands \[backport to v4] - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **OpenCode (claude-opus-4-8)** in [#​10680](https://redirect.github.com/vitest-dev/vitest/issues/10680) [<samp>(5c18d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5c18dd267) - **vm**: Fix external module resolve error with deps optimizer query for encoded URI \[backport to v4] - by [@​SveLil](https://redirect.github.com/SveLil) and [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​10661](https://redirect.github.com/vitest-dev/vitest/issues/10661) [<samp>(bae52)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/bae52b511) ##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.9...v4.1.10) </details> <details> <summary>privatenumber/tsx (tsx)</summary> ### [`v4.23.0`](https://redirect.github.com/privatenumber/tsx/releases/tag/v4.23.0) [Compare Source](https://redirect.github.com/privatenumber/tsx/compare/v4.22.5...v4.23.0) ##### Bug Fixes - avoid redundant filesystem probes during module resolution ([257bbbb](https://redirect.github.com/privatenumber/tsx/commit/257bbbb7eb2784cad6a3bb7a2d9c9747d28d96ec)), closes [privatenumber/tsx#809](https://redirect.github.com/privatenumber/tsx/issues/809) ##### Features - add multi-scenario startup benchmark suite ([c178197](https://redirect.github.com/privatenumber/tsx/commit/c178197b104d055fd3431f7448982f3156394d12)), closes [privatenumber/tsx#809](https://redirect.github.com/privatenumber/tsx/issues/809) [#​809](https://redirect.github.com/privatenumber/tsx/issues/809) [hi#signal](https://redirect.github.com/hi/issues/signal) [privatenumber/tsx#145](https://redirect.github.com/privatenumber/tsx/issues/145) [#​809](https://redirect.github.com/privatenumber/tsx/issues/809) *** This release is also available on: - [npm package (@​latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.23.0) </details> <details> <summary>sindresorhus/type-fest (type-fest)</summary> ### [`v5.8.0`](https://redirect.github.com/sindresorhus/type-fest/compare/v5.7.0...v5.8.0) [Compare Source](https://redirect.github.com/sindresorhus/type-fest/compare/v5.7.0...v5.8.0) </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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTkuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI1OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> |
||
|
|
af4922be6d | fix(transformer): clear lowered namespace redeclarations (#24300) | ||
|
|
6371fed556 |
fix(transformer): remove stale enum member bindings (#24272)
## Summary Remove TypeScript enum-member bindings after transformation. Enum members are represented as bindings during semantic analysis so the transformer can resolve member values, fold references, and handle merged enums. Once TypeScript transformation finishes, those bindings no longer correspond to emitted JavaScript declarations. Include `EnumMember` in the existing final TypeScript binding cleanup instead of removing bindings during enum lowering, where later references may still need them. This fixes `discriminatedUnionTypes4.ts` and removes the same stale binding mismatch from other enum cases. |
||
|
|
f05dfabe5c |
fix(transformer): correct symbol flags for lowered namespaces (#24271)
Closes #24224 — the first commit is @camc314's fix from there. Lowered namespaces kept their `ValueModule`/`NameSpaceModule` symbol flags, so the flags no longer matched the emitted JavaScript: - Namespaces lowered to a declaration become `let` → `BlockScopedVariable`. - Namespaces lowered to an assignment only lose their module bits. This removes over 2,000 stale symbol-flag mismatches from the snapshots. Unlike #24224 there is no pending state: the type-only check for merged namespaces now reads per-declaration flags from the redeclaration list instead of the symbol's live flags, so each declaration can update the flags right when it is lowered. |
||
|
|
84eeb5570b |
fix(transformer): correct symbol flags for lowered enums (#24269)
Closes #24226 — the first commit is @camc314's fix from there. Lowered enums kept their `RegularEnum`/`ConstEnum` symbol flags, so the flags no longer matched the emitted JavaScript: - Top-level enums become `var` → `FunctionScopedVariable`. - Exported and nested enums become `let` → `BlockScopedVariable`. - Merged enums lowered to an assignment only lose their enum bits. This removes over 1,000 stale symbol-flag mismatches from the snapshots. Unlike #24226 there is no pending state: enum member inlining now identifies enums through `EnumData` (#24268) instead of `SymbolFlags`, so the flags can be updated right when the enum is lowered. |
||
|
|
c3057dac59 |
fix(transformer): preserve generated class binding spans (#24220)
## Summary
- preserve outer and inner class binding spans during legacy decorator lowering
- add a span-aware traversal binding generator for transformed source-backed bindings
- update semantic coverage snapshots, removing stale `Span { start: 0, end: 0 }` mismatches
|
||
|
|
8260096253 |
fix(transformer): correct span for lowered namespace symbol (#24222)
## Summary
- preserve source spans when TypeScript namespace declarations are lowered to variable bindings
- update semantic coverage snapshots, removing stale `Span { start: 0, end: 0 }` mismatches
|
||
|
|
588d9971ac |
fix(semantic): mark TS PropertyDefinitions computed fields as type references (#24233)
## Summary - resolve computed declare class-field keys through ValueAsType so their final references are Type - allow declared keys to resolve type-only import bindings while preserving Read for ordinary runtime class fields - add a red/green semantic snapshot and update conformance snapshots, yielding one additional TypeScript semantic pass and one additional transform-conformance pass |
||
|
|
ce5f40f575 |
fix(transformer): declare temp for renamed anonymous class (#24230)
## Summary
- declare the class-properties temp when another transform names an anonymous class
- prevent static-field initialization from referencing an undeclared temp
- add legacy-decorator/class-properties conformance coverage
## Transformation
```mermaid
flowchart LR
A["Anonymous class"] --> B["Class properties reserves _Class"]
B --> C["Decorator names class _default"]
C --> D["Declare var _Class"]
D --> E["_Class = _default"]
E --> F["Initialize static fields"]
```
```ts
export default class {
@dec
static foo = 0;
}
```
```js
var _Class;
export default class _default {}
_Class = _default;
babelHelpers.defineProperty(_Class, "foo", 0);
```
|
||
|
|
09bd6389c8 |
fix(transformer): scope anonymous decorated class bindings correctly (#24229)
## Summary
Generate bindings for anonymous decorated classes in the class’s enclosing scope.
## Problem
When an anonymous class element has a decorator, the transformer creates a
temporary `_default` binding while traversing the class body.
Previously, the binding was registered in the current class scope even though
the transformed declaration is emitted outside that class.
```text
Semantic data before fix Transformed AST
Program Program
└─ Class scope └─ class/variable _default
└─ binding: _default ↑ emitted here
↑ recorded here
```
This caused the retained semantic data to disagree with semantics rebuilt from
the transformed AST:
```text
after transform: _default → class scope
rebuilt: _default → enclosing scope
```
## Solution
Derive the class’s enclosing scope from its semantic scope and generate the
temporary binding there.
```text
Class scope
│
└── parent scope ── generate `_default` binding here
│
└── matches emitted declaration
```
This corrects binding ownership for anonymous default-export classes with
decorated members.
|
||
|
|
4b7fa9ca35 |
fix(transformer): preserve namespace strict mode flags (#24227)
## Summary Preserve strict-mode metadata when lowering TypeScript namespaces into IIFE-style functions. Previously, namespace transformation always replaced the original scope flags with `Function | StrictMode`, causing semantic mismatches for namespaces that were not strict. The transform now retains strictness only when present on the original namespace or enclosing scope. Updated semantic and transform-conformance snapshots to remove the resolved scope-flag mismatches. |
||
|
|
d8ead846c8 |
fix(transformer): correct scoping flags for lowered enums (#24225)
## Summary TypeScript enum lowering reuses the enum body’s scope for the generated function expression. Update that scope with `ScopeFlags::Function` so transformed semantic data matches a freshly rebuilt AST. |
||
|
|
e8b50ee716 |
fix(transformer): clean up semantics for stripped TypeScript syntax (#24180)
## Summary Keep transformer semantic data in sync when TypeScript-only syntax is removed. This change: - removes resolved and unresolved references belonging only to stripped TypeScript syntax - removes bindings for erased type-only and unused imports - preserves runtime bindings when a type import is merged with a value declaration - promotes the surviving declaration’s symbol flags, span, and redeclaration metadata - adds coverage for type imports merged with runtime declarations - refreshes semantic and transformer conformance snapshots ## Motivation We are preparing to change the AST shape, including adding and rearranging scopes. Currently, transformer semantic snapshots contain thousands of lines of mismatches caused by stale bindings and references from TypeScript syntax that has already been removed from the AST. That creates a large amount of unrelated snapshot noise. With that noise present, snapshot changes caused by the upcoming AST work would be difficult to review: a real scope or semantic regression could easily be hidden among mechanical churn. This PR fixes the underlying semantic inconsistencies first, giving us a much cleaner baseline for reviewing future AST and scope changes. It is not intended to change emitted JavaScript. |
||
|
|
47008d88b6 |
fix(ci): regenerate transform_conformance snapshots (#24103)
In #24078, the snapshot generation was missed, which caused the CI to fail on all subsequent PRs. Also fixes typo in CI trigger, which should prevent this. 🙈 |
||
|
|
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> |
||
|
|
9e72aa0312 |
chore(submodules): update submodule SHAs to latest commits (#23451)
Updates submodule dependencies to their latest commits. ## Changes - test262: `05bb032` → `de8e621` - babel: `2688fbd` → `1fb0b77` - TypeScript: `7539c04` → `7964e22` - estree-conformance: `ca42c3d` → `6514ad7` This PR is automatically generated by the [update_submodules workflow](https://github.com/oxc-project/oxc/blob/main/.github/workflows/update_submodules.yml). |
||
|
|
6c0bdf0486 |
feat(transformer/react-refresh): support module.property.useHook() (#23190)
## Summary Ports facebook/react#35318 to the React Refresh plugin: hook calls through a nested member expression such as `FancyHook.property.useNestedThing()` are now collected into the `$RefreshSig$` custom-hooks list, so components using them no longer lose state on every fast-refresh update. As in the Babel plugin, the binding is resolved through one extra static member level, and a force reset is emitted when the root object has no binding in scope. Deeper nesting (`A.B.C.useHook()`) remains uncollected, same as upstream; note that Babel additionally emits `forceReset = true` in that case while oxc does not — a pre-existing, intentional divergence from #6143 that this PR does not change. closes #16571 ## Example Input: ```jsx import FancyHook from 'fancy'; export default function App() { const foo = FancyHook.property.useNestedThing(); return <h1>{foo}</h1>; } ``` Signature before: ```js _s(App, "useNestedThing{foo}"); ``` Signature after: ```js _s(App, "useNestedThing{foo}", false, function() { return [FancyHook.property.useNestedThing]; }); ``` --- This PR was prepared with AI assistance; I reviewed, tested, and verified the changes. |
||
|
|
2c28748328 |
fix(transformer/class): parent generated constructors to class scope (#23222)
## Summary
- Parent synthesized constructors for TypeScript class field lowering under the transformed class body scope instead of the current traversal scope.
- Update the transform conformance snapshot now that the generated constructor scope matches the rebuilt semantic scope.
## Details
When `useDefineForClassFields` lowering needs to synthesize a constructor, the traversal is still positioned in the scope that encloses the class. Static blocks created in the same transform already use `class_scope_id`, but generated constructors used `create_child_scope_of_current`, so their semantic parent could point outside the class.
This changes the generated constructor scope creation to use `create_child_scope(class_scope_id, ...)`, matching where the constructor actually lives in the class body.
## Example
```ts
class Cls {
y = 1;
[key] = 2;
}
```
Conceptually this transform creates a constructor for the hoisted field initializers:
```ts
class Cls {
constructor() {
this.y = 1;
this[key] = 2;
}
}
```
Before this change, the constructor AST was nested in `Cls`, but its semantic scope was parented to the enclosing scope:
```mermaid
flowchart TD
Program["Program scope"] --> Class["Class body scope: Cls"]
Program --> GeneratedCtor["Generated constructor scope"]
Class --> StaticBlocks["Generated static blocks"]
```
After this change, the generated constructor scope is parented to the class body scope, matching the rebuilt semantic tree:
```mermaid
flowchart TD
Program["Program scope"] --> Class["Class body scope: Cls"]
Class --> GeneratedCtor["Generated constructor scope"]
Class --> StaticBlocks["Generated static blocks"]
```
The same mismatch showed up in the accessor backing field fixture:
```ts
class Hello {
private input = { foo };
accessor util = this.input.foo();
}
```
AI assistance: OpenAI Codex was used to prepare this change.
|
||
|
|
d74964cda6 |
perf(parser): store class definite assertion offset (#23170)
- Store class property definite assignment assertion positions as `u32` offsets instead of carrying a full `Span`. - Reconstruct the one-character diagnostic span only when emitting class definite-assignment diagnostics. - aligns the behaviour for definite assertion errors with variables by reporting on the definite assertion rather than on the whole class member |
||
|
|
d169fcd3af |
feat(parser): report invalid class definite assertions (#23164)
- Match TypeScript’s diagnostic precedence for class property definite assignment assertions. - Report TS1264 when a class property uses ! without a type annotation. - Report TS1255 when a definite assignment assertion is used in disallowed class property contexts, including static. |
||
|
|
00244d8e10 |
feat(parser): report definite property initializer errors (#23160)
Report TS1263 for TypeScript class properties that combine a definite assignment assertion with an initializer. |
||
|
|
b4f9cb9d8c |
chore(submodules): update submodule SHAs to latest commits (#23118)
Updates submodule dependencies to their latest commits. ## Changes - test262: `7e115f4` → `05bb032` - babel: `d9fe348` → `2688fbd` - TypeScript: `e5509e2` → `7539c04` - estree-conformance: `faf089d` → `ca42c3d` This PR is automatically generated by the [update_submodules workflow](https://github.com/oxc-project/oxc/blob/main/.github/workflows/update_submodules.yml). |
||
|
|
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> |
||
|
|
50baca037c |
chore(submodules): update submodule SHAs to latest commits (#22721)
Updates submodule dependencies to their latest commits. ## Changes - test262: `78fc3f8` → `7e115f4` - babel: `3d34928` → `d9fe348` - TypeScript: `f350b52` → `e5509e2` - estree-conformance: `576e7d8` → `faf089d` This PR is automatically generated by the [update_submodules workflow](https://github.com/oxc-project/oxc/blob/main/.github/workflows/update_submodules.yml). Co-authored-by: oxc-guard[bot] <276638029+oxc-guard[bot]@users.noreply.github.com> |
||
|
|
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--> |
||
|
|
7baed9c4b7 |
fix(transformer/private-method): clear inherited strict flags (#22508)
Fixes private method transforms so scopes inherited from a transformed private method are converted back to sloppy mode when the surrounding scope is sloppy. Previously we only cleared `StrictMode` on the private method function scope itself. That left child scopes, such as async/generator wrapper scopes, marked as strict even though the transformed output is no longer inside a class method. This caused semantic rebuild mismatches across Babel and Test262 coverage. Nested classes are still left strict, since class bodies are always strict mode. |
||
|
|
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>
|
||
|
|
69a6ba6353 |
fix(transformer/legacy-decorator): emit Array for ReadonlyArray<T> in decorator metadata (#22265)
## Summary
`ReadonlyArray<T>` is a TypeScript-only utility type with no runtime
value. The legacy decorator metadata emit currently wraps it in the
runtime guard `typeof (_ref = typeof X !== "undefined" && X) ===
"function" ? _ref : Object`, which always falls through to `Object`
because there is no runtime `ReadonlyArray` binding. tsc resolves this
through the checker and emits `Array`; OXC's existing handling of the
short form `readonly T[]` already emits `Array`, so the generic form is
the only divergent shape.
## The bug
```ts
class Entity {
@D() shortForm!: readonly string[]; // tsc: Array, OXC: Array (already correct)
@D() genericForm!: ReadonlyArray<string>; // tsc: Array, OXC: Object (bug)
@D() nestedReadonly!: ReadonlyArray<ReadonlyArray<number>>; // same
}
```
The two surface forms describe the same type but produce different
runtime metadata. Downstream consumers (TypeORM `@Column` array
inference, NestJS Swagger schema, AutoMapper field detection) rely on
the `Array` constructor; `Object` causes silent degradation.
## Fix
In `serialize_type_reference_node`, recognize `ReadonlyArray` by name
when the symbol is unresolved or type-only. Emit `global_array(ctx)`
directly, bypassing the wrapper. A user-shadowed `class ReadonlyArray
{}` would have a value symbol and falls through to the normal
class-handling path, so the shadow case is preserved.
```rust
if ident.name == "ReadonlyArray"
&& symbol_id.is_none_or(|sid| ctx.scoping().symbol_flags(sid).is_type())
{
return Self::global_array(ctx);
}
```
## Scope
Only `ReadonlyArray` is handled in this PR. `ReadonlyMap`,
`ReadonlySet`, `WeakMap`, `WeakSet`, and `Readonly<Array<T>>` peel are
left for a follow-up because tsc's spec emit for those is less
unambiguous and warrants case-by-case verification. The same
predicate-style approach extends naturally if reviewers want them folded
in.
## Test plan
- [x] 4 unit tests in `decorator_metadata_readonly_array.rs`: bare
ReadonlyArray, nested ReadonlyArray, regression on `readonly T[]` short
form, and a user-shadowed `class ReadonlyArray {}` regression
- [x] New conformance fixture `oxc/metadata/readonly-array/`
- [x] `cargo test -p oxc_transformer` passes (31 unit + 9 integration)
- [x] `cargo run -p oxc_transform_conformance` shows 229 OXC fixtures
still passing, +1 new fixture (`readonly-array`); 0 regressions
- [x] `cargo fmt -p oxc_transformer` and `cargo clippy -p
oxc_transformer --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>
|
||
|
|
e421ef0f84 |
fix(transformer/legacy-decorator): return runtime binding for design:type (#22640)
Closes #22227. Closes #22228. ## Summary - Switch `design:type` / `design:paramtypes` / `design:returntype` emit from `typeof X === "function" ? X : Object` to `typeof X === "undefined" ? Object : X`, matching SWC and Babel. Cross-file imported enums and namespace-imported enums (`NS.E`) now return the actual enum object instead of silently degrading to `Object` — consumers like type-graphql, typeorm, NestJS Swagger, AutoMapper, and class-validator can introspect via `Object.values()`. - Cases where the runtime binding is genuinely missing still fall back to `Object` (stale ambient declarations, erased type imports, unresolved references), so existing behavior is preserved everywhere else. - See #14740 for the design rationale: matching SWC/Babel rather than tsc's primitive-type emit (which requires cross-file type information OXC doesn't have). - Conformance: 5 existing fixtures updated for the new emit shape, 6 new fixtures cover the bug paths and predicate boundaries; no `Output mismatch` regressions. ## Example Input: ```ts import { StringEnum } from './enums'; class Source { @dec value!: StringEnum; } ``` Before: ```js // design:type === Object — StringEnum is an enum object, typeof !== "function" babelHelpers.decorateMetadata("design:type", typeof (_ref = typeof StringEnum !== "undefined" && StringEnum) === "function" ? _ref : Object) ``` After: ```js // design:type === StringEnum (the enum object — introspectable via Object.values) babelHelpers.decorateMetadata("design:type", typeof StringEnum === "undefined" ? Object : StringEnum) ``` ## Note on the SWC enum-metadata debate [swc-project/swc#11033](https://github.com/swc-project/swc/issues/11033) argues SWC's emit is wrong for cross-file enums — the runtime returns the enum object (an `{...}`) rather than `Number` / `String` / `Object` as tsc would. This PR adopts the same emit shape SWC and Babel use, so it has the same property: cross-file enum metadata is the enum binding itself, not a primitive constructor. OXC chose this side of the debate deliberately in #14740 — returning the enum object is what type-graphql, typeorm, NestJS Swagger, AutoMapper, and class-validator depend on to introspect enum members. Matching tsc's primitive emit would require cross-file type information OXC doesn't have, and would unblock no real consumer. If TypeScript publishes a position on what non-type-checker transformers should emit, this can be revisited. AI disclosure: drafted with Claude Code, reviewed manually. |
||
|
|
ec7de07b08 |
chore(submodules): update submodule SHAs to latest commits (#22550)
Updates submodule dependencies to their latest commits. ## Changes - test262: `ccaac10` → `78fc3f8` - babel: `4079bcd` → `3d34928` - estree-conformance: `9c67f5e` → `576e7d8` This PR is automatically generated by the [update_submodules workflow](https://github.com/oxc-project/oxc/blob/main/.github/workflows/update_submodules.yml). Co-authored-by: oxc-guard[bot] <276638029+oxc-guard[bot]@users.noreply.github.com> |
||
|
|
e6090e7ccc |
fix(transformer): keep enum IIFE when a non-inlinable value reference remains (#22501)
Refs vitejs/vite#22452 (comment). The optimize pass dropped the enum declaration whenever the members were all evaluable — regardless of whether some non-inlinable value reference still named the enum at runtime. The result referenced a binding that no longer existed: ```ts const enum Phase { one = 'one' } export default Phase; // -> export default Phase; // ReferenceError at runtime enum Direction { Up } Direction.Up.toString(); // -> Direction.Up.toString(); // ReferenceError at runtime ``` ## Fix Decide based on the remaining resolved references: drop only when none of them is a value reference (`Read`/`Write`). Type references (`as E`, `: E`) are kept here and stripped later by `annotations.rs`, so they don't block removal. `typeof E` in JS expression position is `Read` and correctly keeps the IIFE; `typeof E` in TS type position is `ValueAsType` (not in `Value`) and doesn't. Unifies the rule for regular and const enums — the previous asymmetry (const always dropped, regular dropped only when no refs at all) had no principled basis. ## Compatibility Diverges from Babel on two `optimize-const-enums/*` fixtures where the input has a bare value reference to the enum that we can't inline. Three engines disagree on what to do: | Engine | Inline `E.X` member accesses | Preserve `E` binding (IIFE) | Result for `E.unknown` / bare `E` | |---|---|---|---| | Babel `transform-typescript` (optimize-const-enums) | yes | **no** | runtime ReferenceError / TypeError | | tsc `--isolatedModules` | no | yes | `undefined` / resolves | | oxc after this PR | yes | yes | `undefined` / resolves | We now hybridize: inline what's inlinable (Babel) **and** keep the binding (tsc). Local overrides under `tasks/transform_conformance/overrides/` record the new expected output for the two affected Babel fixtures. ### `optimize-const-enums/local` Input: ```ts const enum A { x, y } A.x; A["y"]; A.z; A; ``` Babel (and oxc before this PR): ```js 0; 1; A.z; A; ``` `A.z` is `TypeError: cannot read properties of undefined`; `A;` is `ReferenceError`. tsc (`--isolatedModules`): ```js var A; (function (A) { A[A["x"] = 0] = "x"; A[A["y"] = 1] = "y"; })(A || (A = {})); A.x; A["y"]; A.z; A; ``` Keeps the IIFE binding, no member-access inlining. `A.z` evaluates to `undefined`; `A;` is a no-op. oxc after this PR (`overrides/.../optimize-const-enums/local/output.mjs`): ```js var A = /* @__PURE__ */ function(A) { A[A["x"] = 0] = "x"; A[A["y"] = 1] = "y"; return A; }(A || {}); 0; 1; A.z; A; ``` Hybrid: inlines `A.x` / `A["y"]` like Babel, **and** keeps the IIFE binding like tsc — so `A.z` evaluates to `undefined` (not crash) and `A;` resolves. ### `optimize-const-enums/merged` Input: ```ts const enum A { x, y } const enum A { z } A.x; A["y"]; A.z; A.w; A; ``` Babel (and oxc before this PR): ```js 0; 1; 0; A.w; A; ``` `A.w` is `TypeError: cannot read properties of undefined`; `A;` is `ReferenceError`. tsc (`--isolatedModules`): ```js var A; (function (A) { A[A["x"] = 0] = "x"; A[A["y"] = 1] = "y"; })(A || (A = {})); (function (A) { A[A["z"] = 0] = "z"; })(A || (A = {})); A.x; A["y"]; A.z; A.w; A; ``` Both IIFEs emitted, no inlining. `A.w` is `undefined`; `A;` resolves. oxc after this PR (`overrides/.../optimize-const-enums/merged/output.mjs`): ```js var A = /* @__PURE__ */ function(A) { A[A["x"] = 0] = "x"; A[A["y"] = 1] = "y"; return A; }(A || {}); A = /* @__PURE__ */ function(A) { A[A["z"] = 0] = "z"; return A; }(A || {}); 0; 1; 0; A.w; A; ``` Hybrid: both enum bodies lower (the second reuses the first's binding via `A = (function(A) { … })(A || {})` — assignment, not `var`) **and** members are inlined like Babel. `A.w` evaluates to `undefined`; `A;` resolves. ## Verification New fixtures cover the bug shapes: - `babel-plugin-transform-typescript/const-enum-value-ref-kept/` — `export default Phase` - `babel-plugin-transform-typescript/const-enum-mixed-refs/` — member access + bare ref combined Existing `optimize-enums/type-cast` updated to drop the IIFE for the all-type-refs case (the regular-enum side of the unified rule). |
||
|
|
931b7d6b97 |
fix(transformer): inline const enum members through type-cast wrappers (#22500)
Closes #22444. `Phase.idle as Phase`, `Phase.idle satisfies Phase`, `Phase.idle!`, and `<Phase>Phase.idle` failed to inline under `optimizeConstEnums`. The const enum declaration was stripped while the member access was left as `Phase.idle`, producing a runtime `ReferenceError`. ## Cause The enum inliner's `enter_expression` matched only bare `StaticMemberExpression`/`ComputedMemberExpression`. `annotations.rs` strips TS-only wrappers in its own `enter_expression`, but `walk_expression` only calls `enter_expression` once per node — after the strip the inner `Phase.idle` was never revisited. ## Fix Peek through the wrappers via `Expression::get_inner_expression_mut()` (it already handles `TSAsExpression`, `TSSatisfiesExpression`, `TSNonNullExpression`, `TSTypeAssertion`, `TSInstantiationExpression`, `ParenthesizedExpression`). The outer `*expr = …` replacement then drops the wrapper along with the inlined value. ## Example ```ts const enum Phase { idle, active } class Foo { #foo = Phase.idle as Phase; } ``` Before: ```js class Foo { #foo = Phase.idle; // dangling reference } ``` After: ```js class Foo { #foo = 0; } ``` ## Verification New fixtures cover all wrapper shapes for const + regular enums: - `babel-plugin-transform-typescript/const-enum-type-cast/` - `babel-plugin-transform-typescript/optimize-enums/type-cast/` |
||
|
|
c73c159e16 |
fix(transformer/async-to-generator): reparent parameter initializer scopes (#22507)
Fixes a semantic mismatch in `async_to_generator` for async methods with parameter default initializers.
Before this change, the transform reused the original method scope as the inner generator scope and moved parameter bindings to the wrapper scope. Scopes created inside parameter defaults were left parented under the generator, even though the transformed AST places those defaults with the wrapper parameters.
For example:
```js
class C {
async method(value = function fallback() {}) {}
}
```
Conceptually this became:
```js
class C {
method(value = function fallback() {}) {
// `value` belongs to this wrapper scope.
return asyncToGenerator(function* () {
// Before: the scope for `fallback` was still parented here,
// because this generator reused the original async method scope.
})();
}
}
```
A fresh semantic rebuild from the transformed AST sees it differently:
```js
class C {
method(value = function fallback() {
// After rebuild: `fallback` is created from the parameter default,
// so its direct parent is the wrapper method scope.
}) {
return asyncToGenerator(function* () {
// The generator should only own body scopes.
})();
}
}
```
This updates `BindingMover` so that when parameter bindings move to the wrapper, direct scopes created inside parameter-side expressions are reparented there too. It still stops at function/class scope boundaries, so nested body scopes are not traversed or moved.
|
||
|
|
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--> |
||
|
|
ecfd3ca7c5 |
fix(transformer/async-to-generator): move only parameter bindings (#22503)
Previously, given:
```js
class C {
async method(x = function y() {}) {}
}
```
The async-to-generator transform generates:
```js
class C {
method(x = function y() {}) {
return babelHelpers.asyncToGenerator(function* () {})();
}
}
```
The method parameter stays on the outer wrapper method, while only the original body moves into the inner generator function.
Before this change, `BindingMover` walked the full parameter AST while moving those parameter bindings. That meant it also visited default initializer expressions, so bindings created inside the initializer, like `y` above, could be moved out of their own function/class scope and into the wrapper method scope.
After transform, rebuilt semantics would disagree with the transformed scope tree because the parameter binding was correct, but nested initializer bindings had the wrong owning scope.
This PR makes `BindingMover` only visit the binding positions for formal parameters, rest parameters, and the left side of assignment patterns. It skips initializer expressions so nested function/class bindings stay in the scopes created for those expressions.
|
||
|
|
3ce3431717 |
fix(transformer/explicit-resource-managment): preserve shadowed for-head block (#22451)
Given:
```
for (using x of y) { const x = z; }
```
Previously we would produce
```
var _usingCtx2 = require("@oxc-project/runtime/helpers/usingCtx");
for (const _x of y) try {
var _usingCtx = _usingCtx2();
const x = _usingCtx.u(_x);
const x = z;
} catch (_) {
_usingCtx.e = _;
} finally {
_usingCtx.d();
}
```
Now we produce
```
var _usingCtx2 = require("@oxc-project/runtime/helpers/usingCtx");
for (const _x of y) try {
var _usingCtx = _usingCtx2();
const x = _usingCtx.u(_x);
{
const x = z;
}
} catch (_) {
_usingCtx.e = _;
} finally {
_usingCtx.d();
}
```
Which avoids a syntax error - cannot create a duplicate var named `x`.
|
||
|
|
e68f4fa1c3 |
chore(submodules): update submodule SHAs to latest commits (#22417)
Updates submodule dependencies to their latest commits. ## Changes - test262: `d0c1b45` → `ccaac10` - babel: `6402dbb` → `4079bcd` - estree-conformance: `d968f2c` → `9c67f5e` This PR is automatically generated by the [update_submodules workflow](https://github.com/oxc-project/oxc/blob/main/.github/workflows/update_submodules.yml). |
||
|
|
dda33deea8 |
fix(transformer/explicit-resource-management): align lexical binding scopes (#22320)
Part of #9699 |
||
|
|
8e79de8f86 | fix(transformer): preserve for-await statement bodies (#22361) | ||
|
|
0cba210ba6 |
fix(transformer/class): replace new.target in static blocks (#22360)
|
||
|
|
d3d0b18fde |
fix(traverse): handle ChainElement::TSNonNullExpression in GatherNodeParts (#22247)
Fixes #22246, transformer panics with `const x = a[b?.c!]?.["d"];` under es2020 target. (I wasn't sure where to put the test, but I've confirmed that it works on my end for now.) |
||
|
|
4e880de872 |
fix(transformer/object-rest-spread): declare temp vars for computed keys (#22284)
Given some code like
```js
const {
[({ ...rest }) => {
let { ...b } = {};
}]: a,
[({ ...d } = {})]: c,
} = {};
export {}; // necessary so we are in strict mode
```
It would previously be transformed to:
```js
const { [(_ref) => {
let rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
let _ref2 = {}, b = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
}]: a, [(_ref3 = {}, {} = _ref3, d = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3)), _ref3)]: c } = {};
export {};
```
This is a problem because there was no declaration to `_ref3`
This causes runtime errors.
After this PR, we now emit:
This new code includes `var _ref3`, fixing the unresolved reference issue.
```js
var _ref3;
const {
[_ref => {
let rest = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref));
let _ref2 = {},
b = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref2), _ref2));
}]: a,
[(_ref3 = {}, {} = _ref3, d = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref3), _ref3)), _ref3)]: c
} = {};
```
This aligns with Babel.
----
This has been fixed by walking up to find the containing statement, and inserting the var declaration before it.
Previously, the `var` declaration would only be inserted if we were inside `ExpressionStatementExpression` which was not guaranteed.
|
||
|
|
5da9fda0d8 |
fix(transformer/explicit-resource-management): preserve class names (#22306)
Stacked on #22305. ## Why `class C { static getSelf() { return C } }` lowered by the explicit resource management transform was emitting `var C = class {}` (anonymous), so when the outer `C` is reassigned (`C = 123`), `getSelf()` returns the reassigned value instead of the original class — the exact behaviour the named class expression's inner binding is supposed to protect against. Babel emits `var C = class C {}` for the same input. ## Fix 1. **Emit `var C = class C {}`** for both `class C {}` and `export default class C {}`. Adds a `preserve_class_expression_name` helper that mirrors the swap in `decorator::legacy::transform_class_declaration_with_class_decorators` — generate a fresh `Class`-flagged symbol in the class scope for the inner class id, swap `class_decl.id.symbol_id` (via `Cell::replace`) to the new symbol, and repurpose the original symbol as the outer `var` (flags → `FunctionScopedVariable`). Returns the outer `BoundIdentifier` and the original span so the caller can emit the outer declarator with the correct span. 2. **Carry the original span through both sides of the swap.** The inner symbol is created with the original `id.span` (via `Scoping::create_symbol(span, ...)` + `add_binding`); the outer var's `BindingIdentifier` is emitted with the same span (via `BoundIdentifier::create_spanned_binding_pattern`, added in #22305). This eliminates the `Symbol span mismatch` diffs in: - `transform-top-level/hoisting/input.mjs` - `transform-top-level/hoisting-default-class/input.mjs` - `export-class-name/input.js` ## Comparison with Babel Babel reuses the *original `id` node* for the outer `var` and clones it for the inner class. This PR does the inverse — reuses the original *symbol id* for the outer `var` and generates a new symbol for the inner class. Given oxc's symbol-aware model, the inversion avoids rewiring every outer-scope reference (`const K = C`, `C = 123`, …): they already point at the original symbol. ## Remaining follow-up `export-class-name/input.js` still has `Symbol reference IDs mismatch` for `C` — references inside the class body (`return C`) still resolve to the outer symbol in the transformer's bookkeeping. A fresh semantic rebuild over the printed AST correctly resolves them to the inner class symbol, so tools that re-run semantic (rolldown / oxc_minifier on a fresh build) are fine. Tools that trust the transformer's symbol table directly (in-place minification / mangler) will see the stale binding. Rewiring those references is a separate follow-up (`Reference.symbol_id` update + `delete_resolved_reference` / `add_resolved_reference`). ## Conformance impact - Babel suite: **692 → 694 passing** (+2) - `transform-top-level/hoisting/input.mjs` ✓ - `transform-top-level/hoisting-default-class/input.mjs` ✓ - `export-class-name/input.js`: 4 span mismatches eliminated; reference-rewiring follow-up remains. ## Test plan - [x] `cargo run -p oxc_transform_conformance` - [x] `cargo run -p oxc_transform_conformance -- --exec` - [x] `cargo test -p oxc_transformer` |