From a2ded4e1357af3f7e4567003b798c543d8b2378a Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 07:04:29 +0100 Subject: [PATCH 01/29] chore(repo): define rollup-next catalog To test plugins against the upcoming Rollup 5 release. --- pnpm-workspace.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c1c7cb59f..780f3f0af 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,3 +7,7 @@ packages: # and resolve to the range below. catalog: typescript: ^5.9.3 + +catalogs: + rollup-next: + rollup: ^5.0.0-2 From 1f1a110cf8ca40632e2cb179d3ca13cba32f8649 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:24:50 +0100 Subject: [PATCH 02/29] feat(virtual): support rollup 5 Extend the peer dependency range and test against the upcoming Rollup 5 release. --- packages/virtual/package.json | 5 +- packages/virtual/test/rollup-build.test.js | 18 ++ packages/virtual/test/types.test.js | 31 ++- pnpm-lock.yaml | 299 ++++++++++++++++++++- 4 files changed, 333 insertions(+), 20 deletions(-) create mode 100644 packages/virtual/test/rollup-build.test.js diff --git a/packages/virtual/package.json b/packages/virtual/package.json index 7f65ac9d0..48f1985e2 100755 --- a/packages/virtual/package.json +++ b/packages/virtual/package.json @@ -60,7 +60,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -70,7 +70,8 @@ "devDependencies": { "@rollup/plugin-node-resolve": "^15.0.0", "@rollup/plugin-typescript": "^9.0.1", - "rollup": "^4.0.0-24", + "@types/node": "^20.19.0", + "rollup": "catalog:rollup-next", "typescript": "^4.8.3" }, "types": "./types/index.d.ts" diff --git a/packages/virtual/test/rollup-build.test.js b/packages/virtual/test/rollup-build.test.js new file mode 100644 index 000000000..d01da0375 --- /dev/null +++ b/packages/virtual/test/rollup-build.test.js @@ -0,0 +1,18 @@ +const { rollup } = require('rollup'); + +const virtual = require('..'); + +test('bundles virtual modules with rollup', async () => { + const bundle = await rollup({ + input: 'entry', + plugins: [ + virtual({ + entry: "import value from './dep.js'; export default value;", + 'dep.js': 'export default "virtual-test-value";' + }) + ] + }); + const { output } = await bundle.generate({ format: 'es' }); + expect(output).toHaveLength(1); + expect(output[0].code).toContain('virtual-test-value'); +}); diff --git a/packages/virtual/test/types.test.js b/packages/virtual/test/types.test.js index c708522a8..e99e7d1a1 100644 --- a/packages/virtual/test/types.test.js +++ b/packages/virtual/test/types.test.js @@ -7,16 +7,17 @@ const modes = [ ['NodeNext', ts.ModuleKind.NodeNext, ts.ModuleResolutionKind.NodeNext] ]; +const TYPES_TEST_TIMEOUT = 30_000; + function diagnostics(fixture, module, moduleResolution) { const program = ts.createProgram([path.join(__dirname, 'fixtures', 'types', fixture)], { esModuleInterop: true, module, moduleResolution, noEmit: true, - skipLibCheck: false, strict: true, target: ts.ScriptTarget.ES2019, - types: [] + types: ['node'] }); return ts @@ -25,17 +26,25 @@ function diagnostics(fixture, module, moduleResolution) { } for (const [name, module, moduleResolution] of modes) { - test(`supports default imports in ${name} ES modules`, () => { + test(`supports default imports in ${name} ES modules`, { timeout: TYPES_TEST_TIMEOUT }, () => { expect(diagnostics('esm.mts', module, moduleResolution)).toEqual([]); }); - test(`supports default imports in ${name} CommonJS modules`, () => { - expect(diagnostics('commonjs.cts', module, moduleResolution)).toEqual([]); - }); + test( + `supports default imports in ${name} CommonJS modules`, + { timeout: TYPES_TEST_TIMEOUT }, + () => { + expect(diagnostics('commonjs.cts', module, moduleResolution)).toEqual([]); + } + ); } -test('supports default imports with legacy Node resolution', () => { - expect(diagnostics('legacy.ts', ts.ModuleKind.CommonJS, ts.ModuleResolutionKind.NodeJs)).toEqual( - [] - ); -}); +test( + 'supports default imports with legacy Node resolution', + { timeout: TYPES_TEST_TIMEOUT }, + () => { + expect( + diagnostics('legacy.ts', ts.ModuleKind.CommonJS, ts.ModuleResolutionKind.NodeJs) + ).toEqual([]); + } +); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8cbba389d..579cfed5e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,6 +9,10 @@ catalogs: typescript: specifier: ^5.9.3 version: 5.9.3 + rollup-next: + rollup: + specifier: ^5.0.0-2 + version: 5.0.0-2 importers: @@ -772,13 +776,16 @@ importers: devDependencies: '@rollup/plugin-node-resolve': specifier: ^15.0.0 - version: 15.0.0(rollup@4.0.0-24) + version: 15.0.0(rollup@5.0.0-2) '@rollup/plugin-typescript': specifier: ^9.0.1 - version: 9.0.1(rollup@4.0.0-24)(tslib@2.4.0)(typescript@4.8.4) + version: 9.0.1(rollup@5.0.0-2)(tslib@2.4.0)(typescript@4.8.4) + '@types/node': + specifier: ^20.19.0 + version: 20.19.23 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: ^4.8.3 version: 4.8.4 @@ -1722,6 +1729,12 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} + engines: {node: ^22.20 || ^24.12 || >=25} + cpu: [x64] + os: [linux] + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1864,6 +1877,11 @@ packages: cpu: [arm] os: [android] + '@rollup/rollup-android-arm-eabi@5.0.0-2': + resolution: {integrity: sha512-hOAoxYpsQFt2jVm3c5iHXcTEPFfnGN6cEFbQJH7NmJWWV2CecryxmXqiaLD+P2+w3Axym+H2gWLfNktocimzCQ==} + cpu: [arm] + os: [android] + '@rollup/rollup-android-arm64@4.0.0-24': resolution: {integrity: sha512-ftTp5ByyyozDsHfmYGeErrQmBi4ZEVZItC4Siilwretkf+cMv9z0s0Ru8ncd28OZpaO0cr9b7Afm+DIRDyE8Kw==} cpu: [arm64] @@ -1874,6 +1892,16 @@ packages: cpu: [arm64] os: [android] + '@rollup/rollup-android-arm64@5.0.0-2': + resolution: {integrity: sha512-XK8hfa8k/WHlpyfumS3gRG9sqfreyyO0jYg2sh4I1Lrl+zOwYLRAsxISpr9pAmc+IGUgDpiBKo1wE3YfBfJVDg==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-android-x64@5.0.0-2': + resolution: {integrity: sha512-XA+6xbgUiwtO/DdCqh9V69WfEhAR+zpVMxfBQ9ZkiZ7x2h3VWON3ACtGTa621Oy4ouV4MaxcROB2evaH3VkQcA==} + cpu: [x64] + os: [android] + '@rollup/rollup-darwin-arm64@4.0.0-24': resolution: {integrity: sha512-wYXWdPbMLiIRHQeTF/r9ZoDcf3k1ROR0Kyd/caUtbs5VEZOBfnpZ/FHQPzXW0S1fzxTtD5W4tXULxARMHAlNdQ==} cpu: [arm64] @@ -1884,6 +1912,11 @@ packages: cpu: [arm64] os: [darwin] + '@rollup/rollup-darwin-arm64@5.0.0-2': + resolution: {integrity: sha512-/MWEJ6O5xLsTI4m3iwiCrn7csMgrp4f3YKgfM8z5mUbiASgXxIo45gMLEfBf44kehA7XjaYocjq9jHeoWbJIyw==} + cpu: [arm64] + os: [darwin] + '@rollup/rollup-darwin-x64@4.0.0-24': resolution: {integrity: sha512-8tIz6Uga/5XdeRkid7kfNtxrvru7o4lDBxAPooZezKXbyB2ap2yKAKCqTFEXyTuPhl2yxLMa5zqZ91FBEnSbPg==} cpu: [x64] @@ -1894,16 +1927,31 @@ packages: cpu: [x64] os: [darwin] + '@rollup/rollup-darwin-x64@5.0.0-2': + resolution: {integrity: sha512-0MhllQoAFk4lcNyOhfbS/nQ33Flp0dtG6TNe1f4xUpXCUfALHmuU/dXW/yJJSSPV3s2Mntg1smVCYH5Sl1ARWQ==} + cpu: [x64] + os: [darwin] + '@rollup/rollup-freebsd-arm64@4.52.5': resolution: {integrity: sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==} cpu: [arm64] os: [freebsd] + '@rollup/rollup-freebsd-arm64@5.0.0-2': + resolution: {integrity: sha512-1M3PPlEfap+gEUKbW2rCoy9+YYUQgnnn7W3UMv3MoDaqpGRqtQiKmOriRt5MAJNAaIJm20cVG/fr4YPNmEvW6Q==} + cpu: [arm64] + os: [freebsd] + '@rollup/rollup-freebsd-x64@4.52.5': resolution: {integrity: sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==} cpu: [x64] os: [freebsd] + '@rollup/rollup-freebsd-x64@5.0.0-2': + resolution: {integrity: sha512-ZRkxXembkVYM4dZWbZb/E261R6AA7KUsQmmd/TLvOdxPteV/gLl3w5W5hISMtVZfx6hIYHgkxwAKpjNoKp9jHw==} + cpu: [x64] + os: [freebsd] + '@rollup/rollup-linux-arm-gnueabihf@4.0.0-24': resolution: {integrity: sha512-ZCNBOaw2NV3BnpQ049VCPJSamss3wAoCunFcWYfhWgGyu9C0hiRvZAcKvhd7e/9EhuoIxsNxMLwI46NmZx9WBQ==} cpu: [arm] @@ -1914,11 +1962,21 @@ packages: cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-gnueabihf@5.0.0-2': + resolution: {integrity: sha512-3U30xQbFFv67ZFjCf+kLe77LVWOVhsVTgjX9dUQmIrGP0m8m8UpVUhiRmHZzhpaSXrqgWi9ruYsceW/NESrD5A==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.52.5': resolution: {integrity: sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-musleabihf@5.0.0-2': + resolution: {integrity: sha512-+mkbdgJEStysTgkS7CkIGxBd28LE2Gemx07oTqBl7T8AxJyMWrnclR6/UASnDX3TeHlWpgCRF0E4LBZEbYUweA==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.0.0-24': resolution: {integrity: sha512-BGnRktAZq4RI6FSicI+F6ws9paiYmjyaXUNKSukLthzgzPC91V4SXVylbFOCKvrhdWAr0lvZgcTrkgYNAmAcuQ==} cpu: [arm64] @@ -1929,36 +1987,81 @@ packages: cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-gnu@5.0.0-2': + resolution: {integrity: sha512-EebgKRaqRa3Zn0SNBwiGf2Zs6c0u7Np5eZHdkPueG6x0BJdxKmKq2ADnBj13JywB2Vg1lBnpxSPR59zVnJgdrw==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-arm64-musl@4.52.5': resolution: {integrity: sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-musl@5.0.0-2': + resolution: {integrity: sha512-UTibuqKhYH57GhkXTcbYmx493tzt1UNBJKeTarGplAct7HNdHpsv7mUx+OhTkA8tJW8cK3zfxFboHlaWVdy9ow==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-loong64-gnu@4.52.5': resolution: {integrity: sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==} cpu: [loong64] os: [linux] + '@rollup/rollup-linux-loong64-gnu@5.0.0-2': + resolution: {integrity: sha512-8sVjPGbzwaLmhJ/47Sy12w7PCjmMFxPKFC05UftvvAhZ4iKv8eDn8h1QTN2mvd9VpfeIVMCyGeetw3Y39iQUpg==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-loong64-musl@5.0.0-2': + resolution: {integrity: sha512-Jbxoy+FMKFMfOpUCKhJloWhfxWLKnb8oGZqCsAvVfRllLu9FdM/P4Y+lG+eJQaAdr1jVy8nM0JIwiuBAfNdYfg==} + cpu: [loong64] + os: [linux] + '@rollup/rollup-linux-ppc64-gnu@4.52.5': resolution: {integrity: sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==} cpu: [ppc64] os: [linux] + '@rollup/rollup-linux-ppc64-gnu@5.0.0-2': + resolution: {integrity: sha512-rmtM92oxoJKyNT7U0gu4mvJTRh91nOFpmROgkBcuGSsTBH/mYLVIuGHv3SFPTHcJBRHHE8JlAJRCJmGS2St67w==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-ppc64-musl@5.0.0-2': + resolution: {integrity: sha512-NPE2xkMwSUShis0hDYCVpW7m022+gTyMddFfnU9m+tnlr1JVxl+BOz7mEzKyiYXfhiqprpk7WDJS+A3bQ1ko8A==} + cpu: [ppc64] + os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.52.5': resolution: {integrity: sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-gnu@5.0.0-2': + resolution: {integrity: sha512-TLru/d8a6qXihOyK1GtJXCl7j8QjSl115R8nsX6wVIixrEKOBiNIs4xJrzVFnhCM/Pg99gSJvCOC6qCttqbJ5w==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-riscv64-musl@4.52.5': resolution: {integrity: sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-musl@5.0.0-2': + resolution: {integrity: sha512-CNP7GIlDlgo+XMTT7B34pEblAUuOXnsLt1kmy2GKw0nOjmrXCTqSdIsu/gfXv4HmF0Do1zrn3naqgZE95N+1cg==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.52.5': resolution: {integrity: sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==} cpu: [s390x] os: [linux] + '@rollup/rollup-linux-s390x-gnu@5.0.0-2': + resolution: {integrity: sha512-WWC/fQp+sNUwzi8nuYw1AWOrhkthjctlt/YSGKJVzW8MPL+FWAyc65qhFl8gXJqKJ31xuPx3p2bUBmx+nJU44Q==} + cpu: [s390x] + os: [linux] + '@rollup/rollup-linux-x64-gnu@4.0.0-24': resolution: {integrity: sha512-FzhHpp+vRTjIUYXMExj9Ffj2bCQgnRAzlWlsQTdYGYvPQMVadfPMvnlcr4Li8P7Yv1iBFtDzRVfZAgL5glvIAA==} cpu: [x64] @@ -1969,6 +2072,11 @@ packages: cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-gnu@5.0.0-2': + resolution: {integrity: sha512-BgNoJ4p7LKPEG4/17fDoawLCaiLnevtBoZ3Gp6eRHLD3rmYsfB6rjgSUkRecRCYPf/j3YyZMeyydraiPpoa1qA==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-musl@4.0.0-24': resolution: {integrity: sha512-0y+oXnCCT5+U5V58bY7dy65yDrWWfopFJwtC2EbFeA9SHrVjG36/TQo535ML3zdFwO+fma8r5FP1os0psbQBXQ==} cpu: [x64] @@ -1979,11 +2087,26 @@ packages: cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-musl@5.0.0-2': + resolution: {integrity: sha512-S8qpxiE1dO+qBmC4UbS34319lyuyVU4iTgP9YDrCKXhh1up1XSsFh0e1IpCov1WCE6bGHmoBJ3Cjj5j7eQDaCw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openbsd-x64@5.0.0-2': + resolution: {integrity: sha512-SP07ZPSf8JqCvfTqiNm1eSOkxsMD/MrE/x6h2kIiPftwpQYSXOWikX+EFSjH+L9W8c1CYbOXnUOPQQyAQB3bDA==} + cpu: [x64] + os: [openbsd] + '@rollup/rollup-openharmony-arm64@4.52.5': resolution: {integrity: sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==} cpu: [arm64] os: [openharmony] + '@rollup/rollup-openharmony-arm64@5.0.0-2': + resolution: {integrity: sha512-pnEPJy86CCPnhusktg01iZ/A870AKA/1QjUp553T/WyGVw2u/QGFZ3j1vcgn7AdUsxGyK2iJ3fUX0jk4F0RTdA==} + cpu: [arm64] + os: [openharmony] + '@rollup/rollup-win32-arm64-msvc@4.0.0-24': resolution: {integrity: sha512-xT8djNMxVB84cCm1XILpQXkMcu8S+GBKjurXM4sc6eB1FQpFpcTAOsuQSg9xOhfPqm1xa7qqXA6ZpUhoUMboVQ==} cpu: [arm64] @@ -1994,6 +2117,11 @@ packages: cpu: [arm64] os: [win32] + '@rollup/rollup-win32-arm64-msvc@5.0.0-2': + resolution: {integrity: sha512-fa1XJxFFWBSsYiQ+SZVC58QkSiQI2ZzOQorTc7Sh8QVcOvE5Jaaw2NVbJ7p5p49DXptXjqZJZI5jKiVNyonjrw==} + cpu: [arm64] + os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.0.0-24': resolution: {integrity: sha512-3gXFBlG5f18xbhVxKTM+zwciJPk097i3YswLI9cajVd4MAqMw5bGbuZkGOZOMnkzeIX0ELxovYWPbGDyUr+f5g==} cpu: [ia32] @@ -2004,11 +2132,21 @@ packages: cpu: [ia32] os: [win32] + '@rollup/rollup-win32-ia32-msvc@5.0.0-2': + resolution: {integrity: sha512-C1YO1wkRsjubrsw6k46NwUhsljJtPgR6iaKTKECBWtaari9o1C3MQFnhfNSSoUrGsDw/fQMAzTANBKzWVXMtog==} + cpu: [ia32] + os: [win32] + '@rollup/rollup-win32-x64-gnu@4.52.5': resolution: {integrity: sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==} cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-gnu@5.0.0-2': + resolution: {integrity: sha512-wGpmXFG/NeOez1PkBzJcrFoD63/5Lynn5oAX5l0/y1qhLPt84UEJUefBF4cpJarJZ9CBTQgS/kOSUpCIKp0pSA==} + cpu: [x64] + os: [win32] + '@rollup/rollup-win32-x64-msvc@4.0.0-24': resolution: {integrity: sha512-41+QkzRaKEZwmA14Fa2DI0QKN5hkcN/orA2KOg5vJAtvwSfB1uQTUmf6T4SGZLw/8In2TEmViB9tDVlbnXmH1A==} cpu: [x64] @@ -2019,6 +2157,11 @@ packages: cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-msvc@5.0.0-2': + resolution: {integrity: sha512-gw0w/7l+1cebmewhKdvzU8tMQVMebba4uozHT45fDd6TRCQc8zW2ydJ4IGtgCR8ubFSrmLCLf+4Xb9hWNrdiXA==} + cpu: [x64] + os: [win32] + '@sindresorhus/is@4.6.0': resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} @@ -2034,6 +2177,9 @@ packages: '@sinonjs/text-encoding@0.7.2': resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} + deprecated: |- + Deprecated: no longer maintained and no longer used by Sinon packages. See + https://github.com/sinonjs/nise/issues/243 for replacement details. '@standard-schema/spec@1.0.0': resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} @@ -2335,6 +2481,7 @@ packages: '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} + deprecated: Potential CWE-502 - Update to 1.3.1 or higher '@vitest/expect@4.0.2': resolution: {integrity: sha512-izQY+ABWqL2Vyr5+LNo3m16nLLTAzLn8em6i5uxqsrWRhdgzdN5JIHrpFVGBAYRGDAbtwE+yD4Heu8gsBSWTVQ==} @@ -3144,6 +3291,7 @@ packages: eslint@9.37.0: resolution: {integrity: sha512-XyLmROnACWqSxiGYArdef1fItQd47weqB7iwtfr9JHwRrqIXZdcFMvvEcL9xHCmL0SNsOvF0c42lWyM1U5dgig==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true peerDependencies: jiti: '*' @@ -4715,6 +4863,11 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rollup@5.0.0-2: + resolution: {integrity: sha512-UhOlXyjWgE+1kECSNCUlyfuP8fximLVoLIDZJO2jabbtxkd4dqFmCBB97CdapA8I1XnHdasgyxK4NkfQP/p0uw==} + engines: {node: '>=22.22.0', npm: '>=10.9.3'} + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -5200,6 +5353,7 @@ packages: uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true v8-compile-cache-lib@3.0.1: @@ -6411,6 +6565,9 @@ snapshots: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.5.5 + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + optional: true + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -6485,6 +6642,17 @@ snapshots: optionalDependencies: rollup: 4.52.5 + '@rollup/plugin-node-resolve@15.0.0(rollup@5.0.0-2)': + dependencies: + '@rollup/pluginutils': 4.2.1 + '@types/resolve': 1.20.2 + deepmerge: 4.2.2 + is-builtin-module: 3.2.0 + is-module: 1.0.0 + resolve: 1.22.1 + optionalDependencies: + rollup: 5.0.0-2 + '@rollup/plugin-typescript@9.0.1(rollup@4.0.0-24)(tslib@2.4.0)(typescript@4.8.4)': dependencies: '@rollup/pluginutils': 4.2.1 @@ -6494,6 +6662,15 @@ snapshots: rollup: 4.0.0-24 tslib: 2.4.0 + '@rollup/plugin-typescript@9.0.1(rollup@5.0.0-2)(tslib@2.4.0)(typescript@4.8.4)': + dependencies: + '@rollup/pluginutils': 4.2.1 + resolve: 1.22.1 + typescript: 4.8.4 + optionalDependencies: + rollup: 5.0.0-2 + tslib: 2.4.0 + '@rollup/plugin-typescript@9.0.1(tslib@2.4.0)(typescript@5.9.3)': dependencies: '@rollup/pluginutils': 4.2.1 @@ -6549,99 +6726,177 @@ snapshots: '@rollup/rollup-android-arm-eabi@4.52.5': optional: true + '@rollup/rollup-android-arm-eabi@5.0.0-2': + optional: true + '@rollup/rollup-android-arm64@4.0.0-24': optional: true '@rollup/rollup-android-arm64@4.52.5': optional: true + '@rollup/rollup-android-arm64@5.0.0-2': + optional: true + + '@rollup/rollup-android-x64@5.0.0-2': + optional: true + '@rollup/rollup-darwin-arm64@4.0.0-24': optional: true '@rollup/rollup-darwin-arm64@4.52.5': optional: true + '@rollup/rollup-darwin-arm64@5.0.0-2': + optional: true + '@rollup/rollup-darwin-x64@4.0.0-24': optional: true '@rollup/rollup-darwin-x64@4.52.5': optional: true + '@rollup/rollup-darwin-x64@5.0.0-2': + optional: true + '@rollup/rollup-freebsd-arm64@4.52.5': optional: true + '@rollup/rollup-freebsd-arm64@5.0.0-2': + optional: true + '@rollup/rollup-freebsd-x64@4.52.5': optional: true + '@rollup/rollup-freebsd-x64@5.0.0-2': + optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.0.0-24': optional: true '@rollup/rollup-linux-arm-gnueabihf@4.52.5': optional: true + '@rollup/rollup-linux-arm-gnueabihf@5.0.0-2': + optional: true + '@rollup/rollup-linux-arm-musleabihf@4.52.5': optional: true + '@rollup/rollup-linux-arm-musleabihf@5.0.0-2': + optional: true + '@rollup/rollup-linux-arm64-gnu@4.0.0-24': optional: true '@rollup/rollup-linux-arm64-gnu@4.52.5': optional: true + '@rollup/rollup-linux-arm64-gnu@5.0.0-2': + optional: true + '@rollup/rollup-linux-arm64-musl@4.52.5': optional: true + '@rollup/rollup-linux-arm64-musl@5.0.0-2': + optional: true + '@rollup/rollup-linux-loong64-gnu@4.52.5': optional: true + '@rollup/rollup-linux-loong64-gnu@5.0.0-2': + optional: true + + '@rollup/rollup-linux-loong64-musl@5.0.0-2': + optional: true + '@rollup/rollup-linux-ppc64-gnu@4.52.5': optional: true + '@rollup/rollup-linux-ppc64-gnu@5.0.0-2': + optional: true + + '@rollup/rollup-linux-ppc64-musl@5.0.0-2': + optional: true + '@rollup/rollup-linux-riscv64-gnu@4.52.5': optional: true + '@rollup/rollup-linux-riscv64-gnu@5.0.0-2': + optional: true + '@rollup/rollup-linux-riscv64-musl@4.52.5': optional: true + '@rollup/rollup-linux-riscv64-musl@5.0.0-2': + optional: true + '@rollup/rollup-linux-s390x-gnu@4.52.5': optional: true + '@rollup/rollup-linux-s390x-gnu@5.0.0-2': + optional: true + '@rollup/rollup-linux-x64-gnu@4.0.0-24': optional: true '@rollup/rollup-linux-x64-gnu@4.52.5': optional: true + '@rollup/rollup-linux-x64-gnu@5.0.0-2': + optional: true + '@rollup/rollup-linux-x64-musl@4.0.0-24': optional: true '@rollup/rollup-linux-x64-musl@4.52.5': optional: true + '@rollup/rollup-linux-x64-musl@5.0.0-2': + optional: true + + '@rollup/rollup-openbsd-x64@5.0.0-2': + optional: true + '@rollup/rollup-openharmony-arm64@4.52.5': optional: true + '@rollup/rollup-openharmony-arm64@5.0.0-2': + optional: true + '@rollup/rollup-win32-arm64-msvc@4.0.0-24': optional: true '@rollup/rollup-win32-arm64-msvc@4.52.5': optional: true + '@rollup/rollup-win32-arm64-msvc@5.0.0-2': + optional: true + '@rollup/rollup-win32-ia32-msvc@4.0.0-24': optional: true '@rollup/rollup-win32-ia32-msvc@4.52.5': optional: true + '@rollup/rollup-win32-ia32-msvc@5.0.0-2': + optional: true + '@rollup/rollup-win32-x64-gnu@4.52.5': optional: true + '@rollup/rollup-win32-x64-gnu@5.0.0-2': + optional: true + '@rollup/rollup-win32-x64-msvc@4.0.0-24': optional: true '@rollup/rollup-win32-x64-msvc@4.52.5': optional: true + '@rollup/rollup-win32-x64-msvc@5.0.0-2': + optional: true + '@sindresorhus/is@4.6.0': {} '@sinonjs/commons@1.8.3': @@ -6748,7 +7003,7 @@ snapshots: dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 20.19.23 + '@types/node': 14.18.30 '@types/responselike': 1.0.0 '@types/chai@5.2.3': @@ -6777,7 +7032,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 20.19.23 + '@types/node': 14.18.30 '@types/minimist@1.2.2': {} @@ -6799,7 +7054,7 @@ snapshots: '@types/responselike@1.0.0': dependencies: - '@types/node': 20.19.23 + '@types/node': 14.18.30 '@types/semver@7.3.12': {} @@ -9605,6 +9860,36 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.52.5 fsevents: 2.3.3 + rollup@5.0.0-2: + optionalDependencies: + '@napi-rs/lzma-linux-x64-gnu': 1.5.1 + '@rollup/rollup-android-arm-eabi': 5.0.0-2 + '@rollup/rollup-android-arm64': 5.0.0-2 + '@rollup/rollup-android-x64': 5.0.0-2 + '@rollup/rollup-darwin-arm64': 5.0.0-2 + '@rollup/rollup-darwin-x64': 5.0.0-2 + '@rollup/rollup-freebsd-arm64': 5.0.0-2 + '@rollup/rollup-freebsd-x64': 5.0.0-2 + '@rollup/rollup-linux-arm-gnueabihf': 5.0.0-2 + '@rollup/rollup-linux-arm-musleabihf': 5.0.0-2 + '@rollup/rollup-linux-arm64-gnu': 5.0.0-2 + '@rollup/rollup-linux-arm64-musl': 5.0.0-2 + '@rollup/rollup-linux-loong64-gnu': 5.0.0-2 + '@rollup/rollup-linux-loong64-musl': 5.0.0-2 + '@rollup/rollup-linux-ppc64-gnu': 5.0.0-2 + '@rollup/rollup-linux-ppc64-musl': 5.0.0-2 + '@rollup/rollup-linux-riscv64-gnu': 5.0.0-2 + '@rollup/rollup-linux-riscv64-musl': 5.0.0-2 + '@rollup/rollup-linux-s390x-gnu': 5.0.0-2 + '@rollup/rollup-linux-x64-gnu': 5.0.0-2 + '@rollup/rollup-linux-x64-musl': 5.0.0-2 + '@rollup/rollup-openbsd-x64': 5.0.0-2 + '@rollup/rollup-openharmony-arm64': 5.0.0-2 + '@rollup/rollup-win32-arm64-msvc': 5.0.0-2 + '@rollup/rollup-win32-ia32-msvc': 5.0.0-2 + '@rollup/rollup-win32-x64-gnu': 5.0.0-2 + '@rollup/rollup-win32-x64-msvc': 5.0.0-2 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 From a68704e997b5ea50f6eca44df59dd4d8dab376ee Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:24:54 +0100 Subject: [PATCH 03/29] feat(alias): support rollup 5 Extend the peer dependency range and test against the upcoming Rollup 5 release. --- packages/alias/package.json | 4 ++-- packages/alias/test/alias.test.ts | 40 +++++++++++++++++++++++++++---- pnpm-lock.yaml | 17 +++---------- 3 files changed, 41 insertions(+), 20 deletions(-) diff --git a/packages/alias/package.json b/packages/alias/package.json index 922347049..76d5aac39 100755 --- a/packages/alias/package.json +++ b/packages/alias/package.json @@ -48,7 +48,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": ">=4.0.0" + "rollup": "^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -58,7 +58,7 @@ "devDependencies": { "@rollup/plugin-node-resolve": "^15.0.0", "del-cli": "^5.0.0", - "rollup": "^4.0.0", + "rollup": "catalog:rollup-next", "typescript": "catalog:" }, "types": "./dist/index.d.ts", diff --git a/packages/alias/test/alias.test.ts b/packages/alias/test/alias.test.ts index bc2e540e9..55032636f 100644 --- a/packages/alias/test/alias.test.ts +++ b/packages/alias/test/alias.test.ts @@ -414,11 +414,27 @@ describe('plugin-alias', () => { ] ); expect(resolverCalls).toEqual([ - ['entry-point', '/src/importer.js', { attributes: {}, custom: void 0, isEntry: true }], + [ + 'entry-point', + '/src/importer.js', + { + attributes: {}, + custom: void 0, + importerAttributes: {}, + importerRawId: '/src/importer.js', + isEntry: true + } + ], [ 'non-entry-point', '/src/importer.js', - { attributes: {}, custom: { test: 42 }, isEntry: false } + { + attributes: {}, + custom: { test: 42 }, + importerAttributes: {}, + importerRawId: '/src/importer.js', + isEntry: false + } ] ]); expect(result).toEqual(['entry-point', 'non-entry-point']); @@ -451,11 +467,27 @@ describe('plugin-alias', () => { ] ); expect(resolverCalls).toEqual([ - ['entry-point', '/src/importer.js', { attributes: {}, custom: void 0, isEntry: true }], + [ + 'entry-point', + '/src/importer.js', + { + attributes: {}, + custom: void 0, + importerAttributes: {}, + importerRawId: '/src/importer.js', + isEntry: true + } + ], [ 'non-entry-point', '/src/importer.js', - { attributes: {}, custom: { test: 42 }, isEntry: false } + { + attributes: {}, + custom: { test: 42 }, + importerAttributes: {}, + importerRawId: '/src/importer.js', + isEntry: false + } ] ]); expect(result).toEqual(['entry-point', 'non-entry-point']); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 579cfed5e..c3644baa5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,13 +95,13 @@ importers: devDependencies: '@rollup/plugin-node-resolve': specifier: ^15.0.0 - version: 15.0.0(rollup@4.52.5) + version: 15.0.0(rollup@5.0.0-2) del-cli: specifier: ^5.0.0 version: 5.0.0 rollup: - specifier: ^4.0.0 - version: 4.52.5 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: 'catalog:' version: 5.9.3 @@ -6631,17 +6631,6 @@ snapshots: optionalDependencies: rollup: 4.0.0-24 - '@rollup/plugin-node-resolve@15.0.0(rollup@4.52.5)': - dependencies: - '@rollup/pluginutils': 4.2.1 - '@types/resolve': 1.20.2 - deepmerge: 4.2.2 - is-builtin-module: 3.2.0 - is-module: 1.0.0 - resolve: 1.22.1 - optionalDependencies: - rollup: 4.52.5 - '@rollup/plugin-node-resolve@15.0.0(rollup@5.0.0-2)': dependencies: '@rollup/pluginutils': 4.2.1 From 5f5fcebfd8b965b65c70f67750dc87051af31279 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:24:57 +0100 Subject: [PATCH 04/29] feat(auto-install): support rollup 5 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. --- packages/auto-install/package.json | 4 ++-- .../auto-install/test/fixtures/pnpm-bare/.npmrc | 3 +++ .../test/fixtures/pnpm-bare/pnpm-workspace.yaml | 2 ++ packages/auto-install/test/fixtures/pnpm/.npmrc | 3 +++ .../test/fixtures/pnpm/pnpm-workspace.yaml | 2 ++ packages/auto-install/test/pnpm-bare.js | 15 ++++++++++++++- packages/auto-install/test/pnpm.js | 17 +++++++++++++++-- pnpm-lock.yaml | 8 ++++---- 8 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 packages/auto-install/test/fixtures/pnpm-bare/.npmrc create mode 100644 packages/auto-install/test/fixtures/pnpm-bare/pnpm-workspace.yaml create mode 100644 packages/auto-install/test/fixtures/pnpm/.npmrc create mode 100644 packages/auto-install/test/fixtures/pnpm/pnpm-workspace.yaml diff --git a/packages/auto-install/package.json b/packages/auto-install/package.json index 26672ca30..4afe432a1 100755 --- a/packages/auto-install/package.json +++ b/packages/auto-install/package.json @@ -54,7 +54,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -66,7 +66,7 @@ "@rollup/plugin-typescript": "^9.0.1", "del": "^6.1.1", "node-noop": "^1.0.0", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "typescript": "^4.8.3" }, "types": "./types/index.d.ts" diff --git a/packages/auto-install/test/fixtures/pnpm-bare/.npmrc b/packages/auto-install/test/fixtures/pnpm-bare/.npmrc new file mode 100644 index 000000000..e941bcc63 --- /dev/null +++ b/packages/auto-install/test/fixtures/pnpm-bare/.npmrc @@ -0,0 +1,3 @@ +# pnpm refuses to add dependencies at a workspace root without an explicit opt-in; +# this also means the root .npmrc no longer applies here, which is fine for this fixture +ignore-workspace-root-check=true diff --git a/packages/auto-install/test/fixtures/pnpm-bare/pnpm-workspace.yaml b/packages/auto-install/test/fixtures/pnpm-bare/pnpm-workspace.yaml new file mode 100644 index 000000000..538d9c6dc --- /dev/null +++ b/packages/auto-install/test/fixtures/pnpm-bare/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +# Anchor pnpm workspace detection to this fixture so that package installs spawned here do not +# operate on the monorepo workspace root and regenerate its lockfile. diff --git a/packages/auto-install/test/fixtures/pnpm/.npmrc b/packages/auto-install/test/fixtures/pnpm/.npmrc new file mode 100644 index 000000000..e941bcc63 --- /dev/null +++ b/packages/auto-install/test/fixtures/pnpm/.npmrc @@ -0,0 +1,3 @@ +# pnpm refuses to add dependencies at a workspace root without an explicit opt-in; +# this also means the root .npmrc no longer applies here, which is fine for this fixture +ignore-workspace-root-check=true diff --git a/packages/auto-install/test/fixtures/pnpm/pnpm-workspace.yaml b/packages/auto-install/test/fixtures/pnpm/pnpm-workspace.yaml new file mode 100644 index 000000000..538d9c6dc --- /dev/null +++ b/packages/auto-install/test/fixtures/pnpm/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +# Anchor pnpm workspace detection to this fixture so that package installs spawned here do not +# operate on the monorepo workspace root and regenerate its lockfile. diff --git a/packages/auto-install/test/pnpm-bare.js b/packages/auto-install/test/pnpm-bare.js index 690592b02..0c173cec1 100644 --- a/packages/auto-install/test/pnpm-bare.js +++ b/packages/auto-install/test/pnpm-bare.js @@ -13,6 +13,12 @@ const input = join(cwd, '../input.js'); process.chdir(cwd); +// pnpm would otherwise discover the monorepo workspace root above the fixture and regenerate +// its lockfile. The fixture pnpm-workspace.yaml anchors workspace detection to the fixture +// directory; ensure the fixture installs leave the workspace root lockfile untouched. +const rootLockfile = join(__dirname, '../../../pnpm-lock.yaml'); +const originalLockfileContent = readFileSync(rootLockfile); + test('pnpm, bare', async () => { await rollup({ input, @@ -28,5 +34,12 @@ test('pnpm, bare', async () => { }, 50000); afterAll(async () => { - await del(['node_modules', 'package.json', 'pnpm-lock.yaml']); + try { + expect( + readFileSync(rootLockfile).equals(originalLockfileContent), + 'the workspace root lockfile was modified by a fixture install' + ).toBe(true); + } finally { + await del(['node_modules', 'package.json', 'pnpm-lock.yaml']); + } }); diff --git a/packages/auto-install/test/pnpm.js b/packages/auto-install/test/pnpm.js index 3be105293..bb1d13190 100644 --- a/packages/auto-install/test/pnpm.js +++ b/packages/auto-install/test/pnpm.js @@ -13,6 +13,12 @@ const input = join(cwd, '../input.js'); process.chdir(cwd); +// pnpm would otherwise discover the monorepo workspace root above the fixture and regenerate +// its lockfile. The fixture pnpm-workspace.yaml anchors workspace detection to the fixture +// directory; ensure the fixture installs leave the workspace root lockfile untouched. +const rootLockfile = join(__dirname, '../../../pnpm-lock.yaml'); +const originalLockfileContent = readFileSync(rootLockfile); + test('pnpm', async () => { await rollup({ input, @@ -29,6 +35,13 @@ test('pnpm', async () => { }, 50000); afterAll(async () => { - await del(['node_modules', 'package.json']); - writeFileSync('pnpm-lock.yaml', ''); + try { + expect( + readFileSync(rootLockfile).equals(originalLockfileContent), + 'the workspace root lockfile was modified by a fixture install' + ).toBe(true); + } finally { + await del(['node_modules', 'package.json']); + writeFileSync('pnpm-lock.yaml', ''); + } }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3644baa5..8cfd62c61 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -110,10 +110,10 @@ importers: devDependencies: '@rollup/plugin-node-resolve': specifier: ^15.0.0 - version: 15.0.0(rollup@4.0.0-24) + version: 15.0.0(rollup@5.0.0-2) '@rollup/plugin-typescript': specifier: ^9.0.1 - version: 9.0.1(rollup@4.0.0-24)(tslib@2.4.0)(typescript@4.8.4) + version: 9.0.1(rollup@5.0.0-2)(tslib@2.4.0)(typescript@4.8.4) del: specifier: ^6.1.1 version: 6.1.1 @@ -121,8 +121,8 @@ importers: specifier: ^1.0.0 version: 1.0.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: ^4.8.3 version: 4.8.4 From 2c05c9dc345bd05aa452fee8a8e86bfa4bfbc112 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:25:00 +0100 Subject: [PATCH 05/29] feat(beep): support rollup 5 Extend the peer dependency range and test against the upcoming Rollup 5 release. --- packages/beep/package.json | 4 ++-- pnpm-lock.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/beep/package.json b/packages/beep/package.json index ac48a2964..6ade96603 100644 --- a/packages/beep/package.json +++ b/packages/beep/package.json @@ -38,7 +38,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -46,7 +46,7 @@ } }, "devDependencies": { - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "strip-ansi": "^7.0.1" }, "types": "types/index.d.ts" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8cfd62c61..3bae2b599 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -176,8 +176,8 @@ importers: packages/beep: devDependencies: rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 strip-ansi: specifier: ^7.0.1 version: 7.0.1 From c998a485e127f839acc2525cb9339c3932b90302 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:25:01 +0100 Subject: [PATCH 06/29] feat(buble): support rollup 5 Extend the peer dependency range and test against the upcoming Rollup 5 release. --- packages/buble/package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/buble/package.json b/packages/buble/package.json index 9d26e8bc9..e3402551a 100644 --- a/packages/buble/package.json +++ b/packages/buble/package.json @@ -54,7 +54,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -69,7 +69,7 @@ "devDependencies": { "@rollup/plugin-typescript": "^9.0.1", "del-cli": "^5.0.0", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "source-map": "^0.7.4", "typescript": "^4.8.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3bae2b599..5cb26e14c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -186,7 +186,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) '@types/buble': specifier: ^0.19.2 version: 0.19.2 @@ -196,13 +196,13 @@ importers: devDependencies: '@rollup/plugin-typescript': specifier: ^9.0.1 - version: 9.0.1(rollup@4.0.0-24)(tslib@2.4.0)(typescript@4.8.4) + version: 9.0.1(rollup@5.0.0-2)(tslib@2.4.0)(typescript@4.8.4) del-cli: specifier: ^5.0.0 version: 5.0.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 source-map: specifier: ^0.7.4 version: 0.7.4 @@ -6685,6 +6685,14 @@ snapshots: optionalDependencies: rollup: 4.0.0-24 + '@rollup/pluginutils@5.0.1(rollup@5.0.0-2)': + dependencies: + '@types/estree': 1.0.0 + estree-walker: 2.0.2 + picomatch: 2.3.1 + optionalDependencies: + rollup: 5.0.0-2 + '@rollup/pluginutils@5.0.4(rollup@4.0.0-24)': dependencies: '@types/estree': 1.0.0 From 76d10b881170effc94d16d7e72b9d69e3ba5fc1f Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:38:41 +0100 Subject: [PATCH 07/29] feat(commonjs): support rollup 5 --- packages/commonjs/package.json | 4 +- .../function/custom-options/_config.js | 24 +++++- .../module-side-effects-late-entry/_config.js | 2 +- .../strict-requires-debug-none/_config.js | 5 +- .../_config.js | 2 +- .../commonjs/test/snapshots/function.js.snap | 80 +++++++++---------- packages/commonjs/test/test.js | 6 +- pnpm-lock.yaml | 16 ++-- 8 files changed, 84 insertions(+), 55 deletions(-) diff --git a/packages/commonjs/package.json b/packages/commonjs/package.json index 89616d3b8..7cc4586ef 100644 --- a/packages/commonjs/package.json +++ b/packages/commonjs/package.json @@ -55,7 +55,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" + "rollup": "^2.68.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -76,7 +76,7 @@ "@rollup/plugin-node-resolve": "^15.0.0", "locate-character": "^2.0.5", "require-relative": "^0.8.7", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "source-map": "^0.7.4", "source-map-support": "^0.5.21", "typescript": "^4.8.3" diff --git a/packages/commonjs/test/fixtures/function/custom-options/_config.js b/packages/commonjs/test/fixtures/function/custom-options/_config.js index 8fe741c1b..864be2651 100644 --- a/packages/commonjs/test/fixtures/function/custom-options/_config.js +++ b/packages/commonjs/test/fixtures/function/custom-options/_config.js @@ -21,8 +21,28 @@ module.exports = { }, buildEnd() { assert.deepStrictEqual(resolveIdArgs, [ - ['other.js', 'main.js', { attributes: {}, custom: { test: 42 }, isEntry: true }], - ['main.js', void 0, { attributes: {}, custom: {}, isEntry: true }] + [ + 'other.js', + 'main.js', + { + attributes: {}, + custom: { test: 42 }, + importerAttributes: {}, + importerRawId: ID_MAIN, + isEntry: true + } + ], + [ + 'main.js', + void 0, + { + attributes: {}, + custom: {}, + importerAttributes: {}, + importerRawId: void 0, + isEntry: true + } + ] ]); }, resolveId(source, importer, options) { diff --git a/packages/commonjs/test/fixtures/function/module-side-effects-late-entry/_config.js b/packages/commonjs/test/fixtures/function/module-side-effects-late-entry/_config.js index 09d728ee6..7ca230dc4 100644 --- a/packages/commonjs/test/fixtures/function/module-side-effects-late-entry/_config.js +++ b/packages/commonjs/test/fixtures/function/module-side-effects-late-entry/_config.js @@ -2,7 +2,7 @@ const path = require('path'); const assert = require('assert'); let referenceId; -const testEntry = 'generated-foo2.js'; +const testEntry = 'generated-foo.js'; module.exports = { description: diff --git a/packages/commonjs/test/fixtures/function/strict-requires-debug-none/_config.js b/packages/commonjs/test/fixtures/function/strict-requires-debug-none/_config.js index d570e0882..ad9958494 100644 --- a/packages/commonjs/test/fixtures/function/strict-requires-debug-none/_config.js +++ b/packages/commonjs/test/fixtures/function/strict-requires-debug-none/_config.js @@ -18,6 +18,9 @@ module.exports = { exports() { assert.strictEqual(warnings.length, 1); assert.deepStrictEqual(warnings[0].ids, []); - assert.strictEqual(warnings[0].message, 'The commonjs plugin did not wrap any files.'); + assert.strictEqual( + warnings[0].message, + '[plugin commonjs] The commonjs plugin did not wrap any files.' + ); } }; diff --git a/packages/commonjs/test/fixtures/function/warn-this-resolve-without-options/_config.js b/packages/commonjs/test/fixtures/function/warn-this-resolve-without-options/_config.js index a79b74cb8..5699ab69d 100644 --- a/packages/commonjs/test/fixtures/function/warn-this-resolve-without-options/_config.js +++ b/packages/commonjs/test/fixtures/function/warn-this-resolve-without-options/_config.js @@ -18,7 +18,7 @@ module.exports = { assert.strictEqual(warnings.length, 1); assert.strictEqual( warnings[0].message, - 'It appears a plugin has implemented a "resolveId" hook that uses "this.resolve" without forwarding the third "options" parameter of "resolveId". This is problematic as it can lead to wrong module resolutions especially for the node-resolve plugin and in certain cases cause early exit errors for the commonjs plugin.\nIn rare cases, this warning can appear if the same file is both imported and required from the same mixed ES/CommonJS module, in which case it can be ignored.' + '[plugin commonjs--resolver] It appears a plugin has implemented a "resolveId" hook that uses "this.resolve" without forwarding the third "options" parameter of "resolveId". This is problematic as it can lead to wrong module resolutions especially for the node-resolve plugin and in certain cases cause early exit errors for the commonjs plugin.\nIn rare cases, this warning can appear if the same file is both imported and required from the same mixed ES/CommonJS module, in which case it can be ignored.' ); assert.strictEqual(warnings[0].pluginCode, 'THIS_RESOLVE_WITHOUT_OPTIONS'); assert.strictEqual(warnings[0].url, 'https://rollupjs.org/guide/en/#resolveid'); diff --git a/packages/commonjs/test/snapshots/function.js.snap b/packages/commonjs/test/snapshots/function.js.snap index 1ecce0bb1..442d3dcea 100644 --- a/packages/commonjs/test/snapshots/function.js.snap +++ b/packages/commonjs/test/snapshots/function.js.snap @@ -4786,14 +4786,14 @@ exports[`expose-file-type-detection 1`] = ` { "main.js": "'use strict'; -var other = require('./other-UXsUMMAz.js'); +var other = require('./other-BucbZjd3.js'); var otherExports = other.requireOther(); var foo = /*@__PURE__*/other.getDefaultExportFromCjs(otherExports); t.is(foo, 'foo'); ", - "other-UXsUMMAz.js": "'use strict'; + "other-BucbZjd3.js": "'use strict'; function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; @@ -4814,7 +4814,7 @@ exports.requireOther = requireOther; ", "other.js": "'use strict'; -var other$1 = require('./other-UXsUMMAz.js'); +var other$1 = require('./other-BucbZjd3.js'); var otherExports = other$1.requireOther(); var other = /*@__PURE__*/other$1.getDefaultExportFromCjs(otherExports); @@ -6143,16 +6143,6 @@ function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; } -var foo; -var hasRequiredFoo; - -function requireFoo () { - if (hasRequiredFoo) return foo; - hasRequiredFoo = 1; - foo = 1; - return foo; -} - var multiply; var hasRequiredMultiply; @@ -6165,6 +6155,16 @@ function requireMultiply () { return multiply; } +var foo; +var hasRequiredFoo; + +function requireFoo () { + if (hasRequiredFoo) return foo; + hasRequiredFoo = 1; + foo = 1; + return foo; +} + /* eslint-disable global-require */ var main$1; @@ -6564,7 +6564,7 @@ function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; } -node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('main.js', document.baseURI).href))); +node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('main.js', document.baseURI).href))); var main$1; var hasRequiredMain; @@ -6640,22 +6640,22 @@ exports[`module-side-effects-late-entry 1`] = ` { "generated-foo.js": "'use strict'; -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; +require('./generated-foo2.js'); -// This side-effect will only be respected if this is an entry point -commonjsGlobal.foo = 'foo'; +var foo = {}; + +module.exports = foo; ", "generated-foo2.js": "'use strict'; -require('./generated-foo.js'); - -var foo = {}; +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; -module.exports = foo; +// This side-effect will only be respected if this is an entry point +commonjsGlobal.foo = 'foo'; ", "main.js": "'use strict'; -require('./generated-foo.js'); +require('./generated-foo2.js'); var main = 'main'; @@ -7308,7 +7308,7 @@ module.exports = main; exports[`pass-require-to-node-resolve 1`] = ` { - "bar-imported-QFe_5Jm2.js": "'use strict'; + "bar-imported-D3D8389F.js": "'use strict'; var barImported = 'imported'; @@ -7341,7 +7341,7 @@ function requireRequiring () { hasRequiredRequiring = 1; requiring.foo = requireFooRequired(); - requiring.barPromise = Promise.resolve().then(function () { return require('./bar-imported-QFe_5Jm2.js'); }); + requiring.barPromise = Promise.resolve().then(function () { return require('./bar-imported-D3D8389F.js'); }); return requiring; } @@ -7351,7 +7351,7 @@ var required = /*@__PURE__*/getDefaultExportFromCjs(requiringExports); t.is(foo, 'imported'); t.is(required.foo, 'required'); -var main = Promise.all([Promise.resolve().then(function () { return require('./bar-imported-QFe_5Jm2.js'); }), required.barPromise]); +var main = Promise.all([Promise.resolve().then(function () { return require('./bar-imported-D3D8389F.js'); }), required.barPromise]); module.exports = main; ", @@ -8447,8 +8447,8 @@ function requireMain () { main$1.conditionalTrue = requireB() ; main$1.conditionalFalse = requireB(); main$1.logicalAnd1 = requireB(); - main$1.logicalAnd2 = false ; - main$1.logicalOr1 = true ; + main$1.logicalAnd2 = false; + main$1.logicalOr1 = true; main$1.logicalOr2 = requireB(); return main$1; } @@ -8527,9 +8527,9 @@ const readable = new stream.Readable({}); var main = { Readable: stream.Readable, readable }; -var main$1 = /*@__PURE__*/getDefaultExportFromCjs(main); +var main_default = /*@__PURE__*/getDefaultExportFromCjs(main); -module.exports = main$1; +module.exports = main_default; ", } `; @@ -8553,9 +8553,9 @@ const readable = new stream.Readable({}); var main = { Readable: stream.Readable, readable }; -var main$1 = /*@__PURE__*/getDefaultExportFromCjs(main); +var main_default = /*@__PURE__*/getDefaultExportFromCjs(main); -module.exports = main$1; +module.exports = main_default; ", } `; @@ -8712,14 +8712,14 @@ exports[`strict-requires-debug-none 1`] = ` "main.js": "'use strict'; function getDefaultExportFromCjs (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; + return x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; } var main = 'bar'; -var main$1 = /*@__PURE__*/getDefaultExportFromCjs(main); +var main_default = /*@__PURE__*/getDefaultExportFromCjs(main); -module.exports = main$1; +module.exports = main_default; ", } `; @@ -9698,7 +9698,7 @@ t.is(external__default.default, 'bar'); exports[`transpiled-esm-entry-default 1`] = ` { - "entry-ix7rhf3Z.js": "'use strict'; + "entry-BHDxPxXK.js": "'use strict'; function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; @@ -9721,7 +9721,7 @@ exports.requireEntry = requireEntry; ", "entry.js": "'use strict'; -var entry$1 = require('./entry-ix7rhf3Z.js'); +var entry$1 = require('./entry-BHDxPxXK.js'); var entryExports = entry$1.requireEntry(); var entry = /*@__PURE__*/entry$1.getDefaultExportFromCjs(entryExports); @@ -9730,7 +9730,7 @@ module.exports = entry; ", "main.js": "'use strict'; -var entry$2 = require('./entry-ix7rhf3Z.js'); +var entry$2 = require('./entry-BHDxPxXK.js'); function _mergeNamespaces(n, m) { m.forEach(function (e) { @@ -9762,7 +9762,7 @@ t.deepEqual(entry$1, { default: 'default' }); exports[`transpiled-esm-entry-mixed 1`] = ` { - "entry-Fl2t-jMB.js": "'use strict'; + "entry-wxX_Yv_b.js": "'use strict'; function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; @@ -9786,7 +9786,7 @@ exports.requireEntry = requireEntry; ", "entry.js": "'use strict'; -var entry$1 = require('./entry-Fl2t-jMB.js'); +var entry$1 = require('./entry-wxX_Yv_b.js'); var entryExports = entry$1.requireEntry(); var entry = /*@__PURE__*/entry$1.getDefaultExportFromCjs(entryExports); @@ -9795,7 +9795,7 @@ module.exports = entry; ", "main.js": "'use strict'; -var entry$2 = require('./entry-Fl2t-jMB.js'); +var entry$2 = require('./entry-wxX_Yv_b.js'); function _mergeNamespaces(n, m) { m.forEach(function (e) { diff --git a/packages/commonjs/test/test.js b/packages/commonjs/test/test.js index dcf3b3c72..a0ed184d9 100644 --- a/packages/commonjs/test/test.js +++ b/packages/commonjs/test/test.js @@ -508,7 +508,7 @@ test('creates an error with a code frame when parsing fails', async () => { } catch (error) { expect(error.frame).toBe(`1: /* eslint-disable */ 2: export const foo = 2, - ^`); + ^`); } }); @@ -640,7 +640,7 @@ test('logs a warning when the deprecated namedExports option is used', async () }); await getCodeFromBundle(bundle); expect(message).toBe( - 'The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.' + '[plugin commonjs] The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.' ); }); @@ -737,7 +737,7 @@ test('throws when there is a dynamic require from outside dynamicRequireRoot', a path.join(cwd, 'fixtures/samples/dynamic-require-outside-root') ); expect(error).toMatchObject({ - message: `"${id}" contains dynamic require statements but it is not within the current dynamicRequireRoot "${dynamicRequireRoot}". You should set dynamicRequireRoot to "${minimalDynamicRequireRoot}" or one of its parent directories.`, + message: `[plugin commonjs] fixtures/samples/dynamic-require-outside-root/main.js (3:9): "${id}" contains dynamic require statements but it is not within the current dynamicRequireRoot "${dynamicRequireRoot}". You should set dynamicRequireRoot to "${minimalDynamicRequireRoot}" or one of its parent directories.`, pluginCode: 'DYNAMIC_REQUIRE_OUTSIDE_ROOT', normalizedId: id, normalizedDynamicRequireRoot: dynamicRequireRoot diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5cb26e14c..7c176f604 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -214,7 +214,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) commondir: specifier: ^1.0.1 version: 1.0.1 @@ -236,10 +236,10 @@ importers: devDependencies: '@rollup/plugin-json': specifier: ^5.0.0 - version: 5.0.0(rollup@4.0.0-24) + version: 5.0.0(rollup@5.0.0-2) '@rollup/plugin-node-resolve': specifier: ^15.0.0 - version: 15.0.0(rollup@4.0.0-24) + version: 15.0.0(rollup@5.0.0-2) locate-character: specifier: ^2.0.5 version: 2.0.5 @@ -247,8 +247,8 @@ importers: specifier: ^0.8.7 version: 0.8.7 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 source-map: specifier: ^0.7.4 version: 0.7.4 @@ -6620,6 +6620,12 @@ snapshots: optionalDependencies: rollup: 4.0.0-24 + '@rollup/plugin-json@5.0.0(rollup@5.0.0-2)': + dependencies: + '@rollup/pluginutils': 4.2.1 + optionalDependencies: + rollup: 5.0.0-2 + '@rollup/plugin-node-resolve@15.0.0(rollup@4.0.0-24)': dependencies: '@rollup/pluginutils': 4.2.1 From 88e54a8a89d275482607c9e2630423e32dd9b4c9 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:38:45 +0100 Subject: [PATCH 08/29] feat(data-uri): support rollup 5 --- packages/data-uri/package.json | 4 ++-- pnpm-lock.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/data-uri/package.json b/packages/data-uri/package.json index d82c61233..2b78592d2 100644 --- a/packages/data-uri/package.json +++ b/packages/data-uri/package.json @@ -55,7 +55,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -67,7 +67,7 @@ }, "devDependencies": { "@rollup/plugin-typescript": "^9.0.1", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "typescript": "^4.8.3" }, "types": "./types/index.d.ts" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7c176f604..dd6add25d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -263,14 +263,14 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) devDependencies: '@rollup/plugin-typescript': specifier: ^9.0.1 - version: 9.0.1(rollup@4.0.0-24)(tslib@2.4.0)(typescript@4.8.4) + version: 9.0.1(rollup@5.0.0-2)(tslib@2.4.0)(typescript@4.8.4) rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: ^4.8.3 version: 4.8.4 From 9674f56336d3adcb47ae478d0227db87fdd5ea96 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:38:45 +0100 Subject: [PATCH 09/29] feat(dsv): support rollup 5 --- packages/dsv/package.json | 4 ++-- pnpm-lock.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/dsv/package.json b/packages/dsv/package.json index 4617e7152..0c8fa0110 100755 --- a/packages/dsv/package.json +++ b/packages/dsv/package.json @@ -44,7 +44,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" + "rollup": "^2.78.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -60,7 +60,7 @@ }, "devDependencies": { "del-cli": "^5.0.0", - "rollup": "^4.0.0-24" + "rollup": "catalog:rollup-next" }, "types": "./types/index.d.ts" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd6add25d..79d6be438 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -279,7 +279,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) '@types/d3-dsv': specifier: ^3.0.0 version: 3.0.0 @@ -297,8 +297,8 @@ importers: specifier: ^5.0.0 version: 5.0.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 packages/dynamic-import-vars: dependencies: From a005b93491e49bdb6a58112004c1e42b154664f1 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:38:46 +0100 Subject: [PATCH 10/29] feat(dynamic-import-vars): support rollup 5 --- packages/dynamic-import-vars/package.json | 4 +- .../rollup-plugin-dynamic-import-vars.test.js | 2 +- ...up-plugin-dynamic-import-vars.test.js.snap | 54 +++++++++---------- pnpm-lock.yaml | 6 +-- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/packages/dynamic-import-vars/package.json b/packages/dynamic-import-vars/package.json index 778de9c31..de89e9fa3 100644 --- a/packages/dynamic-import-vars/package.json +++ b/packages/dynamic-import-vars/package.json @@ -56,7 +56,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -73,7 +73,7 @@ "devDependencies": { "acorn": "^8.8.0", "prettier": "^2.7.1", - "rollup": "^4.0.0-24" + "rollup": "catalog:rollup-next" }, "types": "./types/index.d.ts" } diff --git a/packages/dynamic-import-vars/test/rollup-plugin-dynamic-import-vars.test.js b/packages/dynamic-import-vars/test/rollup-plugin-dynamic-import-vars.test.js index 63e1144c1..64b63996c 100644 --- a/packages/dynamic-import-vars/test/rollup-plugin-dynamic-import-vars.test.js +++ b/packages/dynamic-import-vars/test/rollup-plugin-dynamic-import-vars.test.js @@ -219,7 +219,7 @@ test('warns if no files in dir when `errorWhenNoFilesFound` and `warnOnError` ar ], onwarn(warning) { expect(warning.message).toEqual( - `No files found in ./module-dir-c/*.js when trying to dynamically load concatted string from ${require.resolve( + `[plugin rollup-plugin-dynamic-import-variables] fixture-no-files.js: No files found in ./module-dir-c/*.js when trying to dynamically load concatted string from ${require.resolve( './fixtures/fixture-no-files.js' )}` ); diff --git a/packages/dynamic-import-vars/test/snapshots/rollup-plugin-dynamic-import-vars.test.js.snap b/packages/dynamic-import-vars/test/snapshots/rollup-plugin-dynamic-import-vars.test.js.snap index c82ca964e..b55053e2a 100644 --- a/packages/dynamic-import-vars/test/snapshots/rollup-plugin-dynamic-import-vars.test.js.snap +++ b/packages/dynamic-import-vars/test/snapshots/rollup-plugin-dynamic-import-vars.test.js.snap @@ -12,10 +12,10 @@ export { importModule }; exports[`complex concatenation 1`] = ` "function __variableDynamicImportRuntime0__(path) { switch (path) { - case './module-dir-a/module-a-1.js': return import('./module-a-1-fiunS6HF.js'); - case './module-dir-a/module-a-2.js': return import('./module-a-2-qepdcyXv.js'); - case './module-dir-b/module-b-1.js': return import('./module-b-1-3qdzaV4G.js'); - case './module-dir-b/module-b-2.js': return import('./module-b-2-_8gpxG1i.js'); + case './module-dir-a/module-a-1.js': return import('./module-a-1-DigFCZAs.js'); + case './module-dir-a/module-a-2.js': return import('./module-a-2-CBwBchsa.js'); + case './module-dir-b/module-b-1.js': return import('./module-b-1-B1WHOdOw.js'); + case './module-dir-b/module-b-2.js': return import('./module-b-2-BrHQGuGy.js'); default: return new Promise(function(resolve, reject) { (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)( reject.bind(null, new Error("Unknown variable dynamic import: " + path)) @@ -36,7 +36,7 @@ exports[`doesn't change imports that should not be changed 1`] = ` "console.log('a-1'); function importModuleA() { - return import('./module-a-2-qepdcyXv.js'); + return import('./module-a-2-CBwBchsa.js'); } function importModuleB() { @@ -50,8 +50,8 @@ export { importModuleA, importModuleB }; exports[`dynamic imports assertions 1`] = ` "function __variableDynamicImportRuntime0__(path) { switch (path) { - case './module-dir-a/module-a-1.js': return import('./module-a-1-fiunS6HF.js'); - case './module-dir-a/module-a-2.js': return import('./module-a-2-qepdcyXv.js'); + case './module-dir-a/module-a-1.js': return import('./module-a-1-DigFCZAs.js'); + case './module-dir-a/module-a-2.js': return import('./module-a-2-CBwBchsa.js'); default: return new Promise(function(resolve, reject) { (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)( reject.bind(null, new Error("Unknown variable dynamic import: " + path)) @@ -71,11 +71,11 @@ export { importModule }; exports[`multiple dirs 1`] = ` "function __variableDynamicImportRuntime0__(path) { switch (path) { - case './module-dir-a/module-a-1.js': return import('./module-a-1-fiunS6HF.js'); - case './module-dir-a/module-a-2.js': return import('./module-a-2-qepdcyXv.js'); - case './module-dir-b/module-b-1.js': return import('./module-b-1-3qdzaV4G.js'); - case './module-dir-b/module-b-2.js': return import('./module-b-2-_8gpxG1i.js'); - case './sub-dir/fixture-upwards-path.js': return import('./fixture-upwards-path-jrfqlYMu.js'); + case './module-dir-a/module-a-1.js': return import('./module-a-1-DigFCZAs.js'); + case './module-dir-a/module-a-2.js': return import('./module-a-2-CBwBchsa.js'); + case './module-dir-b/module-b-1.js': return import('./module-b-1-B1WHOdOw.js'); + case './module-dir-b/module-b-2.js': return import('./module-b-2-BrHQGuGy.js'); + case './sub-dir/fixture-upwards-path.js': return import('./fixture-upwards-path-CrflyznY.js'); default: return new Promise(function(resolve, reject) { (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)( reject.bind(null, new Error("Unknown variable dynamic import: " + path)) @@ -95,11 +95,11 @@ export { importModule }; exports[`multiple dynamic imports 1`] = ` "function __variableDynamicImportRuntime2__(path) { switch (path) { - case './module-dir-a/module-a-1.js': return import('./module-a-1-fiunS6HF.js'); - case './module-dir-a/module-a-2.js': return import('./module-a-2-qepdcyXv.js'); - case './module-dir-b/module-b-1.js': return import('./module-b-1-3qdzaV4G.js'); - case './module-dir-b/module-b-2.js': return import('./module-b-2-_8gpxG1i.js'); - case './sub-dir/fixture-upwards-path.js': return import('./fixture-upwards-path-jrfqlYMu.js'); + case './module-dir-a/module-a-1.js': return import('./module-a-1-DigFCZAs.js'); + case './module-dir-a/module-a-2.js': return import('./module-a-2-CBwBchsa.js'); + case './module-dir-b/module-b-1.js': return import('./module-b-1-B1WHOdOw.js'); + case './module-dir-b/module-b-2.js': return import('./module-b-2-BrHQGuGy.js'); + case './sub-dir/fixture-upwards-path.js': return import('./fixture-upwards-path-CrflyznY.js'); default: return new Promise(function(resolve, reject) { (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)( reject.bind(null, new Error("Unknown variable dynamic import: " + path)) @@ -110,8 +110,8 @@ exports[`multiple dynamic imports 1`] = ` function __variableDynamicImportRuntime1__(path) { switch (path) { - case './module-dir-a/module-a-1.js': return import('./module-a-1-fiunS6HF.js'); - case './module-dir-a/module-a-2.js': return import('./module-a-2-qepdcyXv.js'); + case './module-dir-a/module-a-1.js': return import('./module-a-1-DigFCZAs.js'); + case './module-dir-a/module-a-2.js': return import('./module-a-2-CBwBchsa.js'); default: return new Promise(function(resolve, reject) { (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)( reject.bind(null, new Error("Unknown variable dynamic import: " + path)) @@ -122,8 +122,8 @@ function __variableDynamicImportRuntime1__(path) { function __variableDynamicImportRuntime0__(path) { switch (path) { - case './module-dir-a/module-a-1.js': return import('./module-a-1-fiunS6HF.js'); - case './module-dir-a/module-a-2.js': return import('./module-a-2-qepdcyXv.js'); + case './module-dir-a/module-a-1.js': return import('./module-a-1-DigFCZAs.js'); + case './module-dir-a/module-a-2.js': return import('./module-a-2-CBwBchsa.js'); default: return new Promise(function(resolve, reject) { (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)( reject.bind(null, new Error("Unknown variable dynamic import: " + path)) @@ -153,8 +153,8 @@ export { Foo, importModuleFromDir }; exports[`own directory 1`] = ` "function __variableDynamicImportRuntime0__(path) { switch (path) { - case './root-module-a.js': return import('./root-module-a-lF5i40jF.js'); - case './root-module-b.js': return import('./root-module-b-F1yin99u.js'); + case './root-module-a.js': return import('./root-module-a-D2fW8xde.js'); + case './root-module-b.js': return import('./root-module-b-DYGa4ib9.js'); default: return new Promise(function(resolve, reject) { (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)( reject.bind(null, new Error("Unknown variable dynamic import: " + path)) @@ -174,8 +174,8 @@ export { importModule }; exports[`single dir 1`] = ` "function __variableDynamicImportRuntime0__(path) { switch (path) { - case './module-dir-a/module-a-1.js': return import('./module-a-1-fiunS6HF.js'); - case './module-dir-a/module-a-2.js': return import('./module-a-2-qepdcyXv.js'); + case './module-dir-a/module-a-1.js': return import('./module-a-1-DigFCZAs.js'); + case './module-dir-a/module-a-2.js': return import('./module-a-2-CBwBchsa.js'); default: return new Promise(function(resolve, reject) { (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)( reject.bind(null, new Error("Unknown variable dynamic import: " + path)) @@ -195,8 +195,8 @@ export { importModule }; exports[`upwards dir path 1`] = ` "function __variableDynamicImportRuntime0__(path) { switch (path) { - case '../module-dir-a/module-a-1.js': return import('./module-a-1-fiunS6HF.js'); - case '../module-dir-a/module-a-2.js': return import('./module-a-2-qepdcyXv.js'); + case '../module-dir-a/module-a-1.js': return import('./module-a-1-DigFCZAs.js'); + case '../module-dir-a/module-a-2.js': return import('./module-a-2-CBwBchsa.js'); default: return new Promise(function(resolve, reject) { (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)( reject.bind(null, new Error("Unknown variable dynamic import: " + path)) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79d6be438..0844ab5da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -304,7 +304,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) astring: specifier: ^1.8.5 version: 1.8.5 @@ -325,8 +325,8 @@ importers: specifier: ^2.7.1 version: 2.7.1 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 packages/eslint: dependencies: From 0473973b279f7c1516cad8cd06859176efe62966 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:38:49 +0100 Subject: [PATCH 11/29] feat(eslint): support rollup 5 --- packages/eslint/package.json | 4 ++-- pnpm-lock.yaml | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/eslint/package.json b/packages/eslint/package.json index 00e2fa1c2..25a7dafe1 100755 --- a/packages/eslint/package.json +++ b/packages/eslint/package.json @@ -55,7 +55,7 @@ ], "peerDependencies": { "eslint": "^8.57.1||^9.0.0", - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -72,7 +72,7 @@ "eslint": "^8.57.1", "eslint9": "npm:eslint@^9.37.0", "esmock": "^2.7.3", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "typescript": "^4.8.3" }, "types": "./types/index.d.ts", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0844ab5da..2009b5a8a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -332,14 +332,14 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.1.0(rollup@4.0.0-24) + version: 5.1.0(rollup@5.0.0-2) devDependencies: '@rollup/plugin-node-resolve': specifier: ^15.0.0 - version: 15.0.0(rollup@4.0.0-24) + version: 15.0.0(rollup@5.0.0-2) '@rollup/plugin-typescript': specifier: ^9.0.1 - version: 9.0.1(rollup@4.0.0-24)(tslib@2.4.0)(typescript@4.8.4) + version: 9.0.1(rollup@5.0.0-2)(tslib@2.4.0)(typescript@4.8.4) '@types/eslint': specifier: ^8.56.12 version: 8.56.12 @@ -353,8 +353,8 @@ importers: specifier: ^2.7.3 version: 2.7.3 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: ^4.8.3 version: 4.8.4 @@ -6715,6 +6715,14 @@ snapshots: optionalDependencies: rollup: 4.0.0-24 + '@rollup/pluginutils@5.1.0(rollup@5.0.0-2)': + dependencies: + '@types/estree': 1.0.0 + estree-walker: 2.0.2 + picomatch: 2.3.1 + optionalDependencies: + rollup: 5.0.0-2 + '@rollup/pluginutils@5.3.0(rollup@4.0.0-24)': dependencies: '@types/estree': 1.0.8 From afcbee529483b5c06c1aa2d37280146a01c0d286 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:48:10 +0100 Subject: [PATCH 12/29] feat(esm-shim): support rollup 5 --- packages/esm-shim/package.json | 4 ++-- pnpm-lock.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/esm-shim/package.json b/packages/esm-shim/package.json index c5ca37a8d..e5a0ce654 100644 --- a/packages/esm-shim/package.json +++ b/packages/esm-shim/package.json @@ -53,7 +53,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^2.0.0||^3.0.0||^4.0.0" + "rollup": "^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -65,7 +65,7 @@ "mlly": "^1.7.4" }, "devDependencies": { - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "typescript": "^4.8.3" }, "types": "./types/index.d.ts" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2009b5a8a..fbcdf6579 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -369,8 +369,8 @@ importers: version: 1.7.4 devDependencies: rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: ^4.8.3 version: 4.8.4 From dac5f894118b0a27d67f526eb2dd50a50a5085b1 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:48:11 +0100 Subject: [PATCH 13/29] feat(graphql): support rollup 5 --- packages/graphql/package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/graphql/package.json b/packages/graphql/package.json index c55e45977..1258ec19b 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -56,7 +56,7 @@ ], "peerDependencies": { "graphql": ">=0.9.0", - "rollup": "^2.78.0||^3.0.0||^4.0.0" + "rollup": "^2.78.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -70,7 +70,7 @@ "devDependencies": { "@rollup/plugin-buble": "^1.0.0", "graphql": "^16.6.0", - "rollup": "^4.0.0-24" + "rollup": "catalog:rollup-next" }, "types": "./types/index.d.ts" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fbcdf6579..eb7306647 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,20 +379,20 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) graphql-tag: specifier: ^2.12.6 version: 2.12.6(graphql@16.6.0) devDependencies: '@rollup/plugin-buble': specifier: ^1.0.0 - version: 1.0.0(rollup@4.0.0-24) + version: 1.0.0(rollup@5.0.0-2) graphql: specifier: ^16.6.0 version: 16.6.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 packages/html: devDependencies: @@ -6603,6 +6603,14 @@ snapshots: optionalDependencies: rollup: 4.0.0-24 + '@rollup/plugin-buble@1.0.0(rollup@5.0.0-2)': + dependencies: + '@rollup/pluginutils': 4.2.1 + '@types/buble': 0.19.2 + buble: 0.20.0 + optionalDependencies: + rollup: 5.0.0-2 + '@rollup/plugin-commonjs@23.0.0(rollup@4.0.0-24)': dependencies: '@rollup/pluginutils': 4.2.1 From d7c1e3c94c5fd17b98b0ec023c3e1c61b66c4921 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:48:13 +0100 Subject: [PATCH 14/29] feat(inject): support rollup 5 --- packages/inject/package.json | 4 ++-- packages/inject/test/rollup-build.test.js | 24 +++++++++++++++++++++++ pnpm-lock.yaml | 8 ++++---- 3 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 packages/inject/test/rollup-build.test.js diff --git a/packages/inject/package.json b/packages/inject/package.json index 07bdf4825..9e85d5cf1 100644 --- a/packages/inject/package.json +++ b/packages/inject/package.json @@ -54,7 +54,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -70,7 +70,7 @@ "@rollup/plugin-buble": "^1.0.0", "del-cli": "^5.0.0", "locate-character": "^2.0.5", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "source-map": "^0.7.4", "typescript": "^4.8.3" }, diff --git a/packages/inject/test/rollup-build.test.js b/packages/inject/test/rollup-build.test.js new file mode 100644 index 000000000..34379e623 --- /dev/null +++ b/packages/inject/test/rollup-build.test.js @@ -0,0 +1,24 @@ +const { rollup } = require('rollup'); + +const inject = require('..'); + +const modules = { + 'entry.js': 'export default $;', + 'injected.js': "export default 'inject-sentinel-value';" +}; + +const modulesPlugin = { + name: 'modules', + resolveId: (id) => (id in modules ? id : null), + load: (id) => (id in modules ? modules[id] : null) +}; + +test('injects imports in a real build', async () => { + const bundle = await rollup({ + input: 'entry.js', + plugins: [modulesPlugin, inject({ $: 'injected.js' })] + }); + const { output } = await bundle.generate({ format: 'es' }); + expect(output).toHaveLength(1); + expect(output[0].code).toContain('inject-sentinel-value'); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb7306647..6525983d6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -432,7 +432,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -442,7 +442,7 @@ importers: devDependencies: '@rollup/plugin-buble': specifier: ^1.0.0 - version: 1.0.0(rollup@4.0.0-24) + version: 1.0.0(rollup@5.0.0-2) del-cli: specifier: ^5.0.0 version: 5.0.0 @@ -450,8 +450,8 @@ importers: specifier: ^2.0.5 version: 2.0.5 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 source-map: specifier: ^0.7.4 version: 0.7.4 From 7eba93884839a996ea7c742404edbade67b08f32 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 09:48:16 +0100 Subject: [PATCH 15/29] feat(image): support rollup 5 --- packages/image/package.json | 4 ++-- pnpm-lock.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/image/package.json b/packages/image/package.json index d2fba283d..0929d606e 100644 --- a/packages/image/package.json +++ b/packages/image/package.json @@ -51,7 +51,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -64,7 +64,7 @@ }, "devDependencies": { "@rollup/plugin-buble": "^1.0.0", - "rollup": "^4.0.0-24" + "rollup": "catalog:rollup-next" }, "types": "./types/index.d.ts" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6525983d6..b27c9e0e7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -416,17 +416,17 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) mini-svg-data-uri: specifier: ^1.4.4 version: 1.4.4 devDependencies: '@rollup/plugin-buble': specifier: ^1.0.0 - version: 1.0.0(rollup@4.0.0-24) + version: 1.0.0(rollup@5.0.0-2) rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 packages/inject: dependencies: From e5e099b5a8bc9ed48dd6173131110e86d59c9d4d Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:09:47 +0100 Subject: [PATCH 16/29] feat(legacy): support rollup 5 --- packages/legacy/package.json | 4 ++-- pnpm-lock.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/legacy/package.json b/packages/legacy/package.json index 4c398892a..de82d76fc 100644 --- a/packages/legacy/package.json +++ b/packages/legacy/package.json @@ -49,7 +49,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -62,7 +62,7 @@ "devDependencies": { "@rollup/plugin-buble": "^1.0.0", "del-cli": "^5.0.0", - "rollup": "^4.0.0-24" + "rollup": "catalog:rollup-next" }, "types": "./types/index.d.ts" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b27c9e0e7..5cbe96d91 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -482,17 +482,17 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) devDependencies: '@rollup/plugin-buble': specifier: ^1.0.0 - version: 1.0.0(rollup@4.0.0-24) + version: 1.0.0(rollup@5.0.0-2) del-cli: specifier: ^5.0.0 version: 5.0.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 packages/multi-entry: dependencies: From 28eadaf542336a1e14d65bc5ae692e2fdaaf4a0d Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:09:49 +0100 Subject: [PATCH 17/29] feat(multi-entry): support rollup 5 --- packages/multi-entry/package.json | 4 ++-- pnpm-lock.yaml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/multi-entry/package.json b/packages/multi-entry/package.json index f13fc4580..3a7c3fed3 100755 --- a/packages/multi-entry/package.json +++ b/packages/multi-entry/package.json @@ -53,7 +53,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -65,7 +65,7 @@ "tinyglobby": "^0.2.14" }, "devDependencies": { - "rollup": "^4.0.0-24" + "rollup": "catalog:rollup-next" }, "types": "./types/index.d.ts" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5cbe96d91..07b3c349e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -498,14 +498,14 @@ importers: dependencies: '@rollup/plugin-virtual': specifier: ^3.0.0 - version: 3.0.0(rollup@4.0.0-24) + version: 3.0.0(rollup@5.0.0-2) tinyglobby: specifier: ^0.2.14 version: 0.2.14 devDependencies: rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 packages/node-resolve: dependencies: @@ -6682,9 +6682,9 @@ snapshots: optionalDependencies: tslib: 2.4.0 - '@rollup/plugin-virtual@3.0.0(rollup@4.0.0-24)': + '@rollup/plugin-virtual@3.0.0(rollup@5.0.0-2)': optionalDependencies: - rollup: 4.0.0-24 + rollup: 5.0.0-2 '@rollup/pluginutils@4.2.1': dependencies: From 3c5731955eaada1071042219c1166dbd4574b46e Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:09:50 +0100 Subject: [PATCH 18/29] feat(node-resolve): support rollup 5 --- packages/node-resolve/package.json | 4 +-- packages/node-resolve/test/prefer-builtins.js | 2 +- .../node-resolve/test/snapshots/test.mjs.snap | 3 ++- packages/node-resolve/test/test.mjs | 20 ++++++++++++++ pnpm-lock.yaml | 27 +++++++++++++------ 5 files changed, 44 insertions(+), 12 deletions(-) diff --git a/packages/node-resolve/package.json b/packages/node-resolve/package.json index f06f248d0..c1fdbd418 100644 --- a/packages/node-resolve/package.json +++ b/packages/node-resolve/package.json @@ -54,7 +54,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" + "rollup": "^2.78.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -75,7 +75,7 @@ "@rollup/plugin-commonjs": "^23.0.0", "@rollup/plugin-json": "^5.0.0", "es5-ext": "^0.10.62", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "source-map": "^0.7.4", "string-capitalize": "^1.0.1" }, diff --git a/packages/node-resolve/test/prefer-builtins.js b/packages/node-resolve/test/prefer-builtins.js index 16701ad36..32734eecd 100644 --- a/packages/node-resolve/test/prefer-builtins.js +++ b/packages/node-resolve/test/prefer-builtins.js @@ -44,7 +44,7 @@ test('warning when preferring a builtin module, no explicit configuration', asyn }); const localPath = resolve('node_modules/events/index.js'); expect(warning).toBe( - `preferring built-in module 'events' over local alternative ` + + `[plugin node-resolve] preferring built-in module 'events' over local alternative ` + `at '${localPath}', pass 'preferBuiltins: false' to disable this behavior ` + `or 'preferBuiltins: true' to disable this warning.` + `or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.` diff --git a/packages/node-resolve/test/snapshots/test.mjs.snap b/packages/node-resolve/test/snapshots/test.mjs.snap index 7d419c9ec..fb70176f2 100644 --- a/packages/node-resolve/test/snapshots/test.mjs.snap +++ b/packages/node-resolve/test/snapshots/test.mjs.snap @@ -4,8 +4,9 @@ exports[`allows custom moduleDirectories with legacy customResolveOptions.module [ { "code": "PLUGIN_WARNING", - "message": "node-resolve: The \`customResolveOptions.moduleDirectory\` option has been deprecated. Use \`moduleDirectories\`, which must be an array.", + "message": "[plugin node-resolve] node-resolve: The \`customResolveOptions.moduleDirectory\` option has been deprecated. Use \`moduleDirectories\`, which must be an array.", "plugin": "node-resolve", + Symbol(augmented): true, }, ] `; diff --git a/packages/node-resolve/test/test.mjs b/packages/node-resolve/test/test.mjs index 84f03cdf8..69e8fdbea 100755 --- a/packages/node-resolve/test/test.mjs +++ b/packages/node-resolve/test/test.mjs @@ -542,6 +542,8 @@ test('passes on "isEntry" flag and original importee', async () => { { attributes: {}, custom: {}, + importerAttributes: {}, + importerRawId: 'entry/main.js', isEntry: true } ], @@ -551,6 +553,8 @@ test('passes on "isEntry" flag and original importee', async () => { { attributes: {}, custom: {}, + importerAttributes: {}, + importerRawId: void 0, isEntry: true } ], @@ -568,6 +572,8 @@ test('passes on "isEntry" flag and original importee', async () => { importee: './other.js' } }, + importerAttributes: {}, + importerRawId: 'entry/main.js', isEntry: true } ], @@ -585,6 +591,8 @@ test('passes on "isEntry" flag and original importee', async () => { importee: 'entry/main.js' } }, + importerAttributes: {}, + importerRawId: void 0, isEntry: true } ], @@ -594,6 +602,8 @@ test('passes on "isEntry" flag and original importee', async () => { { attributes: {}, custom: {}, + importerAttributes: {}, + importerRawId: join(DIRNAME, 'fixtures', 'entry', 'main.js'), isEntry: false } ], @@ -611,6 +621,8 @@ test('passes on "isEntry" flag and original importee', async () => { importee: './dep.js' } }, + importerAttributes: {}, + importerRawId: join(DIRNAME, 'fixtures', 'entry', 'main.js'), isEntry: false } ] @@ -653,6 +665,8 @@ test('passes on custom options', async () => { custom: { test: 42 }, + importerAttributes: {}, + importerRawId: void 0, isEntry: false } ], @@ -671,6 +685,8 @@ test('passes on custom options', async () => { importee: 'entry/main.js' } }, + importerAttributes: {}, + importerRawId: void 0, isEntry: false } ], @@ -680,6 +696,8 @@ test('passes on custom options', async () => { { attributes: {}, custom: {}, + importerAttributes: {}, + importerRawId: void 0, isEntry: true } ], @@ -697,6 +715,8 @@ test('passes on custom options', async () => { importee: 'entry/other.js' } }, + importerAttributes: {}, + importerRawId: void 0, isEntry: true } ] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 07b3c349e..d2d62b392 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -511,7 +511,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) '@types/resolve': specifier: 1.20.2 version: 1.20.2 @@ -533,19 +533,19 @@ importers: version: 7.19.3(@babel/core@7.19.3) '@rollup/plugin-babel': specifier: ^6.0.0 - version: 6.0.0(@babel/core@7.19.3)(@types/babel__core@7.1.19)(rollup@4.0.0-24) + version: 6.0.0(@babel/core@7.19.3)(@types/babel__core@7.1.19)(rollup@5.0.0-2) '@rollup/plugin-commonjs': specifier: ^23.0.0 - version: 23.0.0(rollup@4.0.0-24) + version: 23.0.0(rollup@5.0.0-2) '@rollup/plugin-json': specifier: ^5.0.0 - version: 5.0.0(rollup@4.0.0-24) + version: 5.0.0(rollup@5.0.0-2) es5-ext: specifier: ^0.10.62 version: 0.10.62 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 source-map: specifier: ^0.7.4 version: 0.7.4 @@ -6586,14 +6586,14 @@ snapshots: optionalDependencies: rollup: 4.0.0-24 - '@rollup/plugin-babel@6.0.0(@babel/core@7.19.3)(@types/babel__core@7.1.19)(rollup@4.0.0-24)': + '@rollup/plugin-babel@6.0.0(@babel/core@7.19.3)(@types/babel__core@7.1.19)(rollup@5.0.0-2)': dependencies: '@babel/core': 7.19.3 '@babel/helper-module-imports': 7.18.6 '@rollup/pluginutils': 4.2.1 optionalDependencies: '@types/babel__core': 7.1.19 - rollup: 4.0.0-24 + rollup: 5.0.0-2 '@rollup/plugin-buble@1.0.0(rollup@4.0.0-24)': dependencies: @@ -6622,6 +6622,17 @@ snapshots: optionalDependencies: rollup: 4.0.0-24 + '@rollup/plugin-commonjs@23.0.0(rollup@5.0.0-2)': + dependencies: + '@rollup/pluginutils': 4.2.1 + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 8.1.0 + is-reference: 1.2.1 + magic-string: 0.26.7 + optionalDependencies: + rollup: 5.0.0-2 + '@rollup/plugin-json@5.0.0(rollup@4.0.0-24)': dependencies: '@rollup/pluginutils': 4.2.1 From 8777fee8fed2227298a3d49f3944570725afd7c7 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:09:53 +0100 Subject: [PATCH 19/29] feat(pluginutils): support rollup 5 --- packages/pluginutils/package.json | 4 ++-- pnpm-lock.yaml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/pluginutils/package.json b/packages/pluginutils/package.json index 3a5c6b216..d5bf7252e 100644 --- a/packages/pluginutils/package.json +++ b/packages/pluginutils/package.json @@ -53,7 +53,7 @@ "utils" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -72,7 +72,7 @@ "@types/node": "^14.18.30", "@types/picomatch": "^2.3.0", "acorn": "^8.8.0", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "typescript": "^4.8.3" }, "types": "./types/index.d.ts", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d2d62b392..4b6173d70 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -567,13 +567,13 @@ importers: devDependencies: '@rollup/plugin-commonjs': specifier: ^23.0.0 - version: 23.0.0(rollup@4.0.0-24) + version: 23.0.0(rollup@5.0.0-2) '@rollup/plugin-node-resolve': specifier: ^15.0.0 - version: 15.0.0(rollup@4.0.0-24) + version: 15.0.0(rollup@5.0.0-2) '@rollup/plugin-typescript': specifier: ^9.0.1 - version: 9.0.1(rollup@4.0.0-24)(tslib@2.4.0)(typescript@4.8.4) + version: 9.0.1(rollup@5.0.0-2)(tslib@2.4.0)(typescript@4.8.4) '@types/node': specifier: ^14.18.30 version: 14.18.31 @@ -584,8 +584,8 @@ importers: specifier: ^8.8.0 version: 8.8.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: ^4.8.3 version: 4.8.4 From a11f62a5bbebab804743acf08b99eab2f1ddcedd Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:20:29 +0100 Subject: [PATCH 20/29] feat(replace): support rollup 5 --- packages/replace/package.json | 4 ++-- packages/replace/test/snapshots/misc.js.snap | 3 ++- packages/replace/test/sourcemaps.js | 4 ++-- pnpm-lock.yaml | 8 ++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/replace/package.json b/packages/replace/package.json index 84fd2b5de..593ded318 100644 --- a/packages/replace/package.json +++ b/packages/replace/package.json @@ -54,7 +54,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -69,7 +69,7 @@ "@rollup/plugin-buble": "^1.0.0", "del-cli": "^5.0.0", "locate-character": "^2.0.5", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "source-map": "^0.7.4", "typescript": "^4.8.3" }, diff --git a/packages/replace/test/snapshots/misc.js.snap b/packages/replace/test/snapshots/misc.js.snap index 7eb1ce21d..19f42dc6a 100644 --- a/packages/replace/test/snapshots/misc.js.snap +++ b/packages/replace/test/snapshots/misc.js.snap @@ -4,8 +4,9 @@ exports[`no explicit setting of preventAssignment 1`] = ` [ { "code": "PLUGIN_WARNING", - "message": "@rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to \`true\`, as the next major version will default this option to \`true\`.", + "message": "[plugin replace] @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to \`true\`, as the next major version will default this option to \`true\`.", "plugin": "replace", + Symbol(augmented): true, }, ] `; diff --git a/packages/replace/test/sourcemaps.js b/packages/replace/test/sourcemaps.js index be365c326..8451d1522 100644 --- a/packages/replace/test/sourcemaps.js +++ b/packages/replace/test/sourcemaps.js @@ -121,7 +121,7 @@ test('does not generate sourcemaps if disabled in plugin', async () => { input: 'main.js', onwarn(warning) { expect(warning.message).toBe( - "Sourcemap is likely to be incorrect: a plugin (replace) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help" + "[plugin replace] Sourcemap is likely to be incorrect: a plugin (replace) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help" ); warned = true; }, @@ -149,7 +149,7 @@ test('does not generate sourcemaps if disabled in plugin (camelcase)', async () input: 'main.js', onwarn(warning) { expect(warning.message).toBe( - "Sourcemap is likely to be incorrect: a plugin (replace) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help" + "[plugin replace] Sourcemap is likely to be incorrect: a plugin (replace) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help" ); warned = true; }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4b6173d70..6fb9e918e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -594,14 +594,14 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) magic-string: specifier: ^0.30.3 version: 0.30.3 devDependencies: '@rollup/plugin-buble': specifier: ^1.0.0 - version: 1.0.0(rollup@4.0.0-24) + version: 1.0.0(rollup@5.0.0-2) del-cli: specifier: ^5.0.0 version: 5.0.0 @@ -609,8 +609,8 @@ importers: specifier: ^2.0.5 version: 2.0.5 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 source-map: specifier: ^0.7.4 version: 0.7.4 From db1d39a6e59e8e3417f8e7b68909397ec3839188 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:20:32 +0100 Subject: [PATCH 21/29] feat(run): support rollup 5 --- packages/run/package.json | 4 ++-- packages/run/test/test.js | 4 ++-- pnpm-lock.yaml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/run/package.json b/packages/run/package.json index b804b5af6..279e15852 100644 --- a/packages/run/package.json +++ b/packages/run/package.json @@ -50,7 +50,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^2.0.0||^3.0.0||^4.0.0" + "rollup": "^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -63,7 +63,7 @@ "devDependencies": { "@rollup/plugin-typescript": "^9.0.1", "del": "^6.1.1", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "sinon": "^14.0.0", "typescript": "^4.8.3" }, diff --git a/packages/run/test/test.js b/packages/run/test/test.js index ae53e16c4..ff389d97f 100644 --- a/packages/run/test/test.js +++ b/packages/run/test/test.js @@ -91,7 +91,7 @@ test('throws an error when bundle is not written to disk', async () => { expect(error).toBeInstanceOf(Error); expect(error.message).toBe( - '@rollup/plugin-run currently only works with bundles that are written to disk' + '[plugin run] @rollup/plugin-run currently only works with bundles that are written to disk' ); }); @@ -105,7 +105,7 @@ test('throws an error when input option is invalid', async () => { const error = await bundle.write(outputDirOptions).catch((caught) => caught); expect(error).toBeInstanceOf(Error); - expect(error.message).toBe('@rollup/plugin-run could not find output chunk'); + expect(error.message).toBe('[plugin run] @rollup/plugin-run could not find output chunk'); }); test('throws an error when there are multiple entry points', async () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6fb9e918e..54b02c948 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -626,13 +626,13 @@ importers: devDependencies: '@rollup/plugin-typescript': specifier: ^9.0.1 - version: 9.0.1(rollup@4.0.0-24)(tslib@2.4.0)(typescript@4.8.4) + version: 9.0.1(rollup@5.0.0-2)(tslib@2.4.0)(typescript@4.8.4) del: specifier: ^6.1.1 version: 6.1.1 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 sinon: specifier: ^14.0.0 version: 14.0.1 From b9198456ce926960b562cf4db7f0b9997319e192 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:20:35 +0100 Subject: [PATCH 22/29] feat(strip): support rollup 5 --- packages/strip/package.json | 4 +-- packages/strip/test/rollup-build.test.js | 35 ++++++++++++++++++++++++ pnpm-lock.yaml | 6 ++-- 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 packages/strip/test/rollup-build.test.js diff --git a/packages/strip/package.json b/packages/strip/package.json index e9d975aca..9b33457dd 100644 --- a/packages/strip/package.json +++ b/packages/strip/package.json @@ -48,7 +48,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -62,7 +62,7 @@ }, "devDependencies": { "acorn": "^8.8.0", - "rollup": "^4.0.0-24" + "rollup": "catalog:rollup-next" }, "types": "./types/index.d.ts" } diff --git a/packages/strip/test/rollup-build.test.js b/packages/strip/test/rollup-build.test.js new file mode 100644 index 000000000..4bc8208db --- /dev/null +++ b/packages/strip/test/rollup-build.test.js @@ -0,0 +1,35 @@ +const { rollup } = require('rollup'); + +const strip = require('..'); + +const ENTRY_ID = 'entry.js'; +const ENTRY_CODE = [ + 'debugger;', + "console.log('stripped-sentinel');", + "export default 'kept-sentinel';" +].join('\n'); + +const entryPlugin = { + name: 'entry', + resolveId(id) { + if (id === ENTRY_ID) return ENTRY_ID; + return null; + }, + load(id) { + if (id === ENTRY_ID) return ENTRY_CODE; + return null; + } +}; + +test('strips debugger and console calls in a real build', async () => { + const bundle = await rollup({ + input: ENTRY_ID, + plugins: [entryPlugin, strip()] + }); + const { output } = await bundle.generate({ format: 'es' }); + expect(output).toHaveLength(1); + const [{ code }] = output; + expect(code).toContain('kept-sentinel'); + expect(code).not.toContain('stripped-sentinel'); + expect(code).not.toContain('debugger'); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 54b02c948..8bc6c9766 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -644,7 +644,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -656,8 +656,8 @@ importers: specifier: ^8.8.0 version: 8.8.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 packages/sucrase: dependencies: From 4716d12009969e006233a37b4f112e87742adb99 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:20:38 +0100 Subject: [PATCH 23/29] feat(sucrase): support rollup 5 --- packages/sucrase/package.json | 4 ++-- pnpm-lock.yaml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/sucrase/package.json b/packages/sucrase/package.json index b173b9bcf..56b508f96 100644 --- a/packages/sucrase/package.json +++ b/packages/sucrase/package.json @@ -55,7 +55,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^2.53.1||^3.0.0||^4.0.0" + "rollup": "^2.53.1||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -68,7 +68,7 @@ }, "devDependencies": { "@rollup/plugin-alias": "^4.0.0", - "rollup": "^4.0.0-24" + "rollup": "catalog:rollup-next" }, "types": "./types/index.d.ts" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8bc6c9766..b82654431 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -663,17 +663,17 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) sucrase: specifier: ^3.27.0 version: 3.28.0 devDependencies: '@rollup/plugin-alias': specifier: ^4.0.0 - version: 4.0.0(rollup@4.0.0-24) + version: 4.0.0(rollup@5.0.0-2) rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 packages/swc: dependencies: @@ -6580,11 +6580,11 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.13.0 - '@rollup/plugin-alias@4.0.0(rollup@4.0.0-24)': + '@rollup/plugin-alias@4.0.0(rollup@5.0.0-2)': dependencies: slash: 4.0.0 optionalDependencies: - rollup: 4.0.0-24 + rollup: 5.0.0-2 '@rollup/plugin-babel@6.0.0(@babel/core@7.19.3)(@types/babel__core@7.1.19)(rollup@5.0.0-2)': dependencies: From e199e6f048c497c2a14c3f4199206d579b41c045 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:20:38 +0100 Subject: [PATCH 24/29] feat(swc): support rollup 5 --- packages/swc/package.json | 4 ++-- pnpm-lock.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/swc/package.json b/packages/swc/package.json index 7539ab965..e888f33a3 100644 --- a/packages/swc/package.json +++ b/packages/swc/package.json @@ -55,7 +55,7 @@ ], "peerDependencies": { "@swc/core": "^1.3.0", - "rollup": "^3.0.0||^4.0.0" + "rollup": "^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -68,7 +68,7 @@ }, "devDependencies": { "@swc/core": "^1.3.78", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "typescript": "^4.8.3" }, "types": "./types/index.d.ts" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b82654431..ba59a2e20 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -679,7 +679,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) smob: specifier: ^1.4.0 version: 1.4.0 @@ -688,8 +688,8 @@ importers: specifier: ^1.3.78 version: 1.3.78 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: ^4.8.3 version: 4.8.4 From 0dd512c9f252b056a82451f3174d8bbeecf5fb91 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:22:10 +0100 Subject: [PATCH 25/29] feat(terser): support rollup 5 --- packages/terser/package.json | 4 ++-- pnpm-lock.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/terser/package.json b/packages/terser/package.json index 0e0fa9f6b..6a9474daa 100644 --- a/packages/terser/package.json +++ b/packages/terser/package.json @@ -54,7 +54,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^2.0.0||^3.0.0||^4.0.0" + "rollup": "^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -68,7 +68,7 @@ }, "devDependencies": { "@types/serialize-javascript": "^5.0.4", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "typescript": "catalog:" }, "types": "./types/index.d.ts" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ba59a2e20..20e34e44a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -710,8 +710,8 @@ importers: specifier: ^5.0.4 version: 5.0.4 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: 'catalog:' version: 5.9.3 From c25a0cfd0e7f4a94db04521fa468e941cf0d098e Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:31:01 +0100 Subject: [PATCH 26/29] feat(typescript): support rollup 5 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. --- packages/typescript/package.json | 6 +- packages/typescript/test/declarations.js | 303 ++++++++++-------- .../typescript/test/snapshots/tslib.js.snap | 2 +- .../test/snapshots/warnings.js.snap | 3 +- packages/typescript/test/test.js | 64 +++- pnpm-lock.yaml | 25 +- 6 files changed, 229 insertions(+), 174 deletions(-) diff --git a/packages/typescript/package.json b/packages/typescript/package.json index efcd000f5..7549c1508 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -52,7 +52,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^2.14.0||^3.0.0||^4.0.0", + "rollup": "^2.14.0||^3.0.0||^4.0.0||^5.0.0", "tslib": "*", "typescript": ">=3.7.0" }, @@ -71,10 +71,10 @@ "devDependencies": { "@rollup/plugin-buble": "^1.0.0", "@rollup/plugin-commonjs": "^23.0.0", - "@types/node": "^14.18.30", + "@types/node": "^20.19.0", "@types/resolve": "^1.20.2", "buble": "^0.20.0", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "typescript": "^4.8.3" }, "types": "./types/index.d.ts" diff --git a/packages/typescript/test/declarations.js b/packages/typescript/test/declarations.js index 884d4f846..19889dbc2 100644 --- a/packages/typescript/test/declarations.js +++ b/packages/typescript/test/declarations.js @@ -5,6 +5,8 @@ import { getCode } from '../../../util/test'; beforeEach(() => process.chdir(__dirname)); +const DECLARATION_TEST_TIMEOUT = 30_000; + // eslint-disable-next-line no-console const onwarn = (warning) => console.warn(warning.toString()); @@ -17,114 +19,131 @@ const captureThrownError = async (valueOrFactory) => { return expect.unreachable('Expected call to throw'); }; -test.sequential('supports creating declaration files', async () => { - const bundle = await rollup({ - input: 'fixtures/basic/main.ts', - plugins: [ - typescript({ - tsconfig: 'fixtures/basic/tsconfig.json', - outDir: 'fixtures/basic/dist', - declaration: true - }) - ], - onwarn - }); - const output = await getCode( - bundle, - { - format: 'es', - dir: 'fixtures/basic/dist' - }, - true - ); - const declaration = output[1].source; - expect(output.map((out) => out.fileName)).toEqual(['main.js', 'main.d.ts']); - expect(declaration.includes('declare const answer = 42;'), declaration).toBe(true); -}); -test.sequential('supports creating declaration files in subfolder', async () => { - const bundle = await rollup({ - input: 'fixtures/basic/main.ts', - plugins: [ - typescript({ - tsconfig: 'fixtures/basic/tsconfig.json', - outDir: 'fixtures/basic/dist/types', - declaration: true, - declarationMap: true - }) - ], - onwarn - }); - const output = await getCode( - bundle, - { - format: 'es', - dir: 'fixtures/basic/dist' - }, - true - ); - const declaration = output[2].source; - expect(output.map((out) => out.fileName)).toEqual([ - 'main.js', - 'types/main.d.ts.map', - 'types/main.d.ts' - ]); - expect(declaration.includes('declare const answer = 42;'), declaration).toBe(true); - expect(declaration.includes('//# sourceMappingURL=main.d.ts.map'), declaration).toBe(true); -}); -test.sequential('supports creating declarations with non-default rootDir', async () => { - const bundle = await rollup({ - input: 'fixtures/declaration-root-dir/src/main.ts', - plugins: [ - typescript({ - tsconfig: 'fixtures/declaration-root-dir/tsconfig.json' - }) - ], - onwarn - }); - const output = await getCode( - bundle, - { - format: 'es', - dir: 'fixtures/declaration-root-dir/lib' - }, - true - ); - expect(output.map((out) => out.fileName)).toEqual(['main.js', 'main.d.ts']); -}); -test.sequential('supports creating declaration files for interface only source file', async () => { - const bundle = await rollup({ - input: 'fixtures/export-interface-only/main.ts', - plugins: [ - typescript({ - tsconfig: 'fixtures/export-interface-only/tsconfig.json', - declarationDir: 'fixtures/export-interface-only/dist/types', - declaration: true, - declarationMap: true - }) - ], - onwarn - }); - const output = await getCode( - bundle, - { - format: 'es', - dir: 'fixtures/export-interface-only/dist' - }, - true - ); - const declaration = output[2].source; - expect(output.map((out) => out.fileName)).toEqual([ - 'main.js', - 'types/interface.d.ts.map', - 'types/interface.d.ts', - 'types/main.d.ts.map', - 'types/main.d.ts' - ]); - expect(declaration.includes('export interface ITest'), declaration).toBe(true); - expect(declaration.includes('//# sourceMappingURL=interface.d.ts.map'), declaration).toBe(true); -}); +test.sequential( + 'supports creating declaration files', + { timeout: DECLARATION_TEST_TIMEOUT }, + async () => { + const bundle = await rollup({ + input: 'fixtures/basic/main.ts', + plugins: [ + typescript({ + tsconfig: 'fixtures/basic/tsconfig.json', + outDir: 'fixtures/basic/dist', + declaration: true + }) + ], + onwarn + }); + const output = await getCode( + bundle, + { + format: 'es', + dir: 'fixtures/basic/dist' + }, + true + ); + const declaration = output[1].source; + expect(output.map((out) => out.fileName)).toEqual(['main.js', 'main.d.ts']); + expect(declaration.includes('declare const answer = 42;'), declaration).toBe(true); + } +); +test.sequential( + 'supports creating declaration files in subfolder', + { timeout: DECLARATION_TEST_TIMEOUT }, + async () => { + const bundle = await rollup({ + input: 'fixtures/basic/main.ts', + plugins: [ + typescript({ + tsconfig: 'fixtures/basic/tsconfig.json', + outDir: 'fixtures/basic/dist/types', + declaration: true, + declarationMap: true + }) + ], + onwarn + }); + const output = await getCode( + bundle, + { + format: 'es', + dir: 'fixtures/basic/dist' + }, + true + ); + const declaration = output[2].source; + expect(output.map((out) => out.fileName)).toEqual([ + 'main.js', + 'types/main.d.ts.map', + 'types/main.d.ts' + ]); + expect(declaration.includes('declare const answer = 42;'), declaration).toBe(true); + expect(declaration.includes('//# sourceMappingURL=main.d.ts.map'), declaration).toBe(true); + } +); +test.sequential( + 'supports creating declarations with non-default rootDir', + { timeout: DECLARATION_TEST_TIMEOUT }, + async () => { + const bundle = await rollup({ + input: 'fixtures/declaration-root-dir/src/main.ts', + plugins: [ + typescript({ + tsconfig: 'fixtures/declaration-root-dir/tsconfig.json' + }) + ], + onwarn + }); + const output = await getCode( + bundle, + { + format: 'es', + dir: 'fixtures/declaration-root-dir/lib' + }, + true + ); + expect(output.map((out) => out.fileName)).toEqual(['main.js', 'main.d.ts']); + } +); +test.sequential( + 'supports creating declaration files for interface only source file', + { timeout: DECLARATION_TEST_TIMEOUT }, + async () => { + const bundle = await rollup({ + input: 'fixtures/export-interface-only/main.ts', + plugins: [ + typescript({ + tsconfig: 'fixtures/export-interface-only/tsconfig.json', + declarationDir: 'fixtures/export-interface-only/dist/types', + declaration: true, + declarationMap: true + }) + ], + onwarn + }); + const output = await getCode( + bundle, + { + format: 'es', + dir: 'fixtures/export-interface-only/dist' + }, + true + ); + const declaration = output[2].source; + expect(output.map((out) => out.fileName)).toEqual([ + 'main.js', + 'types/interface.d.ts.map', + 'types/interface.d.ts', + 'types/main.d.ts.map', + 'types/main.d.ts' + ]); + expect(declaration.includes('export interface ITest'), declaration).toBe(true); + expect(declaration.includes('//# sourceMappingURL=interface.d.ts.map'), declaration).toBe(true); + } +); test.sequential( 'supports creating declaration files for type-only source files that are implicitly included', + { timeout: DECLARATION_TEST_TIMEOUT }, async () => { const bundle = await rollup({ input: 'fixtures/implicitly-included-type-only-file/main.ts', @@ -153,30 +172,34 @@ test.sequential( expect(declaration.includes('export declare type MyNumber = number;'), declaration).toBe(true); } ); -test.sequential('supports creating declaration files in declarationDir', async () => { - const bundle = await rollup({ - input: 'fixtures/basic/main.ts', - plugins: [ - typescript({ - tsconfig: 'fixtures/basic/tsconfig.json', - declarationDir: 'fixtures/basic/dist/types', - declaration: true - }) - ], - onwarn - }); - const output = await getCode( - bundle, - { - format: 'es', - dir: 'fixtures/basic/dist' - }, - true - ); - const declaration = output[1].source; - expect(output.map((out) => out.fileName)).toEqual(['main.js', 'types/main.d.ts']); - expect(declaration.includes('declare const answer = 42;'), declaration).toBe(true); -}); +test.sequential( + 'supports creating declaration files in declarationDir', + { timeout: DECLARATION_TEST_TIMEOUT }, + async () => { + const bundle = await rollup({ + input: 'fixtures/basic/main.ts', + plugins: [ + typescript({ + tsconfig: 'fixtures/basic/tsconfig.json', + declarationDir: 'fixtures/basic/dist/types', + declaration: true + }) + ], + onwarn + }); + const output = await getCode( + bundle, + { + format: 'es', + dir: 'fixtures/basic/dist' + }, + true + ); + const declaration = output[1].source; + expect(output.map((out) => out.fileName)).toEqual(['main.js', 'types/main.d.ts']); + expect(declaration.includes('declare const answer = 42;'), declaration).toBe(true); + } +); async function ensureOutDirWhenCreatingDeclarationFiles(compilerOptionName) { const bundle = await rollup({ input: 'fixtures/basic/main.ts', @@ -205,9 +228,17 @@ async function ensureOutDirWhenCreatingDeclarationFiles(compilerOptionName) { `Unexpected error message: ${caughtError.message}` ).toBe(true); } -test.sequential('ensures outDir is set when creating declaration files (declaration)', async () => { - await ensureOutDirWhenCreatingDeclarationFiles('declaration'); -}); -test.sequential('ensures outDir is set when creating declaration files (composite)', async () => { - await ensureOutDirWhenCreatingDeclarationFiles('composite'); -}); +test.sequential( + 'ensures outDir is set when creating declaration files (declaration)', + { timeout: DECLARATION_TEST_TIMEOUT }, + async () => { + await ensureOutDirWhenCreatingDeclarationFiles('declaration'); + } +); +test.sequential( + 'ensures outDir is set when creating declaration files (composite)', + { timeout: DECLARATION_TEST_TIMEOUT }, + async () => { + await ensureOutDirWhenCreatingDeclarationFiles('composite'); + } +); diff --git a/packages/typescript/test/snapshots/tslib.js.snap b/packages/typescript/test/snapshots/tslib.js.snap index 45675c289..cea800cd3 100644 --- a/packages/typescript/test/snapshots/tslib.js.snap +++ b/packages/typescript/test/snapshots/tslib.js.snap @@ -1,3 +1,3 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`fails without tslib installed 1`] = `[RollupError: @rollup/plugin-typescript: Could not find module 'tslib', which is required by this plugin. Is it installed?]`; +exports[`fails without tslib installed 1`] = `[RollupError: [plugin typescript] @rollup/plugin-typescript: Could not find module 'tslib', which is required by this plugin. Is it installed?]`; diff --git a/packages/typescript/test/snapshots/warnings.js.snap b/packages/typescript/test/snapshots/warnings.js.snap index b2a3d7588..91f9873b2 100644 --- a/packages/typescript/test/snapshots/warnings.js.snap +++ b/packages/typescript/test/snapshots/warnings.js.snap @@ -4,8 +4,9 @@ exports[`bad module in tsconfig 1`] = ` [ { "code": "PLUGIN_WARNING", - "message": "@rollup/plugin-typescript: Rollup requires that TypeScript produces ES Modules. Unfortunately your configuration specifies a "module" other than "esnext". Unless you know what you're doing, please change "module" to "esnext" in the target tsconfig.json file or plugin options.", + "message": "[plugin typescript] @rollup/plugin-typescript: Rollup requires that TypeScript produces ES Modules. Unfortunately your configuration specifies a "module" other than "esnext". Unless you know what you're doing, please change "module" to "esnext" in the target tsconfig.json file or plugin options.", "plugin": "typescript", + Symbol(augmented): true, }, ] `; diff --git a/packages/typescript/test/test.js b/packages/typescript/test/test.js index dbadde532..885e99596 100644 --- a/packages/typescript/test/test.js +++ b/packages/typescript/test/test.js @@ -2,7 +2,7 @@ const path = require('path'); const fs = require('fs'); const commonjs = require('@rollup/plugin-commonjs'); -const { rollup, watch } = require('rollup'); +const { rollup, VERSION, watch } = require('rollup'); const ts = require('typescript'); const { evaluateBundle, getCode, getFiles, onwarn } = require('../../../util/test'); @@ -10,6 +10,12 @@ const typescript = require('..'); const { fakeTypescript, forceRemove, waitForWatcherEvent } = require('./helpers'); +const [rollupMajor, rollupMinor] = VERSION.split('.').map(Number); +// rollup 4.13.0 augments plugin warnings and errors with a "[plugin ]" message prefix +// and, if the log has a location, an additional "relativeId (line:column)" segment +const hasAugmentedPluginLogs = rollupMajor > 4 || (rollupMajor === 4 && rollupMinor >= 13); +const COLD_START_TEST_TIMEOUT = 30_000; + beforeEach(() => process.chdir(__dirname)); const outputOptions = { format: 'es' @@ -27,7 +33,7 @@ const captureThrownError = async (valueOrFactory) => { const expectNoError = (valueOrFactory) => typeof valueOrFactory === 'function' ? valueOrFactory() : valueOrFactory; -test.sequential('runs code through typescript', async () => { +test.sequential('runs code through typescript', { timeout: COLD_START_TEST_TIMEOUT }, async () => { const bundle = await rollup({ input: 'fixtures/basic/main.ts', plugins: [ @@ -375,14 +381,23 @@ test.sequential('warns for invalid module types', async () => { } }) ); - expect(warnings).toEqual([ + const expectedWarnings = [ { code: 'PLUGIN_WARNING', plugin: 'typescript', pluginCode: 'TS6046', - message: `@rollup/plugin-typescript TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'.` + message: `${ + hasAugmentedPluginLogs ? '[plugin typescript] ' : '' + }@rollup/plugin-typescript TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'.` } - ]); + ]; + if (hasAugmentedPluginLogs) { + // rollup marks augmented warnings with an internal symbol; include it in the expectation + for (const [index, warning] of warnings.entries()) { + expectedWarnings[index][Object.getOwnPropertySymbols(warning)[0]] = true; + } + } + expect(warnings).toEqual(expectedWarnings); }); test.sequential('ignores case of module types', async () => { await expectNoError( @@ -472,7 +487,13 @@ test.sequential('reports diagnostics and throws if errors occur during transpila onwarn }) ); - expect(caughtError.message).toBe('@rollup/plugin-typescript TS1110: Type expected.'); + expect(caughtError.message).toBe( + `${ + hasAugmentedPluginLogs + ? '[plugin typescript] fixtures/syntax-error/missing-type.ts (1:8): ' + : '' + }@rollup/plugin-typescript TS1110: Type expected.` + ); expect(caughtError.pluginCode).toBe('TS1110'); }); test.sequential('ignore type errors if noEmitOnError is false', async () => { @@ -494,7 +515,13 @@ test.sequential('ignore type errors if noEmitOnError is false', async () => { expect(warnings[0].code).toBe('PLUGIN_WARNING'); expect(warnings[0].plugin).toBe('typescript'); expect(warnings[0].pluginCode).toBe('TS1110'); - expect(warnings[0].message).toBe('@rollup/plugin-typescript TS1110: Type expected.'); + expect(warnings[0].message).toBe( + `${ + hasAugmentedPluginLogs + ? '[plugin typescript] fixtures/syntax-error/missing-type.ts (1:8): ' + : '' + }@rollup/plugin-typescript TS1110: Type expected.` + ); expect(warnings[0].loc.line).toBe(1); expect(warnings[0].loc.column).toBe(8); expect(warnings[0].loc.file.includes('missing-type.ts')).toBe(true); @@ -772,14 +799,23 @@ test.sequential('should throw on bad options', async () => { message: "@rollup/plugin-typescript: Couldn't process compiler options" } ); - expect(warnings).toEqual([ + const expectedWarnings = [ { code: 'PLUGIN_WARNING', plugin: 'typescript', pluginCode: 'TS5023', - message: `@rollup/plugin-typescript TS5023: Unknown compiler option 'foo'.` + message: `${ + hasAugmentedPluginLogs ? '[plugin typescript] ' : '' + }@rollup/plugin-typescript TS5023: Unknown compiler option 'foo'.` } - ]); + ]; + if (hasAugmentedPluginLogs) { + // rollup marks augmented warnings with an internal symbol; include it in the expectation + for (const [index, warning] of warnings.entries()) { + expectedWarnings[index][Object.getOwnPropertySymbols(warning)[0]] = true; + } + } + expect(warnings).toEqual(expectedWarnings); }); test.sequential('should handle re-exporting types', async () => { const bundle = await rollup({ @@ -1059,11 +1095,9 @@ test.sequential('supports consecutive rebuilds when watchMode is false', async ( const secondRunCode = secondRun[0].code; expect(firstRunCode).not.toEqual(secondRunCode); } finally { - fs.copyFile('original.txt', 'main.ts', (err) => { - if (err) { - expect.unreachable(err); - } - }); + // This must be awaited: the next test changes the working directory, which would + // otherwise make this relative copy fail with an unhandled error. + await fs.promises.copyFile('original.txt', 'main.ts'); } }); test.sequential('does not output to filesystem when outputToFilesystem is false', async () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20e34e44a..4cca5ed1a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -720,7 +720,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.1.0 - version: 5.1.0(rollup@4.0.0-24) + version: 5.1.0(rollup@5.0.0-2) resolve: specifier: ^1.22.1 version: 1.22.1 @@ -730,13 +730,13 @@ importers: devDependencies: '@rollup/plugin-buble': specifier: ^1.0.0 - version: 1.0.0(rollup@4.0.0-24) + version: 1.0.0(rollup@5.0.0-2) '@rollup/plugin-commonjs': specifier: ^23.0.0 - version: 23.0.0(rollup@4.0.0-24) + version: 23.0.0(rollup@5.0.0-2) '@types/node': - specifier: ^14.18.30 - version: 14.18.31 + specifier: ^20.19.0 + version: 20.19.23 '@types/resolve': specifier: ^1.20.2 version: 1.20.2 @@ -744,8 +744,8 @@ importers: specifier: ^0.20.0 version: 0.20.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 typescript: specifier: ^4.8.3 version: 4.8.4 @@ -6611,17 +6611,6 @@ snapshots: optionalDependencies: rollup: 5.0.0-2 - '@rollup/plugin-commonjs@23.0.0(rollup@4.0.0-24)': - dependencies: - '@rollup/pluginutils': 4.2.1 - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 8.1.0 - is-reference: 1.2.1 - magic-string: 0.26.7 - optionalDependencies: - rollup: 4.0.0-24 - '@rollup/plugin-commonjs@23.0.0(rollup@5.0.0-2)': dependencies: '@rollup/pluginutils': 4.2.1 From bdcb1233b1de67fec288a741681d8d536d768bd6 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:33:03 +0100 Subject: [PATCH 27/29] feat(url): support rollup 5 --- packages/url/package.json | 4 ++-- pnpm-lock.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/url/package.json b/packages/url/package.json index 2063fdb84..dc5e9e777 100644 --- a/packages/url/package.json +++ b/packages/url/package.json @@ -50,7 +50,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -65,7 +65,7 @@ "devDependencies": { "del": "^6.1.1", "globby": "^11.1.0", - "rollup": "^4.0.0-24" + "rollup": "catalog:rollup-next" }, "types": "./types/index.d.ts" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4cca5ed1a..dfa3e4d39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -754,7 +754,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.0.1 - version: 5.0.1(rollup@4.0.0-24) + version: 5.0.1(rollup@5.0.0-2) make-dir: specifier: ^3.1.0 version: 3.1.0 @@ -769,8 +769,8 @@ importers: specifier: ^11.1.0 version: 11.1.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 packages/virtual: devDependencies: From 3eaada264caadc2916b2791ce401ae95c9bef363 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Mon, 2 Nov 2026 10:35:02 +0100 Subject: [PATCH 28/29] feat(yaml): support rollup 5 --- packages/yaml/package.json | 4 ++-- pnpm-lock.yaml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/yaml/package.json b/packages/yaml/package.json index b7be7851e..6ded49a5f 100755 --- a/packages/yaml/package.json +++ b/packages/yaml/package.json @@ -50,7 +50,7 @@ "rollup-plugin" ], "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" + "rollup": "^2.78.0||^3.0.0||^4.0.0||^5.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -65,7 +65,7 @@ "devDependencies": { "@rollup/plugin-node-resolve": "^15.0.0", "del-cli": "^5.0.0", - "rollup": "^4.0.0-24", + "rollup": "catalog:rollup-next", "source-map-support": "^0.5.21" }, "types": "./types/index.d.ts" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dfa3e4d39..3c228c812 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -816,7 +816,7 @@ importers: dependencies: '@rollup/pluginutils': specifier: ^5.3.0 - version: 5.3.0(rollup@4.0.0-24) + version: 5.3.0(rollup@5.0.0-2) js-yaml: specifier: ^4.1.0 version: 4.1.0 @@ -826,13 +826,13 @@ importers: devDependencies: '@rollup/plugin-node-resolve': specifier: ^15.0.0 - version: 15.0.0(rollup@4.0.0-24) + version: 15.0.0(rollup@5.0.0-2) del-cli: specifier: ^5.0.0 version: 5.0.0 rollup: - specifier: ^4.0.0-24 - version: 4.0.0-24 + specifier: catalog:rollup-next + version: 5.0.0-2 source-map-support: specifier: ^0.5.21 version: 0.5.21 @@ -6731,13 +6731,13 @@ snapshots: optionalDependencies: rollup: 5.0.0-2 - '@rollup/pluginutils@5.3.0(rollup@4.0.0-24)': + '@rollup/pluginutils@5.3.0(rollup@5.0.0-2)': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.3 optionalDependencies: - rollup: 4.0.0-24 + rollup: 5.0.0-2 '@rollup/rollup-android-arm-eabi@4.0.0-24': optional: true From 00fbf144f46b5543f6ceb2dfb9f3ede17f72920c Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Tue, 3 Nov 2026 08:17:05 +0100 Subject: [PATCH 29/29] chore(repo): raise vitest test timeout for cold CI runners 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. --- .config/vitest.config.mts | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/vitest.config.mts b/.config/vitest.config.mts index 104645a1b..54c0f71f3 100644 --- a/.config/vitest.config.mts +++ b/.config/vitest.config.mts @@ -7,6 +7,7 @@ export default defineConfig({ test: { // Enable global APIs for CommonJS test files. globals: true, + testTimeout: 20_000, // Phase 1/2/3 packages use runtime-style, top-level test files, *.test, and a few named entrypoints. include: [ 'test/*.{js,mjs,cjs,ts,mts,cts}',