Repository navigation
feat(alias,auto-install,beep,esm-shim,multi-entry,run,terser): support rollup 5 - #2037
Conversation
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable issues remain. Reviews (12) · Last reviewed commit: "feat(terser): support rollup 5" · Reviewed by Greptile |
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
138dee6 to
08718f0
Compare
6a4c2b9 to
3eaada2
Compare
|
Hey @lukastaegert, while working on #2017 I realized a few other plugins here also break with import attributes in Rollup 5 and need Also, |
|
@TrickyPi Thanks for looking into this! |
00fbf14 to
a492f14
Compare
|
@TrickyPi One question about the commonjs fix: If it depends on rollup/rollup#6653, can we still release it before rollup@5 is still released? To my understanding, the commonjs plugin was working with current rollup 5? It would be nice to have versions for all plugins that work with both latest rollup 4 and rollup 5 before we release rollup 5. |
@lukastaegert Yes, it stays compatible with Rollup 4 and can be released before Rollup 5. I only needed And yeah, regular builds already work fine on Rollup 5, it's just importing CJS modules with import attributes that breaks. I've opened #2057 for |
a492f14 to
857c155
Compare
Done |
857c155 to
c12d038
Compare
c12d038 to
2d3cbce
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. 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.
2d3cbce to
7595568
Compare
|
I created some more PRs for packages that would profit from minor adjustments. This PR is now reduced to the remaining ones. |
The release run that published @rollup/plugin-alias@6.1.0 pushed the version commit but had its tag push rejected by GitHub, so the workflow's cleanup step never ran. That step is what commits the changelog versioner writes after it has already committed the version bump, so the entry was lost. This restores it verbatim from what versioner generates for the #2037 commit.


Rollup Plugins: 27 plugins
alias,auto-install,beep,esm-shim,multi-entry,run,terserThis 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-3through the newrollup-nextcatalog, and includes the Rollup 5 test and snapshot adaptations it needs.This is intended to trigger a minor release for each of the 7 updated plugins.
generated with AI