Commit Graph

20233 Commits

Author SHA1 Message Date
Cameron 7d09bf6312 feat(codegen): claim annotation comments by node id 2026-09-04 14:48:49 +01:00
Cameron 576218f5f1 feat(codegen): print comments inside empty containers 2026-09-04 14:48:49 +01:00
Cameron 1b2ddc7b27 feat(codegen): print comments inside structural bodies 2026-09-04 14:48:49 +01:00
Cameron ec6960c662 feat(codegen): print comments inside literals 2026-09-04 14:48:49 +01:00
Cameron 66ce3e6896 feat(codegen): print comments inside functions 2026-09-04 14:48:49 +01:00
Cameron 3acb77d25f feat(codegen): print comments 2026-09-04 14:48:49 +01:00
Cameron f38cbf3747 feat(semantic): rehome comments during node id rebuild 2026-09-04 14:48:49 +01:00
Cameron 5195a0588c feat(ast_visit): add comment attachment sidecar 2026-09-04 14:48:49 +01:00
Cameron 1130d46fa4 feat(ast_visit): add standalone node id assignment 2026-09-04 14:48:49 +01:00
Sysix 2a68cc458b refactor(oxlint/lsp): remove Option for code actions map (#26335)
The `Option<>` wrap for `Vec<LinterCodeAction>` is not needed, after each lint-run we save an entry (even if empty) to the map.
There is no different code branch for `None` as a value.
2026-09-04 13:31:46 +00:00
overlookmotel 613bc92c2e chore(codeowners): add @overlookmotel as codeowner of oxc_lexer (#26329)
I'm not actually the primary owner of this code - @ShanonJackson is. But add me to codeowners file, so I get added as a reviewer on any PRs touching the crate, so I don't miss them.
2026-09-04 13:25:58 +00:00
renovate[bot] 007a9fdc64 chore(deps): update dependency tsdown to v0.23.0 (#26300)
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/) |
|---|---|---|---|---|---|
| [tsdown](http://tsdown.dev/)
([source](https://redirect.github.com/rolldown/tsdown)) | [`0.22.14` →
`0.23.0`](https://renovatebot.com/diffs/npm/tsdown/0.22.14/0.23.0) |
![age](https://developer.mend.io/api/mc/badges/age/npm/tsdown/0.23.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tsdown/0.23.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tsdown/0.22.14/0.23.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tsdown/0.22.14/0.23.0?slim=true)
|

---

### Release Notes

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

###
[`v0.23.0`](https://redirect.github.com/rolldown/tsdown/releases/tag/v0.23.0)

[Compare
Source](https://redirect.github.com/rolldown/tsdown/compare/v0.22.14...v0.23.0)

#####    🧭 Migration Guide

Most users can upgrade directly. Before upgrading, run one final build
with `tsdown@0.22.14` and resolve all deprecation warnings.

- **config**:
  - `bundle: false` → `unbundle: true`; `bundle: true` can be removed
  - `outExtension` → `outExtensions`
  - `publicDir` / `--public-dir` → `copy` / `--copy`
  - `removeNodeProtocol: true` → `nodeProtocol: 'strip'`
  - `injectStyle` → `css.inject`
- **deps**:
  - `inlineOnly` / `deps.onlyAllowBundle` → `deps.onlyBundle`
  - `skipNodeModulesBundle: true` → `deps.neverBundle: true`
- `resolveDepSubpath` now defaults to `false`; set it to `true` to
preserve the previous behavior
- **dts**:
- Select a generator with `dts.generator`, for example `{ generator:
'oxc' }`
- `dts.cjsReexport` was removed; dual-format builds now generate CJS
declarations in a separate pass
- **attw**:
- The default profile changed from `strict` to `esm-only`; set `profile:
'strict'` to preserve the previous checks
- **programmatic API**:
- `build()` now returns `{ bundles, watch }`; replace `const bundles =
await build()` with `const { bundles } = await build()`
- **requirements**:
- Node.js 25 is no longer supported; use `^22.18.0`, `^24.11.0`, or
`>=26.0.0`
- The packages no longer publish legacy `types` and `typesVersions`
fallbacks; use TypeScript’s `bundler`, `node16`, or `nodenext` module
resolution

#####    🚨 Breaking Changes

- Drop support for Node.js 25  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(26950)</samp>](https://redirect.github.com/rolldown/tsdown/commit/26950f1)
- Remove deprecated tsup compatibility options  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(50766)</samp>](https://redirect.github.com/rolldown/tsdown/commit/507661c)
- Drop `types` and `typesVersions`fields  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(be3ea)</samp>](https://redirect.github.com/rolldown/tsdown/commit/be3ea86)
- **attw**:
- Change default profile to `esm-only`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(9b3cf)</samp>](https://redirect.github.com/rolldown/tsdown/commit/9b3cfca)
- **deps**:
- Remove deprecated `deps.onlyAllowBundle`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(30c55)</samp>](https://redirect.github.com/rolldown/tsdown/commit/30c553d)
- Disable `resolveDepSubpath` by default  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(d300f)</samp>](https://redirect.github.com/rolldown/tsdown/commit/d300fcc)
- Remove deprecated `skipNodeModulesBundle`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(f2a3d)</samp>](https://redirect.github.com/rolldown/tsdown/commit/f2a3d8e)
- **dts**:
- Remove dts.cjsReexport option  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(9c70f)</samp>](https://redirect.github.com/rolldown/tsdown/commit/9c70fa9)
- Make `dts.generator` the only way to select generator  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(eb75f)</samp>](https://redirect.github.com/rolldown/tsdown/commit/eb75f9d)

#####    🚀 Features

- Expose programmatic watch controls  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz) in
[#&#8203;1062](https://redirect.github.com/rolldown/tsdown/issues/1062)
[<samp>(96a40)</samp>](https://redirect.github.com/rolldown/tsdown/commit/96a4098)
- **css**: Support function form for `css.modules.localsConvention`  - 
by [@&#8203;sxzz](https://redirect.github.com/sxzz) and
[@&#8203;lazerg](https://redirect.github.com/lazerg)
[<samp>(b566f)</samp>](https://redirect.github.com/rolldown/tsdown/commit/b566f6d)
- **report**: Add `summary` option to skip per-file size logs  -  by
[@&#8203;lazerg](https://redirect.github.com/lazerg) in
[#&#8203;1036](https://redirect.github.com/rolldown/tsdown/issues/1036)
[<samp>(020e9)</samp>](https://redirect.github.com/rolldown/tsdown/commit/020e9cd)

#####    🐞 Bug Fixes

- Allow `unplugin-unused` v0.5+  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(53c78)</samp>](https://redirect.github.com/rolldown/tsdown/commit/53c78cb)
- Ignore optional dependencies in type definitions  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(94622)</samp>](https://redirect.github.com/rolldown/tsdown/commit/946224d)
- **cli**:
- Camel-case nested flag keys  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(bf53f)</samp>](https://redirect.github.com/rolldown/tsdown/commit/bf53f43)
- **css**:
- Watch files imported via `@import`  -  by
[@&#8203;lazerg](https://redirect.github.com/lazerg) in
[#&#8203;1038](https://redirect.github.com/rolldown/tsdown/issues/1038)
[<samp>(ebee5)</samp>](https://redirect.github.com/rolldown/tsdown/commit/ebee509)
- **deps**:
- Apply `resolveDepSubpath` when `neverBundle` is `true`  -  by
[@&#8203;lazerg](https://redirect.github.com/lazerg) in
[#&#8203;1053](https://redirect.github.com/rolldown/tsdown/issues/1053)
[<samp>(4943c)</samp>](https://redirect.github.com/rolldown/tsdown/commit/4943c08)
- **exports**:
- Scope inlined dependencies to configs with exports  -  by
[@&#8203;lazerg](https://redirect.github.com/lazerg) in
[#&#8203;1040](https://redirect.github.com/rolldown/tsdown/issues/1040)
[<samp>(d5b80)</samp>](https://redirect.github.com/rolldown/tsdown/commit/d5b8015)
- **migrate**:
- Pin migrated projects to tsdown 0.22.14  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(113fb)</samp>](https://redirect.github.com/rolldown/tsdown/commit/113fb8a)
- Support non-interactive environments  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(51e41)</samp>](https://redirect.github.com/rolldown/tsdown/commit/51e4183)

#####    🏎 Performance

- Remove `asyncDispose` polyfill  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(82675)</samp>](https://redirect.github.com/rolldown/tsdown/commit/826755e)
- Replace `ansis` with `util.styleText`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(be6bf)</samp>](https://redirect.github.com/rolldown/tsdown/commit/be6bfd2)

#####     [View changes on
GitHub](https://redirect.github.com/rolldown/tsdown/compare/v0.22.14...v0.23.0)

</details>

---

### Configuration

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

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

🚦 **Automerge**: Enabled.

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

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

---

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

---

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

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-04 12:23:10 +00:00
overlookmotel c966acaac5 fix(parser): do not omit < token opening type argument list (#26328)
Fix tokens produced when `<<` opens a type argument list. e.g.:

```typescript
type Bar = ReturnType<<T>(x: T) => number>;
```

Previously only 1 `<` token was produced between `ReturnType` and `T`. This PR corrects that so 2 `<` tokens are produced.

TS-ESLint get this wrong too - hence why this wasn't noticed before, as our conformance tests compare to TS-ESLint.

PR submitted to fix TS-ESLint: https://github.com/typescript-eslint/typescript-eslint/pull/12821

In meantime, this PR skips the erroneously failing ESTree tokens conformance tests. We can can re-enable those tests once the fix lands in TS-ESLint.
2026-09-04 12:08:49 +00:00
camc314 6f22859717 chore(deps): update setup-node to v1.4.1 (#26296)
## Summary

- update `oxc-project/setup-node` from v1.4.0 to v1.4.1 across all workflows
- pick up `pnpm/action-setup` v6.0.10, whose newer bootstrap fixes broken `@pnpm/exe` shims during package-manager self-updates

The setup action fix was released after oxc-project/setup-node#34.
2026-09-04 10:20:51 +00:00
Pearce Ropion 253cdb2f46 fix(linter/eslint/id-length): exempt TS interface/type-literal members with never (#26310)
## Summary

The `id-length` lint rule lets users opt out of checking property name
lengths via a `properties: "never"` setting. This exemption worked
correctly for plain JavaScript object properties, but was silently
ignored for TypeScript interface members and object type literal
members. As a result, users who explicitly disabled property length
checks would still see false-positive warnings on their TypeScript type
definitions.

## Why

TypeScript interfaces and type literals describe object shapes using
their own dedicated syntax, distinct from JavaScript object literals.
The rule's internal logic only recognized the JavaScript form when
deciding whether to skip the length check, so the TypeScript equivalents
were treated as ordinary identifiers instead of property names, even
though users intended the same exemption to apply to both.

## Changes

- The rule now recognizes TypeScript interface and type literal members
as property names, so the `properties: "never"` setting applies to them
consistently with plain JavaScript object properties.
- Added test coverage confirming both the exempted and non-exempted
behavior for TypeScript interface and type literal members.

## Test plan

- Added passing test cases showing the exemption now applies to
TypeScript interface and type literal members.
- Added failing test cases confirming the rule still flags these members
under its default settings.
- Verified the fix manually against the exact reproduction case reported
in the issue, confirming the false-positive warning no longer occurs.
- Full linter test suite passes with no regressions.

## AI disclosure

Per the repo's AI usage policy: this fix was drafted with AI assistance
(Claude), and reviewed, tested, and understood by me before submission.
The linked issue itself was also AI-drafted and reviewed by me.

Resolves #26309

---------

Signed-off-by: Cameron <cameron.clark@hey.com>
Co-authored-by: Cameron <cameron.clark@hey.com>
2026-09-04 09:54:59 +01:00
leaysgur 0f4af5d7df test(formatter_tests): assert fingerprint survives formatting (#26322)
Historically, only JS formatter has had the `detect_code_removal` feature, which uses CI to check for missing nodes or comments.

While this would be useful in other languages (especially CSS), but setting up the mechanism is difficult. For now, just start with something simple that just guarantees the number of comments.

That said, even with a mechanism in place, it can't detect anything unless the cases are fully covered by fixtures, so this only tells us that the current state is problem-free.
2026-09-04 07:14:53 +00:00
leaysgur 172ddb67dc fix(formatter_css): keep a same-line line comment on its line (#26321)
Consistent output with other language formatters.
2026-09-04 07:14:53 +00:00
leaysgur cafaf32de1 fix(formatter_css): never drop comments inside an at-rule prelude (#26320)
Fix missing comment bug.
2026-09-04 07:14:52 +00:00
leaysgur 534a0fe838 fix(formatter_css): keep a line comment on its comma's line (#26319)
e.g.

```scss
$my-map: (
  "foo": 1, // Comment
  "bar": 2, // Comment
);
```

should not be formatted:

```scss
$my-map: (
  "foo": 1,
  // Comment
  "bar": 2, // Comment
);
```
2026-09-04 07:14:52 +00:00
leaysgur 99cfd7556e fix(formatter_css): hide raw comment printing API, use strcut instead (#26316)
#26313 for CSS formatter. This also fixes some bugs.
2026-09-04 07:14:52 +00:00
leaysgur 223eb9dcb8 refactor(formatter_yaml): hide raw comment printing API, use struct instead (#26315)
#26313 for YAML formatter.
2026-09-04 07:14:51 +00:00
leaysgur 54316b239f refactor(formatter_json): hide raw comment printing API, use struct instead (#26314)
#26313 for JSON formatter.
2026-09-04 07:14:51 +00:00
leaysgur fa493a735e refactor(formatter): remove impl Format for Comment for safety (#26313)
If line-comment is printed with this and forget to add `hardline` after it, content rides on line-comment and disappear.

To prevent, hide raw API and always use safer struct based one.
2026-09-04 07:14:50 +00:00
leaysgur 32084d466a docs(formatter_core): clarify printer hard_line compression (#26312)
`[hardline, hardline]` does not produce 2 line breaks. This is printer philosophy.
2026-09-04 07:14:50 +00:00
camc314 949d7a9302 chore(deps): update vitest to v5 (#26299)
## Summary

- update workspace test dependencies to Vitest 5.0.0
- pin Vitest and related tooling to Vite 8.2.2
- migrate removed sequential and benchmark APIs
- update the pnpm lockfile
2026-09-03 19:05:05 +00:00
overlookmotel b4f6593c4f ci(lexer): run lint, tests and conformance on both lexer implementations (#26298)
#26263 added the ability to run tests and conformance for both versions of `oxc_lexer` (SIMD and scalar fallback) on any platform.

Run tests and conformance on CI (both SIMD and scalar) on any PR which touches `oxc_lexer` crate or other files which affect conformance runner.

Additionally, run Clippy on the SIMD version (main Lint CI task doesn't lint it, due to the `target_feature = "avx2"` gate on the code).

All of this sets up `oxc_lexer` crate for further development, catching any regressions in CI.
2026-09-03 16:40:21 +00:00
overlookmotel 0aa2fff2eb docs(tools): add comment to lexer just recipe about running x86 version on Mac (#26297)
Follow-on after #26263. That PR added `just` commands to run `oxc_lexer` tests and conformance on any platform. Add a comment to the justfile pointing to solution for the cryptic error you get if `x86_64-apple-darwin` target is not installed on an M-chip Mac (it's not by default).
2026-09-03 16:40:20 +00:00
Armano a17de58e30 feat(minifier): process of return/throw in non last position and fix async * inlining (#26214)
This Pr brings couple optimizations and refactor,

- Disable merging: `if (a) return x; return;` and `if (a) return; return
x;` when is descendant of `async* function`
- Handle empty chains: `if (a) return; return;` → `a; return;`
- Process returns/throw anywhere in block via handler merge `if (a)
return; return; var b` → `a; return; var b`

fixes #26255
ref #24331
2026-09-03 23:05:40 +08:00
camc314 f6b75b4a6b test(parser): group annotation application cases (#26294)
## Summary

- group independent `PURE` and `NO_SIDE_EFFECTS` application checks
- clarify test names for unapplied annotation cases
2026-09-03 14:50:56 +00:00
camc314 03cdfdbf17 test(codegen): group unapplied annotation comment cases (#26295)
## Summary

- group unapplied `PURE` and `NO_SIDE_EFFECTS` codegen coverage
- keep the mixed-annotation preservation regression with related cases
2026-09-03 14:43:37 +00:00
overlookmotel 7e75a5aab6 test(ast_visit, linter/plugins): increase test coverage for UTF-16 offset conversion (#26287)
Follow-on after #26173 and #26223.

Expand the test coverage added in both PRs to cover more cases.
2026-09-03 14:33:15 +00:00
renovate[bot] 32d0cdcd4b chore(deps): update pnpm to v11.25.0 (#26293)
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/) |
|---|---|---|---|---|---|
| [pnpm](https://pnpm.io)
([source](https://redirect.github.com/pnpm/pnpm/tree/HEAD/pnpm11/pnpm))
| [`11.24.0` →
`11.25.0`](https://renovatebot.com/diffs/npm/pnpm/11.24.0/11.25.0) |
![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/11.25.0?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/11.25.0?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/11.24.0/11.25.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/11.24.0/11.25.0?slim=true)
|

---

### Release Notes

<details>
<summary>pnpm/pnpm (pnpm)</summary>

###
[`v11.25.0`](https://redirect.github.com/pnpm/pnpm/releases/tag/v11.25.0):
pnpm 11.25

[Compare
Source](https://redirect.github.com/pnpm/pnpm/compare/v11.24.0...v11.25.0)

##### Minor Changes

- Added an opt-in proof of concept that lets installs reuse a
dependency's build output across machines, by publishing and restoring
signed, organization-scoped artifacts through pnpr instead of running
the lifecycle scripts locally.

Configure it with the new `remoteSideEffectsCache` setting. A workspace
names the eligible `organization` and `packages`; everything describing
the act of signing — `publish`, `keyId`, `builderId`, `trustedKeys`,
`privateKey` and the provenance fields — is refused in
`pnpm-workspace.yaml` and read from the global config file or the
environment instead.

- Added macOS and Windows x64 and arm64 support to remote shared build
artifacts
[pnpm/pnpm#13771](https://redirect.github.com/pnpm/pnpm/issues/13771).

- Added the `audit.ignorePrune` setting. When set to `true`, `pnpm audit
--fix` removes ignored GHSA entries that no longer appear in the audit
report.

- Generalized the experimental shared-artifact protocol so candidates
and signed payloads identify a discriminated subject. Dependency side
effects use package and source-integrity subjects, while workspace tasks
use project and task subjects.

This changes shared-artifact request bodies and signed payloads. A pnpr
server and its clients have to be on matching versions.

- `pnpm init` now pins the latest pnpm version, instead of the version
of pnpm that ran the command. A project scaffolded by an outdated pnpm
therefore no longer inherits that staleness through its own
`devEngines.packageManager` / `packageManager` pin
[#&#8203;7490](https://redirect.github.com/pnpm/pnpm/issues/7490).

The version is read from the `latest` tag on the package-manager
registries. When that lookup cannot answer — no network, an unreachable
or slow registry, `offline`, or a `latest` that the `minimumReleaseAge`
/ `trustPolicy` settings reject — `pnpm init` pins the running version
as before, and never fails or hangs on the lookup. A `latest` that is
older than the running pnpm is never pinned either.

- A `scope` set in a project's `pnpm-workspace.yaml` is now ignored,
with a warning naming where to set it instead. `pnpm login` records the
scope as a `@scope:registry` route in the machine-global `auth.ini`,
which outranks `~/.npmrc` in every project — so a repository-committed
file could redirect a scope such as `@acme` for all of a user's other
projects after one routine login. Use `--scope`, the `PNPM_CONFIG_SCOPE`
environment variable, or the global config file instead
[#&#8203;13557](https://redirect.github.com/pnpm/pnpm/issues/13557).

- Verified remote build artifacts are persisted in the shared store with
their signed origin metadata. Later installs reverify the artifact
against current trust, policy, platform, and source before reuse, while
invalid remote variants are quarantined per channel
([pnpm/pnpm#13771](https://redirect.github.com/pnpm/pnpm/issues/13771)).

- Persist completed recursive tasks so `--resume-from` skips exactly the
work that passed during a matching interrupted or failed `pnpm -r run` /
`pnpm -r exec` invocation. When no compatible state exists, pnpm retains
its graph-based resume behavior.

- Allowed `pnpm update --patches` to refresh registry revisions through
a configured pnpr server while retaining locked package versions.

- Added explicit registry revision selection with `<version>+rN` and
`pnpm update --patches` for refreshing revision artifacts without
changing package versions. Registry-backed lockfile policy checks
recognize historical revisions, and pnpr now preserves safe revision
histories from upstream registries.

- Workspace install, rebuild, pack, publish, stage, and lifecycle work
now starts as soon as its dependencies finish instead of waiting for an
unrelated topological group.

- `pnpm stage approve` now approves several staged packages at once. Run
it without a stage id to pick from the staged versions interactively, or
pass a list of stage ids. The whole batch is approved with a single
one-time password, and pnpm asks for a new one only once the registry
stops accepting it. Inside a workspace, the selected packages are
approved in dependency order, and a package whose workspace dependency
could not be approved is skipped instead of being published against a
dependency that never reached the registry.

- Added per-task concurrency limits to workspace task orchestration. Set
`tasks.<name>.concurrency` in `pnpm-workspace.yaml` to limit how many
instances of that task may run across workspace projects at once:

  ```yaml
  tasks:
    build:
      concurrency: 2
  ```

- Added support for registry replacement tarballs using standard
integrity values, explicit revision fields, registry routing from the
`registries` setting, non-redirecting integrity-addressed URLs,
canonical safe-integer revision numbers, and pnpr proxying for immutable
upstream revision artifacts.

- `sideEffectsCache` now declares the whole of how a package's build
output is reused — whether one is restored, whether one is saved, and
the remote tier that shares it between machines:

  ```yaml
  sideEffectsCache:
    read: true
    write: true
    remote:
      org: acme
      packages: ['native-addon']
  ```

`sideEffectsCache: true`, `sideEffectsCacheReadonly`,
`remoteSideEffectsCache`, and its `organization` field all keep working.
Where a field is set under both spellings the one above wins; where it
is set under only one, it is kept.

Two behaviors change, both bringing this CLI in line with what the Rust
one already did: `sideEffectsCacheReadonly: true` now blocks writing to
the cache, and setting it alongside `sideEffectsCache: false` gives a
read-only view rather than switching the cache off entirely. A cache can
also be declared write-only now, to populate one the run does not read.

- Workspace task orchestration
([pnpm/rfcs#23](https://redirect.github.com/pnpm/rfcs/pull/23)). `pnpm
-r run` and `pnpm -r exec` now schedule per task instead of in
topological chunks: a task starts as soon as the tasks it depends on
have finished, so a project no longer waits for unrelated projects that
happen to share its chunk.

A new `tasks` section in `pnpm-workspace.yaml` declares what a task
depends on, using the `^` convention:

  ```yaml
  tasks:
    build:
      dependsOn: ['^build']
    test:
      dependsOn: ['build']
    lint: {}
  ```

`^name` means the named task in each of the project's workspace
dependencies; a bare `name` means the task in the same project; an entry
with no `dependsOn` declares an empty dependency list. A task with no
entry behaves as `dependsOn: ['^<its own name>']`, which is exactly what
the previous chunked ordering implied — an unconfigured workspace gets
the scheduler improvement and nothing else changes meaning. A project
without the script is reported skipped and passes its edges through to
its own dependencies, so a scriptless package does not sever a chain.

  Also part of this change:

- A dependency cycle among the tasks of a run is now an error naming the
participating tasks (`ERR_PNPM_TASK_CYCLE`) instead of silently running
in an arbitrary order. Setting `ignoreWorkspaceCycles: true` downgrades
the error to a warning: the cycle's tasks run in an arbitrary order
relative to each other.
- `--resume-from` now skips exactly the transitive dependencies of the
anchor package; work unrelated to the anchor still runs.
- Under `--no-bail`, tasks whose dependencies failed are reported as
skipped, not failed, and do not add to the exit code.
- With `--bail` (the default), the first failure still ends the run at
once and nothing new is dispatched — including scripts already queued
behind the concurrency limit.
- `pnpm -r run --dry-run <script>` prints the task graph that would
execute without running anything (including skipping the
`verifyDepsBeforeRun` check); `--json` emits the tasks and their
resolved dependency edges.
- Output is inherited rather than piped only when at most one script can
ever be in flight (`--workspace-concurrency=1`, or the graph forces the
scripts to run one after another).

##### Patch Changes

- An `_auth` entry in the global config file no longer decides which
registry packages come from when something else says. A `registry` or
`registries` declared in `pnpm-workspace.yaml` or the global config now
wins over the route inferred from a stored credential, which still
applies where nothing else declares one. The `pnpm_config__auth`
environment variable is unchanged: it stays the way to point a CI runner
at a mandated proxy, and still overrides what a repository declares.

- Prevent installs through a symlinked `node_modules` directory from
rewriting the target checkout
[pnpm/pnpm#14286](https://redirect.github.com/pnpm/pnpm/issues/14286).

- Treat empty scripts selected by a regular expression as missing before
running dependent tasks.

- The options type of the `fetch` command now declares `allowBuilds`, a
setting its handler already forwarded to the installer. Type-level only
— what `pnpm fetch` does is unchanged.

- Filter hidden scripts matched by a regular expression during recursive
runs when a visible script also matches.

- Fixed automatically switched pnpm versions forcing all descendant pnpm
processes to use the same version
[pnpm/pnpm#14309](https://redirect.github.com/pnpm/pnpm/issues/14309).

- Fixed `ERR_PNPM_UNUSED_PATCH` validation during incremental installs
[pnpm/pnpm#13692](https://redirect.github.com/pnpm/pnpm/issues/13692).

- Fixed `pnpm deploy --prod` failing when an excluded dev dependency was
also declared as an optional peer dependency
[pnpm/pnpm#14302](https://redirect.github.com/pnpm/pnpm/issues/14302).

- `pnpm update -g` no longer downgrades a global package. `--latest`
resolves the `latest` dist-tag, which can point at an older release than
the one installed — after `pnpm add -g <pkg>@next`, for instance
[#&#8203;14270](https://redirect.github.com/pnpm/pnpm/issues/14270).

`pnpm update -g` also no longer changes the pnpm version. pnpm's own
global install belongs to `pnpm self-update`
[#&#8203;14270](https://redirect.github.com/pnpm/pnpm/issues/14270).

- Copying a built package to its other hoisted locations no longer
replaces the destination directory. With `nodeLinker: hoisted`, that
replacement deleted the dependencies nested inside the destination's
`node_modules`, and made concurrent copies of the same build chunk fail
with `ERR_PNPM_ENOENT: no such file or directory, rename
'.../node_modules/_tmp_...'`
[#&#8203;12880](https://redirect.github.com/pnpm/pnpm/issues/12880).

- `pnpm update` no longer replaces the specifier a project declares for
a dependency that is also listed in `overrides`. A `catalog:` reference
stays a `catalog:` reference, and a declared range stays as written,
instead of being rewritten to the version the override resolved to
[#&#8203;12115](https://redirect.github.com/pnpm/pnpm/issues/12115).

- `pnpm update` no longer moves the range a project declares for a
dependency that `overrides` also lists, even when the override repeats
that range verbatim. Previously the updated `package.json` disagreed
with the lockfile, so the next `pnpm install --frozen-lockfile` failed
with a specifier mismatch
[#&#8203;14224](https://redirect.github.com/pnpm/pnpm/issues/14224).

- Make `pnpm add --lockfile-only` skip dependency linking
[pnpm/pnpm#14286](https://redirect.github.com/pnpm/pnpm/issues/14286).

- `--production` is accepted again as an alias of `--prod` on `install`,
`fetch`, `prune`, `update`, `list`, `why`, and `sbom`, and the install
that `verifyDepsBeforeRun` reproduces is now spelled with `--prod`.
`pnpm run` no longer aborts with "unexpected argument '--production'
found" after a production-only install
[#&#8203;14147](https://redirect.github.com/pnpm/pnpm/issues/14147).

- The progress output no longer overwrites the lines above it once it
grows taller than the terminal window
[#&#8203;14270](https://redirect.github.com/pnpm/pnpm/issues/14270).

- Restoring a dependency's build from the remote side-effects cache no
longer downloads files the store already holds.

- Forward `patchedDependencies` hashes and `packageExtensions` to pnpr
so server-side resolution preserves patches and package extensions in
the lockfile and installed packages.

- Published the workspace task graph and scheduler as
`@pnpm/workspace.task-scheduler` so other workspace commands can use the
same dependency-aware scheduling as recursive run and exec.

- The environment variables for the remote side-effects cache are named
for the setting they configure: `PNPM_SIDE_EFFECTS_CACHE_REMOTE_KEY_ID`,
`..._BUILDER_ID`, `..._IMAGE_DIGEST`, `..._ARCHITECTURE_BASELINE`,
`..._PRIVATE_KEY`, `..._BUILD_ENV`, `..._TRUSTED_KEYS` and
`..._PUBLISH`. The `PNPM_REMOTE_SIDE_EFFECTS_CACHE_*` names keep
working, and the new one wins when both are set.

- A `devEngines.packageManager` range pin on pnpm is now recorded in
`pnpm-lock.yaml`'s `packageManagerDependencies` when the running pnpm
already satisfies it, using the running version and keeping the range as
the recorded specifier. Previously only an exact pin — or a range
resolved on the way through a version switch — reached the lockfile, so
a range pin written by hand (or by any tool other than `pnpm add` /
`pnpm self-update`) left the project without the shared resolution the
pin exists to provide.

- Fixed recursive `run` cleanup on Windows when a lifecycle script fails
while another script's process tree is still running.

- The update notification now suggests `pnpm self-update` when
`PNPM_HOME` manages the pnpm in use, and the [standalone install
script](https://pnpm.io/installation) otherwise — under Corepack, or
when another package manager installed pnpm. `pnpm self-update` under
Corepack names the standalone install script too.

- Enforce `allowBuilds` when a prepared git dependency is reused from
the shared store, and use the lockfile's canonical git resolution ID in
approval suggestions.

- Topologically sorting workspace projects now runs in linear time,
fixing installs and lockfile updates that stalled for seconds on
workspaces with thousands of projects forming deep dependency chains
[#&#8203;14149](https://redirect.github.com/pnpm/pnpm/issues/14149),
[#&#8203;14151](https://redirect.github.com/pnpm/pnpm/issues/14151).

<!-- sponsors -->

##### Platinum Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer"><img
src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
      </td>
      <td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160"
alt="OpenAI" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/notion.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/notion_light.svg" />
<img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"
/>
          </picture>
        </a>
      </td>
    </tr>
  </tbody>
</table>

##### Gold Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity"
/>
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220"
alt="Discord" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer"><img
src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160"
alt="SerpApi" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a
href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220"
alt="CodeRabbit" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a
href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190"
alt="Stackblitz" />
          </picture>
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190"
alt="Workleap" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes"
target="_blank" rel="noopener noreferrer"><img
src="https://pnpm.io/img/users/latitude.svg" width="160"
alt="Latitude"></a>
      </td>
    </tr>
  </tbody>
</table>

<!-- sponsors end -->

</details>

---

### Configuration

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

- Branch creation
  - "before 10am on the first day of the month"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, 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:eyJjcmVhdGVkSW5WZXIiOiI0NC42MS4xIiwidXBkYXRlZEluVmVyIjoiNDQuNjEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-03 14:29:56 +00:00
renovate[bot] b2e30f41c2 chore(deps): update dependency rust to v1.98.1 (#26292)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [rust](https://redirect.github.com/rust-lang/rust) | patch | `1.98.0`
→ `1.98.1` |

---

### Release Notes

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

###
[`v1.98.1`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1981-2026-09-03)

[Compare
Source](https://redirect.github.com/rust-lang/rust/compare/1.98.0...1.98.1)

\===========================

<a id="1.98.1"></a>

- [rustc: fix miscompilation in generating
vtables](https://redirect.github.com/rust-lang/rust/issues/161441)

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-03 14:20:27 +00:00
overlookmotel da77cc0ae7 test(ast_visit): re-order tests for Utf8ToUtf16 (#26286)
Pure refactor of tests. Move the new tests added in #26173 to lower down below the existing unit tests.
2026-09-03 14:14:34 +00:00
overlookmotel 67dd054273 docs(ast_visit): correct out-of-date comments on Utf8ToUtf16 converter (#26285)
Comments-only change.

While reviewing #26173 and #26223, I noticed that various comments on UTF-8 to UTF-16 offset conversion code were out of date or unclear. Bring them up to date, and add some clarifications.
2026-09-03 14:07:55 +00:00
Cameron 8c7ea7678d fix(ast_visit): account for trimmed source offsets (#26223)
## Summary

- keep UTF-8 translation offsets absolute when the converter is built
from source with a trimmed BOM or partial-source prefix
- extend the Oxlint BOM fixture with the reported comment-before-Unicode
case
- assert the JS plugin API returns the complete comment range and source
slice

Without the fix, the integration snapshot reports an end offset of 4 and
slices `"/*x*"`. With the fix, it reports an end offset of 5 and slices
`"/*x*/"`.

Fixes #26162

*Update*: #26173 fixed the same bug in the same way, and has been
merged. This PR adds more tests, so merging it on top.

Co-authored-by: camc314 <18101008+camc314@users.noreply.github.com>
2026-09-03 13:58:10 +01:00
Bharadwaj Pendyala f07dca52c4 fix(ast_visit): add the trimmed prefix length to translation table offsets (#26173)
Closes #26162.

`Utf8ToUtf16::new_with_offset` seeds the translation table with an
absolute BOM entry, `{ utf8_offset: 3, utf16_difference: 3 }`, but
`build_translations` records later entries relative to the trimmed
source text. From the first non-ASCII character on, the table is 3 bytes
short and offsets land on the wrong side of a boundary.

For the issue repro, a JS plugin reading
`context.sourceCode.getAllComments()[0]` gets `0..4`, so
`text.slice(start, end)` is `"/*x*"` instead of `"/*x*/"`. Parsing the
BOM'd file and converting comment spans the way `parse.rs` does gives
`comment span = 0..4`, `"/*x*"` before the change and `comment span =
0..5`, `"/*x*/"` after.

Add `offset` back on when pushing the entry so the table stays absolute.
This is one line in `build_translations`.

`Utf8ToUtf16::new` passes `offset: 0`, so the parser, coverage, and
benchmarks are unchanged. The four non-zero-offset callers are in the
linter's JS-plugin path: `crates/oxc_linter/src/lib.rs:752` (BOM) and
`:754` (leading newline of a Vue/Astro/Svelte fragment),
`apps/oxlint/src/js_plugins/parse.rs:249` and `fix.rs:34`. Each trims
the prefix from `source_text` before constructing this type. I left the
other two spots the reporter flagged alone because they look like
separate bugs.

Both new tests fail on `db66f58` before the change and pass after:

- `translate_offsets_after_trimmed_bom`: comment end `8` converts to
`4`, expected `5`.
- `translate_offsets_with_trimmed_prefix`: sweeps every byte offset of
three sources against the same source with nothing trimmed, for a 1-byte
and a 3-byte prefix. One source puts the non-ASCII characters in the
SIMD aligned-chunk path rather than the short-source path.

Ran on `db66f58`, macOS arm64, rustc 1.98.0:

- `cargo test -p oxc_ast_visit --lib --features serialize`: 5 passed, 0
failed (3 passed, 2 failed without the fix)
- `cargo test -p oxc_linter`: 1256 passed, 0 failed
- `cargo clippy -p oxc_ast_visit --all-features --all-targets -- -D
warnings`: clean
- `cargo fmt --all --check`: clean

Per the AI usage policy: I used an AI assistant on this. The diagnosis,
the tests and the numbers above are all mine and I ran every command
quoted here.
2026-09-03 13:55:02 +01:00
overlookmotel 6365db964b test(lexer): enable oxc_lexer conformance tests on all platforms (#26263)
`oxc_lexer` has 2 implementations:

1\. SIMD-based on x86_64 with AVX2.
2\. Scalar/SWAR fallback which works on all platforms.

Both produce the same output.

This PR enables running the lexer conformance on either implementation. Which implementation is tested depends on what build flags are passed to `cargo coverage`.

It turns out that it's possible to test the SIMD implementation on Mac by compiling as x86_64, and running it under Rosetta 2.

This PR also adds `just` recipes to run tests and conformance on either implementation:

- `just test-lexer`
- `just test-lexer-simd`
- `just conformance-lexer`
- `just conformance-lexer-simd`

These commands should work correctly on any of Linux x86, Windows x86, Mac aarch64.
2026-09-03 10:59:05 +00:00
overlookmotel 651c54649a refactor(coverage/lexer): clarify code and fix clippy warnings (#26262)
Refactor the conformance tester for lexer.

The diff is large, as I've reordered the code so it now reads top-to-bottom, but it's pure refactor. The actual logic is exactly as it was before - just moved things around, renamed vars, shortened code etc.

This also fixes some Clippy warnings which were present before, but hidden because this code is gated behind `target_feature = "avx2"`. That changes in next PR #26263, at which point CI would have started failing if the warnings weren't fixed here first.
2026-09-03 10:59:05 +00:00
overlookmotel d752d501c6 ci(coverage): error if cargo coverage passed unknown argument (#26261)
Small fix to `cargo coverage`.

Previously a typo e.g. `cargo coverage prser` would fall through to the catch-all arm and would run all coverage tasks.

Instead, this PR makes it panic with an error `Unknown coverage task: "prser"`. This ensures you are running what you think you are.
2026-09-03 10:59:05 +00:00
overlookmotel ef0f33eb7d test(all): run conformance with panic = "unwind" (#26260)
Conformance tests for `oxc_lexer` crate rely on using `catch_unwind` to catch panics and report them, rather than crashing the whole process. Currently this doesn't work because conformance is compiled with `panic = "abort"` (inherited from `release` profile).

This PR fixes that by adding `panic = "unwind"` to `coverage` profile.

I've measured the time it takes to run conformance locally before/after this change, and the difference is within noise (+/- 2%), so this seems to have no adverse effects.

`codegen-conformance` profile only existed to add `panic = "unwind"` too, so after this change it becomes identical to `coverage` profile. That makes it redundant, so this PR removes it in favour of just using `coverage` everywhere.
2026-09-03 10:59:04 +00:00
overlookmotel 94d815d7ff build(vscode): VS Code settings use --all-features (#26259)
Some code in Oxc repo is Cargo feature-gated - most notably all the code in `oxc_data_structures`, but also bits and pieces all over the place.

Currently, when using VS Code, Rust Analyzer only gives you jump-to-definition etc on code which is part of default features set. Code that's gated behind a Cargo feature is "dark" to RA. Ditto `cargo check` and Clippy which are run on save in VS Code. This makes working on feature-gated code slow and annoying.

This PR alters the default VS Code settings for the repo to run Rust Analyzer, check, and Clippy within VS Code with the equivalent of `--all-features`. This matches what `just check` / `cargo ck` and `just lint` do.

This also has a beneficial side effect:

RA shares `target` directory with the terminal. In a workflow where you're using RA and also running `just check` / `just lint` regularly (which agents do), previously each would compile separately with different settings. Now they all use the same settings, so share the same build artifacts. This reduces both compile/check/lint time, and reduces the speed at which `target` directory grows.
2026-09-03 10:59:04 +00:00
碳苯 Carbon bfb4c57a5d feat(parser): distinguish unapplied no-side-effects comments (#26120)
## Summary 

Fixes #26088

`NO_SIDE_EFFECTS` can either be applied to a function:

```rs
/* #__NO_SIDE_EFFECTS__ */ function foo() {}
```

Or be meaningless for its position, since it only works on function
declaration:
```rs
/* #__NO_SIDE_EFFECTS__ */ value;
```

But oxc could not distinguish these two cases. 

This PR adds `CommentContent::NoSideEffectsNotApplied`, mirroring the
existing `PureNotApplied`.

---------

Co-authored-by: Cameron <cameron.clark@hey.com>
2026-09-03 11:14:24 +01:00
camc314 5f9cffc753 fix(linter/typescript/no-explicit-any): fix rest parameter to unknown[] (#26279)
## Summary

- replace bare any rest parameter annotations with unknown[] when fixToUnknown is enabled
- preserve existing element-wise fixes for any[] and Array<any>
- add regression coverage for function declarations, arrow functions, call signatures, and method signatures reported in https://github.com/typescript-eslint/typescript-eslint/issues/12813
2026-09-03 09:46:00 +00:00
camc314 204fa80b5d ci(labeler): label lexer PRs (#26278)
## Summary

- automatically apply `A-lexer` to changes under `crates/oxc_lexer`
- keep parser-internal lexer changes covered by the existing `A-parser` rule
2026-09-03 09:17:38 +00:00
camc314 4de9fa3d44 fix(linter/react/jsx-no-literals): check nested JSX expression literals (#26253)
## Summary

- report text literals in JSX nested inside expression containers
- preserve upstream element override inheritance through nested JSX and fragments
- add regression coverage for logical, conditional, and plain JSX expressions

Fixes #26208
2026-09-03 09:01:50 +00:00
leaysgur 2028896ab9 fix(formatter_css): preserve comments around SCSS/Less variable values (#26276)
```less
// input
@a: /* c */ 1;

// before
@a: 1;

// after
@a: /* c */ 1;
```

Comment should be preserved.

```scss
// input
$x: // c
  1;

// before
$x:
  // c1;

// after
$x: // c
  1;
```

Content should be preserved.
2026-09-03 08:17:36 +00:00
leaysgur 6752abc1a2 fix(formatter_css): keep leading comments before (#26272)
Apply comment printing policy.
2026-09-03 08:17:36 +00:00
leaysgur 3b054de895 fix(formatter_graphql): align comment printing after open { (#26271)
Aligned the handling of line comments immediately following an opening `{`.

(For GraphQL only,) previously kept their own line, now matches other languages by inserting a line break and treating them as leading comments for the next element.

This brings it in line with Prettier's style. The only drawback is that the behavior of `-line` style comments. However, since most of these can be replaced with `-next-line` style comments, we are going to standardize on this consistent behavior for now.

prettier/prettier#1267 (won't fix)
2026-09-03 08:17:35 +00:00
leaysgur b3c287a47d fix(formatter_css): fix SCSS bracket list printing (#26270)
`$basic: [1, 2];` and `$basic: (1, 2);` should be formatted in the same way.
2026-09-03 08:17:35 +00:00