Repository navigation
feat(alias,auto-install,beep,buble,commonjs,data-uri,dsv,dynamic-import-vars,eslint,esm-shim,graphql,image,inject,legacy,multi-entry,node-resolve,pluginutils,replace,run,strip,sucrase,swc,terser,typescript,url,virtual,yaml): support rollup 5 - #2037
lukastaegert wants to merge 29 commits into
Conversation
To test plugins against the upcoming Rollup 5 release.
[Medium impact] The latest change appears safe to merge; the earlier Node 20 test concern remains non-blocking. Findings
Reviews (6) · Last reviewed commit: "chore(repo): raise vitest test timeout f..." · Reviewed by Greptile |
| catalogs: | ||
| rollup-next: | ||
| rollup: ^5.0.0-2 |
There was a problem hiding this comment.
The new rollup-next catalog selects Rollup 5, which requires Node >=22.22.0, but both test workflows still run it on Node 20. This leaves those checks outside Rollup's supported runtime and makes failures harder to separate from plugin problems. Keep Rollup 4 for the Node 20 checks and run the Rollup 5 checks on a supported Node version.
There was a problem hiding this comment.
🟡 Changes recommended
The Rollup 5 upgrade requires Node >=22.22.0 while CI still runs Node 20, and the updated HTML snapshot no longer verifies exclusion of non-entry chunks.
2 open issues
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
Prepares 29 Rollup plugins and utilities for Rollup 5 by updating dependency declarations and compatibility tests. json and wasm remain excluded because they require separate source changes.
Changes:
- Adds Rollup 5 peer support and a shared
rollup-nextdevelopment catalog. - Updates test expectations and snapshots, adds build smoke tests, and adjusts Node type dependencies.
- Isolates auto-install’s pnpm fixtures and checks that installs leave the root lockfile unchanged.
| File | Description |
|---|---|
| pnpm-workspace.yaml | Defines the Rollup 5 development catalog. |
| pnpm-lock.yaml | Locks Rollup 5 and updated dependency resolutions. |
| packages/yaml/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/virtual/test/types.test.js | Includes Node types in type tests. |
| packages/virtual/test/rollup-build.test.js | Adds a virtual-module build smoke test. |
| packages/virtual/package.json | Adds Rollup 5 support and Node type dependencies. |
| packages/url/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/typescript/test/test.js | Adapts diagnostic assertions to augmented Rollup logs. |
| packages/typescript/test/snapshots/warnings.js.snap | Updates warning snapshots for augmented logs. |
| packages/typescript/test/snapshots/tslib.js.snap | Updates the missing-tslib error snapshot. |
| packages/typescript/package.json | Adds Rollup 5 support and updates Node types. |
| packages/terser/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/swc/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/sucrase/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/strip/test/rollup-build.test.js | Adds a stripping build smoke test. |
| packages/strip/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/run/test/test.js | Updates expected plugin error prefixes. |
| packages/run/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/replace/test/sourcemaps.js | Updates sourcemap warning expectations. |
| packages/replace/test/snapshots/misc.js.snap | Updates the plugin warning snapshot. |
| packages/replace/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/pluginutils/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/node-resolve/test/test.mjs | Expects additional resolver importer metadata. |
| packages/node-resolve/test/snapshots/test.mjs.snap | Updates the deprecation warning snapshot. |
| packages/node-resolve/test/prefer-builtins.js | Updates the built-in preference warning expectation. |
| packages/node-resolve/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/multi-entry/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/legacy/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/inject/test/rollup-build.test.js | Adds an injected-import build smoke test. |
| packages/inject/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/image/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/html/test/snapshots/test.js.snap | Updates dynamic-import output and warning snapshots. |
| packages/html/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/graphql/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/esm-shim/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/eslint/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/dynamic-import-vars/test/snapshots/rollup-plugin-dynamic-import-vars.test.js.snap | Updates generated chunk hashes. |
| packages/dynamic-import-vars/test/rollup-plugin-dynamic-import-vars.test.js | Updates the missing-files warning expectation. |
| packages/dynamic-import-vars/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/dsv/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/data-uri/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/commonjs/test/test.js | Updates diagnostic formatting expectations. |
| packages/commonjs/test/snapshots/function.js.snap | Refreshes generated bundle snapshots. |
| packages/commonjs/test/fixtures/function/warn-this-resolve-without-options/_config.js | Updates the resolver warning prefix. |
| packages/commonjs/test/fixtures/function/strict-requires-debug-none/_config.js | Updates the wrapping diagnostic prefix. |
| packages/commonjs/test/fixtures/function/module-side-effects-late-entry/_config.js | Adjusts the expected generated entry filename. |
| packages/commonjs/test/fixtures/function/custom-options/_config.js | Expects additional resolver importer metadata. |
| packages/commonjs/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/buble/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/beep/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/babel/test/as-output-plugin.mjs | Updates warning and chunk-hash expectations. |
| packages/babel/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/auto-install/test/pnpm.js | Checks root lockfile preservation during fixture installs. |
| packages/auto-install/test/pnpm-bare.js | Checks root lockfile preservation during bare installs. |
| packages/auto-install/test/fixtures/pnpm/pnpm-workspace.yaml | Anchors workspace detection to the fixture. |
| packages/auto-install/test/fixtures/pnpm/.npmrc | Allows dependency installation at the fixture root. |
| packages/auto-install/test/fixtures/pnpm-bare/pnpm-workspace.yaml | Anchors workspace detection to the bare fixture. |
| packages/auto-install/test/fixtures/pnpm-bare/.npmrc | Allows dependency installation at the bare fixture root. |
| packages/auto-install/package.json | Adds Rollup 5 peer support and catalog usage. |
| packages/alias/test/alias.test.ts | Expects additional resolver importer metadata. |
| packages/alias/package.json | Explicitly supports Rollup 4–5 and uses the catalog. |
Review effort: Balanced
|
|
||
| catalogs: | ||
| rollup-next: | ||
| rollup: ^5.0.0-2 |
| { | ||
| "code": "if (Math.random() % 2) { | ||
| import('./batman-w40geAFS.js'); | ||
| Promise.resolve().then(function () { return batman; }); |
138dee6 to
08718f0
Compare
Extend the peer dependency range and test against the upcoming Rollup 5 release.
Extend the peer dependency range and test against the upcoming Rollup 5 release.
Extend the peer dependency range and test against the upcoming Rollup 5 release. Also anchor pnpm workspace detection to the fixture so its installs no longer rewrite the workspace lockfile.
Extend the peer dependency range and test against the upcoming Rollup 5 release.
Extend the peer dependency range and test against the upcoming Rollup 5 release.
408e68b to
6a4c2b9
Compare
Also await restoring the incremental fixture file, which produced an unhandled ENOENT in the watchMode test, and raise the declaration-test timeout for cold CI runners.
6a4c2b9 to
3eaada2
Compare
Cold runners can exceed the 5s default when loading TypeScript and Rollup types. Use the same 20s default as test-earliest-supported-rollup; only one testTimeout key should remain when the branches merge.


Rollup Plugins: 27 plugins
alias,auto-install,beep,buble,commonjs,data-uri,dsv,dynamic-import-vars,eslint,esm-shim,graphql,image,inject,legacy,multi-entry,node-resolve,pluginutils,replace,run,strip,sucrase,swc,terser,typescript,url,virtual,yamlThis PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Prepare the plugins that only need a peer dependency range extension for Rollup 5. Each plugin now accepts
rollup@^5.0.0, tests againstrollup@5.0.0-2through the newrollup-nextcatalog, and includes the Rollup 5 test and snapshot adaptations it needs.Smoke tests that run an actual Rollup build were duplicated from
test-earliest-supported-rollupwhere they exist (inject,strip,virtual). The auto-install fixture lockfile guard and virtual's type-test@types/nodesetup were duplicated as well, so the two branches can merge in either order.htmlandbabelwere moved to separate PRs (#2038, #2039) because their declared peer floors are too low (1.20.0 and 2.0.0).jsonandwasmare intentionally excluded: they need source changes to handle Rollup 5's attribute-encoded module ids viarawId. Those are tracked separately.This is intended to trigger a minor release for each of the 27 updated plugins.
generated with AI