Skip to content

chore(deps): upgrade oxc to 0.155.0 - #11228

Merged
shulaoda merged 15 commits into
mainfrom
claude/gifted-pascal-tl3lic
Oct 21, 2026
Merged

shulaoda merged 15 commits into
mainfrom
claude/gifted-pascal-tl3lic

Conversation

@Dunqing

@Dunqing Dunqing commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Upgrades oxc from 0.154.0 to 0.155.0.

The breaking change: AST strings are now JSStr and can hold lone surrogates ('\uD800'). Rolldown handles them in two ways:

  • Module requests: each lone surrogate becomes U+FFFD, as in Node, webpack and Bun. So import './a\uD800.js' resolves a�.js. Before, Rolldown tried a mangled a�d800.js.
  • Property and export names: skipped, so they keep their exact value.

An earlier revision reported an error instead, but no other bundler does.

It also brings oxc fixes for a few minifier bugs, such as wrong this in (0, foo?.bar)(), which changes one snapshot.

Needs attention

rolldown-binding.wasi.d.cts was edited by hand to match binding.d.cts, because the wasm target isn't installed locally. CI's WASI job passes.

Tests

New fixtures load files with U+FFFD in their names, for every import form and for HMR. CI is green, including Windows.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E

Dunqing and others added 2 commits October 16, 2026 02:52
…6242)

