rollup 4.51.0 → 4.52.0
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/dist/bin/rollup +2 -2
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +16 -9
- package/dist/es/shared/parseAst.js +2 -2
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/native.js +5 -1
- package/dist/parseAst.js +2 -2
- package/dist/rollup.d.ts +3 -0
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/parseAst.js +2 -2
- package/dist/shared/rollup.js +16 -9
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +24 -22
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.
|
|
5
|
-
Fri, 19 Sep 2025
|
|
4
|
+
Rollup.js v4.52.0
|
|
5
|
+
Fri, 19 Sep 2025 19:45:47 GMT - commit 2029f639f983289619538c60bc14eebc638c6926
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
8
8
|
|
package/dist/es/getLogFilter.js
CHANGED
package/dist/es/parseAst.js
CHANGED
package/dist/es/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
Fri, 19 Sep 2025
|
|
3
|
+
Rollup.js v4.52.0
|
|
4
|
+
Fri, 19 Sep 2025 19:45:47 GMT - commit 2029f639f983289619538c60bc14eebc638c6926
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ function _mergeNamespaces(n, m) {
|
|
|
27
27
|
return Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' });
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
var version = "4.
|
|
30
|
+
var version = "4.52.0";
|
|
31
31
|
|
|
32
32
|
// src/vlq.ts
|
|
33
33
|
var comma = ",".charCodeAt(0);
|
|
@@ -19406,8 +19406,8 @@ function* concatLazy(iterables) {
|
|
|
19406
19406
|
* those chunks that are already loaded for that dynamic entry and create
|
|
19407
19407
|
* another round of chunks.
|
|
19408
19408
|
*/
|
|
19409
|
-
function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log) {
|
|
19410
|
-
const { chunkDefinitions, modulesInManualChunks } = getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry);
|
|
19409
|
+
function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log, isManualChunksFunctionForm, onlyExplicitManualChunks) {
|
|
19410
|
+
const { chunkDefinitions, modulesInManualChunks } = getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry, isManualChunksFunctionForm, onlyExplicitManualChunks);
|
|
19411
19411
|
const { allEntries, dependentEntriesByModule, dynamicallyDependentEntriesByDynamicEntry, dynamicImportsByEntry, dynamicallyDependentEntriesByAwaitedDynamicEntry, awaitedDynamicImportsByEntry } = analyzeModuleGraph(entries);
|
|
19412
19412
|
// Each chunk is identified by its position in this array
|
|
19413
19413
|
const chunkAtoms = getChunksWithSameDependentEntries(getModulesWithDependentEntries(dependentEntriesByModule, modulesInManualChunks));
|
|
@@ -19425,11 +19425,16 @@ function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log
|
|
|
19425
19425
|
})));
|
|
19426
19426
|
return chunkDefinitions;
|
|
19427
19427
|
}
|
|
19428
|
-
function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry) {
|
|
19428
|
+
function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry, isManualChunksFunctionForm, onlyExplicitManualChunks) {
|
|
19429
19429
|
const modulesInManualChunks = new Set(manualChunkAliasByEntry.keys());
|
|
19430
19430
|
const manualChunkModulesByAlias = Object.create(null);
|
|
19431
19431
|
for (const [entry, alias] of manualChunkAliasByEntry) {
|
|
19432
|
-
|
|
19432
|
+
if (isManualChunksFunctionForm && onlyExplicitManualChunks) {
|
|
19433
|
+
(manualChunkModulesByAlias[alias] ||= []).push(entry);
|
|
19434
|
+
}
|
|
19435
|
+
else {
|
|
19436
|
+
addStaticDependenciesToManualChunk(entry, (manualChunkModulesByAlias[alias] ||= []), modulesInManualChunks);
|
|
19437
|
+
}
|
|
19433
19438
|
}
|
|
19434
19439
|
const manualChunks = Object.entries(manualChunkModulesByAlias);
|
|
19435
19440
|
const chunkDefinitions = new Array(manualChunks.length);
|
|
@@ -20627,7 +20632,7 @@ class Bundle {
|
|
|
20627
20632
|
this.pluginDriver.finaliseAssets();
|
|
20628
20633
|
}
|
|
20629
20634
|
async generateChunks(bundle, getHashPlaceholder) {
|
|
20630
|
-
const { experimentalMinChunkSize, inlineDynamicImports, manualChunks, preserveModules } = this.outputOptions;
|
|
20635
|
+
const { experimentalMinChunkSize, inlineDynamicImports, manualChunks, preserveModules, onlyExplicitManualChunks } = this.outputOptions;
|
|
20631
20636
|
const manualChunkAliasByEntry = typeof manualChunks === 'object'
|
|
20632
20637
|
? await this.addManualChunks(manualChunks)
|
|
20633
20638
|
: this.assignManualChunks(manualChunks);
|
|
@@ -20639,7 +20644,7 @@ class Bundle {
|
|
|
20639
20644
|
? [{ alias: null, modules: includedModules }]
|
|
20640
20645
|
: preserveModules
|
|
20641
20646
|
? includedModules.map(module => ({ alias: null, modules: [module] }))
|
|
20642
|
-
: getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog);
|
|
20647
|
+
: getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog, typeof manualChunks === 'function', onlyExplicitManualChunks);
|
|
20643
20648
|
const chunks = new Array(executableModule.length);
|
|
20644
20649
|
const chunkByModule = new Map();
|
|
20645
20650
|
let index = 0;
|
|
@@ -23064,6 +23069,7 @@ async function normalizeOutputOptions(config, inputOptions, unsetInputOptions) {
|
|
|
23064
23069
|
minifyInternalExports: getMinifyInternalExports(config, format, compact),
|
|
23065
23070
|
name: config.name,
|
|
23066
23071
|
noConflict: config.noConflict || false,
|
|
23072
|
+
onlyExplicitManualChunks: config.onlyExplicitManualChunks || false,
|
|
23067
23073
|
outro: getAddon(config, 'outro'),
|
|
23068
23074
|
paths: config.paths || {},
|
|
23069
23075
|
plugins: await normalizePluginOption(config.plugins),
|
|
@@ -23783,6 +23789,7 @@ async function mergeOutputOptions(config, overrides, log) {
|
|
|
23783
23789
|
minifyInternalExports: getOption('minifyInternalExports'),
|
|
23784
23790
|
name: getOption('name'),
|
|
23785
23791
|
noConflict: getOption('noConflict'),
|
|
23792
|
+
onlyExplicitManualChunks: getOption('onlyExplicitManualChunks'),
|
|
23786
23793
|
outro: getOption('outro'),
|
|
23787
23794
|
paths: getOption('paths'),
|
|
23788
23795
|
plugins: await normalizePluginOption(config.plugins),
|
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/native.js
CHANGED
|
@@ -32,7 +32,11 @@ const bindingsByPlatformAndArch = {
|
|
|
32
32
|
win32: {
|
|
33
33
|
arm64: { base: 'win32-arm64-msvc' },
|
|
34
34
|
ia32: { base: 'win32-ia32-msvc' },
|
|
35
|
-
x64: {
|
|
35
|
+
x64: {
|
|
36
|
+
base: report.getReport().header.osName.startsWith('MINGW32_NT')
|
|
37
|
+
? 'win32-x64-gnu'
|
|
38
|
+
: 'win32-x64-msvc'
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
41
|
};
|
|
38
42
|
|
package/dist/parseAst.js
CHANGED
package/dist/rollup.d.ts
CHANGED
|
@@ -818,6 +818,8 @@ export interface OutputOptions {
|
|
|
818
818
|
minifyInternalExports?: boolean | undefined;
|
|
819
819
|
name?: string | undefined;
|
|
820
820
|
noConflict?: boolean | undefined;
|
|
821
|
+
/** @deprecated This will be the new default in Rollup 5. */
|
|
822
|
+
onlyExplicitManualChunks?: boolean | undefined;
|
|
821
823
|
outro?: string | AddonFunction | undefined;
|
|
822
824
|
paths?: OptionsPaths | undefined;
|
|
823
825
|
plugins?: OutputPluginOption | undefined;
|
|
@@ -873,6 +875,7 @@ export interface NormalizedOutputOptions {
|
|
|
873
875
|
minifyInternalExports: boolean;
|
|
874
876
|
name: string | undefined;
|
|
875
877
|
noConflict: boolean;
|
|
878
|
+
onlyExplicitManualChunks: boolean;
|
|
876
879
|
outro: AddonFunction;
|
|
877
880
|
paths: OptionsPaths;
|
|
878
881
|
plugins: OutputPlugin[];
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/parseAst.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
Fri, 19 Sep 2025
|
|
3
|
+
Rollup.js v4.52.0
|
|
4
|
+
Fri, 19 Sep 2025 19:45:47 GMT - commit 2029f639f983289619538c60bc14eebc638c6926
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -42,7 +42,7 @@ function _mergeNamespaces(n, m) {
|
|
|
42
42
|
|
|
43
43
|
const promises__namespace = /*#__PURE__*/_interopNamespaceDefault(promises);
|
|
44
44
|
|
|
45
|
-
var version = "4.
|
|
45
|
+
var version = "4.52.0";
|
|
46
46
|
|
|
47
47
|
function ensureArray$1(items) {
|
|
48
48
|
if (Array.isArray(items)) {
|
|
@@ -3677,6 +3677,7 @@ async function mergeOutputOptions(config, overrides, log) {
|
|
|
3677
3677
|
minifyInternalExports: getOption('minifyInternalExports'),
|
|
3678
3678
|
name: getOption('name'),
|
|
3679
3679
|
noConflict: getOption('noConflict'),
|
|
3680
|
+
onlyExplicitManualChunks: getOption('onlyExplicitManualChunks'),
|
|
3680
3681
|
outro: getOption('outro'),
|
|
3681
3682
|
paths: getOption('paths'),
|
|
3682
3683
|
plugins: await normalizePluginOption(config.plugins),
|
|
@@ -20899,8 +20900,8 @@ function* concatLazy(iterables) {
|
|
|
20899
20900
|
* those chunks that are already loaded for that dynamic entry and create
|
|
20900
20901
|
* another round of chunks.
|
|
20901
20902
|
*/
|
|
20902
|
-
function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log) {
|
|
20903
|
-
const { chunkDefinitions, modulesInManualChunks } = getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry);
|
|
20903
|
+
function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log, isManualChunksFunctionForm, onlyExplicitManualChunks) {
|
|
20904
|
+
const { chunkDefinitions, modulesInManualChunks } = getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry, isManualChunksFunctionForm, onlyExplicitManualChunks);
|
|
20904
20905
|
const { allEntries, dependentEntriesByModule, dynamicallyDependentEntriesByDynamicEntry, dynamicImportsByEntry, dynamicallyDependentEntriesByAwaitedDynamicEntry, awaitedDynamicImportsByEntry } = analyzeModuleGraph(entries);
|
|
20905
20906
|
// Each chunk is identified by its position in this array
|
|
20906
20907
|
const chunkAtoms = getChunksWithSameDependentEntries(getModulesWithDependentEntries(dependentEntriesByModule, modulesInManualChunks));
|
|
@@ -20918,11 +20919,16 @@ function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log
|
|
|
20918
20919
|
})));
|
|
20919
20920
|
return chunkDefinitions;
|
|
20920
20921
|
}
|
|
20921
|
-
function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry) {
|
|
20922
|
+
function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry, isManualChunksFunctionForm, onlyExplicitManualChunks) {
|
|
20922
20923
|
const modulesInManualChunks = new Set(manualChunkAliasByEntry.keys());
|
|
20923
20924
|
const manualChunkModulesByAlias = Object.create(null);
|
|
20924
20925
|
for (const [entry, alias] of manualChunkAliasByEntry) {
|
|
20925
|
-
|
|
20926
|
+
if (isManualChunksFunctionForm && onlyExplicitManualChunks) {
|
|
20927
|
+
(manualChunkModulesByAlias[alias] ||= []).push(entry);
|
|
20928
|
+
}
|
|
20929
|
+
else {
|
|
20930
|
+
addStaticDependenciesToManualChunk(entry, (manualChunkModulesByAlias[alias] ||= []), modulesInManualChunks);
|
|
20931
|
+
}
|
|
20926
20932
|
}
|
|
20927
20933
|
const manualChunks = Object.entries(manualChunkModulesByAlias);
|
|
20928
20934
|
const chunkDefinitions = new Array(manualChunks.length);
|
|
@@ -22100,7 +22106,7 @@ class Bundle {
|
|
|
22100
22106
|
this.pluginDriver.finaliseAssets();
|
|
22101
22107
|
}
|
|
22102
22108
|
async generateChunks(bundle, getHashPlaceholder) {
|
|
22103
|
-
const { experimentalMinChunkSize, inlineDynamicImports, manualChunks, preserveModules } = this.outputOptions;
|
|
22109
|
+
const { experimentalMinChunkSize, inlineDynamicImports, manualChunks, preserveModules, onlyExplicitManualChunks } = this.outputOptions;
|
|
22104
22110
|
const manualChunkAliasByEntry = typeof manualChunks === 'object'
|
|
22105
22111
|
? await this.addManualChunks(manualChunks)
|
|
22106
22112
|
: this.assignManualChunks(manualChunks);
|
|
@@ -22112,7 +22118,7 @@ class Bundle {
|
|
|
22112
22118
|
? [{ alias: null, modules: includedModules }]
|
|
22113
22119
|
: preserveModules
|
|
22114
22120
|
? includedModules.map(module => ({ alias: null, modules: [module] }))
|
|
22115
|
-
: getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog);
|
|
22121
|
+
: getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog, typeof manualChunks === 'function', onlyExplicitManualChunks);
|
|
22116
22122
|
const chunks = new Array(executableModule.length);
|
|
22117
22123
|
const chunkByModule = new Map();
|
|
22118
22124
|
let index = 0;
|
|
@@ -23400,6 +23406,7 @@ async function normalizeOutputOptions(config, inputOptions, unsetInputOptions) {
|
|
|
23400
23406
|
minifyInternalExports: getMinifyInternalExports(config, format, compact),
|
|
23401
23407
|
name: config.name,
|
|
23402
23408
|
noConflict: config.noConflict || false,
|
|
23409
|
+
onlyExplicitManualChunks: config.onlyExplicitManualChunks || false,
|
|
23403
23410
|
outro: getAddon(config, 'outro'),
|
|
23404
23411
|
paths: config.paths || {},
|
|
23405
23412
|
plugins: await normalizePluginOption(config.plugins),
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.52.0",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"powerpc64le-unknown-linux-gnu",
|
|
29
29
|
"s390x-unknown-linux-gnu",
|
|
30
30
|
"x86_64-apple-darwin",
|
|
31
|
+
"x86_64-pc-windows-gnu",
|
|
31
32
|
"x86_64-pc-windows-msvc",
|
|
32
33
|
"x86_64-unknown-freebsd",
|
|
33
34
|
"x86_64-unknown-linux-gnu",
|
|
@@ -105,27 +106,28 @@
|
|
|
105
106
|
"homepage": "https://rollupjs.org/",
|
|
106
107
|
"optionalDependencies": {
|
|
107
108
|
"fsevents": "~2.3.2",
|
|
108
|
-
"@rollup/rollup-darwin-arm64": "4.
|
|
109
|
-
"@rollup/rollup-android-arm64": "4.
|
|
110
|
-
"@rollup/rollup-win32-arm64-msvc": "4.
|
|
111
|
-
"@rollup/rollup-freebsd-arm64": "4.
|
|
112
|
-
"@rollup/rollup-linux-arm64-gnu": "4.
|
|
113
|
-
"@rollup/rollup-linux-arm64-musl": "4.
|
|
114
|
-
"@rollup/rollup-android-arm-eabi": "4.
|
|
115
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.
|
|
116
|
-
"@rollup/rollup-linux-arm-musleabihf": "4.
|
|
117
|
-
"@rollup/rollup-win32-ia32-msvc": "4.
|
|
118
|
-
"@rollup/rollup-linux-loong64-gnu": "4.
|
|
119
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.
|
|
120
|
-
"@rollup/rollup-linux-riscv64-musl": "4.
|
|
121
|
-
"@rollup/rollup-linux-ppc64-gnu": "4.
|
|
122
|
-
"@rollup/rollup-linux-s390x-gnu": "4.
|
|
123
|
-
"@rollup/rollup-darwin-x64": "4.
|
|
124
|
-
"@rollup/rollup-win32-x64-
|
|
125
|
-
"@rollup/rollup-
|
|
126
|
-
"@rollup/rollup-
|
|
127
|
-
"@rollup/rollup-linux-x64-
|
|
128
|
-
"@rollup/rollup-
|
|
109
|
+
"@rollup/rollup-darwin-arm64": "4.52.0",
|
|
110
|
+
"@rollup/rollup-android-arm64": "4.52.0",
|
|
111
|
+
"@rollup/rollup-win32-arm64-msvc": "4.52.0",
|
|
112
|
+
"@rollup/rollup-freebsd-arm64": "4.52.0",
|
|
113
|
+
"@rollup/rollup-linux-arm64-gnu": "4.52.0",
|
|
114
|
+
"@rollup/rollup-linux-arm64-musl": "4.52.0",
|
|
115
|
+
"@rollup/rollup-android-arm-eabi": "4.52.0",
|
|
116
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.52.0",
|
|
117
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.52.0",
|
|
118
|
+
"@rollup/rollup-win32-ia32-msvc": "4.52.0",
|
|
119
|
+
"@rollup/rollup-linux-loong64-gnu": "4.52.0",
|
|
120
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.52.0",
|
|
121
|
+
"@rollup/rollup-linux-riscv64-musl": "4.52.0",
|
|
122
|
+
"@rollup/rollup-linux-ppc64-gnu": "4.52.0",
|
|
123
|
+
"@rollup/rollup-linux-s390x-gnu": "4.52.0",
|
|
124
|
+
"@rollup/rollup-darwin-x64": "4.52.0",
|
|
125
|
+
"@rollup/rollup-win32-x64-gnu": "4.52.0",
|
|
126
|
+
"@rollup/rollup-win32-x64-msvc": "4.52.0",
|
|
127
|
+
"@rollup/rollup-freebsd-x64": "4.52.0",
|
|
128
|
+
"@rollup/rollup-linux-x64-gnu": "4.52.0",
|
|
129
|
+
"@rollup/rollup-linux-x64-musl": "4.52.0",
|
|
130
|
+
"@rollup/rollup-openharmony-arm64": "4.52.0"
|
|
129
131
|
},
|
|
130
132
|
"dependencies": {
|
|
131
133
|
"@types/estree": "1.0.8"
|