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.
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.
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.
## 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.
## 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>
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.
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.
## 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
#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.
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).
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) |

|

|

|

|
---
### 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
[#​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
[#​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
[#​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`
[#​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_...'`
[#​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
[#​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
[#​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
[#​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
[#​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
[#​14149](https://redirect.github.com/pnpm/pnpm/issues/14149),
[#​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>
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>
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.
## 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>
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.
`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.
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.
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.
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.
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.
## 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>
## 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
## 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
```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.
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)