Skip to content

chore(deps): update rolldown to 1.2.12 - #74

Merged
kazupon merged 2 commits into
mainfrom
chore/rolldown-1.2.12
Oct 2, 2026
Merged

kazupon merged 2 commits into
mainfrom
chore/rolldown-1.2.12

Conversation

@kazupon

@kazupon kazupon commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Part of #36

This PR updates rolldown to 1.2.12, both @rolldown/browser (which @vrowzer/rolldown bundles for the browser) and the Node rolldown. It is stage 0 of #36. The next stage ports the build code of Vite 8.3.1 to a build Worker, and Vite 8.3.1 expects rolldown ~1.2.11. On 1.2.12, the ported code can keep its upstream form.

Changes

  • Catalog: rolldown and @rolldown/browser are 1.2.12.

    • The Node rolldown moves too, for two reasons. The vite-dev-server port takes its types from rolldown and its runtime from @vrowzer/rolldown; with only @rolldown/browser updated, the types no longer match the runtime. And vite-dev-server tells plugins the rolldownVersion of the Node rolldown, which should be the version that runs.
    • The host's vite (vite-plus-core 0.3.0) bundles its own rolldown 1.2.5, so it does not change.
  • Types: @vrowzer/rolldown/experimental now declares the Vite plugins that rolldown implements natively:

    • viteLoadFallbackPlugin, viteBuildImportAnalysisPlugin, viteModulePreloadPolyfillPlugin, viteReporterPlugin, viteManifestPlugin
    • viteDynamicImportVarsPlugin, viteImportGlobPlugin, viteAliasPlugin, viteResolvePlugin, viteWebWorkerPostPlugin

    The runtime already exported them, since the experimental entries bundle @rolldown/browser/experimental. Only the generated declarations lacked them. The browser build of Add vrowzer.build() for browser-side production builds #36 uses them, as upstream Vite's build does.

  • The rolldown integration test expects the version 1.2.12.

Lockfile

The catalog change makes pnpm resolve the workspace again.

  • New in the lockfile: rolldown 1.2.12 and its bindings, @rolldown/browser 1.2.12, @emnapi/core and @emnapi/runtime 2.0.0-alpha.5 (from alpha.4), @emnapi/wasi-threads 2.1.0 (from 2.0.1) and @oxc-project/types 0.152.0. Nothing else is new.

  • Moved to versions that the lockfile already had:

    Package Version Projects
    vue 3.5.31 → 3.5.40 e2e/vite-vue, examples/vue, play-vrowzer, vite-plugin (dev)
    @vitejs/plugin-vue 6.0.5 → 6.0.8 e2e/vite-vue, examples/vue, play-vrowzer, vite-plugin (dev)
    publint 0.3.18 → 0.3.22 the packages that run publint (dev)
    obug 2.1.1 → 2.1.4 vite-dev-server (dev), vite-plugin
    ws 8.19.0 → 8.21.1 vite-plugin
    birpc 4.0.0 → 4.2.0 vite-dev-server
    postcss 8.5.6 → 8.5.23 vite-dev-server
    lightningcss 1.31.1 → 1.33.0 vite-dev-server (dev)
    @babel/parser 7.28.6 → 7.29.7 vite-dev-server (dev)
    @types/estree 1.0.8 → 1.0.9 vite-dev-server (dev)
    mlly 1.8.0 → 1.8.2 vite-dev-server (dev)
    picomatch 4.0.3 → 4.0.5 vite-dev-server (dev)
    tinyglobby 0.2.15 → 0.2.17 vite-dev-server (dev)
    ufo 1.6.3 → 1.6.4 vite-dev-server (dev)

    The Service Worker and Web Worker bundles of @vrowzer/vite-dev-server include their dependencies, so the published bundles get the newer birpc, postcss, picomatch and so on. The version ranges in the package.json files do not change.

  • e2e manifests: the manifests of vite-vue (paths of vue 3.5.40) and vite-react (new hashes of the prebundled react-dom server files) are generated again.

  • A workaround for pnpm 12.1.0: after it resolves the workspace again, pnpm 12.1.0 drops the vite entry of three projects: e2e/vite-vue, packages/service-worker-server and packages/vrowzer.

    • Then --frozen-lockfile, which CI uses, rejects that lockfile: ERR_PNPM_OUTDATED_LOCKFILE, "1 dependency was added: vite@npm:@voidzero-dev/vite-plus-core@0.3.0".
    • A plain install also left those projects without their own node_modules/vite link, so their imports fell back to the root's vite.
    • The first commit adds the three entries back by hand, with the resolution that the other projects use (packages/fs, e2e/vite-react).
    • Afterwards, vp install --frozen-lockfile passes, also in a fresh worktree, and links vite in the three projects. vp install and vp install --lockfile-only report "Already up to date" and keep the lockfile as it is.
    • This looks like one of the pnpm 12 problems with npm: alias overrides (here vite: 'catalog:'), such as overrides with an npm: alias is dropped when pnpm 12 re-resolves a locked dependency (resolves the real package instead) pnpm/pnpm#16309. pnpm install --fix-lockfile broke the install instead (vite-plus could not find @voidzero-dev/vite-plus-core), so I did not use it.

