mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
codex/parser-grouped-expression-allocation
1234 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
92cfb14aa4 |
fix(linter/plugins): fix types for walkProgram and walkProgramWithCfg (#20081)
Fix a mistake in our (internal) types: `walkProgramWithCfg` was missing that elements can be `CfgVisitFn`. Also refactor the types for `walkProgram`, importing the original `VisitFn` and `EnterExit` types from where they're defined. |
||
|
|
ee0491e937 |
fix(apps,napi): explicitly specify libs in tsconfigs (#20071)
Replaces #20064 The `dom` lib was implicitly being injected, this means stuff like `Token` and `Comment` were in the global scope, which was incorrect. cc @overlookmotel |
||
|
|
3a8c4a4cad |
release(crates): oxc v0.116.0 (#19911)
### 🚀 Features - |
||
|
|
05ccf9f21e |
perf(linter/plugins): transfer tokens via raw transfer (#19893)
Transfer tokens via raw transfer in Oxlint JS plugins. Deserializer is written by hand. `Token` is not a normal struct, so deserializer cannot be generated. |
||
|
|
1f9c115632 |
test(estree/tokens): add tests for tokens via raw transfer (#19885)
Implement the beginnings of support for tokens in `napi/parser`. This PR only adds support for tokens via raw transfer, and behind an undocumented `experimentalTokens` option. Add tests checking that tokens received on JS side via raw transfer match snapshots for all Test262, AcornJSX, and TypeScript test cases. They do! The tests are the main purpose of this PR, making sure it works before we switch over to tokens via raw transfer in Oxlint. We can add full tokens support to `napi/parser` (including via JSON transfer) later on. |
||
|
|
8b89309f57 |
test(napi/parser): fix tests for range, parent, and lazy on TS fixtures (#19884)
`napi/parser`'s tests for raw transfer ranges, parents, and lazy deserialization were incorrect. They were testing parsing the entire TS fixture file, which can contain multiple parts, instead of testing each part individually. Fix that. |
||
|
|
6a6513c6ab |
perf(linter/plugins): use Oxc tokens in plugins (#19498)
Builds on #19497. Use the tokens generated by Oxc's parser in linter plugins, instead of running TS parser to tokenize source. This is a sizeable perf gain, and also allows us to remove TS parser from `oxlint`'s bundle (#19531). Additionally, our parser is more accurate than TypeScript - we handle HTML comments and space before slash in closing JSX elements (`< /div>`) - so this fixes a few conformance tests. |
||
|
|
2fa936fd2b |
docs(README.md): map npm package links to npmx.dev (#19666)
## Summary - replace npm package links from npmjs.com to https://npmx.dev - only update documentation files --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> |
||
|
|
b3b2d305f9 |
perf(parser): introduce ParserConfig (#19637)
### What this PR does Introduce `ParserConfig` trait (another try at #16785). The aim is to remove the large performance regression in parser that #19497 created, by making whether the parser generates tokens or not a compile-time option. `ParserConfig::tokens` method replaces `ParseOptions::collect_tokens` property. The former can be const-folded at compile time, where the latter couldn't. ### 3 options This PR also introduces 3 different config types that users can pass to the parser: * `NoTokensParserConfig` (default) * `TokensParserConfig` * `RuntimeParserConfig` The first 2 set whether tokens are collected or not at compile time. The last sets it at runtime. All 3 implement `ParserConfig`. `NoTokensParserConfig` is the default, and is what's used in compiler pipeline. It switches tokens off in the parser, and makes all the tokens-related code dead code, which the compiler eliminates. This makes the ability of the parser to generate tokens zero cost when it's not used (in the compiler pipeline). `TokensParserConfig` is the one to use where you *always* want tokens. This is probably the config that linter will use. `RuntimeParserConfig` is the one to use when an application decides whether to generate tokens or not at runtime. This config avoids compiling the parser twice, at the cost of runtime checks. This is what NAPI parser package will use. ### Future extension #### Supporting additional features In future we intend to build the UTF-8 to UTF-16 offsets conversion table in the parser. This will be more performant than searching through the source text for unicode characters in a 2nd pass later on. But this feature is only required for uses of the parser where we're interacting with JS side (NAPI parser package, linter with JS plugins). `ParserConfig` can be extended to toggle this feature on/off at compile time or runtime, in the same way as you toggle on/off tokens. #### Options and configs This PR introduces `ParserConfig` but leaves `ParseOptions` as it is. So we now have 2 sets of options, passed to `Parser` with `with_options(...)` and `with_config(...)`. This is confusing. We could merge the 2 by making `ParseOptions` implement `ParserConfig`, so then you'd define all options with one `with_options` call. This would have the side effect of making all other parser options (e.g. `preserve_parens`) able to be set at either runtime or compile time, depending on the use case. For users consuming `oxc_parser` as a library, with specific needs, they could also configure `Parser` to their needs e.g. create a parser which only handles plain JS code with all the code paths for JSX and TS shaken out as dead code. This would likely improve parsing speed significantly for these use cases. ### Implementation details Why a trait instead of a cargo feature? IMO a trait is preferable for the following reasons: 1. We have 3 different use cases we need to support (the 3 provided configs). 3 different Cargo features would be unwieldy. 2. This situation would become far worse once we introduce more features e.g. UTF-8 -> UTF-16 conversion. 3. No problems around feature unification. We found Cargo features caused headaches when we used them in linter for toggling on/off JS plugins support. 4. No clippy errors which only appear when the feature is/isn't disabled, requiring complex `#[cfg_attr(feature = "whatever", expect(clippy::unused_async))]` etc. The introduction of a trait does not seem to significantly affect compile time: ``` # Before this PR cargo build -p oxc_parser 15.33s user 3.27s system 254% cpu 7.316 total cargo build -p oxc_parser --release 17.36s user 2.26s system 231% cpu 8.477 total cargo build -p oxc_parser --example parser 18.43s user 3.75s system 271% cpu 8.156 total cargo build -p oxc_parser --example parser --release 32.52s user 2.59s system 180% cpu 19.454 total # After this PR cargo build -p oxc_parser 15.00s user 3.24s system 272% cpu 6.692 total cargo build -p oxc_parser --release 16.71s user 2.12s system 287% cpu 6.539 total cargo build -p oxc_parser --example parser 18.50s user 3.91s system 285% cpu 7.845 total cargo build -p oxc_parser --example parser --release 33.48s user 2.63s system 169% cpu 21.263 total ``` Measured on Mac Mini M4 Pro, `cargo clean` run before each. The difference appears to be mostly within the noise threshold. |
||
|
|
9e11dc63a0 |
feat(parser,estree,coverage): collect tokens in parser and convert to ESTree format (#19497)
Implement a `collect_tokens` option for parser. When enabled, the parser stores all tokens produced during parsing in a `Vec`. Implement serializing the tokens to ESTree format. Currently this is not hooked up to NAPI parser or linter. That happens in a later PR in this stack (#19498). Serialization of tokens implementation is in new `oxc_estree_tokens` crate. Unfortunately it can't go in existing `oxc_estree` crate because `oxc_ast` depends on `oxc_estree`, and the tokens serialization code requires AST types - which would be a circular dependency. We may be able to move it into another crate (parser?) later on. |
||
|
|
7675bc43e7 |
release(crates): oxc v0.115.0 (#19626)
### 🚀 Features - |
||
|
|
08b0218dd6 | chore(submodules): update submodule SHAs to latest commits (#19518) | ||
|
|
fc66d6dfd1 |
refactor(formatter): Remove experimental prefix from sort_imports (#19472)
Internal changes that do not affect Oxfmt users. |
||
|
|
704c109d6d |
release(crates): oxc v0.114.0 (#19429)
### 🚀 Features - |
||
|
|
1bb0559a32 |
feat(playground): Support more sort-imports options (#19424)
It hadn't been updated for some time, so I made it compatible with the latest state. (I also want to stop manual mapping, but we are not yet ready for that...) |
||
|
|
e48e6b2f77 |
refactor(formatter,oxfmt): Simplify sort_imports options parsing (#19418)
Introduce `GroupEntry::parse()` to reduce redundants. |
||
|
|
9c34f7226b |
feat(formatter/sort_imports)!: Report invalid group name with renaming side-effect > side_effect (#19416)
- Breaking: Rename ambiguous modifier/selector names
- `side-effect` → `side_effect`
- `side-effect-style` → `side_effect_style`
- Now `-` is used only for joiner (`modifier-modifier-selector`)
- before: `value-side-effect-style` 🆚 after: `value-side_effect_style`
- Breaking: Add config-time validation for invalid group names
- previously silently ignored...
- or wrongly applied (and user didn't notice)
|
||
|
|
4baebefa81 |
feat(formatter/sort_imports): Support { newlinesBetween: bool } inside groups (#19358)
Fixes #17830 Introduce new variant for `groups` like: ```json // "newlinesBetween": true, // Default "groups": [ ["value-builtin", "value-external"], { "newlinesBetween": false }, // 👈🏻 "value-parent", "value-sibling" ] ``` This allows you to specify line breaks globally between groups while reverting them at any position. Conversely, you can also add line breaks at any position while specifying `newlinesBetween: false`. |
||
|
|
ebb80b32ff |
feat(ast): add node_id field to all AST struct nodes (#18138)
## Summary - Add `pub node_id: NodeId` as the first field in all AST structs (~190 structs across js.rs, ts.rs, jsx.rs, literal.rs) - Update codegen to special-case `node_id`: - `Dummy`: Use `NodeId::DUMMY` instead of `Dummy::dummy(allocator)` - `CloneIn`: Use `NodeId::DUMMY` for regular clone, preserve ID for semantic clone - `ContentEq`: Skip `node_id` from equality comparisons - `ESTree`: Skip `node_id` from serialization - `AstBuilder`: Exclude `node_id` from builder parameters, use `NodeId::DUMMY` - Update pattern matching in minifier and transformer to use `..` for new field - Update traverse script to include `NodeId` import This is the foundational step for assigning unique IDs to AST nodes. The `node_id` defaults to `NodeId::DUMMY` (value 0) for uninitialized nodes. ## Test plan - [x] `cargo build` succeeds - [x] `cargo test` passes - [x] `just ast` regenerates code correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
bcd0f6430f | fix(napi): disable mimalloc global allocator on android targets (#19214) | ||
|
|
acdb40ed42 |
release(crates): oxc v0.113.0 (#19210)
### 💥 BREAKING CHANGES - |
||
|
|
00d431d957 |
chore(oxlint,parser,e2e): explicitly set strict: false in tsconfigs (#19129)
fixes the failures seen in https://github.com/oxc-project/oxc/pull/19128 |
||
|
|
2bf7293c69 |
feat(mangler)!: enable top_level by default for modules and commonjs (#18278)
I think we can enable `top_level` by default. refs #18233 |
||
|
|
79689ba59b |
chore(napi/parser): use dot reporter in CI to reduce log output (#18974)
## Summary - Use `dot` reporter in CI to avoid logging ~58,000 test names from `parse-raw.test.ts` - `parse-raw.test.ts` runs test cases via `it.each()` from Test262 (~46k), TypeScript (~11k), and JSX (~40) fixtures 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
57917eef0f |
fix(parser): parse decorators on rest parameters (#18938)
## Summary - Add `decorators` field to `FormalParameterRest` to support decorators on rest parameters in TypeScript - Parse decorators before checking for rest parameters in formal parameter lists - Update semantic builder to visit decorators on rest parameters Fixes parsing of `typescript/tests/cases/compiler/sourceMapValidationDecorators.ts` 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
487601baca |
fix(napi): disable mimalloc on Windows to fix worker_threads crash (#18923)
## Summary - Disable mimalloc as the global allocator on Windows for all NAPI packages (`oxc-parser`, `oxc-minify`, `oxc-transform`) - On Windows, packages now use the system allocator instead Fixes #15518 ## Root Cause mimalloc has known issues with DLL unloading on Windows when the DLL is loaded by the main thread but unloaded by a worker thread ([mimalloc issue #288](https://github.com/microsoft/mimalloc/issues/288)). The cleanup code has `_mi_is_main_thread()` checks that prevent proper memory cleanup when called from a non-main thread, causing `STATUS_ACCESS_VIOLATION` crashes. ## Platforms with mimalloc enabled | Platform | mimalloc | |----------|----------| | macOS | ✅ | | Linux x86_64 | ✅ | | Linux aarch64 | ✅ | | Windows | ❌ (disabled) | | FreeBSD | ❌ | | ARM 32-bit | ❌ | | WASM | ❌ | 🤖 Generated with [Claude Code](https://claude.ai/code) |
||
|
|
16fbd43f12 | chore(submodules): update submodule SHAs to latest commits (#18877) | ||
|
|
6114a1335e |
release(crates): oxc v0.112.0 (#18842)
### 💥 BREAKING CHANGES - |
||
|
|
3d01fa1219 |
docs(transformer): update links to use Oxc docs (#18722)
Updated the links to Oxc docs instead of babel and esbuild. |
||
|
|
005910a084 |
fix(linter/plugins): support plugins outside of workspace (#18755)
## The problem ### 1. Bug with plugins outside of workspace directory There was a bug in workspaces implementation. `loadPlugin` was assuming that the plugin file is within the workspace, but that's not necessarily the case. e.g.: * Workspace 1: `/path/to/project/packages/foo` * Workspace 2: `/path/to/project/packages/bar` * JS plugin: `/path/to/project/node_modules/eslint-plugin-whatever` This problem arises because `loadPlugin` is determining which workspace to load a plugin for by search for the workspace whose root directory contains the plugin file. ### 2. Performance Every call to `loadPlugin`, `setupRuleConfigs`, or `lintFile` was first searching through all workspaces to find the right one (`getResponsibleWorkspace`). This is really expensive when there are lots of workspaces, and quite expensive even when there's only 1 because iterating hashsets is relatively slow. ## This PR This PR separates out CWD and workspace identifiers into 2 different concerns. * Each workspace has an ID which is unique. * Each workspace has a CWD (path to root directory as a file path). The workspace ID is currently the workspace's root directory as a `file://...` URL. Using that as it's guaranteed unique, even for paths which are not valid UTF-8 (`Path::to_string_lossy` can produce the same `&str` for different paths). But ID it doesn't have to be the URI - we could change it later to an integer ID if we want. Rust-side code passes the workspace ID to every call to `loadPlugin`, `setupRuleConfigs`, or `lintFile`. In CLI, it just passes `null` as the ID. There's only ever 1 workspace in CLI, so no point in the expense of passing a `String` on every call. These functions look up the CWD from the workspace ID in the `cwds` map. Separating these 2 concerns solves both problems listed above: 1. Plugins can be outside of the workspace's CWD (see added test). 2. `getResponsibleWorkspace` is removed, solving the perf issue. Note: The multiple hashmap lookups on each call to `lintFile` remain a perf drain. This is addressed in a later PR in this stack. |
||
|
|
e39a983ce3 |
refactor(linter/plugins): store source text in end of buffer (#18714)
Previously we had to store source text at start of buffers sent to JS via raw transfer. #18376 made changes to how raw transfer deserializer handles strings, in order to support files containing a BOM. Building on that, we're now able to remove the requirement that source text be at start of the buffer entirely. This PR changes the deserializer used in Oxlint JS plugins to accept source text being anywhere in the buffer, *as long as no other strings are after it*. In practice this just means that the source text must be allocated before anything else, which is easy to satisfy. Now the source text can be allocated with just the usual safe `allocator.alloc_str(source_text)` method. This change removes a ton of dodgy workarounds and unsafe code we used previously to get source text at the start of buffer. It makes the code less labyrinthine and far less likely a slip up can inadvertently introduce UB. Note: In `napi/parser`, source text still *is* at start of the buffer, as that's simpler and more efficient when the source text is written into the buffer on JS side. This change only affects Oxlint. |
||
|
|
3d349ca4d3 |
refactor(linter/plugins): bump @typescript-eslint/scope-manager dependency (#18632)
Closes #18398. Bump `@typescript-eslint/scope-manager` to latest. That release contains 2 bug fixes: * https://github.com/typescript-eslint/typescript-eslint/pull/11982 * https://github.com/typescript-eslint/typescript-eslint/pull/11995 We had workarounds for both bugs, added in: * #18312 * #18402 This PR bumps dependency to the new version which included the big fixes, and removes both workarounds, as they're no longer required. Also bumped all other usages of `@typescript-eslint/*` packages, so we use the same versions for everything. |
||
|
|
942663d9f7 |
chore(deps): update npm packages (#18582)
> ℹ️ **Note** > > This PR body was truncated due to platform limits. 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/) | |---|---|---|---|---|---| | [@babel/core](https://babel.dev/docs/en/next/babel-core) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-core)) | [`7.28.5` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fcore/7.28.5/7.28.6) |  |  |  |  | | [@babel/plugin-proposal-decorators](https://babel.dev/docs/en/next/babel-plugin-proposal-decorators) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-decorators)) | [`7.28.0` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-proposal-decorators/7.28.0/7.28.6) |  |  |  |  | | [@babel/plugin-transform-async-to-generator](https://babel.dev/docs/en/next/babel-plugin-transform-async-to-generator) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-async-to-generator)) | [`7.27.1` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-async-to-generator/7.27.1/7.28.6) |  |  |  |  | | [@babel/plugin-transform-class-properties](https://babel.dev/docs/en/next/babel-plugin-transform-class-properties) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-properties)) | [`7.27.1` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-class-properties/7.27.1/7.28.6) |  |  |  |  | | [@babel/plugin-transform-class-static-block](https://babel.dev/docs/en/next/babel-plugin-transform-class-static-block) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block)) | [`7.28.3` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-class-static-block/7.28.3/7.28.6) |  |  |  |  | | [@babel/plugin-transform-explicit-resource-management](https://babel.dev/docs/en/next/babel-plugin-transform-explicit-resource-management) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-explicit-resource-management)) | [`7.28.0` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-explicit-resource-management/7.28.0/7.28.6) |  |  |  |  | | [@babel/plugin-transform-exponentiation-operator](https://babel.dev/docs/en/next/babel-plugin-transform-exponentiation-operator) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-exponentiation-operator)) | [`7.28.5` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-exponentiation-operator/7.28.5/7.28.6) |  |  |  |  | | [@babel/plugin-transform-logical-assignment-operators](https://babel.dev/docs/en/next/babel-plugin-transform-logical-assignment-operators) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-logical-assignment-operators)) | [`7.28.5` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-logical-assignment-operators/7.28.5/7.28.6) |  |  |  |  | | [@babel/plugin-transform-optional-chaining](https://babel.dev/docs/en/next/babel-plugin-transform-optional-chaining) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-optional-chaining)) | [`7.28.5` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-optional-chaining/7.28.5/7.28.6) |  |  |  |  | | [@babel/plugin-transform-private-methods](https://babel.dev/docs/en/next/babel-plugin-transform-private-methods) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-private-methods)) | [`7.27.1` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-private-methods/7.27.1/7.28.6) |  |  |  |  | | [@babel/plugin-transform-private-property-in-object](https://babel.dev/docs/en/next/babel-plugin-transform-private-property-in-object) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-private-property-in-object)) | [`7.27.1` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-private-property-in-object/7.27.1/7.28.6) |  |  |  |  | | [@babel/plugin-transform-typescript](https://babel.dev/docs/en/next/babel-plugin-transform-typescript) ([source](https://redirect.github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-typescript)) | [`7.28.5` → `7.28.6`](https://renovatebot.com/diffs/npm/@babel%2fplugin-transform-typescript/7.28.5/7.28.6) |  |  |  |  | | [@napi-rs/wasm-runtime](https://napi.rs/) ([source](https://redirect.github.com/napi-rs/napi-rs/tree/HEAD/wasi-runtime)) | [`1.1.0` → `1.1.1`](https://renovatebot.com/diffs/npm/@napi-rs%2fwasm-runtime/1.1.0/1.1.1) |  |  |  |  | | [@vitest/browser](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/browser#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser)) | [`4.0.15` → `4.0.18`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/4.0.15/4.0.18) |  |  |  |  | | [@vitest/browser-playwright](https://vitest.dev/config/browser/playwright) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright)) | [`4.0.15` → `4.0.18`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser-playwright/4.0.15/4.0.18) |  |  |  |  | | [esbuild](https://redirect.github.com/evanw/esbuild) | [`0.27.1` → `0.27.2`](https://renovatebot.com/diffs/npm/esbuild/0.27.1/0.27.2) |  |  |  |  | | [eslint](https://eslint.org) ([source](https://redirect.github.com/eslint/eslint)) | [`9.36.0` → `9.39.2`](https://renovatebot.com/diffs/npm/eslint/9.36.0/9.39.2) |  |  |  |  | | [esquery](https://redirect.github.com/estools/esquery) | [`1.6.0` → `1.7.0`](https://renovatebot.com/diffs/npm/esquery/1.6.0/1.7.0) |  |  |  |  | | [ovsx](https://open-vsx.org) ([source](https://redirect.github.com/eclipse/openvsx/tree/HEAD/cli)) | [`0.10.7` → `0.10.8`](https://renovatebot.com/diffs/npm/ovsx/0.10.7/0.10.8) |  |  |  |  | | [playwright](https://playwright.dev) ([source](https://redirect.github.com/microsoft/playwright)) | [`1.57.0` → `1.58.0`](https://renovatebot.com/diffs/npm/playwright/1.57.0/1.58.0) |  |  |  |  | | [pnpm](https://pnpm.io) ([source](https://redirect.github.com/pnpm/pnpm/tree/HEAD/pnpm)) | [`10.24.0` → `10.28.1`](https://renovatebot.com/diffs/npm/pnpm/10.24.0/10.28.1) |  |  |  |  | | [prettier](https://prettier.io) ([source](https://redirect.github.com/prettier/prettier)) | [`3.8.0` → `3.8.1`](https://renovatebot.com/diffs/npm/prettier/3.8.0/3.8.1) |  |  |  |  | | [publint](https://publint.dev) ([source](https://redirect.github.com/publint/publint/tree/HEAD/packages/publint)) | [`0.3.15` → `0.3.17`](https://renovatebot.com/diffs/npm/publint/0.3.15/0.3.17) |  |  |  |  | | [tinypool](https://redirect.github.com/tinylibs/tinypool) | [`2.0.0` → `2.1.0`](https://renovatebot.com/diffs/npm/tinypool/2.0.0/2.1.0) |  |  |  |  | | [type-fest](https://redirect.github.com/sindresorhus/type-fest) | [`5.3.0` → `5.4.1`](https://renovatebot.com/diffs/npm/type-fest/5.3.0/5.4.1) |  |  |  |  | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`4.0.15` → `4.0.18`](https://renovatebot.com/diffs/npm/vitest/4.0.15/4.0.18) |  |  |  |  | --- ### Release Notes <details> <summary>babel/babel (@​babel/core)</summary> ### [`v7.28.6`](https://redirect.github.com/babel/babel/compare/v7.28.5...v7.28.6) [Compare Source](https://redirect.github.com/babel/babel/compare/v7.28.5...v7.28.6) </details> <details> <summary>babel/babel (@​babel/plugin-proposal-decorators)</summary> ### [`v7.28.6`](https://redirect.github.com/babel/babel/releases/tag/v7.28.6) [Compare Source](https://redirect.github.com/babel/babel/compare/v7.28.0...v7.28.6) ##### v7.28.6 (2026-01-12) Thanks [@​kadhirash](https://redirect.github.com/kadhirash) and [@​kolvian](https://redirect.github.com/kolvian) for your first PRs! ##### 🐛 Bug Fix - `babel-cli`, `babel-code-frame`, `babel-core`, `babel-helper-check-duplicate-nodes`, `babel-helper-fixtures`, `babel-helper-plugin-utils`, `babel-node`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-property-mutators`, `babel-preset-env`, `babel-traverse`, `babel-types` - [#​17589](https://redirect.github.com/babel/babel/pull/17589) Improve Unicode handling in code-frame tokenizer ([@​JLHwung](https://redirect.github.com/JLHwung)) - `babel-plugin-transform-regenerator` - [#​17556](https://redirect.github.com/babel/babel/pull/17556) fix: `transform-regenerator` correctly handles scope ([@​liuxingbaoyu](https://redirect.github.com/liuxingbaoyu)) - `babel-plugin-transform-react-jsx` - [#​17538](https://redirect.github.com/babel/babel/pull/17538) fix: Keep jsx comments ([@​liuxingbaoyu](https://redirect.github.com/liuxingbaoyu)) ##### :nail\_care: Polish - `babel-core`, `babel-standalone` - [#​17606](https://redirect.github.com/babel/babel/pull/17606) Polish(standalone): improve message on invalid preset/plugin ([@​JLHwung](https://redirect.github.com/JLHwung)) ##### 🏠 Internal - `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-import-attributes-to-assertions`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-syntax-async-do-expressions`, `babel-plugin-syntax-decorators`, `babel-plugin-syntax-destructuring-private`, `babel-plugin-syntax-do-expressions`, `babel-plugin-syntax-explicit-resource-management`, `babel-plugin-syntax-export-default-from`, `babel-plugin-syntax-flow`, `babel-plugin-syntax-function-bind`, `babel-plugin-syntax-function-sent`, `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes`, `babel-plugin-syntax-import-defer`, `babel-plugin-syntax-import-source`, `babel-plugin-syntax-jsx`, `babel-plugin-syntax-module-blocks`, `babel-plugin-syntax-optional-chaining-assign`, `babel-plugin-syntax-partial-application`, `babel-plugin-syntax-pipeline-operator`, `babel-plugin-syntax-throw-expressions`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-dotall-regex`, `babel-plugin-transform-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-explicit-resource-management`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-json-strings`, `babel-plugin-transform-logical-assignment-operators`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-numeric-separator`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-catch-binding`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-regexp-modifiers`, `babel-plugin-transform-unicode-property-regex`, `babel-plugin-transform-unicode-sets-regex` - [#​17580](https://redirect.github.com/babel/babel/pull/17580) Allow Babel 8 in compatible Babel 7 plugins ([@​nicolo-ribaudo](https://redirect.github.com/nicolo-ribaudo)) ##### :running\_woman: Performance - `babel-plugin-transform-react-jsx` - [#​17555](https://redirect.github.com/babel/babel/pull/17555) perf: Use lighter traversal for jsx `__source,__self` ([@​liuxingbaoyu](https://redirect.github.com/liuxingbaoyu)) ##### Committers: 7 - Babel Bot ([@​babel-bot](https://redirect.github.com/babel-bot)) - Eliot Pontarelli ([@​kolvian](https://redirect.github.com/kolvian)) - Huáng Jùnliàng ([@​JLHwung](https://redirect.github.com/JLHwung)) - Kadhirash Sivakumar ([@​kadhirash](https://redirect.github.com/kadhirash)) - Nicolò Ribaudo ([@​nicolo-ribaudo](https://redirect.github.com/nicolo-ribaudo)) - [@​liuxingbaoyu](https://redirect.github.com/liuxingbaoyu) - coderaiser ([@​coderaiser](https://redirect.github.com/coderaiser)) </details> <details> <summary>napi-rs/napi-rs (@​napi-rs/wasm-runtime)</summary> ### [`v1.1.1`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/wasm-runtime@1.1.0...@napi-rs/wasm-runtime@1.1.1) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/wasm-runtime@1.1.0...@napi-rs/wasm-runtime@1.1.1) </details> <details> <summary>vitest-dev/vitest (@​vitest/browser)</summary> ### [`v4.0.18`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v4.0.18) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.0.17...v4.0.18) ##### 🚀 Experimental Features - **experimental**: Add `onModuleRunner` hook to `worker.init` - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9286](https://redirect.github.com/vitest-dev/vitest/issues/9286) [<samp>(ea837)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ea837de7d) ##### 🐞 Bug Fixes - Use `meta.url` in `createRequire` - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9441](https://redirect.github.com/vitest-dev/vitest/issues/9441) [<samp>(e0572)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e057281ca) - **browser**: Hide injected data-testid attributes - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9503](https://redirect.github.com/vitest-dev/vitest/issues/9503) [<samp>(f8989)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f89899cd8) - **ui**: Process artifact attachments when generating HTML reporter - by [@​macarie](https://redirect.github.com/macarie) in [#​9472](https://redirect.github.com/vitest-dev/vitest/issues/9472) [<samp>(22543)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/225435647) ##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v4.0.17...v4.0.18) ### [`v4.0.17`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v4.0.17) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.0.16...v4.0.17) ##### 🚀 Experimental Features - Support openTelemetry for browser mode - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9180](https://redirect.github.com/vitest-dev/vitest/issues/9180) [<samp>(1ec3a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1ec3a8b68) - Support TRACEPARENT and TRACESTATE environment variables for OpenTelemetry context propagation - by [@​Copilot](https://redirect.github.com/Copilot), **hi-ogawa** and [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9295](https://redirect.github.com/vitest-dev/vitest/issues/9295) [<samp>(876cb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/876cb84c2) ##### 🐞 Bug Fixes - Improve asymmetric matcher diff readability by unwrapping container matchers - by [@​Copilot](https://redirect.github.com/Copilot), **sheremet-va**, **hi-ogawa** and [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9330](https://redirect.github.com/vitest-dev/vitest/issues/9330) [<samp>(b2ec7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b2ec724a8) - Improve runner error when importing outside of test context - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9335](https://redirect.github.com/vitest-dev/vitest/issues/9335) [<samp>(2dd3d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2dd3dd839) - Replace crypto.randomUUID to allow insecure environments (fix [#​9](https://redirect.github.com/vitest-dev/vitest/issues/9)… - by [@​plusgut](https://redirect.github.com/plusgut) in [#​9339](https://redirect.github.com/vitest-dev/vitest/issues/9339) and [#​9](https://redirect.github.com/vitest-dev/vitest/issues/9) [<samp>(e6a3f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e6a3f8cc7) - Handle null options in `addEventHandler` [#​9371](https://redirect.github.com/vitest-dev/vitest/issues/9371) - by [@​ThibautMarechal](https://redirect.github.com/ThibautMarechal) in [#​9372](https://redirect.github.com/vitest-dev/vitest/issues/9372) and [#​9371](https://redirect.github.com/vitest-dev/vitest/issues/9371) [<samp>(40841)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/40841ff00) - Typo in browser.provider error - by [@​deammer](https://redirect.github.com/deammer) in [#​9394](https://redirect.github.com/vitest-dev/vitest/issues/9394) [<samp>(4b67f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4b67fc25a) - **browser**: - Fix `process.env` and `import.meta.env` defines in inline project - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9239](https://redirect.github.com/vitest-dev/vitest/issues/9239) [<samp>(b70c9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b70c96121) - Fix upload File instance - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9294](https://redirect.github.com/vitest-dev/vitest/issues/9294) [<samp>(b6778)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b67788c69) - Fix invalid project token for artifacts assets - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9321](https://redirect.github.com/vitest-dev/vitest/issues/9321) [<samp>(caa7d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/caa7d73d4) - Log `ErrorEvent.message` when unhandled `ErrorEvent.error` is null - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9322](https://redirect.github.com/vitest-dev/vitest/issues/9322) [<samp>(5d84e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5d84eeb91) - Support `fileParallelism` on an instance - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9328](https://redirect.github.com/vitest-dev/vitest/issues/9328) [<samp>(15006)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/150065459) - **coverage**: - Remove unnecessary `istanbul-lib-source-maps` usage - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio) in [#​9344](https://redirect.github.com/vitest-dev/vitest/issues/9344) [<samp>(b0940)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b09405375) - Apply patch from [istanbuljs/istanbuljs#837](https://redirect.github.com/istanbuljs/istanbuljs/issues/837) - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio) and **sapphi-red** in [#​9413](https://redirect.github.com/vitest-dev/vitest/issues/9413) and [#​837](https://redirect.github.com/vitest-dev/vitest/issues/837) [<samp>(e05ce)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e05cedbf4) - **fsModuleCache**: - Don't store importers in cache - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9422](https://redirect.github.com/vitest-dev/vitest/issues/9422) [<samp>(75136)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/751364eec) - Add importers alongside importedModules - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9423](https://redirect.github.com/vitest-dev/vitest/issues/9423) [<samp>(59f92)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/59f92d403) - **mocker**: - Fix mock transform with class - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9421](https://redirect.github.com/vitest-dev/vitest/issues/9421) [<samp>(d390e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d390eb527) - **pool**: - Validate environment options when reusing the worker - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9349](https://redirect.github.com/vitest-dev/vitest/issues/9349) [<samp>(a8a88)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a8a8836e3) - Handle worker start failures gracefully - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio) in [#​9337](https://redirect.github.com/vitest-dev/vitest/issues/9337) [<samp>(200da)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/200dadb32) - **reporter**: - Report test module if it failed to run - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9272](https://redirect.github.com/vitest-dev/vitest/issues/9272) [<samp>(c7888)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c78882985) - **runner**: - Respect nested test.only within describe.only - by [@​Ujjwaljain16](https://redirect.github.com/Ujjwaljain16) in [#​9021](https://redirect.github.com/vitest-dev/vitest/issues/9021) and [#​9213](https://redirect.github.com/vitest-dev/vitest/issues/9213) [<samp>(55d5d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/55d5dad69) - **typecheck**: - Improve error message when tsc outputs help text - by [@​Ujjwaljain16](https://redirect.github.com/Ujjwaljain16) in [#​9214](https://redirect.github.com/vitest-dev/vitest/issues/9214) [<samp>(7b10a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7b10ab4cd) - **ui**: - Detect gzip by magic numbers instead of Content-Type header in html reporter - by [@​Copilot](https://redirect.github.com/Copilot), **hi-ogawa** and [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9278](https://redirect.github.com/vitest-dev/vitest/issues/9278) [<samp>(dd033)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/dd0331632) - **webdriverio**: - Fall back to WebDriver Classic [#​9244](https://redirect.github.com/vitest-dev/vitest/issues/9244) - by [@​JustasMonkev](https://redirect.github.com/JustasMonkev) in [#​9373](https://redirect.github.com/vitest-dev/vitest/issues/9373) and [#​9244](https://redirect.github.com/vitest-dev/vitest/issues/9244) [<samp>(c23dd)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c23dd11bd) ##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v4.0.16...v4.0.17) ### [`v4.0.16`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v4.0.16) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.0.15...v4.0.16) ##### 🐞 Bug Fixes - Fix browser mode default testTimeout back to 15 seconds - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9167](https://redirect.github.com/vitest-dev/vitest/issues/9167) [<samp>(da0ad)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/da0ade249) - Avoid crashing on `process.versions` stub - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio) in [#​9174](https://redirect.github.com/vitest-dev/vitest/issues/9174) [<samp>(78cfb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/78cfbf99a) - Reject calling suite function inside test - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9198](https://redirect.github.com/vitest-dev/vitest/issues/9198) [<samp>(1a259)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1a259c340) - Allow inlining fully dynamic import - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9137](https://redirect.github.com/vitest-dev/vitest/issues/9137) [<samp>(56851)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/568513ca6) - Fix module graph UI on html reporter with headless browser mode - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9219](https://redirect.github.com/vitest-dev/vitest/issues/9219) [<samp>(60642)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/60642b304) - Log deprecated `test.poolOptions` if it's set - by [@​sheremet-va](https://redirect.github.com/sheremet-va) in [#​9226](https://redirect.github.com/vitest-dev/vitest/issues/9226) [<samp>(f7f6a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f7f6aa8ba) - **browser**: - Import `recordArtifact` from the vitest package - by [@​macarie](https://redirect.github.com/macarie) in [#​9186](https://redirect.github.com/vitest-dev/vitest/issues/9186) [<samp>(01c56)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/01c56454d) - Fix `import.meta.env` define - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9205](https://redirect.github.com/vitest-dev/vitest/issues/9205) [<samp>(01a9a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/01a9a58d9) - String formatting bug when including placeholders in console.log - by [@​michael-debs](https://redirect.github.com/michael-debs) and [@​hi-ogawa](https://redirect.github.com/hi-ogawa) in [#​9030](https://redirect.github.com/vitest-dev/vitest/issues/9030) and [#​9131](https://redirect.github.com/vitest-dev/vitest/issues/9131) [<samp>(84a30)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/84a306210) - **coverage**: - Istanbul untested files source maps are off - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio) in [#​9208](https://redirect.github.com/vitest-dev/vitest/issues/9208) [<samp>(372e8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/372e86fde) - **experimental**: - Export `setupEnvironment` for custom pools - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio) in [#​9187](https://redirect.github.com/vitest-dev/vitest/issues/9187) [<samp>(5d26b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5d26b87b0) ##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v4.0.15...v4.0.16) </details> <details> <summary>evanw/esbuild (esbuild)</summary> ### [`v0.27.2`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0272) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.27.1...v0.27.2) - Allow import path specifiers starting with `#/` ([#​4361](https://redirect.github.com/evanw/esbuild/pull/4361)) Previously the specification for `package.json` disallowed import path specifiers starting with `#/`, but this restriction [has recently been relaxed](https://redirect.github.com/nodejs/node/pull/60864) and support for it is being added across the JavaScript ecosystem. One use case is using it for a wildcard pattern such as mapping `#/*` to `./src/*` (previously you had to use another character such as `#_*` instead, which was more confusing). There is some more context in [nodejs/node#49182](https://redirect.github.com/nodejs/node/issues/49182). This change was contributed by [@​hybrist](https://redirect.github.com/hybrist). - Automatically add the `-webkit-mask` prefix ([#​4357](https://redirect.github.com/evanw/esbuild/issues/4357), [#​4358](https://redirect.github.com/evanw/esbuild/issues/4358)) This release automatically adds the `-webkit-` vendor prefix for the [`mask`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/mask) CSS shorthand property: ```css /* Original code */ main { mask: url(x.png) center/5rem no-repeat } /* Old output (with --target=chrome110) */ main { mask: url(x.png) center/5rem no-repeat; } /* New output (with --target=chrome110) */ main { -webkit-mask: url(x.png) center/5rem no-repeat; mask: url(x.png) center/5rem no-repeat; } ``` This change was contributed by [@​BPJEnnova](https://redirect.github.com/BPJEnnova). - Additional minification of `switch` statements ([#​4176](https://redirect.github.com/evanw/esbuild/issues/4176), [#​4359](https://redirect.github.com/evanw/esbuild/issues/4359)) This release contains additional minification patterns for reducing `switch` statements. Here is an example: ```js // Original code switch (x) { case 0: foo() break case 1: default: bar() } // Old output (with --minify) switch(x){case 0:foo();break;case 1:default:bar()} // New output (with --minify) x===0?foo():bar(); ``` - Forbid `using` declarations inside `switch` clauses ([#​4323](https://redirect.github.com/evanw/esbuild/issues/4323)) This is a rare change to remove something that was previously possible. The [Explicit Resource Management](https://redirect.github.com/tc39/proposal-explicit-resource-management) proposal introduced `using` declarations. These were previously allowed inside `case` and `default` clauses in `switch` statements. This had well-defined semantics and was already widely implemented (by V8, SpiderMonkey, TypeScript, esbuild, and others). However, it was considered to be too confusing because of how scope works in switch statements, so it has been removed from the specification. This edge case will now be a syntax error. See [tc39/proposal-explicit-resource-management#215](https://redirect.github.com/tc39/proposal-explicit-resource-management/issues/215) and [rbuckton/ecma262#14](https://redirect.github.com/rbuckton/ecma262/pull/14) for details. Here is an example of code that is no longer allowed: ```js switch (mode) { case 'read': using readLock = db.read() return readAll(readLock) case 'write': using writeLock = db.write() return writeAll(writeLock) } ``` That code will now have to be modified to look like this instead (note the additional `{` and `}` block statements around each case body): ```js switch (mode) { case 'read': { using readLock = db.read() return readAll(readLock) } case 'write': { using writeLock = db.write() return writeAll(writeLock) } } ``` This is not being released in one of esbuild's breaking change releases since this feature hasn't been finalized yet, and esbuild always tracks the current state of the specification (so esbuild's previous behavior was arguably incorrect). </details> <details> <summary>eslint/eslint (eslint)</summary> ### [`v9.39.2`](https://redirect.github.com/eslint/eslint/compare/v9.39.1...9278324aa0023d223874825b0d4b6ac75783096a) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v9.39.1...v9.39.2) ### [`v9.39.1`](https://redirect.github.com/eslint/eslint/compare/v9.39.0...e2772811a8595d161870835ff04822b25a2cdf45) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v9.39.0...v9.39.1) ### [`v9.39.0`](https://redirect.github.com/eslint/eslint/compare/v9.38.0...ac3a60dffc29d8d4d5031621bc062e77f891532a) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v9.38.0...v9.39.0) ### [`v9.38.0`](https://redirect.github.com/eslint/eslint/releases/tag/v9.38.0) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v9.37.0...v9.38.0) #### Features - [`ce40f74`](https://redirect.github.com/eslint/eslint/commit/ce40f74efd45f66d9fbfc6f78ce622ee72008485) feat: update `complexity` rule to only highlight function header ([#​20048](https://redirect.github.com/eslint/eslint/issues/20048)) (Atul Nair) - [`e37e590`](https://redirect.github.com/eslint/eslint/commit/e37e590aae2a7fcca4d3a9adc1379ad466e5c5d1) feat: correct `no-loss-of-precision` false positives with `e` notation ([#​20187](https://redirect.github.com/eslint/eslint/issues/20187)) (Francesco Trotta) #### Bug Fixes - [`50c3dfd`](https://redirect.github.com/eslint/eslint/commit/50c3dfd98065622765a51a8ddb1e70c44fc5a4cb) fix: improve type support for isolated dependencies in pnpm ([#​20201](https://redirect.github.com/eslint/eslint/issues/20201)) (Francesco Trotta) - [`a1f06a3`](https://redirect.github.com/eslint/eslint/commit/a1f06a350c4155c4dbf39bf932a38d71d70f1b65) fix: correct SourceCode typings ([#​20114](https://redirect.github.com/eslint/eslint/issues/20114)) (Pixel998) #### Documentation - [`462675a`](https://redirect.github.com/eslint/eslint/commit/462675af8a811f9ca984efaedbdc5b46b13ced7a) docs: improve web accessibility by hiding non-semantic character ([#​20205](https://redirect.github.com/eslint/eslint/issues/20205)) (루밀LuMir) - [`c070e65`](https://redirect.github.com/eslint/eslint/commit/c070e65f6bb9e38d06a89ba2b3261781bec3d397) docs: correct formatting in `no-irregular-whitespace` rule documentation ([#​20203](https://redirect.github.com/eslint/eslint/issues/20203)) (루밀LuMir) - [`b39e71a`](https://redirect.github.com/eslint/eslint/commit/b39e71a2130ae1ea3fbc19b19f5b951eb625722a) docs: Update README (GitHub Actions Bot) - [`cd39983`](https://redirect.github.com/eslint/eslint/commit/cd3998314876a4fad6463d9011bc73778ccc1fd9) docs: move `custom-formatters` type descriptions to `nodejs-api` ([#​20190](https://redirect.github.com/eslint/eslint/issues/20190)) (Percy Ma) #### Chores - [`d17c795`](https://redirect.github.com/eslint/eslint/commit/d17c795bf1624e0604998482b98e6bb6bff39045) chore: upgrade [@​eslint/js](https://redirect.github.com/eslint/js)@​9.38.0 ([#​20221](https://redirect.github.com/eslint/eslint/issues/20221)) (Milos Djermanovic) - [`25d0e33`](https://redirect.github.com/eslint/eslint/commit/25d0e33270e08baed09dbee2cdd56a8e5cd9da0f) chore: package.json update for [@​eslint/js](https://redirect.github.com/eslint/js) release (Jenkins) - [`c82b5ef`](https://redirect.github.com/eslint/eslint/commit/c82b5efa1fc91900e029efa23e688fad67fc17fa) refactor: Use types from [@​eslint/core](https://redirect.github.com/eslint/core) ([#​20168](https://redirect.github.com/eslint/eslint/issues/20168)) (Nicholas C. Zakas) - [`ff31609`](https://redirect.github.com/eslint/eslint/commit/ff31609f195654d448954210ba4d31e921d463e8) ci: add Node.js 25 to `ci.yml` ([#​20220](https://redirect.github.com/eslint/eslint/issues/20220)) (루밀LuMir) - [`004577e`](https://redirect.github.com/eslint/eslint/commit/004577eda2f2f4b2829e0364f8b41893cebfc859) ci: bump github/codeql-action from 3 to 4 ([#​20211](https://redirect.github.com/eslint/eslint/issues/20211)) (dependabot\[bot]) - [`eac71fb`](https://redirect.github.com/eslint/eslint/commit/eac71fb77113de7bf199ff20c6ee44cefcb59848) test: remove use of `nodejsScope` option of eslint-scope from tests ([#​20206](https://redirect.github.com/eslint/eslint/issues/20206)) (Milos Djermanovic) - [`4168a18`](https://redirect.github.com/eslint/eslint/commit/4168a18b7efd8facbbd71cd44a62942a9f656a30) chore: fix typo in legacy-eslint.js ([#​20202](https://redirect.github.com/eslint/eslint/issues/20202)) (Sweta Tanwar) - [`205dbd2`](https://redirect.github.com/eslint/eslint/commit/205dbd2d9272e761574c478e3b0181f7b89ed0f6) chore: fix typos ([#​20200](https://redirect.github.com/eslint/eslint/issues/20200)) (ntnyq) - [`dbb200e`](https://redirect.github.com/eslint/eslint/commit/dbb200e3604e63bba23a18d40089ca44604835ed) chore: use team member's username when name is not available in data ([#​20194](https://redirect.github.com/eslint/eslint/issues/20194)) (Milos Djermanovic) - [`8962089`](https://redirect.github.com/eslint/eslint/commit/8962089edbd978b43513576387a134036b8e2d36) chore: mark deprecated rules as available until v11.0.0 ([#​20184](https://redirect.github.com/eslint/eslint/issues/20184)) (Pixel998) ### [`v9.37.0`](https://redirect.github.com/eslint/eslint/releases/tag/v9.37.0) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v9.36.0...v9.37.0) #### Features - [`39f7fb4`](https://redirect.github.com/eslint/eslint/commit/39f7fb493a6924ff7dc638fd4d6e7b3d8eb95383) feat: `preserve-caught-error` should recognize all static "cause" keys ([#​20163](https://redirect.github.com/eslint/eslint/issues/20163)) (Pixel998) - [`f81eabc`](https://redirect.github.com/eslint/eslint/commit/f81eabc5849ece98b8ca054f96b29f038a69bcf8) feat: support TS syntax in `no-restricted-imports` ([#​19562](https://redirect.github.com/eslint/eslint/issues/19562)) (Nitin Kumar) #### Bug Fixes - [`a129cce`](https://redirect.github.com/eslint/eslint/commit/a129cced7a86ea2518eb9be6990fa18af39694ca) fix: correct `no-loss-of-precision` false positives for leading zeros ([#​20164](https://redirect.github.com/eslint/eslint/issues/20164)) (Francesco Trotta) - [`09e04fc`](https://redirect.github.com/eslint/eslint/commit/09e04fcc3f4cc963eea7c9c579391de5e231595b) fix: add missing AST token types ([#​20172](https://redirect.github.com/eslint/eslint/issues/20172)) (Pixel998) - [`861c6da`](https://redirect.github.com/eslint/eslint/commit/861c6da2bd2796414e6eed782155ec34e2ed6344) fix: correct `ESLint` typings ([#​20122](https://redirect.github.com/eslint/eslint/issues/20122)) (Pixel998) #### Documentation - [`b950359`](https://redirect.github.com/eslint/eslint/commit/b950359c5f39085483c3137a6a160e582ef32007) docs: fix typos across the docs ([#​20182](https://redirect.github.com/eslint/eslint/issues/20182)) (루밀LuMir) - [`42498a2`](https://redirect.github.com/eslint/eslint/commit/42498a27981d50750dd15ae8660dbe85c4f4587c) docs: improve ToC accessibility by hiding non-semantic character ([#​20181](https://redirect.github.com/eslint/eslint/issues/20181)) (Percy Ma) - [`29ea092`](https://redirect.github.com/eslint/eslint/commit/29ea092b93608756350b1e9c5a4f29c8a49264ab) docs: Update README (GitHub Actions Bot) - [`5c97a04`](https://redirect.github.com/eslint/eslint/commit/5c97a04578e6280c2395f642c2d8d6bdf30eec18) docs: show `availableUntil` in deprecated rule banner ([#​20170](https://redirect.github.com/eslint/eslint/issues/20170)) (Pixel998) - [`90a71bf`](https://redirect.github.com/eslint/eslint/commit/90a71bf5024a86fc232cd2e05f96811e2a18fd0f) docs: update `README` files to add badge and instructions ([#​20115](https://redirect.github.com/eslint/eslint/issues/20115)) (루밀LuMir) - [`1603ae1`](https://redirect.github.com/eslint/eslint/commit/1603ae1526d9b6f557c7d5534a4f40f46842edd6) docs: update references from `master` to `main` ([#​20153](https://redirect.github.com/eslint/eslint/issues/20153)) (루밀LuMir) #### Chores - [`afe8a13`](https://redirect.github.com/eslint/eslint/commit/afe8a1346958242031fea66fdfbb239e8bf408b7) chore: update `@eslint/js` dependency to version 9.37.0 ([#​20183](https://redirect.github.com/eslint/eslint/issues/20183)) (Francesco Trotta) - [`abee4ca`](https://redirect.github.com/eslint/eslint/commit/abee4ca1fa10da733b1cc4a7d5e765b912a9de82) chore: package.json update for [@​eslint/js](https://redirect.github.com/eslint/js) release (Jenkins) - [`fc9381f`](https://redirect.github.com/eslint/eslint/commit/fc9381f6ca57b824e82d118c14631c17bea79d7e) chore: fix typos in comments ([#​20175](https://redirect.github.com/eslint/eslint/issues/20175)) (overlookmotel) - [`e1574a2`](https://redirect.github.com/eslint/eslint/commit/e1574a22d38fd7e1891f86f8db0b09053f8963cb) chore: unpin jiti ([#​20173](https://redirect.github.com/eslint/eslint/issues/20173)) (renovate\[bot]) - [`e1ac05e`](https://redirect.github.com/eslint/eslint/commit/e1ac05e2fae779e738f85bd47dda1cc2b7099346) refactor: mark `ESLint.findConfigFile()` as `async`, add missing docs ([#​20157](https://redirect.github.com/eslint/eslint/issues/20157)) (Pixel998) - [`347906d`](https://redirect.github.com/eslint/eslint/commit/347906d627c53bf45d63ba831d2fd2b83fb0a749) chore: update eslint ([#​20149](https://redirect.github.com/eslint/eslint/issues/20149)) (renovate\[bot]) - [`0cb5897`](https://redirect.github.com/eslint/eslint/commit/0cb5897e24059bacadb8d2e6458184904759fda1) test: remove tmp dir created for circular fixes in multithread mode test ([#​20146](https://redirect.github.com/eslint/eslint/issues/20146)) (Milos Djermanovic) - [`bb99566`](https://redirect.github.com/eslint/eslint/commit/bb995665e32b3a958e78006c9fd75744c5604f1b) ci: pin `jiti` to version 2.5.1 ([#​20151](https://redirect.github.com/eslint/eslint/issues/20151)) (Pixel998) - [`177f669`](https://redirect.github.com/eslint/eslint/commit/177f669adc0f96d14ae1a71cde7786f327515863) perf: improve worker count calculation for `"auto"` concurrency ([#​20067](https://redirect.github.com/eslint/eslint/issues/20067)) (Francesco Trotta) - [`448b57b`](https://redirect.github.com/eslint/eslint/commit/448b57bca3406ee12c4e44e9298fc0c99d3ee10c) chore: Mark deprecated formatting rules as available until v11.0.0 ([#​20144](https://redirect.github.com/eslint/eslint/issues/20144)) (Milos Djermanovic) </details> <details> <summary>estools/esquery (esquery)</summary> ### [`v1.7.0`](https://redirect.github.com/estools/esquery/compare/v1.6.0...444da2c9b1f973555102b0e3a2c62f5d607dc6fe) [Compare Source](https://redirect.github.com/estools/esquery/compare/v1.6.0...444da2c9b1f973555102b0e3a2c62f5d607dc6fe) </details> <details> <summary>eclipse/openvsx (ovsx)</summary> ### [`v0.10.8`](https://redirect.github.com/eclipse/openvsx/blob/HEAD/cli/CHANGELOG.md#v0108-Jan-2026) [Compare Source](https://redirect.github.com/eclipse/openvsx/compare/2000f6441959b4a2bcdfa81b5daa35ae0591ed78...f3382bc2d7a7b9c4ed1e9ed1392bf0656436aee8) ##### Dependencies - Upgrade `jws` from `3.2.2` to `4.0.1` ([#​1482](https://redirect.github.com/eclipse/openvsx/pull/1482)) - Upgrade `@vscode/vsce` from `3.2.1` to `3.7.1` ([#​1482](https://redirect.github.com/eclipse/openvsx/pull/1482)) </details> <details> <summary>microsoft/playwright (playwright)</summary> ### [`v1.58.0`](https://redirect.github.com/microsoft/playwright/compare/v1.57.0...961381ec73a9fa2661d92504eab1a6bd6eaffc75) [Compare Source](https://redirect.github.com/microsoft/playwright/compare/v1.57.0...v1.58.0) </details> <details> <summary>pnpm/pnpm (pnpm)</summary> ### [`v10.28.1`](https://redirect.github.com/pnpm/pnpm/compare/v10.28.0...v10.28.1) [Compare Source](https://redirect.github.com/pnpm/pnpm/compare/v10.28.0...v10.28.1) ### [`v10.28.0`](https://redirect.github.com/pnpm/pnpm/compare/v10.27.0...v10.28.0) [Compare Source](https://redirect.github.com/pnpm/pnpm/compare/v10.27.0...v10.28.0) ### [`v10.27.0`](https://redirect.github.com/pnpm/pnpm/compare/v10.26.2...v10.27.0) [Compare Source](https://redirect.github.com/pnpm/pnpm/compare/v10.26.2...v10.27.0) ### [`v10.26.2`](https://redirect.github.com/pnpm/pnpm/releases/tag/v10.26.2): pnpm 10.26.2 [Compare Source](https://redirect.github.com/pnpm/pnpm/compare/v10.26.1...v10.26.2) #### Patch Changes - Improve error message when a package version exists but does not meet the `minimumReleaseAge` constraint. The error now clearly states that the version exists and shows a human-readable time since release (e.g., "released 6 hours ago") [#​10307](https://redirect.github.com/pnpm/pnpm/issues/10307). - Fix installation of Git dependencies using annotated tags [#​10335](https://redirect.github.com/pnpm/pnpm/issues/10335). Previously, pnpm would store the annotated tag object's SHA in the lockfile instead of the actual commit SHA. This caused `ERR_PNPM_GIT_CHECKOUT_FAILED` errors because the checked-out commit hash didn't match the stored tag object hash. - Binaries of runtime engines (Node.js, Deno, Bun) are written to `node_modules/.bin` before lifecycle scripts (install, postinstall, prepare) are executed [#​10244](https://redirect.github.com/pnpm/pnpm/issues/10244). - Try to avoid making network calls with preferOffline [#​10334](https://redirect.github.com/pnpm/pnpm/pull/10334). #### Platinum Sponsors <table> <tbody> <tr> <td align="center" valign="middle"> <a href="https://bit.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a> </td> </tr> </tbody> </table> #### Gold Sponsors <table> <tbody> <tr> <td align="center" valign="middle"> <a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <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://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <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://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank"> <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:/ </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 10am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Mi4xIiwidXBkYXRlZEluVmVyIjoiNDIuOTIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> |
||
|
|
9951f16184 |
release(crates): oxc v0.111.0 (#18572)
### 💥 BREAKING CHANGES - |
||
|
|
8ccd853d91 |
docs(npm): update package homepage URLs and add keywords (#18509)
## Summary - Update homepage links to point to specific documentation pages (e.g., `https://oxc.rs/docs/guide/usage/linter`) - Add usage instruction links to napi package READMEs - Add relevant keywords for better npm discoverability 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
c205b0df51 |
fix(ast): remove ThisExpression from TSModuleReference (#18489)
## Summary - Removes `ThisExpression` variant from `TSModuleReference` since `import x = this` is invalid TypeScript (error TS1359) - Adds parser error when `this` is used in import equals declaration - Updates codegen, transformer, and linter rules to handle the new enum structure Closes #16841 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
9b3165f524 |
docs(napi/parser): clarify when to use parseAsync vs parseSync (#18486)
## Summary - Add detailed JSDoc documentation to `parse` and `parseSync` functions explaining their performance characteristics - Clarify that `parseSync` is generally preferable since AST deserialization happens on the main thread anyway - Recommend using worker threads with `parseSync` for parallelizing multiple files Closes #15361 🤖 Generated with [Claude Code](https://claude.ai/code) |
||
|
|
09a4057f14 |
refactor(linter/plugins, napi/parser): remove pattern of destructuring globals at top level (#18455)
Pure refactor.
Remove a few remaining instances of the pattern where we destructure global objects at top level e.g. `const { isArray } = Array;`.
In Oxlint, TSDown plugin already performs this optimization. In `napi/parser`, we intend to build the package with TSDown, and we'll apply the same optimization in build process then too.
|
||
|
|
ba832b8680 |
refactor(napi/transform)!: remove useBuiltIns / useSpread options (#18432)
These options does not change the behavior so I think it's better not to expose these to users. https://github.com/oxc-project/oxc/blob/671c2fc96d767eed91e19c3cec0986394d75c282/crates/oxc_transformer/src/jsx/options.rs#L96-L104 |
||
|
|
b67ab40408 |
chore(deps): update dependency rust to v1.93.0 (#18406)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [rust](https://redirect.github.com/rust-lang/rust) | minor | `1.92.0` → `1.93.0` | --- ### Release Notes <details> <summary>rust-lang/rust (rust)</summary> ### [`v1.93.0`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1930-2026-01-22) [Compare Source](https://redirect.github.com/rust-lang/rust/compare/1.92.0...1.93.0) \========================== <a id="1.93.0-Language"></a> ## Language - [Stabilize several s390x `vector`-related target features and the `is_s390x_feature_detected!` macro](https://redirect.github.com/rust-lang/rust/pull/145656) - [Stabilize declaration of C-style variadic functions for the `system` ABI](https://redirect.github.com/rust-lang/rust/pull/145954) - [Emit error when using some keyword as a `cfg` predicate](https://redirect.github.com/rust-lang/rust/pull/146978) - [Stabilize `asm_cfg`](https://redirect.github.com/rust-lang/rust/pull/147736) - [During const-evaluation, support copying pointers byte-by-byte](https://redirect.github.com/rust-lang/rust/pull/148259) - [LUB coercions now correctly handle function item types, and functions with differing safeties](https://redirect.github.com/rust-lang/rust/pull/148602) - [Allow `const` items that contain mutable references to `static` (which is *very* unsafe, but not *always* UB)](https://redirect.github.com/rust-lang/rust/pull/148746) - [Add warn-by-default `const_item_interior_mutations` lint to warn against calls which mutate interior mutable `const` items](https://redirect.github.com/rust-lang/rust/pull/148407) - [Add warn-by-default `function_casts_as_integer` lint](https://redirect.github.com/rust-lang/rust/pull/141470) <a id="1.93.0-Compiler"></a> ## Compiler - [Stabilize `-Cjump-tables=bool`](https://redirect.github.com/rust-lang/rust/pull/145974). The flag was previously called `-Zno-jump-tables`. <a id="1.93.0-Platform-Support"></a> ## Platform Support - [Promote `riscv64a23-unknown-linux-gnu` to Tier 2 (without host tools)](https://redirect.github.com/rust-lang/rust/pull/148435) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html <a id="1.93.0-Libraries"></a> ## Libraries - [Stop internally using `specialization` on the `Copy` trait as it is unsound in the presence of lifetime dependent `Copy` implementations. This may result in some performance regressions as some standard library APIs may now call `Clone::clone` instead of performing bitwise copies](https://redirect.github.com/rust-lang/rust/pull/135634) - [Allow the global allocator to use thread-local storage and `std::thread::current()`](https://redirect.github.com/rust-lang/rust/pull/144465) - [Make `BTree::append` not update existing keys when appending an entry which already exists](https://redirect.github.com/rust-lang/rust/pull/145628) - [Don't require `T: RefUnwindSafe` for `vec::IntoIter<T>: UnwindSafe`](https://redirect.github.com/rust-lang/rust/pull/145665) <a id="1.93.0-Stabilized-APIs"></a> ## Stabilized APIs - [`<[MaybeUninit<T>]>::assume_init_drop`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_drop) - [`<[MaybeUninit<T>]>::assume_init_ref`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_ref) - [`<[MaybeUninit<T>]>::assume_init_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_mut) - [`<[MaybeUninit<T>]>::write_copy_of_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_copy_of_slice) - [`<[MaybeUninit<T>]>::write_clone_of_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_clone_of_slice) - [`String::into_raw_parts`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_raw_parts) - [`Vec::into_raw_parts`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts) - [`<iN>::unchecked_neg`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_neg) - [`<iN>::unchecked_shl`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shl) - [`<iN>::unchecked_shr`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shr) - [`<uN>::unchecked_shl`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shl) - [`<uN>::unchecked_shr`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shr) - [`<[T]>::as_array`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_array) - [`<[T]>::as_array_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_array) - [`<*const [T]>::as_array`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_array) - [`<*mut [T]>::as_array_mut`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_mut_array) - [`VecDeque::pop_front_if`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_front_if) - [`VecDeque::pop_back_if`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_back_if) - [`Duration::from_nanos_u128`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_nanos_u128) - [`char::MAX_LEN_UTF8`](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF8) - [`char::MAX_LEN_UTF16`](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF16) - [`std::fmt::from_fn`](https://doc.rust-lang.org/stable/std/fmt/fn.from_fn.html) - [`std::fmt::FromFn`](https://doc.rust-lang.org/stable/std/fmt/struct.FromFn.html) <a id="1.93.0-Cargo"></a> ## Cargo - [Enable CARGO\_CFG\_DEBUG\_ASSERTIONS in build scripts based on profile](https://redirect.github.com/rust-lang/cargo/pull/16160/) - [In `cargo tree`, support long forms for `--format` variables](https://redirect.github.com/rust-lang/cargo/pull/16204/) - [Add `--workspace` to `cargo clean`](https://redirect.github.com/rust-lang/cargo/pull/16263/) <a id="1.93.0-Rustdoc"></a> ## Rustdoc - [Remove `#![doc(document_private_items)]`](https://redirect.github.com/rust-lang/rust/pull/146495) - [Include attribute and derive macros in search filters for "macros"](https://redirect.github.com/rust-lang/rust/pull/148176) - [Include extern crates in search filters for `import`](https://redirect.github.com/rust-lang/rust/pull/148301) - [Validate usage of crate-level doc attributes](https://redirect.github.com/rust-lang/rust/pull/149197). This means if any of `html_favicon_url`, `html_logo_url`, `html_playground_url`, `issue_tracker_base_url`, or `html_no_source` either has a missing value, an unexpected value, or a value of the wrong type, rustdoc will emit the deny-by-default lint `rustdoc::invalid_doc_attributes`. <a id="1.93.0-Compatibility-Notes"></a> ## Compatibility Notes - [Introduce `pin_v2` into the builtin attributes namespace](https://redirect.github.com/rust-lang/rust/pull/139751) - [Update bundled musl to 1.2.5](https://redirect.github.com/rust-lang/rust/pull/142682) - [On Emscripten, the unwinding ABI used when compiling with `panic=unwind` was changed from the JS exception handling ABI to the wasm exception handling ABI.](https://redirect.github.com/rust-lang/rust/pull/147224) If linking C/C++ object files with Rust objects, `-fwasm-exceptions` must be passed to the linker now. On nightly Rust, it is possible to get the old behavior with `-Zwasm-emscripten-eh=false -Zbuild-std`, but it will be removed in a future release. - The `#[test]` attribute, used to define tests, was previously ignored in various places where it had no meaning (e.g on trait methods or types). Putting the `#[test]` attribute in these places is no longer ignored, and will now result in an error; this may also result in errors when generating rustdoc. [Error when `test` attribute is applied to structs](https://redirect.github.com/rust-lang/rust/pull/147841) - Cargo now sets the `CARGO_CFG_DEBUG_ASSERTIONS` environment variable in more situations. This will cause crates depending on `static-init` versions 1.0.1 to 1.0.3 to fail compilation with "failed to resolve: use of unresolved module or unlinked crate `parking_lot`". See [the linked issue](https://redirect.github.com/rust-lang/rust/issues/150646#issuecomment-3718964342) for details. - [User written types in the `offset_of!` macro are now checked to be well formed.](https://redirect.github.com/rust-lang/rust/issues/150465/) - `cargo publish` no longer emits `.crate` files as a final artifact for user access when the `build.build-dir` config is unset - [Upgrade the `deref_nullptr` lint from warn-by-default to deny-by-default](https://redirect.github.com/rust-lang/rust/pull/148122) - [Add future-incompatibility warning for `...` function parameters without a pattern outside of `extern` blocks](https://redirect.github.com/rust-lang/rust/pull/143619) - [Introduce future-compatibility warning for `repr(C)` enums whose discriminant values do not fit into a `c_int` or `c_uint`](https://redirect.github.com/rust-lang/rust/pull/147017) - [Introduce future-compatibility warning against ignoring `repr(C)` types as part of `repr(transparent)`](https://redirect.github.com/rust-lang/rust/pull/147185) </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:eyJjcmVhdGVkSW5WZXIiOiI0Mi44NS4xIiwidXBkYXRlZEluVmVyIjoiNDIuODUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> |
||
|
|
1b616ff7a8 |
chore(deps): bump typescript-eslint packages to latest (#18401)
Bump `@typescript-eslint/scope-manager` and `@typescript-eslint/visitor-keys` dependencies to latest. |
||
|
|
8db0e78ae6 |
feat(linter/plugins): handle BOMs (#18376)
Closes #12526. Handle BOM on start of files in the same way that ESLint does - do not include it in the source text on JS side, but `context.sourceCode.hasBOM` evaluates to `true`. Method: * Alter `program.source_text` to trim off the BOM before passing AST to JS side. * Add a `has_bom` flag to `RawTransferMetadata`. * Add ability to add an offset in the conversion from UTF-8 to UTF-16 spans. The result is that the file as it's seen on JS side is as if the BOM didn't exist (except for the `hasBOM` flag). Spans are converted accordingly in JS-side AST, and converted back when passing diagnostics back to Rust. |
||
|
|
6ac09e2a9d |
feat(linter/plugins): support source text not being at start of buffer (#18375)
Previous raw transfer required that the source text start exactly at the start of the buffer. In linter, relax this restriction and handle when source text is stored elsewhere in the buffer. This is necessary for stripping BOM from source (#18376), as then the source text used on JS side starts 3 bytes after the start of the buffer. |
||
|
|
7174336d10 |
refactor(parser): shorten raw transfer deserializer code for non-range variants (#18137)
## Summary
- Use inline assignment pattern (`let x; { x: x = value }`) for `start` and `end` fields instead of declaring them in the preamble
- This allows minifiers to eliminate unused variables when RANGE is false
- Restores original file size for deserializers that don't use range fields
**Before (js.js with RANGE=false):**
```javascript
function deserializeIdentifierName(pos) {
let start = deserializeU32(pos),
end = deserializeU32(pos + 4);
return { type: "Identifier", name: deserializeStr(pos + 8), start, end };
}
```
**After (js.js with RANGE=false):**
```javascript
function deserializeIdentifierName(pos) {
return { type: "Identifier", name: deserializeStr(pos + 8), start: deserializeU32(pos), end: deserializeU32(pos + 4) };
}
```
Closes #14332
## Test plan
- [x] `just ast` regenerates deserializers correctly
- [x] `pnpm test --filter='@oxc-project/napi-parser'` passes (109 tests)
- [x] `cargo clippy -p oxc_ast_tools` passes
🤖 Generated with [Claude Code](https://claude.ai/code)
|
||
|
|
af0ca46d70 |
feat(span)!: use ModuleKind::CommonJS for SourceType::cjs() (#18276)
Follow-up to #18089. Maybe we should add `SourceType::script()` so that it's easier to create a SourceType with `ModuleType::Script`. |
||
|
|
1b59f63488 |
docs(napi/parser): correct typo in README (#18251)
An extraneous `` ` `` had crept in to a comment. Remove it. Also remove unnecessary full stops from short comments. |
||
|
|
89de3a146b |
release(crates): oxc v0.110.0 (#18240)
### 🐛 Bug Fixes - |
||
|
|
7282e9c564 | release(crates): oxc v0.109.0 (#18222) | ||
|
|
6e8fa809f5 |
feat(napi/parser, napi/transform): accept sourceType: "commonjs" (#18197)
#18089 added support in parser for `commonjs` source type. Extend this support to the NAPI packages - accept `sourceType: 'commonjs'` in options for `oxc-parser` and `oxc-transform`. |
||
|
|
984d5c1ca6 |
feat(oxfmt/sort-imports): support options.customGroups (#17576)
#17076 ### Authorship & Use of AI All code changes in this pull request are completed by a human (myself). ChatGPT is used **only** to assist with writing comments and this PR description. ### Commit Structure The changes are split into small, meaningful commits. Each commit should be reviewable independently. ## Current State of the Implementation For easier comparison, I forked [actual](https://github.com/nilptr/actual) and made a few auxiliary changes on a separate branch [nilptr/feat/oxfmt-custom-groups](https://github.com/nilptr/actual/tree/nilptr/feat/oxfmt-custom-groups). The auxiliary changes include: - Upgraded `oxfmt` to address the incompatible binding API. - Updated `eslint.config.mjs` to lint and fix .ts files. - Updated `.oxfmtrc` to enable `experimentalSortImports`, keeping it consistent with `eslint.config.mjs`. ### How to Compare? 1. Clone `git@github.com:nilptr/actual.git` and check out `nilptr/feat/oxfmt-custom-groups` branch. 2. Run `yarn install` 3. Run `NAPI_RS_NATIVE_LIBRARY_PATH=/path/to/binding.node yarn fmt:oxfmt` The native binding can be obtained in one of the following ways: - Download the [oxfmt.darwin-arm64.node.zip](https://github.com/user-attachments/files/24402116/oxfmt.darwin-arm64.node.zip) built by me (if you trust it, or scan it with [VirusTotal](https://www.virustotal.com/gui/home/upload)). - Build it by yourself: clone my repo, run `pnpm build`, and locate the .node binding file under `apps/oxfmt/src-js`. 4. Inspect the results with `git diff` — the diff shows the differences between perfectionist and oxfmt ### Observed Differences There are 9 differences in total: - **4 differences** are unrelevant to `experimentalSortImports`. (be the way, they are introduced after I rebased main branch) - **5 differences** are relevant to `experimentalSortImports`, but are not caused by the group-matching logic, which is the focus of this PR. - 4 of them are blank lines after side-effect imports being removed - 1 of them is the wrong `ImportLineMetadata.source` <img width="4064" height="2152" alt="image" src="https://github.com/user-attachments/assets/8b4cb860-19d6-42b9-a0a4-6db0b3e40194" /> <img width="4064" height="2152" alt="image" src="https://github.com/user-attachments/assets/e2616d7b-b4b2-4dbc-a0d3-ea15d1c0177e" /> ------ I believe we can start review now. While the review is ongoing, I will also try to see whether the observed differences can be fixed in this PR. --------- Co-authored-by: Yuji Sugiura <y.sugiura.0316@gmail.com> |