Points every oxc crate at oxc main (d2bea210) through `[patch.crates-io]`
to see how the JSStr breaking changes (oxc-project/oxc#26548, #26677,
#27095) affect Rolldown. Not for merging: the npm packages stay at 0.154.0
because oxc main is unpublished.

- Migrate `StringLiteral::value`, `TemplateElementValue::cooked`, and static
  member / property names to `JSStr` and `StaticPropertyName`.
- Names, globs and paths that can be skipped safely (property names,
  CJS export names, `new URL`, `import.meta.glob` patterns) decline through
  `JSStr::as_str()`, as `oxc_str` documents.
- Values Rolldown keeps outside the arena have no owned `JSStr` to go in:
  a static specifier with a lone surrogate reports `UNSUPPORTED_FEATURE`,
  `import()` / `require()` stay non-static, and import attribute entries are
  dropped. These are marked `TODO(oxc)`.
- Snapshot: `(empty(), foo?.bar)()` now keeps `(0, foo?.bar)()`
  (oxc-project/oxc#27082), which matches esbuild.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
Moves the oxc patch from main (d2bea210) to the top of the open #26242
stack (850f799a): #26712, #26716, #26717, #27096, #27098, #26743, #27580.

Only #27098 breaks Rolldown: oxc's `ConstantValue::String` now holds
`JSStr<'a>`. Rolldown keeps constants across modules as `String`, so:

- `ConstantValue::from_oxc` replaces the `From` impl and declines a string
  constant with a lone surrogate (it is not inlined across modules).
- `as_oxc_value` lends the string to oxc without copying, and
  `to_oxc_value_in` copies it into the arena where the context outlives the
  constant map. `StmtEvalAnalyzer` now implements `GlobalContext<'a>` for its
  own lifetime so it can lend.

No snapshot changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://claude-gifted-pascal-tl3lic-rolldown-rs.voidzero-docs.workers.dev (commit 009d835)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://1e52b6db-rolldown-rs.voidzero-docs.workers.dev 009d835 2026-10-21T04:32:26.906Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3095a8c1-rolldown-rs.voidzero-docs.workers.dev 5c28cf4 2026-10-20T07:52:13.803Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e0356d9a-rolldown-rs.voidzero-docs.workers.dev bb7ceb2 2026-10-20T07:18:40.773Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e704b721-rolldown-rs.voidzero-docs.workers.dev 8c9b553 2026-10-20T04:07:48.209Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://122c9d10-rolldown-rs.voidzero-docs.workers.dev 160326d 2026-10-20T02:32:16.271Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2cb048cb-rolldown-rs.voidzero-docs.workers.dev 173da25 2026-10-20T02:08:24.303Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://83d7268d-rolldown-rs.voidzero-docs.workers.dev 5b94654 2026-10-20T01:43:38.916Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://483cee8d-rolldown-rs.voidzero-docs.workers.dev b451673 2026-10-19T03:16:02.012Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c51842e5-rolldown-rs.voidzero-docs.workers.dev 8b6455c 2026-10-19T02:31:38.855Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://07afe78f-rolldown-rs.voidzero-docs.workers.dev 587b14e 2026-10-16T07:19:06.731Z Visit the dashboard ↗

View all previews: View all previews ↗

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 009d835
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6ad83fd9c70885881378c914
😎 Deploy Preview https://deploy-preview-11228--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Dunqing and others added 3 commits October 16, 2026 07:16
Moves the oxc patch to the rebased stack top (2a17adf1, on main@6fe4c1b9).
#26716, #26717 and #27098 were rewritten (#26717 no longer adds
`JSStr::to_string_lossy`); the APIs Rolldown uses are unchanged, so no source
changes are needed and there are no snapshot changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
Addresses the oxc-side review of the JSStr migration. A value with a lone
surrogate that Rolldown can't keep as UTF-8 is now an error wherever skipping
it would change what is built:

- module specifiers in `import()`, `require()`, `new URL()` and
  `import.meta.hot.accept()`, not only static imports. `hot.accept` with such a
  dep no longer turns the module self-accepting.
- import attribute keys and values, which were dropped from the output.
- `import.meta.glob` `base`, `import` and `query` options, which fell back to
  the defaults.
- type-only imports in the isolated-declarations plugin, which were skipped.

Also drops `StmtEvalAnalyzer`'s `get_constant_value_for_reference_id`
override (oxc only reads it through `ConstantEvaluationCtx`), lends
`ConstEvalCtx`'s constants to oxc instead of copying them into the arena,
moves `add_import_record`'s doc comment back onto it, mirrors the
`binding.d.cts` type change in `rolldown-binding.wasi.d.cts`, and adds
fixtures and unit tests for these paths.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
Follow-up to the oxc-side review of 8b6455c. A `data:` URL is left
untouched whatever it contains, so `new URL('data:…\uD800', import.meta.url)`
no longer reports an error.

Also adds the review's test cases: `require()` inside `try`/`catch`, a `data:`
URL, the backtick form of `import.meta.hot.accept()`, `ns['\uD800']` for
`ASSIGN_TO_IMPORT`, and a CJS fixture with lone-surrogate export names. The
`ConstEvalCtx` comment now names the `AstBuilder` covariance it relies on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
graphite-app Bot pushed a commit to oxc-project/oxc that referenced this pull request Oct 19, 2026
…y()` (#27950)

`StaticPropertyName` implemented `Display`, so `.to_string()` turned a name into escaped text without saying so. That matters where the text is used as a key rather than shown. It now has a `display()` adapter like `JSStr`'s, so each caller says what it wants. Both `display()` docs now note that the output is not injective (`"\uD800"` and `"\\ud800"` print the same), so it must not be compared or used as a key.

The 31 current callers keep their output: they format diagnostics or messages, and the few that key by the text get the same keys as before.

**Breaking:** `StaticPropertyName` no longer implements `Display`. Use `name.display()`.

Came up in the review of rolldown/rolldown#11228. Part of #26242.

Implemented with AI assistance.
graphite-app Bot pushed a commit to oxc-project/oxc that referenced this pull request Oct 19, 2026
…y()` (#27950)

`StaticPropertyName` implemented `Display`, so `.to_string()` turned a name into escaped text without saying so. That matters where the text is used as a key rather than shown. It now has a `display()` adapter like `JSStr`'s, so each caller says what it wants. Both `display()` docs now note that the output is not injective (`"\uD800"` and `"\\ud800"` print the same), so it must not be compared or used as a key.

The 31 current callers keep their output: they format diagnostics or messages, and the few that key by the text get the same keys as before.

**Breaking:** `StaticPropertyName` no longer implements `Display`. Use `name.display()`.

Came up in the review of rolldown/rolldown#11228. Part of #26242.

Implemented with AI assistance.
Dunqing and others added 2 commits October 20, 2026 01:24
Replaces the `[patch.crates-io]` git overrides with the released oxc 0.155.0
crates and npm packages. It contains the JSStr changes this branch was written
for (#26548, #26677, #27095, #27579, #26712, #26716, #26717, #27096) but not
oxc-project/oxc#27098, so `ConstantValue::String` is still `Cow<'a, str>`:

- `rolldown_common::ConstantValue` goes back to main's `From` impls. oxc
  doesn't evaluate a literal with a lone surrogate, so the conversion can't
  fail. `From<&ConstantValue>` now lends the string (`Cow::Borrowed`) instead
  of cloning it, which `ConstEvalCtx` can do because it implements the oxc
  traits for the lifetime its constants live for.
- The lone-surrogate unit test expects `'\uD800' + '\uDC00'` to stay
  unevaluated until #27098 is released.

Also regenerates the embedded `@oxc-project/runtime` helper version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
@Dunqing Dunqing changed the title chore(deps): [DO NOT MERGE] test oxc JSStr migration (oxc-project/oxc#26242) chore(deps): upgrade oxc to 0.155.0 Oct 20, 2026
Dunqing and others added 2 commits October 20, 2026 02:05
Moves the constant-lending change out of the upgrade. `ConstEvalCtx`,
`From<&ConstantValue>` and `StmtEvalAnalyzer` are back to main's code: 0.155.0
still uses `Cow<'a, str>` for string constants, so main's version compiles, and
lending them is an unmeasured performance change for its own PR.

Also corrects comments added for the upgrade:
- the module-request and import-attribute docs say why such a value is reported,
  not what older code did, and name the bundled-import case;
- JSON keys always come from `serde_json`, so the JSON-to-ESM path expects UTF-8
  keys instead of describing a branch that can't run;
- smaller wording fixes in `new_url.rs`, `expression_ext.rs`, the glob plugin
  and two fixtures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
…_surrogate`

From a second review of the upgrade:

- `transform_ast` hooks run on a JSON module's AST after `serde_json` parses
  it, so a key with a lone surrogate is reachable. Skip it again (it stays on
  the default export) instead of expecting UTF-8 keys, and say why.
- `text_before_lone_surrogate` takes the first valid UTF-8 chunk in one pass,
  instead of validating twice with an arm that could never run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
@Dunqing Dunqing added the ci: windows label Oct 20, 2026 — with Claude
Dunqing and others added 3 commits October 20, 2026 04:05
…sform peer

From the oxc-side re-review of the upgrade:

- `import.meta['ROLLDOWN_FILE_URL_\uD800']` was left untouched without a
  diagnostic. Reference ids are ASCII, so such a name matches no emitted file:
  it now reports FILE_NOT_FOUND like any unknown reference id.
- `examples/isolated-decl` still resolved `unplugin-isolated-decl`'s
  `oxc-transform` peer to 0.154.0. `pnpm --filter isolated-decl update
  oxc-transform` aligns it to 0.155.0 and drops the old bindings, as the 0.153.0
  and 0.154.0 upgrades did.
- Comments: CommonJS exports can contain a lone surrogate, so the reason for
  treating such a name like a computed one is that Rolldown stores export names
  as UTF-8. The module-request doc covers absolute URLs and bare specifiers,
  and the constant-evaluation test names oxc-project/oxc#27098, which will
  change what it asserts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
main now marks module starts with `// <id>` comments instead of `#region`
pairs (#11235). This PR's new `cjs_compat/lone_surrogate_export_name` snapshot
predates that change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
@Dunqing
Dunqing force-pushed the claude/gifted-pascal-tl3lic branch from 38408b9 to bb7ceb2 Compare October 20, 2026 07:16
A module request, import attribute, `import.meta.glob` option or type-only
import with a lone surrogate was reported as an error. Convert each lone
surrogate to U+FFFD instead, as `URL` and Node's file system APIs do, so the
request names the file the runtime would load. webpack and Bun resolve the
same way.

Property and export names with a lone surrogate are still skipped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSQFCN5EbczjosUMZeBc2E
@Dunqing
Dunqing marked this pull request as ready for review October 21, 2026 00:31
@codspeed

codspeed Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 4 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 7 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing claude/gifted-pascal-tl3lic (009d835) with main (5bfb74e)

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@shulaoda
shulaoda merged commit a973d41 into main Oct 21, 2026
61 of 62 checks passed
@shulaoda
shulaoda deleted the claude/gifted-pascal-tl3lic branch October 21, 2026 10:25
@rolldown-guard rolldown-guard Bot mentioned this pull request Oct 21, 2026
shulaoda added a commit that referenced this pull request Oct 21, 2026
## [1.2.15] - 2026-10-21

### 🚀 Features

- rolldown_plugin_vite_resolve: add `isBundled` to pick the browser-external stub format (#11260) by @h-a-n-a
- dev: mark entry modules in the HMR module graph (#11252) by @h-a-n-a
- mark module starts with `// <id>` comments instead of `#region` pairs (#11235) by @IWANABETHATGUY

### 🐛 Bug Fixes

- plugin: stop `this.resolve` recursion between plugins with `skipSelf: true` (#11181) by @anzal1
- rolldown_plugin_vite_resolve: handle external `require` for `ssr.target: 'webworker'` (#11205) by @sapphi-red
- rolldown_plugin_vite_build_import_analysis: only wrap dynamic imports with static specifiers in __vitePreload (#10879) by @smeng9
- strict-execution-order: wrap eager modules that forward wrapped definers (#11186) by @hyfdev
- chunk-import-map: keep common chunk keys unique when enabling inline common chunks (#11230) by @hyfdev
- only register signal-exit handler when a trace subscriber is active (#11208) by @DaniilIsupov

### 🧪 Testing

- fold hand-unrolled Rust test tables (#11212) by @Brooooooklyn

### ⚙️ Miscellaneous Tasks

- deps: upgrade oxc to 0.155.0 (#11228) by @Dunqing
- rollup-tests: retriage failed tests (#11251) by @sapphi-red
- deps: update rollup submodule for tests to v4.64.12 (#11249) by @rolldown-guard[bot]
- deps: update test262 submodule for tests (#11242) by @rolldown-guard[bot]

### ❤️ New Contributors

* @anzal1 made their first contribution in [#11181](#11181)
* @smeng9 made their first contribution in [#10879](#10879)
* @DaniilIsupov made their first contribution in [#11208](#11208)

Co-authored-by: shulaoda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants