Skip to content

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

Open
lukastaegert wants to merge 29 commits into
masterfrom
simple-rollup-5-updates

Conversation

@lukastaegert

@lukastaegert lukastaegert commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

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, yaml

This PR contains:

  • feature
  • bugfix
  • refactor
  • documentation
  • other

Are tests included?

  • yes
  • no

Breaking Changes?

  • yes
  • no

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 against rollup@5.0.0-2 through the new rollup-next catalog, 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-rollup where they exist (inject, strip, virtual). The auto-install fixture lockfile guard and virtual's type-test @types/node setup were duplicated as well, so the two branches can merge in either order.

html and babel were moved to separate PRs (#2038, #2039) because their declared peer floors are too low (1.20.0 and 2.0.0). json and wasm are intentionally excluded: they need source changes to handle Rollup 5's attribute-encoded module ids via rawId. Those are tracked separately.

This is intended to trigger a minor release for each of the 27 updated plugins.

generated with AI

To test plugins against the upcoming Rollup 5 release.
@lukastaegert
lukastaegert marked this pull request as ready for review November 2, 2026 16:31
Copilot AI balanced review requested due to automatic review settings November 2, 2026 16:31
@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest change appears safe to merge; the earlier Node 20 test concern remains non-blocking.

Findings

  1. P2 CI uses unsupported Node ▶

Reviews (6) · Last reviewed commit: "chore(repo): raise vitest test timeout f..." · Reviewed by Greptile

Comment thread pnpm-workspace.yaml
Comment on lines +11 to +13
catalogs:
rollup-next:
rollup: ^5.0.0-2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 CI uses unsupported Node

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-next development 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

Comment thread pnpm-workspace.yaml

catalogs:
rollup-next:
rollup: ^5.0.0-2
{
"code": "if (Math.random() % 2) {
import('./batman-w40geAFS.js');
Promise.resolve().then(function () { return batman; });
@lukastaegert
lukastaegert force-pushed the simple-rollup-5-updates branch from 138dee6 to 08718f0 Compare November 3, 2026 05:42
@lukastaegert lukastaegert changed the title feat(alias,auto-install,babel,beep,buble,commonjs,data-uri,dsv,dynamic-import-vars,eslint,esm-shim,graphql,html,image,inject,legacy,multi-entry,node-resolve,pluginutils,replace,run,strip,sucrase,swc,terser,typescript,url,virtual,yaml): support rollup 5 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 Nov 3, 2026
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.
@lukastaegert
lukastaegert force-pushed the simple-rollup-5-updates branch 2 times, most recently from 408e68b to 6a4c2b9 Compare November 3, 2026 06:22
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.
@lukastaegert
lukastaegert force-pushed the simple-rollup-5-updates branch from 6a4c2b9 to 3eaada2 Compare November 3, 2026 06:45
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.
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.

2 participants