rollup 4.64.9 → 5.0.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +3 -304
- package/dist/ast-types.d.ts +896 -0
- package/dist/bin/rollup +21 -22
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +1817 -1952
- package/dist/es/shared/parseAst.js +3567 -235
- package/dist/es/shared/watch.js +1765 -9600
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +3 -3
- package/dist/native.js +3 -1
- package/dist/parseAst.d.ts +13 -1
- package/dist/parseAst.js +8 -2
- package/dist/rollup.android-arm-eabi.node +0 -0
- package/dist/rollup.android-arm64.node +0 -0
- package/dist/rollup.d.ts +157 -105
- package/dist/rollup.darwin-arm64.node +0 -0
- package/dist/rollup.darwin-x64.node +0 -0
- package/dist/rollup.freebsd-arm64.node +0 -0
- package/dist/rollup.freebsd-x64.node +0 -0
- package/dist/rollup.js +2 -3
- package/dist/rollup.linux-arm-gnueabihf.node +0 -0
- package/dist/rollup.linux-arm-musleabihf.node +0 -0
- package/dist/rollup.linux-arm64-gnu.node +0 -0
- package/dist/rollup.linux-arm64-musl.node +0 -0
- package/dist/rollup.linux-loong64-gnu.node +0 -0
- package/dist/rollup.linux-loong64-musl.node +0 -0
- package/dist/rollup.linux-ppc64-gnu.node +0 -0
- package/dist/rollup.linux-ppc64-musl.node +0 -0
- package/dist/rollup.linux-riscv64-gnu.node +0 -0
- package/dist/rollup.linux-riscv64-musl.node +0 -0
- package/dist/rollup.linux-s390x-gnu.node +0 -0
- package/dist/rollup.linux-x64-gnu.node +0 -0
- package/dist/rollup.linux-x64-musl.node +0 -0
- package/dist/rollup.openbsd-x64.node +0 -0
- package/dist/rollup.openharmony-arm64.node +0 -0
- package/dist/rollup.win32-arm64-msvc.node +0 -0
- package/dist/rollup.win32-ia32-msvc.node +0 -0
- package/dist/rollup.win32-x64-gnu.node +0 -0
- package/dist/rollup.win32-x64-msvc.node +0 -0
- package/dist/shared/index.js +1775 -9597
- package/dist/shared/loadConfigFile.js +9 -9
- package/dist/shared/node-entry.js +2 -4
- package/dist/shared/parseAst.js +3595 -253
- package/dist/shared/rollup.js +1670 -1783
- package/dist/shared/watch-cli.js +10 -9
- package/dist/shared/watch.js +7 -11
- package/package.json +61 -62
- package/dist/shared/fsevents-importer.js +0 -37
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js
|
|
4
|
-
|
|
3
|
+
Rollup.js v5.0.0-1
|
|
4
|
+
Sun, 18 Oct 2026 06:06:25 GMT - commit ed75a6895d5bc62fdbff91b9d48e22e6e281e3bc
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
12
|
const promises = require('node:fs/promises');
|
|
13
|
-
const
|
|
13
|
+
const sp = require('node:path');
|
|
14
14
|
const process$1 = require('node:process');
|
|
15
15
|
const node_url = require('node:url');
|
|
16
16
|
const rollup = require('./rollup.js');
|
|
@@ -384,11 +384,11 @@ async function loadAndRegisterPlugin(inputOptions, pluginText) {
|
|
|
384
384
|
if (!plugin) {
|
|
385
385
|
try {
|
|
386
386
|
if (pluginText[0] == '.')
|
|
387
|
-
pluginText =
|
|
387
|
+
pluginText = sp.resolve(pluginText);
|
|
388
388
|
// Windows absolute paths must be specified as file:// protocol URL
|
|
389
389
|
// Note that we do not have coverage for Windows-only code paths
|
|
390
390
|
else if (/^[A-Za-z]:\\/.test(pluginText)) {
|
|
391
|
-
pluginText = node_url.pathToFileURL(
|
|
391
|
+
pluginText = node_url.pathToFileURL(sp.resolve(pluginText)).href;
|
|
392
392
|
}
|
|
393
393
|
plugin = await requireOrImport(pluginText);
|
|
394
394
|
}
|
|
@@ -511,7 +511,7 @@ async function loadTranspiledConfigFile(fileName, commandOptions) {
|
|
|
511
511
|
inputOptions.plugins.push({
|
|
512
512
|
name: 'external-fallback',
|
|
513
513
|
resolveId: source => {
|
|
514
|
-
const looksLikeExternal = (source[0] !== '.' && !
|
|
514
|
+
const looksLikeExternal = (source[0] !== '.' && !sp.isAbsolute(source)) || source.slice(-5) === '.json';
|
|
515
515
|
return looksLikeExternal ? false : null;
|
|
516
516
|
}
|
|
517
517
|
});
|
|
@@ -531,10 +531,10 @@ async function loadTranspiledConfigFile(fileName, commandOptions) {
|
|
|
531
531
|
return `'${moduleId}'`;
|
|
532
532
|
}
|
|
533
533
|
if (property == 'dirname') {
|
|
534
|
-
return `'${
|
|
534
|
+
return `'${sp.dirname(moduleId)}'`;
|
|
535
535
|
}
|
|
536
536
|
if (property == null) {
|
|
537
|
-
return `{url:'${node_url.pathToFileURL(moduleId).href}', filename: '${moduleId}', dirname: '${
|
|
537
|
+
return `{url:'${node_url.pathToFileURL(moduleId).href}', filename: '${moduleId}', dirname: '${sp.dirname(moduleId)}'}`;
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
}
|
|
@@ -544,7 +544,7 @@ async function loadTranspiledConfigFile(fileName, commandOptions) {
|
|
|
544
544
|
rollup.stderr(rollup.bold(`loaded ${parseAst_js.relativeId(fileName)} with warnings`));
|
|
545
545
|
warnings.flush();
|
|
546
546
|
}
|
|
547
|
-
return loadConfigFromWrittenFile(
|
|
547
|
+
return loadConfigFromWrittenFile(sp.join(sp.dirname(fileName), `rollup.config-${Date.now()}.${bundleConfigAsCjs ? 'cjs' : 'mjs'}`), code);
|
|
548
548
|
}
|
|
549
549
|
async function loadConfigFromWrittenFile(bundledFileName, bundledCode) {
|
|
550
550
|
await promises.writeFile(bundledFileName, bundledCode);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js
|
|
4
|
-
|
|
3
|
+
Rollup.js v5.0.0-1
|
|
4
|
+
Sun, 18 Oct 2026 06:06:25 GMT - commit ed75a6895d5bc62fdbff91b9d48e22e6e281e3bc
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
const rollup = require('./rollup.js');
|
|
13
13
|
const parseAst_js = require('./parseAst.js');
|
|
14
|
-
const fseventsImporter = require('./fsevents-importer.js');
|
|
15
14
|
|
|
16
15
|
function waitForAllAndRethrowFirstFailure(promises) {
|
|
17
16
|
return Promise.allSettled(promises).then(results => {
|
|
@@ -131,7 +130,6 @@ async function watchInternal(configs, emitter, wasClosed) {
|
|
|
131
130
|
return parseAst_js.error(parseAst_js.logInvalidOption('watch', parseAst_js.URL_WATCH, 'there must be at least one config where "watch" is not set to "false"'));
|
|
132
131
|
}
|
|
133
132
|
checkWatchConfig(watchOptionsList);
|
|
134
|
-
await fseventsImporter.loadFsEvents();
|
|
135
133
|
const { Watcher } = await Promise.resolve().then(() => require('./watch.js'));
|
|
136
134
|
if (wasClosed()) {
|
|
137
135
|
return;
|