Other effects

  • The rolldown WASM grows from 10,936,998 to 11,051,466 bytes.
  • The Service Worker bundle of examples/vue now includes @babel/helper-string-parser. Before, the build treated it as external, with an UNRESOLVED_IMPORT warning.

There are no breaking changes.

Tests

All on macOS (arm64):

  • vp install --frozen-lockfile passes, also in a fresh worktree.

  • vp run build, the type checks, oxlint, knip and the format check pass. The format check skips the lockfile.

  • Unit tests: 1974 passed, 3 skipped, the same as main.

  • Integration tests:

    Project Result
    fs 3 passed
    node-polyfill 769 passed, 6 skipped
    rolldown 4 passed, including the version check for 1.2.12
    service-worker-server 10 passed
    service-worker 27 passed
    unplugin-service-worker 63 passed, 1 skipped
    vrowzer 85 passed, 1 skipped (45.7 s)
  • e2e, with the Vite caches cleared first:

    • dev mode: 46 passed, 6 skipped. A second run with warm caches passed too. The local times varied with the load of the machine (96.1 s and 132.9 s), so the CI times compare better with main.
    • host build mode: 39 passed, 13 skipped (21.0 s)
    • The react, svelte, vue and worker-config tests pass in both modes. Their HMR tests and the Worker config lifecycle tests run in dev mode only.
  • The types: an import of the ten plugins from @vrowzer/rolldown/experimental in vite-dev-server type-checks. A name that does not exist fails with TS2305. The import was not committed.

CI runs the WASM and its thread Workers on Linux for the first time with 1.2.12.

Update both rolldown entries of the catalog to 1.2.12: @rolldown/browser,
which @vrowzer/rolldown bundles for the browser, and the Node rolldown.
Vite 8.3.1, whose build code #36 ports, expects rolldown ~1.2.11.

The Node rolldown moves with @rolldown/browser because:

- The vite-dev-server port takes its types from rolldown and its runtime
  from @vrowzer/rolldown. With only @rolldown/browser updated, the types
  no longer match the runtime.
- vite-dev-server tells plugins the rolldownVersion of rolldown's
  package.json, which should be the version that runs.

The catalog change makes pnpm resolve the workspace again. Besides
rolldown and its dependencies (@emnapi/core and @emnapi/runtime
2.0.0-alpha.5, @emnapi/wasi-threads 2.1.0, @oxc-project/types 0.152.0),
some projects move to versions that the lockfile already had, such as vue
3.5.40, @vitejs/plugin-vue 6.0.8, publint 0.3.22 and postcss 8.5.23. The
e2e manifests of vite-vue and vite-react are generated again for vue
3.5.40 and the new prebundle hashes.

pnpm 12.1.0 drops the vite entry of e2e/vite-vue,
packages/service-worker-server and packages/vrowzer when it resolves the
workspace again, then rejects the lockfile with --frozen-lockfile
(ERR_PNPM_OUTDATED_LOCKFILE). The three entries are added back by hand,
with the resolution of the other projects. A normal install keeps them.
The experimental entries of @vrowzer/rolldown bundle
@rolldown/browser/experimental, so they already export the Vite plugins
that rolldown implements natively. Their generated type declarations
named only viteJsonPlugin and viteTransformPlugin, though.

Declare the other plugins in both builds (the one that shares
@vrowzer/fs and the standalone ./browser one): viteLoadFallbackPlugin,
viteBuildImportAnalysisPlugin, viteModulePreloadPolyfillPlugin,
viteReporterPlugin, viteManifestPlugin, viteDynamicImportVarsPlugin,
viteImportGlobPlugin, viteAliasPlugin, viteResolvePlugin and
viteWebWorkerPostPlugin. The browser build of #36 uses them as upstream
Vite's build does.
@kazupon
kazupon added this pull request to stack #76 October 2, 2026 15:07
@kazupon
kazupon merged commit 0a93e02 into main Oct 2, 2026
4 checks passed
@kazupon
kazupon deleted the chore/rolldown-1.2.12 branch October 2, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant