Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a2ded4e
chore(repo): define rollup-next catalog
lukastaegert Nov 2, 2026
1f1a110
feat(virtual): support rollup 5
lukastaegert Nov 2, 2026
a68704e
feat(alias): support rollup 5
lukastaegert Nov 2, 2026
5f5fceb
feat(auto-install): support rollup 5
lukastaegert Nov 2, 2026
2c05c9d
feat(beep): support rollup 5
lukastaegert Nov 2, 2026
c998a48
feat(buble): support rollup 5
lukastaegert Nov 2, 2026
76d10b8
feat(commonjs): support rollup 5
lukastaegert Nov 2, 2026
88e54a8
feat(data-uri): support rollup 5
lukastaegert Nov 2, 2026
9674f56
feat(dsv): support rollup 5
lukastaegert Nov 2, 2026
a005b93
feat(dynamic-import-vars): support rollup 5
lukastaegert Nov 2, 2026
0473973
feat(eslint): support rollup 5
lukastaegert Nov 2, 2026
afcbee5
feat(esm-shim): support rollup 5
lukastaegert Nov 2, 2026
dac5f89
feat(graphql): support rollup 5
lukastaegert Nov 2, 2026
d7c1e3c
feat(inject): support rollup 5
lukastaegert Nov 2, 2026
7eba938
feat(image): support rollup 5
lukastaegert Nov 2, 2026
e5e099b
feat(legacy): support rollup 5
lukastaegert Nov 2, 2026
28eadaf
feat(multi-entry): support rollup 5
lukastaegert Nov 2, 2026
3c57319
feat(node-resolve): support rollup 5
lukastaegert Nov 2, 2026
8777fee
feat(pluginutils): support rollup 5
lukastaegert Nov 2, 2026
a11f62a
feat(replace): support rollup 5
lukastaegert Nov 2, 2026
db1d39a
feat(run): support rollup 5
lukastaegert Nov 2, 2026
b919845
feat(strip): support rollup 5
lukastaegert Nov 2, 2026
4716d12
feat(sucrase): support rollup 5
lukastaegert Nov 2, 2026
e199e6f
feat(swc): support rollup 5
lukastaegert Nov 2, 2026
0dd512c
feat(terser): support rollup 5
lukastaegert Nov 2, 2026
c25a0cf
feat(typescript): support rollup 5
lukastaegert Nov 2, 2026
bdcb123
feat(url): support rollup 5
lukastaegert Nov 2, 2026
3eaada2
feat(yaml): support rollup 5
lukastaegert Nov 2, 2026
00fbf14
chore(repo): raise vitest test timeout for cold CI runners
lukastaegert Nov 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .config/vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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}',
Expand Down
4 changes: 2 additions & 2 deletions packages/alias/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"rollup-plugin"
],
"peerDependencies": {
"rollup": ">=4.0.0"
"rollup": "^4.0.0||^5.0.0"
},
"peerDependenciesMeta": {
"rollup": {
Expand All @@ -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",
Expand Down
40 changes: 36 additions & 4 deletions packages/alias/test/alias.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down Expand Up @@ -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']);
Expand Down
4 changes: 2 additions & 2 deletions packages/auto-install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions packages/auto-install/test/fixtures/pnpm-bare/.npmrc
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions packages/auto-install/test/fixtures/pnpm/.npmrc
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
15 changes: 14 additions & 1 deletion packages/auto-install/test/pnpm-bare.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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']);
}
});
17 changes: 15 additions & 2 deletions packages/auto-install/test/pnpm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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', '');
}
});
4 changes: 2 additions & 2 deletions packages/beep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
"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": {
"optional": true
}
},
"devDependencies": {
"rollup": "^4.0.0-24",
"rollup": "catalog:rollup-next",
"strip-ansi": "^7.0.1"
},
"types": "types/index.d.ts"
Expand Down
4 changes: 2 additions & 2 deletions packages/buble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/commonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Loading
Loading