Commit Graph
16776 Commits
Author SHA1 Message Date
Mikhail Baev a950f555c8 fix(linter/unicorn): do not report on optionals in no-single-promise-in-promise-methods (#21157) 2026-04-08 08:41:29 +01:00
leaysgur 32f3be56e1 chore(submodules): Update prettier to 3.8.1 (#21158)
Close #17241
2026-04-08 07:18:59 +00:00
Gunnlaugur Thor Briem 61adedd6f5 perf(minifier): fix O(n²) perf on very many var decls (#21062)
What
---

Fix two O(n²) bottlenecks in the compressor that cause severe slowdowns
on bundler output (esbuild, webpack CJS) containing thousands of
root-level `var import_X = __toESM(require_Y())` declarations, the
pattern reported in #17369, where a file only 6% larger took 2.5x longer
to minify.

Fixes #17369

Specifically:

Batch reference retention in `exit_program`
---

After each compressor iteration, stale references are cleaned up by
diffing live references against the symbol table. The per-reference
`delete_resolved_reference` method uses `.position()` internally, and
that's a linear scan of the symbol's reference list, so repeated
deletions are O(n²) when many references to the same symbol are removed.

Replace with a new `Scoping::retain_resolved_references` method that
iterates each symbol's reference list once, retaining only references
present in the live set. Total cost: O(total_refs).

Cached `is_symbol_mutated` helper
---

`Scoping::symbol_is_mutated(symbol_id)` scans all resolved references
for the symbol looking for a write. For heavily-referenced symbols like
`__toESM` (10k+ refs in the issue's bad.js) each call is O(num_refs),
and when it is called repeatedly during compression the total becomes
O(n²).

Add `PeepholeOptimizations::is_symbol_mutated`, which reads the
`write_references_count` already cached in `SymbolValue` (populated
during `exit_variable_declarator` → `init_symbol_value`). This is O(1).
It falls back to the full scan for symbols without cached values
(function declarations and other non-variable bindings).

Use this helper instead of `Scoping::symbol_is_mutated` in two places:

- Directly in `substitute_single_use_symbol_in_expression`, which walks
target expressions looking for single-use symbols to inline. When it
encounters an identifier it checks whether reordering the replacement
past that identifier is safe. With ~10k substitution attempts per
iteration on bad.js, this was the dominant O(n²) contributor.

- Via `is_expression_that_reference_may_change`, which checks whether
the base object of a member-expression assignment target can be mutated.
It is called from:
- `substitute_single_use_symbol_in_expression`, when the assignment
target is `foo.bar = …`
- `member_object_may_be_mutated`, which is called from
`minimize_logical_expression` and `remove_unused_expression`

Performance
---

On the real-world files from #17369, on my machine, the time taken by
```
Compressor::new(&allocator).build_with_scoping(
    &mut program,
    scoping,
    CompressOptions::smallest(),
)
```
changes thus:

```
good.js (10.4 MB):  48.61 → 47.56 ms  (2.2% faster, or maybe that's just noise)
bad.js  (11.1 MB): 389.18 → 57.18 ms  (6.8x faster)
ratio bad/good:      8.0x →  1.2x
```

The total minification time (parse + compress + mangle) changes thus:
```
good.js (10.4 MB):  91.50 → 91.04 ms  (0.5% faster, probably mostly noise!)
bad.js  (11.1 MB): 436.28 → 104.40 ms  (4.2x faster)
ratio bad/good:      4.8x →  1.15x
```

For both compress and total, the bad/good ratio is now much closer to
the ratio between the file sizes.
2026-04-08 14:09:50 +08:00
Justin MechamandClaude Sonnet 4.6 4da53e5cfd fix(formatter): preserve trailing comma in TSX arrow functions with default type params (#21151)
## Summary

Fixes #21150

When a single-parameter generic arrow function in a `.tsx` file has a
**default type** (e.g. `<Options = any>`), the formatter was incorrectly
removing the trailing comma. Prettier preserves it as `<Options =
any,>`.

The existing `should_force_trailing_comma_for_arrow_function` logic
handles the simple case (`<T,>`) correctly, but it also skipped forcing
the comma when the parameter had a default type. Prettier's equivalent
only skips the forced comma when a **constraint** (`extends` clause) is
present — not for default types. This PR aligns with that behavior.

### Input
```tsx
const AppWrapper = <Options = any,>({
  appName,
}: {
  appName: string;
}) => null;

const getProps = <T = Record<string, unknown>,>(
  option: T | undefined,
): Partial<T> => ({});
```

### Before (incorrect)
```tsx
const AppWrapper = <Options = any>({ appName }: { appName: string }) => null;

const getProps = <T = Record<string, unknown>>(
  option: T | undefined,
): Partial<T> => ({});
```

### After (matches Prettier)
```tsx
const AppWrapper = <Options = any,>({ appName }: { appName: string }) => null;

const getProps = <T = Record<string, unknown>,>(
  option: T | undefined,
): Partial<T> => ({});
```

## Root cause

In `should_force_trailing_comma_for_arrow_function`
(`type_parameters.rs`), the early-return condition checked for both a
constraint **and** a default type:

```rust
// Before
if params.first().is_some_and(|t| t.constraint().is_some() || t.default().is_some()) {
    return false;
}
```

Prettier's equivalent only skips forcing the comma when a **constraint**
is present. See [Prettier
source](https://github.com/prettier/prettier/blob/070c89bba46235f4948560ed612a11e89ccd2da9/src/language-js/print/type-parameters.js#L33-L42).

## Fix

Removed `|| t.default().is_some()` from the condition:

```rust
// After
if params.first().is_some_and(|t| t.constraint().is_some()) {
    return false;
}
```

Prettier conformance: **no regressions** (746/753 JS, 591/601 TS —
unchanged).

## AI Disclosure

This PR was co-authored with Claude Code (AI assistant), as noted in the
commit. The fix was reviewed, tested against the full Prettier
conformance suite, and verified to produce no regressions.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 14:37:08 +09:00
leaysgur d58883d248 test(oxfmt): Pin and update oxfmt/conformance (#21156) 2026-04-08 04:54:39 +00:00
leaysgur 94fe774190 fix(oxfmt): Handle paths with consecutive leading slashes (#21155)
Fixes #21086
2026-04-08 03:18:26 +00:00
Dunqing eab13b39e3 fix(transformer/decorators): avoid accessor storage name collisions (#21106)
## Summary

- Use raw property/identifier names instead of `get_var_name_from_node` (which strips leading underscores) when generating private backing field names for accessor properties
- For non-computed keys, use `PropertyKey::name()` which preserves leading underscores
- For computed keys, match on `Expression::Identifier` to get the raw name directly
- No counters, maps, or helper functions needed — collisions are avoided at the source

This prevents `accessor prop` and `accessor _prop` from producing the same `#_prop_accessor_storage` name, which caused a runtime `TypeError: Cannot initialize the same private elements twice on an object`.

Closes #20946
Supersedes #21023

## Test plan

- [x] Added test fixture covering both non-computed (`prop`/`_prop`) and computed (`[prop]`/`[_prop]`) accessor name collisions
- [x] All existing accessor tests pass unchanged
- [x] `cargo test -p oxc_transformer` passes
- [x] Full `cargo run -p oxc_transform_conformance` passes
- [x] `cargo clippy` clean

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-08 02:22:25 +00:00
leaysgur 0d678345aa feat(oxfmt): Show hint for all files are ignored case (#21154)
Fixes #21107

Messages that were previously omitted when `no_error_on_unmatched_pattern` is specified will now be displayed, resulting in more consistent behavior.
2026-04-08 02:16:24 +00:00
overlookmotel addcd02d97 perf(napi/parser, linter/plugins): raw transfer deserializer for Vecs use shift instead of multiply where possible (#21142)
Tiny optimization to raw transfer. Use shift instead of multiply where possible when calculating the end position of a `Vec`'s contents.
2026-04-07 23:32:03 +00:00
overlookmotel 3068ded6a1 perf(napi/parser, linter/plugins): shift before add when calculating positions in raw transfer deserializer (#21141)
Small perf optimization to raw transfer. When calculating a `u32` offset, shift first then add (`(pos >> 2) + 4`) instead of adding first (`(pos + 16) >> 2`). If a function contains multiple `pos >> 2` calculations, V8 may be able to combine them into a single calculation. Previously it couldn't prove that `pos` is a multiple of 4, so couldn't make this optimization.
2026-04-07 23:32:03 +00:00
overlookmotel eb400b8bb2 perf(napi/parser, linter/plugins): remove uint32 buffer view (#21140)
Continuation of #21132. All uses of the `Uint32Array` view of the buffer in raw transfer code have been removed in preceding PRs. So we can now remove it entirely.
2026-04-07 23:14:37 +00:00
overlookmotel 26750857d5 perf(napi/parser): lazy deserialization use only Int32Array (#21139)
Continuation of #21132. Use `Int32Array` view of the buffer for all code in lazy deserialization. Lazy deserialization is not currently in use, but keeping it in line with the main raw transfer deserializer allows removing the `Unint32Array` view of the buffer entirely in #21140 without breaking the lazy deserializer tests.
2026-04-07 23:14:36 +00:00
overlookmotel 5b35a53a0b perf(napi/parser): deserializing tokens use only int32 array (#21138)
Small perf optimization. When deserializing tokens in `oxc-parser`, use only the `Int32Array` view of the buffer, instead of both `Int32Array` and `Uint8Array`. Less values to keep in registers, and `int32` doesn't need to be obtained with a property lookup on each call.
2026-04-07 23:14:36 +00:00
overlookmotel f163d10859 perf(parser): tokens raw deserialization use Int32Array (#21137)
Continuation of #21132. Use `Int32Array` view of the buffer for tokens deserialization in `oxc-parser`.
2026-04-07 23:14:36 +00:00
overlookmotel 7a866138d1 perf(linter/plugins): use Int32Arrays for tokens and comments buffers (#21136)
Continuation of #21132. Use `Int32Array` view of the buffer for all operations related to tokens and comments.
2026-04-07 23:08:00 +00:00
camc314 7354f3cd64 feat(linter)!: error on no matched files (#21144) 2026-04-07 21:10:31 +00:00
copilot-swe-agent 472f8ee74a fix(linter): mark complete comment for unused disable directives + lsp fix (#21092)
When auto-fixing unused `eslint-disable` / `oxlint-disable` directives, only the comment *content* was stripped — leaving behind empty comment tokens (`//` or `/**/`) instead of removing the line entirely.

**Root cause:** The `comment_span` stored in `DisabledRule` was set to `comment.content_span()` (the text inside the delimiters), so `Fix::delete(span)` left the `//` prefix and `*/` suffix in place.

## Changes

- **`disable_directives.rs`** — Added `DisableDirectivesBuilder::compute_comment_fix_span` static helper and a `fix_span` field alongside `comment_span` in both `DisabledRule::All` and `DisabledRule::Single`:
  - `comment_span` = `comment.span` (full outer comment span, used for **diagnostic labels** — no line extension)
  - `fix_span` = line-aware span: the **entire line** (indentation + newline included) when the comment is the only non-whitespace content on its line; otherwise the full outer comment span (including `//` / `/* */` delimiters)
  - `DisableRuleComment` gains a matching `fix_span` field; its `span` field remains the original comment span for diagnostics

- **`context/host.rs`** and **`apps/oxlint/src/lsp/error_with_position.rs`** — use `span` for `.with_label` (diagnostic highlighting) and `fix_span` for `Fix::delete` (the actual edit)

**Before / after:**

```js
// Before fix applied:
// eslint-disable-next-line no-console   →   //
/* eslint-disable no-console */          →   /**/

// After fix applied:
// eslint-disable-next-line no-console   →   (line removed)
/* eslint-disable no-console */          →   (line removed)
```

Multi-rule comments where only *some* rules are unused are unaffected — the existing per-rule comma-aware removal logic (`RuleCommentType::Single`) continues to work correctly.
2026-04-07 20:54:49 +00:00
babandCameron Clark edd08654fe fix(linter/no-array-index-key): false positive when index is inside an expression within a template literal (#21123)
Closes #21110

Related: #21012

## Summary

The `TemplateLiteral` branch in `expression_uses_index` was calling
`expression_uses_index` recursively, so it detected index even when
wrapped in a binary expression or function call inside `${...}`. ESLint
only checks for direct index references, so replaced with
`is_index_reference`.

### ESLint comparison (inside template literals)

| Pattern | ESLint | oxlint (before) | oxlint (after) |
|---|---|---|---|
| `` `abc${index}` `` | error | error | error |
| `` `${item.type + index}` `` | pass | error | pass |
| `` `abc${String(index)}` `` | pass | error | pass |
| `` `abc${index.toString()}` `` | pass | error | pass |

---------

Co-authored-by: Cameron Clark <cameron.clark@hey.com>
2026-04-07 19:32:52 +01:00
AliceLannisteandCameron Clark 15574bc3c0 feat(linter/unicorn): implement consistent-template-literal-escape (#21126)
part of https://github.com/oxc-project/oxc/issues/684


[consistent-template-literal-escape](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-template-literal-escape.md)

---------

Co-authored-by: Cameron Clark <cameron.clark@hey.com>
2026-04-07 19:23:12 +01:00
overlookmotel 8c51121e4c perf(napi/parser, linter/plugins): raw transfer deserialize Span fields as i32s (#21135)
Continuation of #21132. Get span `start` and `end` from the `Int32Array` view of the buffer, instead of the `Uint32Array`view. This allows V8 to statically see that they are SMIs, and skip type checks.
2026-04-07 17:25:42 +00:00
overlookmotel bc1bcdd95e perf(napi/parser, linter/plugins): inline trivial raw transfer field deserializers into node object definitions (#21134)
Utilize the `#[estree(raw_deser_inline)]` attribute introduced in #21134 to mark all custom deserializers which do not depend on `parent` as inline-able.

This reduces deserializer code size, as well as being more performant in some cases, by avoiding write boundary checks.
2026-04-07 17:25:42 +00:00
overlookmotel 7b3d5a943a feat(ast_tools): support inlining custom deserialized fields with #[estree(raw_deser_inline)] (#21133)
Add an `#[estree(raw_deser_inline)]` attribute which can be used on custom deserializers. Like automatically-generated deserializers, where the value does not require `parent`, it can be set as an object property inline, rather than assigned after constructing the AST node object.
2026-04-07 17:25:42 +00:00
overlookmotel c0278abf55 perf(napi/parser, linter/plugins): use Int32Array in raw transfer deserializer (#21132)
Use `int32` (`Int32Array`) instead of `uint32`(`Uint32Array`) for getting data from buffer in raw transfer deserializer. The buffer is 2 GiB in size, so all offsets within the buffer can be represented as a `u31` which can be stored in an `i32` without any loss, and with no risk of being interpreted as negative numbers.

Same as in #21129, the advantage of fetching offsets from an `Int32Array` is that V8 statically knows the value can be stored in an SMI, its native integer type, without any range checks.
2026-04-07 17:25:41 +00:00
overlookmotel c70a8e9853 refactor(napi/parser, linter/plugins): add int32 buffer view (#21131)
Add an `Int32Array` view of the buffer for raw transfer. It will be used in PRs later in this stack.
2026-04-07 17:25:41 +00:00
overlookmotel 305350dbb7 docs(linter/plugins): correct comments (#21130)
Comments only change. Correct 2 erroneous comments.
2026-04-07 17:25:41 +00:00
overlookmotel 43482c7bb1 perf(linter/plugins): use >> not >>> in binary search loops (#21129)
`>>` is cheaper than `>>>` because `>>` produces a 32-bit _signed_ integer which is V8's native number type (SMI). `>>>` produces a 32-bit _unsigned_ integer, which needs to be boxed and stored on the heap.

Source text in raw transfer is limited to 1 GiB, and therefore source offsets, number of lines, number of tokens, and number of comments after all less than `1 << 30`. Therefore even the sum of 2 of them cannot reach `1 << 31` (the maximum positive integer which can be stored as a positive signed 31-bit int. Therefore it's safe to use `>>` in these binary loops.
2026-04-07 17:10:32 +00:00
overlookmotel 990b73ad2f test(napi/parser): fix benchmarks (#21128)
Raw transfer benchmark had got broken. Fix it.
2026-04-07 17:10:32 +00:00
camc314 c5c8c03f14 feat(linter/prefer-readonly-parameter-types): move rule from nursery to pedantic (#21114) 2026-04-07 12:11:02 +00:00
renovate e0270a4bd1 chore(deps): update dependency rolldown to v1.0.0-rc.13 (#20935)
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/) |
|---|---|---|---|---|---|
| [rolldown](https://rolldown.rs/) ([source](https://redirect.github.com/rolldown/rolldown/tree/HEAD/packages/rolldown)) | [`1.0.0-rc.12` → `1.0.0-rc.13`](https://renovatebot.com/diffs/npm/rolldown/1.0.0-rc.12/1.0.0-rc.13) | ![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown/1.0.0-rc.13?slim=true) | ![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown/1.0.0-rc.13?slim=true) | ![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown/1.0.0-rc.12/1.0.0-rc.13?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown/1.0.0-rc.12/1.0.0-rc.13?slim=true) |

---

### Release Notes

<details>
<summary>rolldown/rolldown (rolldown)</summary>

### [`v1.0.0-rc.13`](https://redirect.github.com/rolldown/rolldown/blob/HEAD/CHANGELOG.md#100-rc13---2026-04-01)

[Compare Source](https://redirect.github.com/rolldown/rolldown/compare/v1.0.0-rc.12...v1.0.0-rc.13)

##### 🚀 Features

- add friendly error for unloadable virtual modules ([#&#8203;8955](https://redirect.github.com/rolldown/rolldown/issues/8955)) by [@&#8203;sapphi-red](https://redirect.github.com/sapphi-red)
- better error message for unsupported CSS error ([#&#8203;8911](https://redirect.github.com/rolldown/rolldown/issues/8911)) by [@&#8203;sapphi-red](https://redirect.github.com/sapphi-red)

##### 🐛 Bug Fixes

- prevent chunk merging from leaking entry side effects ([#&#8203;8979](https://redirect.github.com/rolldown/rolldown/issues/8979)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- correct inlining based on module's def format and esModule flag ([#&#8203;8975](https://redirect.github.com/rolldown/rolldown/issues/8975)) by [@&#8203;h-a-n-a](https://redirect.github.com/h-a-n-a)
- generate init calls for excluded re-exports in strict execution order ([#&#8203;8858](https://redirect.github.com/rolldown/rolldown/issues/8858)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- consistent order for `meta.chunks` in `renderChunk` hook ([#&#8203;8956](https://redirect.github.com/rolldown/rolldown/issues/8956)) by [@&#8203;sapphi-red](https://redirect.github.com/sapphi-red)
- subpath imports in glob imports failing to find files ([#&#8203;8885](https://redirect.github.com/rolldown/rolldown/issues/8885)) by [@&#8203;kalvenschraut](https://redirect.github.com/kalvenschraut)
- browser: bundle binding types in dts output ([#&#8203;8930](https://redirect.github.com/rolldown/rolldown/issues/8930)) by [@&#8203;nyan-left](https://redirect.github.com/nyan-left)
- ci: guard artifact download step in `vite-test-ubuntu` when build is skipped ([#&#8203;8934](https://redirect.github.com/rolldown/rolldown/issues/8934)) by [@&#8203;Copilot](https://redirect.github.com/Copilot)
- track CJS re-export import records to fix inline const and tree-shaking ([#&#8203;8925](https://redirect.github.com/rolldown/rolldown/issues/8925)) by [@&#8203;h-a-n-a](https://redirect.github.com/h-a-n-a)
- use ImportKind::Import for common-chunk root computation ([#&#8203;8899](https://redirect.github.com/rolldown/rolldown/issues/8899)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- watch: clear emitted\_filenames between rebuilds ([#&#8203;8914](https://redirect.github.com/rolldown/rolldown/issues/8914)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- ci: cache esbuild snapshots to avoid 429 rate limiting ([#&#8203;8921](https://redirect.github.com/rolldown/rolldown/issues/8921)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- always check circular deps in chunk optimizer ([#&#8203;8915](https://redirect.github.com/rolldown/rolldown/issues/8915)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- don't mark calls to reassigned bindings as pure ([#&#8203;8917](https://redirect.github.com/rolldown/rolldown/issues/8917)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- magic-string: throw TypeError for non-string content args ([#&#8203;8905](https://redirect.github.com/rolldown/rolldown/issues/8905)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- magic-string: add split-point validation and overwrite/update options ([#&#8203;8904](https://redirect.github.com/rolldown/rolldown/issues/8904)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)

##### 🚜 Refactor

- pre-compute has\_side\_effects on ChunkCandidate ([#&#8203;8981](https://redirect.github.com/rolldown/rolldown/issues/8981)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- cleanup and simplify in dynamic\_import.rs ([#&#8203;8927](https://redirect.github.com/rolldown/rolldown/issues/8927)) by [@&#8203;ulrichstark](https://redirect.github.com/ulrichstark)
- rename came\_from\_cjs to came\_from\_commonjs for consistency ([#&#8203;8938](https://redirect.github.com/rolldown/rolldown/issues/8938)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- inline `create_ecma_view` return destructuring and remove redundant binding ([#&#8203;8932](https://redirect.github.com/rolldown/rolldown/issues/8932)) by [@&#8203;shulaoda](https://redirect.github.com/shulaoda)

##### 📚 Documentation

- document ensure\_lazy\_module\_initialization\_order in code-splitting design doc ([#&#8203;8931](https://redirect.github.com/rolldown/rolldown/issues/8931)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)

##### 🧪 Testing

- add regression test for runtime helper circular dependency ([#&#8203;8958](https://redirect.github.com/rolldown/rolldown/issues/8958)) by [@&#8203;h-a-n-a](https://redirect.github.com/h-a-n-a)
- enable 8 previously-skipped MagicString remove tests ([#&#8203;8945](https://redirect.github.com/rolldown/rolldown/issues/8945)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)
- add test for why PureAnnotation is needed in execution order check ([#&#8203;8933](https://redirect.github.com/rolldown/rolldown/issues/8933)) by [@&#8203;IWANABETHATGUY](https://redirect.github.com/IWANABETHATGUY)

##### ⚙️ Miscellaneous Tasks

- add `@emnapi/runtime` and `@emnapi/core` as direct deps of `@rolldown/browser` ([#&#8203;8978](https://redirect.github.com/rolldown/rolldown/issues/8978)) by [@&#8203;Copilot](https://redirect.github.com/Copilot)
- deps: update dependency vite-plus to v0.1.15 ([#&#8203;8970](https://redirect.github.com/rolldown/rolldown/issues/8970)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
- deps: update dependency oxfmt to ^0.43.0 ([#&#8203;8969](https://redirect.github.com/rolldown/rolldown/issues/8969)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
- deps: upgrade oxc to 0.123.0 ([#&#8203;8967](https://redirect.github.com/rolldown/rolldown/issues/8967)) by [@&#8203;shulaoda](https://redirect.github.com/shulaoda)
- justfile: deduplicate update-submodule as alias of setup-submodule ([#&#8203;8968](https://redirect.github.com/rolldown/rolldown/issues/8968)) by [@&#8203;shulaoda](https://redirect.github.com/shulaoda)
- deps: update rollup submodule for tests to v4.60.1 ([#&#8203;8965](https://redirect.github.com/rolldown/rolldown/issues/8965)) by [@&#8203;sapphi-red](https://redirect.github.com/sapphi-red)
- deps: update test262 submodule for tests ([#&#8203;8966](https://redirect.github.com/rolldown/rolldown/issues/8966)) by [@&#8203;sapphi-red](https://redirect.github.com/sapphi-red)
- remove unused `type-check` scripts ([#&#8203;8957](https://redirect.github.com/rolldown/rolldown/issues/8957)) by [@&#8203;sapphi-red](https://redirect.github.com/sapphi-red)
- deps: update actions/cache action to v5 ([#&#8203;8953](https://redirect.github.com/rolldown/rolldown/issues/8953)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
- deps: update npm packages to v6 (major) ([#&#8203;8954](https://redirect.github.com/rolldown/rolldown/issues/8954)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
- deps: update npm packages ([#&#8203;8948](https://redirect.github.com/rolldown/rolldown/issues/8948)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
- deps: update rust crates ([#&#8203;8949](https://redirect.github.com/rolldown/rolldown/issues/8949)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
- deps: update github-actions ([#&#8203;8947](https://redirect.github.com/rolldown/rolldown/issues/8947)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
- deps: update napi ([#&#8203;8943](https://redirect.github.com/rolldown/rolldown/issues/8943)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
- deps: update dependency rolldown-plugin-dts to ^0.23.0 ([#&#8203;8944](https://redirect.github.com/rolldown/rolldown/issues/8944)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]
- regenerate testing snapshots ([#&#8203;8928](https://redirect.github.com/rolldown/rolldown/issues/8928)) by [@&#8203;ulrichstark](https://redirect.github.com/ulrichstark)
- deps: update dependency rust to v1.94.1 ([#&#8203;8923](https://redirect.github.com/rolldown/rolldown/issues/8923)) by [@&#8203;renovate](https://redirect.github.com/renovate)\[bot]

##### ❤️ New Contributors

- [@&#8203;kalvenschraut](https://redirect.github.com/kalvenschraut) made their first contribution in [#&#8203;8885](https://redirect.github.com/rolldown/rolldown/pull/8885)
- [@&#8203;nyan-left](https://redirect.github.com/nyan-left) made their first contribution in [#&#8203;8930](https://redirect.github.com/rolldown/rolldown/pull/8930)

</details>

---

### Configuration

📅 **Schedule**: 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:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjEwMi4xMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
2026-04-07 12:06:09 +00:00
camc314 1893be1a5a feat(linter/no-useless-default-assignment): move rule from nursery to correctness (#21113) 2026-04-07 11:10:59 +00:00
renovate 98aa09951f chore(deps): update napi to v3.8.4 (#21122)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [napi](https://redirect.github.com/napi-rs/napi-rs) | workspace.dependencies | patch | `3.8.3` → `3.8.4` |
| [napi-derive](https://redirect.github.com/napi-rs/napi-rs) | workspace.dependencies | patch | `3.5.2` → `3.5.3` |

---

### Release Notes

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

### [`v3.8.4`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-v3.8.4)

[Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi-v3.8.3...napi-v3.8.4)

##### Fixed

- *(deps)* update rust crate ctor to v0.8.0 ([#&#8203;3170](https://redirect.github.com/napi-rs/napi-rs/pull/3170))
- *(deps)* update rust crate ctor to v0.7.0 ([#&#8203;3169](https://redirect.github.com/napi-rs/napi-rs/pull/3169))
- *(napi)* check for null error\_message in ExtendedErrorInfo::try\_from ([#&#8203;3158](https://redirect.github.com/napi-rs/napi-rs/pull/3158))
- *(napi)* skip nullish error causes when converting from Unknown ([#&#8203;3143](https://redirect.github.com/napi-rs/napi-rs/pull/3143))

</details>

---

### Configuration

📅 **Schedule**: 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 these updates 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:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ1cGRhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
2026-04-07 11:05:24 +00:00
camc314 5462ff9776 feat(linter/strict-void-return): move rule from nursery to pedantic (#21115) 2026-04-07 10:59:02 +00:00
renovate 152b37a6e8 chore(deps): update napi (#20829)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | Type | Update |
|---|---|---|---|---|---|---|---|
| [@napi-rs/cli](https://napi.rs/) ([source](https://redirect.github.com/napi-rs/napi-rs)) | [`3.5.1` → `3.6.0`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.5.1/3.6.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.6.0?slim=true) | ![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.6.0?slim=true) | ![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.5.1/3.6.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.5.1/3.6.0?slim=true) | pnpm.catalog.default | minor |
| [napi](https://redirect.github.com/napi-rs/napi-rs) | `3.8.3` → `3.8.4` | ![age](https://developer.mend.io/api/mc/badges/age/crate/napi/3.8.4?slim=true) | ![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/napi/3.8.4?slim=true) | ![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/napi/3.8.3/3.8.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/napi/3.8.3/3.8.4?slim=true) | workspace.dependencies | patch |
| [napi-derive](https://redirect.github.com/napi-rs/napi-rs) | `3.5.2` → `3.5.3` | ![age](https://developer.mend.io/api/mc/badges/age/crate/napi-derive/3.5.3?slim=true) | ![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/napi-derive/3.5.3?slim=true) | ![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/napi-derive/3.5.2/3.5.3?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/napi-derive/3.5.2/3.5.3?slim=true) | workspace.dependencies | patch |

---

### Release Notes

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

### [`v3.6.0`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.5.1...@napi-rs/cli@3.6.0)

[Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.5.1...@napi-rs/cli@3.6.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

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

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

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

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My45NC4xIiwidXBkYXRlZEluVmVyIjoiNDMuMTAyLjciLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
2026-04-07 10:48:24 +00:00
camc314 5ed854fc02 test(linter): typecheck files even when zero rules are enabled (#21117)
not sure we had test coverage here previously, but it's important this case doesn't regress
2026-04-07 10:22:51 +00:00
camc314 c2989bd0cd feat(linter/no-unnecessary-type-parameters): move rule from nursery to suspicious (#21112) 2026-04-07 09:58:24 +00:00
camc314 79d339a16a feat(linter/no-unnecessary-qualifier): move rule from nursery to style (#21111) 2026-04-07 09:54:03 +00:00
Dunqing 75663c077d feat(semantic): add enum member value evaluation for const enum support (#20602)
## Summary

Part of https://github.com/oxc-project/oxc/issues/6073 and #11844

- Add `ConstantValue` type in `oxc_syntax` for representing enum member values (number/string)
- Implement enum member value evaluation in `oxc_semantic` supporting numeric auto-increment, string values, binary/unary expressions, cross-member and cross-enum references, template literals, and merged enum declarations
- Store evaluated enum member values in `Scoping` via `EnumData` struct with getter/setter APIs and enum body scope tracking
- All enum evaluation code is gated behind the `enum_eval` Cargo feature (enabled by `oxc_transformer`)

### Feature gate

The `enum_eval` feature controls:
- `ts_enum` module (evaluator + data types)
- `EnumData` field and enum-related methods on `Scoping`
- `oxc_syntax/to_js_string` dependency

Consumers that don't need enum values (linter, language server) pay zero cost.

### Babel alignment

Unary operators on strings follow Babel's JS-coercion semantics (`+"s"` → `"s"`, `-"s"` → `NaN`, `~"s"` → `-1`), which differs from TypeScript (unevaluated). This is documented in the source.

## Test plan

- [x] Integration tests in `crates/oxc_semantic/tests/integration/enum_values.rs`
- [x] Semantic TypeScript conformance snapshot updated
- [x] `cargo check -p oxc_semantic` passes (without feature)
- [x] `cargo check -p oxc_semantic --features enum_eval` passes (with feature)
- [x] `cargo check -p oxc_transformer` passes (enables feature transitively)
2026-04-07 08:52:19 +00:00
renovate 9a0725955f chore(deps): update dependency oxlint to v1.59.0 (#21100)
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/) |
|---|---|---|---|---|---|
| [oxlint](https://oxc.rs/docs/guide/usage/linter) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxlint)) | [`1.58.0` → `1.59.0`](https://renovatebot.com/diffs/npm/oxlint/1.58.0/1.59.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/oxlint/1.59.0?slim=true) | ![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxlint/1.59.0?slim=true) | ![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxlint/1.58.0/1.59.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxlint/1.58.0/1.59.0?slim=true) |

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxlint)</summary>

### [`v1.59.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxlint/CHANGELOG.md#1590---2026-04-06)

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v1.58.0...oxlint_v1.59.0)

##### 🐛 Bug Fixes

- [`dd2df87`](https://redirect.github.com/oxc-project/oxc/commit/dd2df87) npm: Export package.json for oxlint and oxfmt ([#&#8203;20784](https://redirect.github.com/oxc-project/oxc/issues/20784)) (kazuya kawaguchi)

</details>

---

### Configuration

📅 **Schedule**: 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:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ1cGRhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
2026-04-07 08:21:33 +00:00
Mikhail Baev 7e8d5206c8 fix(linter/unicorn): report on optional foo?.postMessage in require-post-message-target-origin rule (#21104)
fixes commented out test for optional `foo?.postMessage` in
`unicorn/require-post-message-target-origin` rule
2026-04-07 09:07:54 +01:00
leaysgur 85075cee59 refactor(oxfmt): Rework glob expansion (#21083)
- Before: Resolved beforehand and treated as a simple list of paths
  - = 2-pass
- After: Walked through like a standard path, with processing handled by a custom matcher
  - = 1-pass
  - To support per-directory config, we need to locate the config files during the directory walk; glob is no exception

This is an internal change and generally has no impact on users.
(In niche cases, the content of the log output will change, but it will result in more consistent.)
2026-04-07 06:59:22 +00:00
Boshen 5f6ce21874 chore(submodules): update submodule SHAs to latest commits (#21105)
Updates submodule dependencies to their latest commits.

## Changes

- test262: `5c82069` → `ff0d161`
- babel: `0124e7c` → `91b4ce3`
- TypeScript: `4f7b417` → `7b8cb3b`
- estree-conformance: `dc0f79b` → `d5e48e7`

This PR is automatically generated by the [update_submodules workflow](https://github.com/oxc-project/oxc/blob/main/.github/workflows/update_submodules.yml).
2026-04-07 06:54:12 +00:00
Dunqing 3cfe8ede95 feat(semantic): add MemberWriteTarget flag to ReferenceFlags (#20772)
## Summary

Add a new `MemberWriteTarget` bit to `ReferenceFlags` ~~Store member write target references in a separate `FxHashSet<ReferenceId>` on `Semantic` rather than adding a flag to `ReferenceFlags`.~~

This marks identifier references read as the object of a member expression in a simple assignment target position (e.g., `A` in `A.foo = 1`).

- Set during `visit_member_expression` when flags indicate write-only context (simple `=`, not compound `+=` or update `++`)
- Stored in `Semantic::member_write_references` (`FxHashSet<ReferenceId>`)
- Queryable via `Semantic::is_member_write_reference(reference_id)` and `Semantic::member_write_references()`
- Does not affect existing `ReferenceFlags` — no changes to the shared bitflags type

## Motivation

Distinguishing "reads that exist only to serve a property write" from "real reads" is broadly useful:

### Minifier: dead code elimination of property-write-only symbols

```js
function A() {}
A.from = () => {}  // A's only reference is a member write target
// → both can be eliminated when property_write_side_effects: false
```

Without this info, the minifier sees `A` as "referenced" and cannot remove the function declaration. With it, the minifier knows all of `A`'s reads are property-write targets and can safely drop them. (See stacked PR #20773 — will be updated to use the new API in a follow-up)

### Linter: `no_unused_vars` improvement

```js
const config = {};
config.debug = true;
config.verbose = false;
// config is never read — only mutated via property writes
```

Currently `config` is considered "used" because `config.debug = ...` creates a read reference. With member write target tracking, `no_unused_vars` could detect that `config`'s only reads are property-write targets and report it as unused.

### Linter: simplify `no_param_reassign` property detection

`no_param_reassign` has a complex `is_modifying_property()` function that manually walks the ancestor chain to detect property modifications like `param.foo = 1`. With member write target tracking, this can be checked directly on the reference.

### Rolldown: replace `MemberExprIsWrite` traversal state

Rolldown already maintains its own [`MemberExprIsWrite` flag](https://github.com/rolldown/rolldown/blob/eec7d7320cc991e1efd5ed8264d02c6889a223c3/crates/rolldown/src/ast_scanner/mod.rs#L130-L131) as local traversal state in the AST scanner to [detect member expressions in write context](https://github.com/rolldown/rolldown/blob/eec7d7320cc991e1efd5ed8264d02c6889a223c3/crates/rolldown/src/ast_scanner/impl_visit.rs#L55-L73). Having this on `Semantic` means Rolldown can consume it directly instead of re-detecting it during scanning. There's also a [TODO in Rolldown's treeshake options](https://github.com/rolldown/rolldown/blob/main/crates/rolldown_common/src/inner_bundler_options/types/treeshake.rs#L255-L259) to wire `property_write_side_effects` to oxc_minifier — our stacked PR #20773 provides that.

### General: escape analysis for local objects

Any analysis that needs to know "is this object only mutated locally, never passed elsewhere?" benefits from knowing which reads are purely for property writes vs. reads that pass the value to other functions.

## Test plan

- [x] Semantic snapshot tests updated
- [x] Conformance snapshots updated
- [x] Clippy clean

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-07 06:11:34 +00:00
renovate[bot] af7bff0c12 chore(deps): update oxc to ^0.124.0 (#21098)
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/) |
|---|---|---|---|---|---|
| [@oxc-project/types](https://oxc.rs)
([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxc-types))
| [`^0.123.0` →
`^0.124.0`](https://renovatebot.com/diffs/npm/@oxc-project%2ftypes/0.123.0/0.124.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@oxc-project%2ftypes/0.124.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@oxc-project%2ftypes/0.124.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@oxc-project%2ftypes/0.123.0/0.124.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@oxc-project%2ftypes/0.123.0/0.124.0?slim=true)
|
| [oxc-parser](https://oxc.rs/docs/guide/usage/parser)
([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/napi/parser))
| [`^0.123.0` →
`^0.124.0`](https://renovatebot.com/diffs/npm/oxc-parser/0.123.0/0.124.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/oxc-parser/0.124.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxc-parser/0.124.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxc-parser/0.123.0/0.124.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxc-parser/0.123.0/0.124.0?slim=true)
|

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxc-parser)</summary>

###
[`v0.124.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/napi/parser/CHANGELOG.md#01240---2026-04-06)

##### ⚡ Performance

-
[`fb52383`](https://redirect.github.com/oxc-project/oxc/commit/fb52383)
napi/parser, linter/plugins: Clear buffers and source texts earlier
([#&#8203;21025](https://redirect.github.com/oxc-project/oxc/issues/21025))
(overlookmotel)
-
[`3b7dec4`](https://redirect.github.com/oxc-project/oxc/commit/3b7dec4)
napi/parser, linter/plugins: Use `utf8Slice` for decoding UTF-8 strings
([#&#8203;21022](https://redirect.github.com/oxc-project/oxc/issues/21022))
(overlookmotel)
-
[`012c924`](https://redirect.github.com/oxc-project/oxc/commit/012c924)
napi/parser, linter/plugins: Speed up decoding strings in raw transfer
([#&#8203;21021](https://redirect.github.com/oxc-project/oxc/issues/21021))
(overlookmotel)
-
[`55e1e9b`](https://redirect.github.com/oxc-project/oxc/commit/55e1e9b)
napi/parser, linter/plugins: Initialize vars as 0
([#&#8203;21020](https://redirect.github.com/oxc-project/oxc/issues/21020))
(overlookmotel)
-
[`c25ef02`](https://redirect.github.com/oxc-project/oxc/commit/c25ef02)
napi/parser, linter/plugins: Simplify branch condition in
`deserializeStr`
([#&#8203;21019](https://redirect.github.com/oxc-project/oxc/issues/21019))
(overlookmotel)
-
[`9f494c3`](https://redirect.github.com/oxc-project/oxc/commit/9f494c3)
napi/parser, linter/plugins: Raw transfer use `String.fromCharCode` in
string decoding
([#&#8203;21018](https://redirect.github.com/oxc-project/oxc/issues/21018))
(overlookmotel)
-
[`0503a78`](https://redirect.github.com/oxc-project/oxc/commit/0503a78)
napi/parser, linter/plugins: Faster deserialization of `raw` fields
([#&#8203;20923](https://redirect.github.com/oxc-project/oxc/issues/20923))
(overlookmotel)
-
[`a24f75e`](https://redirect.github.com/oxc-project/oxc/commit/a24f75e)
napi/parser: Optimize string deserialization for non-ASCII sources
([#&#8203;20834](https://redirect.github.com/oxc-project/oxc/issues/20834))
(Joshua Tuddenham)

</details>

---

### Configuration

📅 **Schedule**: 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 these
updates 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:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ1cGRhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-07 04:34:11 +00:00
camc314 07e8a30f33 fix(transformer/react-refresh): handle parenthesized variable initializers (#21047)
fixes https://github.com/oxc-project/oxc/issues/21024
2026-04-07 02:08:05 +00:00
leaysgur 50c389b64f fix(oxfmt): Support .editorconfig quote_type (#20989)
Fixes #20563

---

- [x] Merge https://github.com/oxc-project/editorconfig-parser/pull/42
- [x] Release https://github.com/oxc-project/editorconfig-parser/pull/43
- [x] Update crates version
- [x] Implement
- [x] Test
- [x] Update schema, snapshots
2026-04-07 02:03:35 +00:00
renovate[bot] 60b1678d18 chore(deps): update dependency oxfmt to ^0.44.0 (#21099)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
| [oxfmt](https://oxc.rs/docs/guide/usage/formatter)
([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt))
| [`^0.43.0` →
`^0.44.0`](https://renovatebot.com/diffs/npm/oxfmt/0.43.0/0.44.0) |
![age](https://developer.mend.io/api/mc/badges/age/npm/oxfmt/0.44.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxfmt/0.44.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxfmt/0.43.0/0.44.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxfmt/0.43.0/0.44.0?slim=true)
|

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxfmt)</summary>

###
[`v0.44.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxfmt/CHANGELOG.md#0440---2026-04-06)

##### 🐛 Bug Fixes

-
[`dd2df87`](https://redirect.github.com/oxc-project/oxc/commit/dd2df87)
npm: Export package.json for oxlint and oxfmt
([#&#8203;20784](https://redirect.github.com/oxc-project/oxc/issues/20784))
(kazuya kawaguchi)
-
[`4216380`](https://redirect.github.com/oxc-project/oxc/commit/4216380)
oxfmt: Support `.editorconfig` `tab_width` fallback
([#&#8203;20988](https://redirect.github.com/oxc-project/oxc/issues/20988))
(leaysgur)

</details>

---

### Configuration

📅 **Schedule**: 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:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ1cGRhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-07 01:58:19 +00:00
BoshenandBoshen a69e707344 release(apps): oxlint v1.59.0 && oxfmt v0.44.0 (#21085)
# Oxlint
### 💥 BREAKING CHANGES

- 22ce6af oxlint/lsp: [**BREAKING**] Show/fix safe suggestions by
default (#19816) (Sysix)

### 🚀 Features

- 7a7b7b8 oxlint/lsp: Add source.fixAllDangerous.oxc code action kind
(#20526) (bab)
- 9cfe57e linter/unicorn: Implement prefer-import-meta-properties rule
(#20662) (Irfan - ئىرفان)
- 1edb391 linter/eslint: Implement `no-restricted-exports` rule (#20592)
(Nicolas Le Cam)
- 0f12bcd linter/react: Implement `hook-use-state` rule (#20986) (Khaled
Labeb)
- 1513a9f oxlint/lsp: Show note field for lsp diagnostic (#20983)
(Sysix)
- 7fdf722 linter/unicorn: Implement `no-useless-iterator-to-array` rule
(#20945) (Mikhail Baev)
- 39c8f2c linter/jest: Implement padding-around-after-all-blocks
(#21034) (Sapphire)
- ac39e51 linter/eslint-vitest-plugin: Prefer importing vitest globals
(#20960) (Said Atrahouch)
- 0b84de1 oxlint: Support allow option for prefer-promise-reject-errors
(#20934) (camc314)
- 23db851 linter/consistent-return: Move rule from nursery to suspicious
(#20920) (camc314)
- 9a27e32 linter/no-unnecessary-type-conversion: Move rule from nursery
to suspicious (#20919) (camc314)
- 1ca7b58 linter/dot-notation: Move rule from nursery to style (#20918)
(camc314)
- 73ba81a linter/consistent-type-exports: Move rule from nursery to
style (#20917) (camc314)
- b9199b1 linter/unicorn: Implement switch-case-break-position (#20872)
(Mikhail Baev)
- 3435ff8 linter: Implements `prefer-snapshot-hint` rule in Jest and
Vitest (#20870) (Said Atrahouch)
- 98510d2 linter: Implement react/prefer-function-component (#19652)
(Connor Shea)
- 871f9d9 linter: Implement no-useless-assignment (#15466) (Zhaoting
Zhou)
- 0f01fbd linter: Implement eslint/object-shorthand (#17688) (yue)

### 🐛 Bug Fixes

- dd2df87 npm: Export package.json for oxlint and oxfmt (#20784) (kazuya
kawaguchi)
- 9bc77dd linter/no-unused-private-class-members: False positive with
await expr (#21067) (camc314)
- 60a57cd linter/const-comparisons: Detect equality contradictions
(#21065) (camc314)
- 2bb2be2 linter/no-array-index-key: False positive when index is passed
as function argument (#21012) (bab)
- 6492953 linter/no-this-in-sfc: Only flag `this` used as member
expression object (#20961) (bab)
- 9446dcc oxlint/lsp: Skip `node_modules` in oxlint config walker
(#21004) (copilot-swe-agent)
- af89923 linter/no-namespace: Support glob pattern matching against
basename (#21031) (bab)
- 64a1a7e oxlint: Don't search for nested config outside base config
(#21051) (Sysix)
- 3b953bc linter/button-has-type: Ignore `document.createElement` calls
(#21008) (Said Atrahouch)
- 8c36070 linter/unicorn: Add support for `Array.from()` for
`prefer-set-size` rule (#21016) (Mikhail Baev)
- c1a48f0 linter: Detect vitest import from vite-plus/test (#20976)
(Said Atrahouch)
- 5c32fd1 lsp: Prevent corrupted autofix output from overlapping text
edits (#19793) (Peter Wagenet)
- ca79960 linter/no-array-index-key: Move span to `key` property
(#20947) (camc314)
- 2098274 linter: Add suggestion for `jest/prefer-equality-matcher`
(#20925) (eryue0220)
- 6eb77ec linter: Allow default-import barrels in import/named (#20757)
(Bazyli Brzóska)
- 9c218ef linter/eslint-vitest-plugin: Remove pending fix status for
require-local-test-context-for-concurrent-snapshot (#20890) (Said
Atrahouch)

### ⚡ Performance

- fb52383 napi/parser, linter/plugins: Clear buffers and source texts
earlier (#21025) (overlookmotel)
- 3b7dec4 napi/parser, linter/plugins: Use `utf8Slice` for decoding
UTF-8 strings (#21022) (overlookmotel)
- 012c924 napi/parser, linter/plugins: Speed up decoding strings in raw
transfer (#21021) (overlookmotel)
- 55e1e9b napi/parser, linter/plugins: Initialize vars as 0 (#21020)
(overlookmotel)
- c25ef02 napi/parser, linter/plugins: Simplify branch condition in
`deserializeStr` (#21019) (overlookmotel)
- 9f494c3 napi/parser, linter/plugins: Raw transfer use
`String.fromCharCode` in string decoding (#21018) (overlookmotel)
- 0503a78 napi/parser, linter/plugins: Faster deserialization of `raw`
fields (#20923) (overlookmotel)
- a24f75e napi/parser: Optimize string deserialization for non-ASCII
sources (#20834) (Joshua Tuddenham)

### 📚 Documentation

- af72b80 oxlint: Fix typo for --tsconfig (#20889) (leaysgur)
- 70c53b1 linter: Highlight that tsconfig is not respected in type aware
linting (#20884) (camc314)
# Oxfmt
### 🚀 Features

- 35cf6e8 oxfmt: Add node version hint for ts config import failures
(#21046) (camc314)

### 🐛 Bug Fixes

- dd2df87 npm: Export package.json for oxlint and oxfmt (#20784) (kazuya
kawaguchi)
- 9d45511 oxfmt: Propagate file write errors instead of panicking
(#20997) (leaysgur)
- 139ddd9 formatter: Handle leading comment after array elision (#20987)
(leaysgur)
- 4216380 oxfmt: Support `.editorconfig` `tab_width` fallback (#20988)
(leaysgur)
- d10df39 formatter: Resolve pending space in fits measurer before
expanded-mode early exit (#20954) (Dunqing)
- f9ef1bd formatter: Avoid breaking after `=>` when arrow body has JSDoc
type cast (#20857) (bab)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
oxlint_v1.59.0 apps_v1.59.0 oxfmt_v0.44.0
2026-04-07 09:35:15 +09:00
BoshenandBoshen 38aea543e4 release(crates): oxc v0.124.0 (#21084)
### 🐛 Bug Fixes

- fc7f60c allocator: Revert changes to
`get_current_chunk_footer_field_offset` (#20964) (overlookmotel)
- 31316c8 semantic: Rebind class expressions before identifier checks
(#20916) (camc314)

### ⚡ Performance

- fb52383 napi/parser, linter/plugins: Clear buffers and source texts
earlier (#21025) (overlookmotel)
- 3b7dec4 napi/parser, linter/plugins: Use `utf8Slice` for decoding
UTF-8 strings (#21022) (overlookmotel)
- 012c924 napi/parser, linter/plugins: Speed up decoding strings in raw
transfer (#21021) (overlookmotel)
- 55e1e9b napi/parser, linter/plugins: Initialize vars as 0 (#21020)
(overlookmotel)
- c25ef02 napi/parser, linter/plugins: Simplify branch condition in
`deserializeStr` (#21019) (overlookmotel)
- 9f494c3 napi/parser, linter/plugins: Raw transfer use
`String.fromCharCode` in string decoding (#21018) (overlookmotel)
- 91cf105 allocator: Increase initial chunk size from 512B to 16KB
(#20968) (overlookmotel)
- cbc0c21 allocator: Add `#[cold]` to to error handling functions
(#20967) (overlookmotel)
- 0503a78 napi/parser, linter/plugins: Faster deserialization of `raw`
fields (#20923) (overlookmotel)
- a24f75e napi/parser: Optimize string deserialization for non-ASCII
sources (#20834) (Joshua Tuddenham)

### 📚 Documentation

- c78a57a syntax: Fix typo (#21044) (camc314)
- f5e228f allocator: Fix typo in comment (#20972) (overlookmotel)
- 7159d51 allocator: Improve doc comment examples for `vec2::Vec`
(#20969) (overlookmotel)
- b1da750 allocator, data_structures: Correct comments (#20966)
(overlookmotel)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
crates_v0.124.0
2026-04-07 09:34:33 +09:00
Sysix 629fbc1045 refactor(oxlint/lsp): rename unused disable directives message from "eslint-disable" to "oxlint-disable" (#21091) 2026-04-06 17:26:38 +00:00
renovate[bot]andCameron Clark 538d70373d chore(deps): update dependency oxlint-tsgolint to v0.20.0 (#21090)
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/) |
|---|---|---|---|---|---|
| [oxlint-tsgolint](https://redirect.github.com/oxc-project/tsgolint) |
[`0.19.0` →
`0.20.0`](https://renovatebot.com/diffs/npm/oxlint-tsgolint/0.19.0/0.20.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/oxlint-tsgolint/0.20.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxlint-tsgolint/0.20.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxlint-tsgolint/0.19.0/0.20.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxlint-tsgolint/0.19.0/0.20.0?slim=true)
|

---

### Release Notes

<details>
<summary>oxc-project/tsgolint (oxlint-tsgolint)</summary>

###
[`v0.20.0`](https://redirect.github.com/oxc-project/tsgolint/releases/tag/v0.20.0)

[Compare
Source](https://redirect.github.com/oxc-project/tsgolint/compare/v0.19.0...v0.20.0)

#### What's Changed

- chore(deps): update crate-ci/typos action to v1.45.0 by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot] in
[#&#8203;863](https://redirect.github.com/oxc-project/tsgolint/pull/863)
- fix(no-unnecessary-type-arguments): handle Partial aliases in
default-type checks by
[@&#8203;camc314](https://redirect.github.com/camc314) in
[#&#8203;862](https://redirect.github.com/oxc-project/tsgolint/pull/862)
- feat: enrich await-thenable diagnostics by
[@&#8203;camc314](https://redirect.github.com/camc314) in
[#&#8203;865](https://redirect.github.com/oxc-project/tsgolint/pull/865)
- feat: enrich no-unsafe-enum-comparison diagnostics by
[@&#8203;camc314](https://redirect.github.com/camc314) in
[#&#8203;867](https://redirect.github.com/oxc-project/tsgolint/pull/867)
- chore(deps): update github-actions by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot] in
[#&#8203;870](https://redirect.github.com/oxc-project/tsgolint/pull/870)
- chore(deps): update extractions/setup-crate action to v2 by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot] in
[#&#8203;871](https://redirect.github.com/oxc-project/tsgolint/pull/871)
- chore(deps): update dependency dprint to v0.53.2 by
[@&#8203;renovate](https://redirect.github.com/renovate)\[bot] in
[#&#8203;869](https://redirect.github.com/oxc-project/tsgolint/pull/869)
- fix(prefer-optional-chain): ignore non-access OR comparison by
[@&#8203;camc314](https://redirect.github.com/camc314) in
[#&#8203;872](https://redirect.github.com/oxc-project/tsgolint/pull/872)
- chore: update typescript-go submodule by
[@&#8203;camc314](https://redirect.github.com/camc314) in
[#&#8203;873](https://redirect.github.com/oxc-project/tsgolint/pull/873)

**Full Changelog**:
<https://github.com/oxc-project/tsgolint/compare/v0.19.0...v0.20.0>

</details>

---

### Configuration

📅 **Schedule**: 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:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ1cGRhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cameron Clark <cameron.clark@hey.com>
2026-04-06 15:25:27 +01:00