Commit Graph

19904 Commits

Author SHA1 Message Date
Boshen 8d1358e12e ci(actions): use high-memory Linux test runner 2026-08-17 21:54:34 +08:00
Hamody We f6b22654d2 fix(linter/eslint/no-redeclare): run in ES modules, skipping only the globals check (#25691)
Closes #25339.

## The problem

`no-redeclare` gated the entire rule on the file not being an ES module:

```rust
fn should_run(&self, ctx: &ContextHost) -> bool {
    // ES modules run in their own scope, and don't conflict with existing globals
    !ctx.source_type().is_module()
}
```

The comment justifies the globals half of the rule, and it is right
about that: an ES module has its own top-level scope, so declaring
`Object` or `self` there shadows nothing, which is why ESLint reports
`builtinGlobals` redeclarations against the global scope rather than
inside a module. But the gate took the rest with it — plain `var a = 3;
var a = 10;`, redeclarations in nested scopes, and the TS type/value
collision check added for #10396 all stopped running too.

**One correction to the issue's framing, from testing it rather than
reading it.** `.ts` is parsed as `ModuleKind::Unambiguous`, which
resolves to `Module` only when ESM syntax is actually present. So a
`.ts` file with no `import`/`export` is a script, and the rule *did* run
there — `var a = 3; var a = 10;` on its own is reported today. What was
dead is every `.ts` file that contains an import or an export, which in
practice is nearly all of them. The effect the issue describes is real;
the boundary is ESM syntax, not the extension.

The rule's own tests hid this either way. Every failing case runs under
`.change_rule_path_extension(".cts")` — CommonJS, never a module — and
the single `.ts` block asserts a *pass*, which it would do whether or
not the rule executed.

## The change

Drop `should_run`, and narrow the exemption to the thing the comment
actually describes:

```rust
// ES modules run in their own scope, so a top-level `Object` or `self` shadows nothing.
// Only the globals half of the rule is skipped for them -- redeclaring a local binding is
// still a redeclaration.
let builtin_globals = if self.builtin_globals && !ctx.source_type().is_module() {
    Some(&GLOBALS_BUILTIN)
} else {
    None
};
```

`builtin_globals` is already the single switch for that half — it drives
`is_builtin`, which chooses between
`no_redeclare_as_builtin_in_diagnostic` and the plain redeclaration
diagnostic — so `None` in modules disables exactly the globals
reporting, for the builtin table and user-configured `globals` alike,
and leaves both redeclaration loops running.

## Tests

A new `.ts` block under the `es-modules` snapshot suffix. Every case
carries ESM syntax so it resolves as a module — otherwise it would test
the script path by accident, which is the trap above:

- **pass** — `export {}; var Object = 0;` and `export {}; var globalThis
= 0;` (a module shadows nothing, so these must stay quiet), plus a
redeclaration-free case and a TS overload pair.
- **fail** — `export {}; var a = 3; var a = 10;`; `export {}; function
f() { var a; var a; }` (nested scope — nothing to do with global scope
at all, and previously silent); the #10396 `type foo = 1; export
function foo(): void; …` case; and `export {}; var Object = 0; var
Object = 0;`.

That last one is the seam this change creates, so it is worth pinning:
inside a module the first `var Object` is no longer reported as
shadowing a builtin, but the second is still reported as a redeclaration
of the first. Without it, narrowing the gate could quietly have turned
builtin-named symbols into a blind spot.

The existing `.cts` blocks and their snapshot are untouched — `.cts` is
CommonJS, so `is_module()` was already false there.

## Verification

Ran locally with `cargo test -p oxc_linter --lib no_redeclare`: passes,
the existing `eslint_no_redeclare.snap` is unchanged, and the new
`eslint_no_redeclare@es-modules.snap` is included. `cargo clippy -p
oxc_linter --lib` is clean.

> AI disclosure, per the contributing policy: I used an AI assistant
while investigating and writing this. I have read and understand the
change, ran the tests myself, and stand behind it.

---------

Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-17 13:20:33 +00:00
camc314 ca9f5534a5 fix(linter/unicorn/prefer-default-parameters): mark fixer as a suggestion (#25801)
## Summary

- mark `unicorn/prefer-default-parameters` as suggestion-only
- prevent `--fix` from changing behavior for `null` and other falsy values

Closes #25799
2026-08-17 13:13:58 +00:00
ch3rry aa49d86046 fix(linter): allow spread rule options in config types (#25675)
## Summary

- represent variadic rule options as a severity followed by zero or more
option values
- regenerate the Oxlint configuration schema and TypeScript declarations
- add a type-level regression for mapped options spread into
`no-restricted-globals`

## Root cause

The schema wrapper materialized the first `additionalItems` entry as a
required tuple element and set `minItems` to 2. A dynamic TypeScript
spread has type `T[]` and may be empty, so it cannot satisfy that
required position even though the severity-only form is already valid
through `RuleNoConfig`.

Keeping severity as the only fixed tuple item and leaving the rule
options in `additionalItems` generates `[severity, ...options]`, which
accepts both an empty spread and populated spreads without changing
runtime rule behavior.

Closes #25666


## AI assistance

Implemented with assistance from OpenAI Codex. The contributor remains
responsible for reviewing, understanding, and submitting the change
under the repository AI usage policy.

---------

Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-17 14:11:07 +01:00
Boshen 2dacf7a9b6 perf(oxlint): reduce debug formatting code size (#25797)
Use compact `Display` formatting for React Compiler terminals and reuse `ConfigBuilderError`'s existing `Display` implementation for `Debug`.

This reduces the release `oxlint` binary from 12,773,552 to 12,740,432 bytes: **-33,120 bytes (-0.26%)**, with `__text` reduced by 24,452 bytes.

Validated with the affected crate tests, workspace checks, and oxlint snapshot tests.

AI assistance was used for implementation and measurement.
2026-08-17 13:04:51 +00:00
camc314 e60f50b7c8 ci(labeler): label React Compiler PRs (#25782)
## Summary

- automatically apply the A-react-compiler label to React Compiler changes
- cover the compiler crate, linter bridge, N-API binding, benchmark, and release workflow
2026-08-17 11:29:31 +00:00
Evyatar Daud d5483f829b fix(linter/typescript/no-useless-empty-export): skip TS declaration files (#25789)
Closes #25788 

Ports https://github.com/typescript-eslint/typescript-eslint/pull/7718

Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-17 11:28:36 +00:00
camc314 57f2199017 fix(linter/typescript/no-useless-empty-export): report after imports (#25786)
## Summary:
- consider static requested modules when deciding whether an empty export is redundant
- add regression coverage for default, side-effect, and namespace imports
- verify autofixes remove the empty export

Closes #25785.
2026-08-17 11:16:43 +00:00
camc314 633bc19c0f fix(linter/typescript/no-unnecessary-type-conversion): mark fixer as suggestion (#25787)
## Summary

- classify typescript/no-unnecessary-type-conversion as suggestion-only
- prevent its runtime-changing removal from being advertised as a normal autofix
- keep TSGolint RuleSuggestion edits available through suggestion handling

Related to #25549.
2026-08-17 11:04:32 +00:00
camc314 6d8b3e2b62 ci(labeler): label ECMAScript PRs (#25783)
## Summary

- automatically apply the A-ecmascript label to changes in crates/oxc_ecmascript
- add the corresponding repository area label
2026-08-17 10:36:09 +00:00
camc314 dea3339abf fix(linter/typescript/explicit-module-boundary-types): anchor diagnostics on arrows (#25779)
## Summary

- anchor exported arrow return-type diagnostics on the arrow token, matching typescript-eslint
- preserve existing property and nested-function diagnostic anchors
- add focused multiline and disable-directive regression coverage

Closes #25627.
2026-08-17 10:17:00 +00:00
camc314 5cd6f028cd fix(linter/eslint/array-callback-return): anchor diagnostic on callback (#25780)
## Summary

- anchor switch/if missing-return diagnostics on the array callback function head, matching ESLint
- preserve the inner control-flow statement as a secondary diagnostic label
- add regression coverage for diagnostic location and eslint-disable-next-line behavior

Fixes #25632
2026-08-17 10:11:04 +00:00
camc314 53f9295ac5 fix(isolated-declarations): preserve undefined for defaulted any (#25292)
## Summary

- emit `any | undefined` for default-initialized `any` parameters followed by required parameters
- add a regression fixture for #25290 and update the existing parameter snapshot
- preserve the existing handling of `unknown`

Closes #25290
2026-08-17 09:43:42 +00:00
Boshen 9ed10b728d perf(linter): use unstable sorts for unique keys (#25778)
Switches order-independent sorts to unstable sorting and avoids cloning rule-table plugin names.

Reduces the stripped `oxlint` release binary from 12,773,568 to 12,757,040 bytes: 16,528 bytes (0.13%).

Validated with `cargo test -p oxc_linter` and focused oxlint JSON checks.

AI assistance was used for analysis and implementation.
2026-08-17 09:34:39 +00:00
Dunqing 8ab883afaa fix(codegen): preserve property key annotations (#25766)
`@__KEY__` and `#__KEY__` are currently treated as normal comments. Codegen can drop them before a later property-mangling pass. The property may then be renamed while the annotated string keeps its old name.

This classifies the marker as a property-key annotation. Codegen keeps it next to string and no-substitution template literals when annotation comments are enabled, and the property mangler reads that classification instead of scanning source text. Final output still follows the normal comment options, so whitespace-minified or annotation-disabled output removes the marker.

## Example

Input:

```js
const object = { _field: 1 };
const key = /* #__KEY__ */ "_field";
object[key];
```

Before, an intermediate codegen pass could remove the marker:

```js
const object = { _field: 1 };
const key = "_field";
object[key];
```

After, the marker survives for the later property-mangling pass.

Verified with the affected crate suites, `just minsize`, workspace lint, docs, AST generation, and independent review. `just ready` is only blocked locally by existing Node-version and terminal-color snapshot differences.

Implemented with AI assistance (OpenAI Codex). I reviewed and understand the changes and remain responsible for this contribution under the repository AI usage policy.
2026-08-17 09:23:04 +00:00
Boshen 28c0493682 fix(react-compiler): support typed assignment targets (#25758)
Support TypeScript-wrapped assignment targets in context analysis and
HIR lowering.

AI-assisted; reviewed and validated by the contributor.
2026-08-17 17:22:29 +08:00
Boshen c41d2a569e fix(react-compiler): support bigint object keys (#25749)
BigInt object keys fell through generic unsupported-key handling. Lower
them through the exact parser-provided decimal string, preserving
alternate bases and values beyond Number precision.

Validated with `just ready`.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-17 17:22:28 +08:00
Boshen fd3980e91b fix(react-compiler): support escaped tagged templates (#25748)
React Compiler HIR already preserves both raw and cooked tagged-template
values, but lowering rejected templates whenever they differed. Remove
the stale bailout and cover escaped and invalid escape sequences.

Validated with `just ready`.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-17 17:22:28 +08:00
Boshen 885c78bb8c fix(react-compiler): validate block nesting (#25745)
Port `assertValidBlockNesting` to reject partially overlapping
program-block and reactive-scope ranges before and after scope-terminal
rewriting. Reuse the traversal when constructing scope terminals.

Validated with `just ready`.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-17 17:22:27 +08:00
Boshen a469a928d5 fix(react-compiler): cover incompatible aliasing signatures (#25744)
`known_incompatible` is already checked before both aliasing and legacy
signature handling, making the legacy-path TODO stale. Add
aliasing-signature coverage to guard the shared behavior.

Validated with `just ready`.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-17 17:22:27 +08:00
camc314 ef8cebfb74 fix(linter/eslint/preserve-caught-error): handle AggregateError options (#25775)
## Summary

- inspect the third argument for built-in `AggregateError` options
- preserve the existing second-argument behavior for `Error` and `TypeError`
- add focused valid-cause and wrong-cause regression coverage

Fixes #25761
2026-08-17 09:11:06 +00:00
camc314 a8248650dc fix(deps): add esbuild@0.28.2 to pnpm allowBuilds (#25771)
should fix https://github.com/oxc-project/oxc/actions/runs/32011123887/job/95330696493
2026-08-17 08:45:25 +00:00
renovate[bot] efebf4c824 chore(deps): update npm packages (#25753)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
| [@napi-rs/wasm-runtime](https://napi.rs/)
([source](https://redirect.github.com/napi-rs/napi-rs/tree/HEAD/wasm-runtime))
| [`1.2.2` →
`1.2.3`](https://renovatebot.com/diffs/npm/@napi-rs%2fwasm-runtime/1.2.2/1.2.3)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fwasm-runtime/1.2.3?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fwasm-runtime/1.2.3?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fwasm-runtime/1.2.2/1.2.3?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fwasm-runtime/1.2.2/1.2.3?slim=true)
|
|
[@typescript-eslint/parser](https://typescript-eslint.io/packages/parser)
([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser))
| [`8.66.0` →
`8.67.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.66.0/8.67.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fparser/8.67.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2fparser/8.67.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2fparser/8.66.0/8.67.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fparser/8.66.0/8.67.0?slim=true)
|
|
[@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.66.0` →
`8.67.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fscope-manager/8.66.0/8.67.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fscope-manager/8.67.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2fscope-manager/8.67.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2fscope-manager/8.66.0/8.67.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fscope-manager/8.66.0/8.67.0?slim=true)
|
| [@typescript-eslint/visitor-keys](https://typescript-eslint.io)
([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/visitor-keys))
| [`8.66.0` →
`8.67.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fvisitor-keys/8.66.0/8.67.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fvisitor-keys/8.67.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2fvisitor-keys/8.67.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2fvisitor-keys/8.66.0/8.67.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fvisitor-keys/8.66.0/8.67.0?slim=true)
|
| [degit](https://redirect.github.com/Rich-Harris/degit) | [`3.6.6` →
`3.7.0`](https://renovatebot.com/diffs/npm/degit/3.6.6/3.7.0) |
![age](https://developer.mend.io/api/mc/badges/age/npm/degit/3.7.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/degit/3.7.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/degit/3.6.6/3.7.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/degit/3.6.6/3.7.0?slim=true)
|
| [eslint](https://eslint.org)
([source](https://redirect.github.com/eslint/eslint)) | [`10.8.0` →
`10.8.1`](https://renovatebot.com/diffs/npm/eslint/10.8.0/10.8.1) |
![age](https://developer.mend.io/api/mc/badges/age/npm/eslint/10.8.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint/10.8.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint/10.8.0/10.8.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint/10.8.0/10.8.1?slim=true)
|
|
[serialize-javascript](https://redirect.github.com/yahoo/serialize-javascript)
| [`7.0.7` →
`7.1.0`](https://renovatebot.com/diffs/npm/serialize-javascript/7.0.7/7.1.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/serialize-javascript/7.1.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/serialize-javascript/7.1.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/serialize-javascript/7.0.7/7.1.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/serialize-javascript/7.0.7/7.1.0?slim=true)
|
| [svelte](https://svelte.dev)
([source](https://redirect.github.com/sveltejs/svelte/tree/HEAD/packages/svelte))
| [`5.56.8` →
`5.56.9`](https://renovatebot.com/diffs/npm/svelte/5.56.8/5.56.9) |
![age](https://developer.mend.io/api/mc/badges/age/npm/svelte/5.56.9?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/svelte/5.56.9?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/svelte/5.56.8/5.56.9?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/svelte/5.56.8/5.56.9?slim=true)
|
| [tsx](https://tsx.hirok.io)
([source](https://redirect.github.com/privatenumber/tsx)) | [`4.23.9` →
`4.23.12`](https://renovatebot.com/diffs/npm/tsx/4.23.9/4.23.12) |
![age](https://developer.mend.io/api/mc/badges/age/npm/tsx/4.23.12?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tsx/4.23.12?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tsx/4.23.9/4.23.12?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tsx/4.23.9/4.23.12?slim=true)
|

---

### Release Notes

<details>
<summary>napi-rs/napi-rs (@&#8203;napi-rs/wasm-runtime)</summary>

###
[`v1.2.3`](https://redirect.github.com/napi-rs/napi-rs/blob/HEAD/wasm-runtime/CHANGELOG.md#123-2026-08-12)

[Compare
Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/wasm-runtime@1.2.2...@napi-rs/wasm-runtime@1.2.3)

##### Bug Fixes

- **cli:** compatible with emnapi v1 & v2
([#&#8203;3454](https://redirect.github.com/napi-rs/napi-rs/issues/3454))
([aeba312](https://redirect.github.com/napi-rs/napi-rs/commit/aeba31217201e96435848fd17055478ff7cf8b98))
- **deps:** update emnapi to v2.0.0-alpha.4
([#&#8203;3451](https://redirect.github.com/napi-rs/napi-rs/issues/3451))
([b8ba732](https://redirect.github.com/napi-rs/napi-rs/commit/b8ba732c4611a54dde09dfe3da750f50726b51d9))

</details>

<details>
<summary>typescript-eslint/typescript-eslint
(@&#8203;typescript-eslint/parser)</summary>

###
[`v8.67.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8670-2026-08-10)

[Compare
Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.66.0...v8.67.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.67.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
(@&#8203;typescript-eslint/scope-manager)</summary>

###
[`v8.67.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/scope-manager/CHANGELOG.md#8670-2026-08-10)

[Compare
Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.66.0...v8.67.0)

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.67.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
(@&#8203;typescript-eslint/visitor-keys)</summary>

###
[`v8.67.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/visitor-keys/CHANGELOG.md#8670-2026-08-10)

[Compare
Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.66.0...v8.67.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.67.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>Rich-Harris/degit (degit)</summary>

###
[`v3.7.0`](https://redirect.github.com/Rich-Harris/degit/compare/v3.6.6...v3.7.0)

[Compare
Source](https://redirect.github.com/Rich-Harris/degit/compare/v3.6.6...v3.7.0)

</details>

<details>
<summary>eslint/eslint (eslint)</summary>

###
[`v10.8.1`](https://redirect.github.com/eslint/eslint/releases/tag/v10.8.1)

[Compare
Source](https://redirect.github.com/eslint/eslint/compare/v10.8.0...v10.8.1)

#### Bug Fixes

-
[`18eb0a7`](https://redirect.github.com/eslint/eslint/commit/18eb0a7e787b9fac3049ef3dad0e845d2bd940a4)
fix: prevent ASI hazard in `no-unused-labels` autofix
([#&#8203;21173](https://redirect.github.com/eslint/eslint/issues/21173))
(dongkyu lee)
-
[`151ba3f`](https://redirect.github.com/eslint/eslint/commit/151ba3f5834a0909e8b9b1736f4889ac694c0104)
fix: false positives in `getter-return` and `accessor-pairs`
([#&#8203;21163](https://redirect.github.com/eslint/eslint/issues/21163))
(Grit)
-
[`6898df9`](https://redirect.github.com/eslint/eslint/commit/6898df9364639ee64b9448a4cb6b08a30c16bd37)
fix: ignore meta-property names in `id-denylist`
([#&#8203;21166](https://redirect.github.com/eslint/eslint/issues/21166))
(Pixel)
-
[`4d7db66`](https://redirect.github.com/eslint/eslint/commit/4d7db6628e2badf0857cb88734fe641c3874bce9)
fix: ignore meta-property names in `id-match`
([#&#8203;21167](https://redirect.github.com/eslint/eslint/issues/21167))
(Pixel)
-
[`677214e`](https://redirect.github.com/eslint/eslint/commit/677214e7eea83d8bc6e4b79eea871577e1369d5f)
fix: handle ASI hazards in no-unused-vars removeVar suggestion
([#&#8203;20935](https://redirect.github.com/eslint/eslint/issues/20935))
(kuldeep kumar)

#### Documentation

-
[`7d0cbf8`](https://redirect.github.com/eslint/eslint/commit/7d0cbf81cfdb7526b5c4cb7b222ddc7f257db560)
docs: Update README (GitHub Actions Bot)
-
[`0a05812`](https://redirect.github.com/eslint/eslint/commit/0a05812adb12598b32e85297b98df5ad14501d60)
docs: add missing backticks to `no-duplicate-imports.js`
([#&#8203;21183](https://redirect.github.com/eslint/eslint/issues/21183))
(Lee Daeun)
-
[`678c90b`](https://redirect.github.com/eslint/eslint/commit/678c90b55da2889d4400cbf6e2584ab683faf202)
docs: Update README (GitHub Actions Bot)
-
[`8a10424`](https://redirect.github.com/eslint/eslint/commit/8a104242e8e1c5614940fab7324346974cff7d26)
docs: Update README (GitHub Actions Bot)
-
[`69bb948`](https://redirect.github.com/eslint/eslint/commit/69bb948061105426dbe6e3c931fcda783286e020)
docs: Update README (GitHub Actions Bot)

#### Chores

-
[`0a14800`](https://redirect.github.com/eslint/eslint/commit/0a148005051fded2ef1d14cc228ae505251b4b10)
chore: update github/codeql-action action to v4.37.4
([#&#8203;21196](https://redirect.github.com/eslint/eslint/issues/21196))
(renovate\[bot])
-
[`05adcb1`](https://redirect.github.com/eslint/eslint/commit/05adcb13542061dc7fadde5cd58d23d405a96d93)
test: fix failing ecosystem test for `eslint-plugin-unicorn`
([#&#8203;21191](https://redirect.github.com/eslint/eslint/issues/21191))
(Lazizbek Ergashev)
-
[`5611035`](https://redirect.github.com/eslint/eslint/commit/56110356652dd614b3cf0933538abb551fc6bd6f)
test: add error locations info to `no-void`
([#&#8203;21185](https://redirect.github.com/eslint/eslint/issues/21185))
(Lee Daeun)
-
[`ee47333`](https://redirect.github.com/eslint/eslint/commit/ee47333aa681cfc3cb54df08c38f211ea219cc2a)
ci: bump github/codeql-action from 4 to 4.37.3
([#&#8203;21176](https://redirect.github.com/eslint/eslint/issues/21176))
(dependabot\[bot])
-
[`f131c03`](https://redirect.github.com/eslint/eslint/commit/f131c034ad91bbf06bcbb6b5e931447a8e419a46)
chore: improve ecosystem test failure reporting
([#&#8203;20937](https://redirect.github.com/eslint/eslint/issues/20937))
(crimsonjay0)
-
[`1f6edde`](https://redirect.github.com/eslint/eslint/commit/1f6eddee609b369b50993eab08d437dda4700991)
chore: update ecosystem plugins
([#&#8203;21182](https://redirect.github.com/eslint/eslint/issues/21182))
(ESLint Bot)
-
[`d3266fb`](https://redirect.github.com/eslint/eslint/commit/d3266fb26c719c6b90a6cbe54bb120c9335ad19c)
chore: unpin `webpack` dependency
([#&#8203;21172](https://redirect.github.com/eslint/eslint/issues/21172))
(Francesco Trotta)
-
[`65a6519`](https://redirect.github.com/eslint/eslint/commit/65a6519cc8733b4688558a8611397cf9d01dd55d)
chore: add allowScripts field to package.json
([#&#8203;21092](https://redirect.github.com/eslint/eslint/issues/21092))
(GiHoon Noh)
-
[`22e5256`](https://redirect.github.com/eslint/eslint/commit/22e52568536e0009d4493dc888736bc163220c4b)
ci: add `triage:no` label to Dependabot PRs
([#&#8203;21141](https://redirect.github.com/eslint/eslint/issues/21141))
(lumir)
-
[`55c9038`](https://redirect.github.com/eslint/eslint/commit/55c9038836c91b6bd5617f0c97bea2274c9cc0bf)
ci: bump actions/labeler from 6 to 7
([#&#8203;21159](https://redirect.github.com/eslint/eslint/issues/21159))
(dependabot\[bot])
-
[`7280e78`](https://redirect.github.com/eslint/eslint/commit/7280e78183d4711a49916b6a49ba5efaa651a991)
chore: update dependency prettier to v3.9.6
([#&#8203;21162](https://redirect.github.com/eslint/eslint/issues/21162))
(renovate\[bot])
-
[`eddbad6`](https://redirect.github.com/eslint/eslint/commit/eddbad60158d8cda86830fbe934a9d2282273b32)
test: fix failing ecosystem test for `eslint-plugin-unicorn`
([#&#8203;21156](https://redirect.github.com/eslint/eslint/issues/21156))
(Francesco Trotta)
-
[`60a178d`](https://redirect.github.com/eslint/eslint/commit/60a178d5ef1b0c471be0831031ed7347f8f81dc2)
chore: update ecosystem plugins
([#&#8203;21150](https://redirect.github.com/eslint/eslint/issues/21150))
(ESLint Bot)
-
[`f9f61dc`](https://redirect.github.com/eslint/eslint/commit/f9f61dc6112836f46a58a410c38b8c2faf10973f)
test: add error locations to `no-unreachable`
([#&#8203;21151](https://redirect.github.com/eslint/eslint/issues/21151))
(JIYEON)
-
[`d086293`](https://redirect.github.com/eslint/eslint/commit/d08629382b0a6aaa042823b796e5100e60053b54)
test: add error locations to `no-undef`
([#&#8203;21147](https://redirect.github.com/eslint/eslint/issues/21147))
(JIYEON)
-
[`cc01b67`](https://redirect.github.com/eslint/eslint/commit/cc01b67061bbf558aa25746883ea1cad847f7cf2)
test: add error locations to `no-useless-catch`
([#&#8203;21144](https://redirect.github.com/eslint/eslint/issues/21144))
(devoil)
-
[`688e75e`](https://redirect.github.com/eslint/eslint/commit/688e75ede01b295d51f2f86c9d82da020a4c887e)
chore: add missing backticks in JSDoc
([#&#8203;21143](https://redirect.github.com/eslint/eslint/issues/21143))
(Bo Hyun Kim)
-
[`7c1e175`](https://redirect.github.com/eslint/eslint/commit/7c1e17543ad396f50f65b003cf9142d43d3c63b0)
test: add error locations to `require-await`
([#&#8203;21145](https://redirect.github.com/eslint/eslint/issues/21145))
(Grit)
-
[`588a26d`](https://redirect.github.com/eslint/eslint/commit/588a26ddce3c5a20f5b3f3d51ba1353cce7b4b0c)
test: add error locations to `no-extra-label`
([#&#8203;21139](https://redirect.github.com/eslint/eslint/issues/21139))
(dongkyu lee)
-
[`059aa89`](https://redirect.github.com/eslint/eslint/commit/059aa895743639e3ab53d14f9d944ff4be042233)
test: add error locations to `no-useless-concat`
([#&#8203;21140](https://redirect.github.com/eslint/eslint/issues/21140))
(dongkyu lee)
-
[`5a452a8`](https://redirect.github.com/eslint/eslint/commit/5a452a8ba53917d65c9d83c3959ed35c2f890613)
test: add error locations to `no-const-assign`
([#&#8203;21138](https://redirect.github.com/eslint/eslint/issues/21138))
(dongkyu lee)

</details>

<details>
<summary>yahoo/serialize-javascript (serialize-javascript)</summary>

###
[`v7.1.0`](https://redirect.github.com/yahoo/serialize-javascript/releases/tag/v7.1.0)

[Compare
Source](https://redirect.github.com/yahoo/serialize-javascript/compare/v7.0.7...v7.1.0)

#### What's Changed

- feat: add Node.js 26 to test matrix by
[@&#8203;okuryu](https://redirect.github.com/okuryu) in
[#&#8203;224](https://redirect.github.com/yahoo/serialize-javascript/pull/224)
- release: v7.1.0 by
[@&#8203;okuryu](https://redirect.github.com/okuryu) in
[#&#8203;225](https://redirect.github.com/yahoo/serialize-javascript/pull/225)

**Full Changelog**:
<https://github.com/yahoo/serialize-javascript/compare/v7.0.7...v7.1.0>

</details>

<details>
<summary>sveltejs/svelte (svelte)</summary>

###
[`v5.56.9`](https://redirect.github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#5569)

[Compare
Source](https://redirect.github.com/sveltejs/svelte/compare/svelte@5.56.8...svelte@5.56.9)

##### Patch Changes

- fix: skip controlled each fast path while another batch is pending
([#&#8203;18625](https://redirect.github.com/sveltejs/svelte/pull/18625))

- fix: better whitespace handling inside printer
([#&#8203;18638](https://redirect.github.com/sveltejs/svelte/pull/18638))

- fix: don't duplicate comments in attributes
([#&#8203;18636](https://redirect.github.com/sveltejs/svelte/pull/18636))

- fix: preserve CSS comments in the AST printer
([#&#8203;18637](https://redirect.github.com/sveltejs/svelte/pull/18637))

</details>

<details>
<summary>privatenumber/tsx (tsx)</summary>

###
[`v4.23.12`](https://redirect.github.com/privatenumber/tsx/releases/tag/v4.23.12)

[Compare
Source](https://redirect.github.com/privatenumber/tsx/compare/v4.23.11...v4.23.12)

##### Bug Fixes

- shim `import.meta` when tokens are split by comments or newlines
([#&#8203;829](https://redirect.github.com/privatenumber/tsx/issues/829))
([ed9d330](https://redirect.github.com/privatenumber/tsx/commit/ed9d33046a135de13a35fdfce12368b79d1b1518)),
closes
[#&#8203;828](https://redirect.github.com/privatenumber/tsx/issues/828)

***

This release is also available on:

- [npm package (@&#8203;latest
dist-tag)](https://www.npmjs.com/package/tsx/v/4.23.12)

###
[`v4.23.11`](https://redirect.github.com/privatenumber/tsx/compare/v4.23.10...bd3bc6448e957c1172eb91a0584ec7fec2d6a7ad)

[Compare
Source](https://redirect.github.com/privatenumber/tsx/compare/v4.23.10...v4.23.11)

###
[`v4.23.10`](https://redirect.github.com/privatenumber/tsx/releases/tag/v4.23.10)

[Compare
Source](https://redirect.github.com/privatenumber/tsx/compare/v4.23.9...v4.23.10)

##### Bug Fixes

- support nyc coverage discovery
([#&#8203;710](https://redirect.github.com/privatenumber/tsx/issues/710))
([ec1bcd5](https://redirect.github.com/privatenumber/tsx/commit/ec1bcd5f711e5159b67cb0aea211f06cf2cfce8a))

***

This release is also available on:

- [npm package (@&#8203;latest
dist-tag)](https://www.npmjs.com/package/tsx/v/4.23.10)

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-17 08:35:47 +00:00
Ulrich Stark c1f7d7d1c2 refactor(parser): remove dead match options in get_modifier (#25725)
`cur_kind` can never be `Kind::Get` or `Kind::Set` because then the
`ModifierKind::try_from(cur_kind).ok()?` line above would have returned
earlier.
2026-08-17 09:33:10 +01:00
renovate[bot] 9c6f1912b5 chore(deps): update rust crates (#25756)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [futures](https://rust-lang.github.io/futures-rs)
([source](https://redirect.github.com/rust-lang/futures-rs)) |
workspace.dependencies | patch | `0.3.33` → `0.3.34` |
| [handlebars](https://redirect.github.com/sunng87/handlebars-rust) |
workspace.dependencies | patch | `6.4.3` → `6.4.4` |
|
[javascript-globals](https://redirect.github.com/oxc-project/javascript-globals)
| workspace.dependencies | patch | `1.5.1` → `1.5.2` |

---

### Release Notes

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

###
[`v0.3.34`](https://redirect.github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#0334---2026-08-11)

[Compare
Source](https://redirect.github.com/rust-lang/futures-rs/compare/0.3.33...0.3.34)

- Preserve cloned waker identity.
([#&#8203;3032](https://redirect.github.com/rust-lang/futures-rs/issues/3032))
- Updato `syn` to 3.
([#&#8203;3028](https://redirect.github.com/rust-lang/futures-rs/issues/3028))

</details>

<details>
<summary>sunng87/handlebars-rust (handlebars)</summary>

###
[`v6.4.4`](https://redirect.github.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#644---2026-08-12)

[Compare
Source](https://redirect.github.com/sunng87/handlebars-rust/compare/v6.4.3...v6.4.4)

- \[Changed] We have to revert `preserve_json_order` as a default
feature. Users
  who need this can still enable it for handlebars-rust, or enable
  `preserve_order` for you serde\_json.

</details>

<details>
<summary>oxc-project/javascript-globals (javascript-globals)</summary>

###
[`v1.5.2`](https://redirect.github.com/oxc-project/javascript-globals/blob/HEAD/CHANGELOG.md#152---2026-08-13)

[Compare
Source](https://redirect.github.com/oxc-project/javascript-globals/compare/javascript-globals-v1.5.1...javascript-globals-v1.5.2)

##### Other

- Auto update globals from upstream
([#&#8203;268](https://redirect.github.com/oxc-project/javascript-globals/pull/268))
- Auto update globals from upstream
([#&#8203;265](https://redirect.github.com/oxc-project/javascript-globals/pull/265))
- Auto update globals from upstream
([#&#8203;261](https://redirect.github.com/oxc-project/javascript-globals/pull/261))
- *(deps)* update rust crate serde\_json to v1.0.151
([#&#8203;259](https://redirect.github.com/oxc-project/javascript-globals/pull/259))
- *(deps)* update rust crate serde to v1.0.229
([#&#8203;256](https://redirect.github.com/oxc-project/javascript-globals/pull/256))
- update sponsor section
- *(deps)* update rust crate rustc-hash to v2.1.3
([#&#8203;247](https://redirect.github.com/oxc-project/javascript-globals/pull/247))
- standardize rustfmt config
- normalize README sponsor section
- add crates environment to release workflow

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cameron <cameron.clark@hey.com>
2026-08-17 08:30:18 +00:00
Dunqing 2f5cdb1231 feat(minifier): add property name mangling (#24740)
Oxc can shorten variable names and private class names, but it cannot shorten property names such as `obj._field`. This change adds optional property mangling. It replaces #23772 and gives bundlers a way to use the same property names across several files.

### Feature

- `include` selects names to mangle. `exclude` and `reserved` keep names unchanged.
- The cache can give a property a fixed output name or keep it unchanged.
- The mangler supports member access, object and class keys, destructuring, optional chains, the left side of `in`, and JSX property names.
- `mangle_quoted` also handles strings and template literals used directly as property keys. `/* @__KEY__ */` and `/* #__KEY__ */` can mark one other string or template literal as a property key.
- Short names are assigned in a stable order. More common properties get shorter names. Existing and reserved names are avoided.
- Bundlers can collect names from several programs, create one shared map, and apply it to every program.
- Numeric keys, `__proto__`, `constructor`, `prototype`, TypeScript-only keys, and private names are never changed by this pass.

### Design

Property names are part of JavaScript syntax, not local scope. For this reason, the code lives in `oxc_minifier`. It only reuses the short-name generator from `oxc_mangler`.

For one program, the order is:

```text
collect names → assign names → rewrite once → compress → mangle variables and private names
```

Property names are rewritten before compression because compression can remove information about quotes and comments.

For several programs, a bundler collects names from each program, merges the results, assigns one shared map, and rewrites each program once. Collection can run in parallel. All programs must use the same options.

The shared map keeps property names consistent inside one build. The cache has a different job: it keeps fixed names and reservations across separate minify calls.

### Example

With `include: "^_"` and `mangle_quoted: true`:

```js
obj[`_field`] = 1;
obj._field = 2;
```

becomes:

```js
obj[`e`] = 1;
obj.e = 2;
```

### Limitation

- Property mangling is unsafe when other code still uses the old property name. Public APIs and names shared with external code, host APIs, imported namespace objects, or separate builds must be excluded or reserved.
- Quote handling is per use. Without `mangle_quoted`, `obj._field` may change while `obj["_field"]` does not.
- The mangler cannot find names built at runtime or stored in arbitrary strings. Code that uses `eval`, `Function`, or `with` must reserve any affected names.
- Compression may create a matching property after this pass has finished. For example, `'f' + 'oo_'` may later become `foo_` and will not be mangled.
- TypeScript enum reverse mappings are not supported because the transform creates quoted strings.
- Multi-program support is a caller API. The caller must collect every program that shares mangled properties before assigning names.

The public `oxc-minify` API is stacked in #24741. The downstream multi-chunk integration is shown in rolldown/rolldown#10374.

Supersedes #23772.

AI assistance: OpenAI Codex and Claude were used for research, implementation, review, and testing. The contributor is responsible for reviewing and understanding the changes before submission.
2026-08-17 07:50:51 +00:00
Boshen 794891d93a perf(lsp): deduplicate server future (#25767)
Type-erase the shared LSP server future so CLI and NAPI reuse one async state machine. This removes duplicate LSP machinery and reduced the measured release binary by about 1.3 MiB.

AI assistance was used to implement this change.
2026-08-17 07:38:12 +00:00
Boshen 9019d26c3f refactor(linter): de-monomorphize rule config parsing (#25765)
Share non-generic array/null/error normalization for `DefaultRuleConfig` and route all 279 call sites through the direct `Value` path. This reduced the local release binary by 66,784 bytes.

Validated with `just ready`.

Prepared with AI assistance.
2026-08-17 06:49:59 +00:00
Dunqing b13fd48471 fix(minifier): model uninitialized module vars as undefined (#25497)
An uninitialized module-level `var` is `undefined` until it is assigned. After Rolldown removed an unreachable setter, Oxc did not keep this fact, so a dead optional call could remain in the output.

This PR records safe uninitialized module `var` bindings as known `undefined`. Existing minifier passes can then remove optional chains and simplify other reads.

The optimization is limited to module scope. It is disabled for resolved writes, redeclarations, and direct `eval`. Script globals and function-local variables are not changed.

Direct aliases keep the same known value without replacing every read with `void 0`. This avoids larger output and lets the existing alias cleanup work normally.

Generic optimizer tests now use function parameters when they need an unknown value. Focused tests cover the new behavior for uninitialized module variables.

## Example

Input:

```js
var slot

function make(value) {
  slot?.(value)
  return value
}

console.log(make(1))
```

Before:

```js
var slot;
function make(value) {
  slot?.(value);
  return value;
}
console.log(make(1));
```

After:

```js
function make(value) {
  return value;
}
console.log(make(1));
```

Verified with the full `oxc_minifier` test suite (649 passed, 34 ignored), Clippy, formatting, minsize, and allocation checks. Minsize and allocation snapshots are unchanged.

Fixes rolldown/rolldown#10659

AI-assisted by OpenAI Codex.
2026-08-17 06:24:04 +00:00
Boshen 63ff8ef0a1 perf(linter): outline diagnostic construction (#25762)
Diagnostic reporting is a cold path, but `LintContext::diagnostic` was explicitly inlined into hundreds of rule bodies. This also duplicated `Message::new`, its primary-label search, and generic diagnostic builders.

Mark these paths `#[cold]` and `#[inline(never)]` so call sites share a few outlined implementations instead of embedding the construction code.

This reduces the stripped aarch64 macOS `oxlint` binary by 224.9 KiB (1.66%; `__text` by 224.3 KiB).

Validated with `just ready` and a release fat-LTO size comparison.

AI assistance: Codex was used to implement and validate this change.
2026-08-17 05:17:33 +00:00
Kotaro Chikuba f6000ac141 fix(ecmascript): fold ** with Number::exponentiate, not IEEE pow (#25644)
`f64::powf` implements IEEE 754 `pow`, which returns `1` for a base of
`1` whatever the exponent.
[`Number::exponentiate`](https://tc39.es/ecma262/#sec-numeric-types-number-exponentiate)
instead returns `NaN` when the exponent is `NaN` (step 1), and when the
base has magnitude `1` and the exponent is infinite (steps 9-10).

Constant folding called `powf` directly, so:

```js
1 ** Infinity      // spec: NaN    oxc folded to: 1
(-1) ** Infinity   // spec: NaN    oxc folded to: 1
1 ** -Infinity     // spec: NaN    oxc folded to: 1
1 ** NaN           // spec: NaN    oxc folded to: 1
```

`1` is truthy and `NaN` is not, so an `if` guarded by such an expression
takes the wrong branch.

The one case the two agree on — an exponent of `0` returning `1`
whatever the base, including `NaN ** 0` and `Infinity ** 0` — is
unchanged, since `powf` already gets it right and the spec checks the
exponent before the base.

`cargo minsize` shows no snapshot change.

Found by the minifier fuzzer (#25594).

---

Written with AI assistance (Claude Code). Reviewed by me, and every
expected value in the added test was checked against Node.js.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 12:21:54 +08:00
camc314 b846abc2a4 fix(isolated-declarations): handle ambient expando properties (#25655)
## Summary

- treat value declarations in ambient namespaces as implicitly exported for expando-function validation
- preserve local versus exported namespace visibility to match TypeScript declaration merging
- add regression coverage for accepted ambient value declarations and rejected local or type-only declarations

## TypeScript compatibility

The regression fixture was checked with TypeScript 6.0.3. TypeScript and Oxc produce TS9023 only for the exported-function/local-namespace mismatch and the type-only namespace property.

Closes #24975
2026-08-17 02:25:03 +00:00
Yuji Sugiura 223e7855fe docs(oxfmt/conformance): Update notes on conformance (#25757)
Filled current state.
2026-08-17 09:25:11 +09:00
renovate[bot] b79db0c08f chore(deps): update github actions (#25752)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [CodSpeedHQ/action](https://redirect.github.com/CodSpeedHQ/action) |
action | patch | `v5.0.2` → `v5.0.3` | |
|
[cross-platform-actions/action](https://redirect.github.com/cross-platform-actions/action)
| action | minor | `v1.3.0` → `v1.4.0` | |
|
[semgrep/semgrep](https://redirect.github.com/semgrep/semgrep-proprietary)
| container | minor | `1.172.0` → `1.173.0` | |
|
[taiki-e/install-action](https://redirect.github.com/taiki-e/install-action)
| action | patch | `v2.85.9` → `v2.85.13` | `v2.86.1` (+2) |

---

### Release Notes

<details>
<summary>CodSpeedHQ/action (CodSpeedHQ/action)</summary>

###
[`v5.0.3`](https://redirect.github.com/CodSpeedHQ/action/releases/tag/v5.0.3)

[Compare
Source](https://redirect.github.com/CodSpeedHQ/action/compare/v5.0.2...v5.0.3)

Bumps the CodSpeed runner to
[v5.0.2](https://redirect.github.com/CodSpeedHQ/codspeed/releases/tag/v5.0.2).

##### 🐛 Bug Fixes

- Retry complete pinned binary downloads by
[@&#8203;art049](https://redirect.github.com/art049) in
[#&#8203;499](https://redirect.github.com/CodSpeedHQ/codspeed/pull/499)
- Accept `--exclude-allocations` and `--cycle-estimation` without a
value by
[@&#8203;not-matthias](https://redirect.github.com/not-matthias)

**Full Runner Changelog**:
<https://github.com/CodSpeedHQ/codspeed/blob/main/CHANGELOG.md>

#### What's Changed

- chore: bump runner version to 5.0.2 by
[@&#8203;github-actions](https://redirect.github.com/github-actions)\[bot]
in [#&#8203;230](https://redirect.github.com/CodSpeedHQ/action/pull/230)

**Full Changelog**:
<https://github.com/CodSpeedHQ/action/compare/v5.0.2...v5.0.3>

</details>

<details>
<summary>cross-platform-actions/action
(cross-platform-actions/action)</summary>

###
[`v1.4.0`](https://redirect.github.com/cross-platform-actions/action/releases/tag/v1.4.0):
Cross Platform Action 1.4.0

[Compare
Source](https://redirect.github.com/cross-platform-actions/action/compare/v1.3.0...v1.4.0)

##### Added

- Add support for FreeBSD on RISC-V 64 (`riscv64`)
([#&#8203;36](https://redirect.github.com/cross-platform-actions/action/issues/36))
- Add support for NetBSD on VAX, running on the SIMH simulator
- Add support for NetBSD 11.0
([#&#8203;154](https://redirect.github.com/cross-platform-actions/action/issues/154))

##### Changed

- OpenBSD on ARM64 now boots with the same EDK II UEFI firmware
(`uefi.fd`) as
every other ARM64 guest, instead of a separate Linaro UEFI build. The
QEMU
machine type for OpenBSD on ARM64 is now `virt,acpi=off`, which makes
the
kernel fall back to the device tree instead of hanging during ACPI
attach.
This removes the dependency on the Linaro release server, which no
longer
  exists

##### Fixed

- Don't log the `Tearing down VM` group when `shutdown_vm` is `false`,
since
  the VM is not being torn down in that case

([#&#8203;109](https://redirect.github.com/cross-platform-actions/action/issues/109))
- The "Start VM" step could keep running for hours when the VM failed to
boot

([#&#8203;158](https://redirect.github.com/cross-platform-actions/action/issues/158)).
Waiting for the VM to become ready is now bounded by an actual wall
clock
timeout, instead of by a number of connection attempts, and a single SSH
  connection attempt is bounded by `ConnectTimeout`.
- The post job step now reports when the console log of the VM is
missing or
  empty, instead of silently printing nothing

([#&#8203;158](https://redirect.github.com/cross-platform-actions/action/issues/158))
- A reboot of a guest that dies instead of rebooting now fails after
roughly
20 seconds, instead of after 13 minutes. The SSH session that issues the
reboot is bounded by `ServerAliveInterval`, so it no longer blocks for
the
full TCP retransmission time, and waiting for the VM to come back up is
given up on as soon as the guest announces a kernel panic on its serial
  console
- Advanced Matrix Extensions (AMX) is no longer exposed to the guests on
x86-64, so which runner a job happens to get no longer decides whether
the
  VM boots

([#&#8203;158](https://redirect.github.com/cross-platform-actions/action/issues/158)).
Kernels released before AMX existed fault as soon as userland starts,
which
affected NetBSD 9.4 and 10.1 and FreeBSD 12.4 on the runners that have
it

</details>

<details>
<summary>taiki-e/install-action (taiki-e/install-action)</summary>

###
[`v2.85.13`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.85.13):
2.85.13

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.85.12...v2.85.13)

- Update `tombi@latest` to 1.3.3.

- Update `mise@latest` to 2026.8.5.

- Update `kingfisher@latest` to 1.113.0.

- Update `cargo-shear@latest` to 1.13.4.

- Update `bpf-linker@latest` to 0.11.0.

###
[`v2.85.12`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.85.12):
2.85.12

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.85.11...v2.85.12)

- Update `zola@latest` to 0.23.3.

- Update `wasm-tools@latest` to 1.256.0.

- Update `tombi@latest` to 1.2.10.

- Update `syft@latest` to 1.51.0.

- Update `prek@latest` to 0.4.13.

- Update `mise@latest` to 2026.8.4.

- Update `editorconfig-checker@latest` to 3.11.1.

- Update `cargo-tarpaulin@latest` to 0.37.1.

- Update `cargo-rdme@latest` to 2.2.1.

- Update `biome@latest` to 2.5.8.

###
[`v2.85.11`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.85.11):
2.85.11

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.85.10...v2.85.11)

- Update `zola@latest` to 0.23.2.

- Update `wasm-bindgen@latest` to 0.2.127.

- Update `uv@latest` to 0.12.3.

- Update `osv-scanner@latest` to 2.5.0.

- Update `mise@latest` to 2026.8.3.

- Update `kingfisher@latest` to 1.112.0.

- Update `editorconfig-checker@latest` to 3.10.0.

###
[`v2.85.10`](https://redirect.github.com/taiki-e/install-action/releases/tag/v2.85.10):
2.85.10

[Compare
Source](https://redirect.github.com/taiki-e/install-action/compare/v2.85.9...v2.85.10)

- Update `uv@latest` to 0.12.2.

- Update `tombi@latest` to 1.2.7.

- Update `cosign@latest` to 3.1.3.

- Update `coreutils@latest` to 0.10.0.

- Update `cargo-rdme@latest` to 2.2.0.

- Update `cargo-crap@latest` to 0.4.3.

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-16 17:08:56 +00:00
leaysgur 44231fb5f7 fix(formatter): fix comment and indent issues around unions (#25665)
Fixes comment-placement bugs, idempotency and also inconsistency around unions/intersections, type aliases, conditional types, and assignment-likes.

- Fix invariant violations where comments crossed `=`, the value, or `;`
  - removed the relocation logic emulating old Prettier 3.8 behavior
- Normalize a union's leading comments to one canonical form behind the synthesized leading `|`, independent of the source shape
- Comments around a formatter-added `(` keep their source side of the `(`
- Hug conditional-type branch comments behind `?`/`:` with the content one level under the operator, matching conditional expressions
- Extend `= // c` position preservation from type aliases to all of JS
2026-08-16 15:04:28 +00:00
Boshen c108d5c45e fix(linter): improve React Compiler diagnostics (#25742)
Improve React Compiler diagnostics with actionable help and cause-oriented labels. Preserve-memoization and recursive-initialization diagnostics previously spanned entire callbacks; they now keep codeframes compact while refs and `try`/`finally` show related locations.

Validated with React Compiler and React linter suites, Clippy, `just ready`, and the 24-rule VS Code ecosystem audit.

AI-assisted: Codex was used to implement and validate this change. I reviewed and take responsibility for the result.
2026-08-16 14:08:22 +00:00
renovate[bot] 2d2b3be43d chore(deps): update rust crate sort-package-json to v1 (#25741)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[sort-package-json](https://redirect.github.com/oxc-project/sort-package-json)
| workspace.dependencies | major | `0.0.15` → `1.0.0` |

---

### Release Notes

<details>
<summary>oxc-project/sort-package-json (sort-package-json)</summary>

###
[`v1.0.0`](https://redirect.github.com/oxc-project/sort-package-json/blob/HEAD/CHANGELOG.md#100---2026-08-16)

[Compare
Source](https://redirect.github.com/oxc-project/sort-package-json/compare/v0.0.15...v1.0.0)

##### Changed

- **Breaking:** Stabilize the public `SortOptions` API and refresh crate
metadata and documentation
([#&#8203;158](https://redirect.github.com/oxc-project/sort-package-json/pull/158))

</details>

---

### Configuration

📅 **Schedule**: (in timezone Asia/Shanghai)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yOS41IiwidXBkYXRlZEluVmVyIjoiNDQuMjkuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Boshen <boshenc@gmail.com>
2026-08-16 13:58:43 +00:00
Boshen daf03ff25d fix(react-compiler): bail out on JSX ref property loads (#25739)
Bail out when JSX `ref` values are loaded through properties, matching React Compiler and preserving getter and live-binding evaluation semantics.

The validator previously stopped temporary tracking for every property result inferred as ref-like instead of only stopping for `ref.current`.

Validation: `cargo test -p oxc_react_compiler` and `just ready`.

AI assistance: Codex was used to investigate and prepare this change; the contributor remains responsible for reviewing it before merge.
2026-08-16 13:25:12 +00:00
Boshen 066b31bdc6 fix(react-compiler): recompile outlined JSX components (#25737)
Queue JSX-outlined components back through the normal `process_fn` pipeline, matching Babel's `Program.ts`. Oxc rebuilds immutable semantics once per FIFO generation and preserves Babel's outlined declaration order.

Validated against the React Compiler fixture suite, Babel output, and `just ready`.

AI-assisted; reviewed and validated by the contributor.
2026-08-16 13:18:57 +00:00
Boshen 892238149b refactor(linter): remove inactive react config rule (#25740)
Remove the inactive `react/config` rule and its generated metadata. Oxlint uses fixed, valid React Compiler options, so the rule cannot produce actionable diagnostics.

AI-assisted: Codex was used to implement and validate this change.
2026-08-16 12:39:27 +00:00
Boshen 28125febdb feat(react-compiler): validate identifier consistency (#25735)
Ports Babel's identifier consistency invariant using Oxc's canonical identifier arena and runs it at every equivalent pipeline point.

Validated with the React compiler fixture corpus and clippy.

AI-assisted: Codex was used to implement and verify this change.
2026-08-16 11:12:30 +00:00
Cameron 77e318af2e chore(all): add .pnpm-store to .gitignore (#25563)
https://github.com/orgs/pnpm/discussions/6936

maybe this should be in my local gitignore?
2026-08-16 19:11:58 +08:00
Boshen 621808eb31 perf(diagnostics): measure graphemes lazily (#25723)
Lazily measure non-ASCII graphemes instead of allocating an eager
boundary table.

Criterion single_unicode_tab: 1.1575 µs → 596.36 ns (-48.6%). ASCII
cases remain neutral or better. Kibana output is unchanged; end-to-end
performance is neutral without type-aware linting.

AI-assisted.
2026-08-16 19:06:18 +08:00
Boshen 2dd7446b8f perf(diagnostics): preallocate graphical output (#25721)
Preallocate graphical reporter output from observed per-diagnostic size.

Criterion: single ASCII -13.7%, batch ASCII -5.7%, Unicode/tab -2.0%.

AI-assisted.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-16 19:06:17 +08:00
Boshen f62ed0e2b9 perf(diagnostics): optimize graphical number rendering (#25715)
Use direct integer formatting for plain graphical snippet coordinates
and line numbers.

Criterion shows 4-14% faster graphical rendering across the covered
cases.

Created with AI assistance.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
2026-08-16 19:06:17 +08:00
Boshen 71528342ee perf(diagnostics): reduce graphical formatting overhead (#25714)
Keep diagnostic titles inline and bypass color formatting when the
active style is plain, reducing focused graphical-rendering time by
5–9%.

AI assistance: Codex was used. The contributor remains responsible for
this change.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a></sub>
2026-08-16 19:06:17 +08:00
Boshen 10fc4b7d33 perf(diagnostics): reduce graphical rendering allocations (#25711)
Keep common graphical-rendering buffers inline and add a focused
benchmark for regressions.

AI assistance: Codex was used. The contributor remains responsible for
this change.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a></sub>
2026-08-16 19:06:16 +08:00
Boshen 9c8abab7a7 perf(diagnostics): batch graphical reports (#25710)
Batch graphical diagnostics so reports sharing a source reuse line
indexing, and route oxlint diagnostic batches through the new API.

AI assistance: Codex was used. The contributor remains responsible for
this change.

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a></sub>
2026-08-16 19:06:16 +08:00
renovate[bot] f004852aac chore(deps): update rust crate sort-package-json to 0.0.15 (#25736)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[sort-package-json](https://redirect.github.com/oxc-project/sort-package-json)
| workspace.dependencies | patch | `0.0.14` → `0.0.15` |

---

### Release Notes

<details>
<summary>oxc-project/sort-package-json (sort-package-json)</summary>

###
[`v0.0.15`](https://redirect.github.com/oxc-project/sort-package-json/blob/HEAD/CHANGELOG.md#0015---2026-08-16)

[Compare
Source](https://redirect.github.com/oxc-project/sort-package-json/compare/v0.0.14...v0.0.15)

##### Fixed

- sort devEngines descriptor fields
([#&#8203;155](https://redirect.github.com/oxc-project/sort-package-json/pull/155))

##### Other

- *(deps)* update Rust dependencies
([#&#8203;157](https://redirect.github.com/oxc-project/sort-package-json/pull/157))
- borrow JSON strings during sorting
([#&#8203;156](https://redirect.github.com/oxc-project/sort-package-json/pull/156))
- reduce Rust dev debug info
([#&#8203;153](https://redirect.github.com/oxc-project/sort-package-json/pull/153))
- *(deps)* update rust crate ignore to v0.4.33
([#&#8203;151](https://redirect.github.com/oxc-project/sort-package-json/pull/151))
- *(deps)* update rust crates
([#&#8203;144](https://redirect.github.com/oxc-project/sort-package-json/pull/144))
- *(deps)* update rust crate ignore to v0.4.30
([#&#8203;142](https://redirect.github.com/oxc-project/sort-package-json/pull/142))
- update sponsor section

</details>

---

### Configuration

📅 **Schedule**: (in timezone Asia/Shanghai)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yOS41IiwidXBkYXRlZEluVmVyIjoiNDQuMjkuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-16 08:49:48 +00:00
Boshen fd0aeb256c feat(react-compiler): validate terminal predecessors (#25734)
Ports Babel's terminal-predecessor invariant and runs it before HIR scope dependency propagation. Keeps terminal successor traversal inline to avoid per-edge heap allocations.

AI-assisted: Codex was used to implement and verify this change.
2026-08-16 07:10:07 +00:00