rollup 4.24.1 → 4.24.3
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 +45 -31
- package/dist/es/shared/parseAst.js +6 -6
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/parseAst.js +2 -2
- 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 +6 -6
- package/dist/shared/rollup.js +45 -31
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +19 -19
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.24.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.24.3
|
|
5
|
+
Tue, 29 Oct 2024 14:13:34 GMT - commit 69353a84d70294ecfcd5e1ab8e372e21e94c9f8e
|
|
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.24.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.24.3
|
|
4
|
+
Tue, 29 Oct 2024 14:13:34 GMT - commit 69353a84d70294ecfcd5e1ab8e372e21e94c9f8e
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ import { performance } from 'node:perf_hooks';
|
|
|
16
16
|
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version = "4.24.
|
|
19
|
+
var version = "4.24.3";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -2934,11 +2934,13 @@ class NodeBase extends ExpressionEntity {
|
|
|
2934
2934
|
this[key] = value;
|
|
2935
2935
|
}
|
|
2936
2936
|
else if (Array.isArray(value)) {
|
|
2937
|
-
this[key] =
|
|
2937
|
+
this[key] = new Array(value.length);
|
|
2938
|
+
let index = 0;
|
|
2938
2939
|
for (const child of value) {
|
|
2939
|
-
this[key]
|
|
2940
|
-
|
|
2941
|
-
|
|
2940
|
+
this[key][index++] =
|
|
2941
|
+
child === null
|
|
2942
|
+
? null
|
|
2943
|
+
: new (this.scope.context.getNodeConstructor(child.type))(this, this.scope).parseNode(child);
|
|
2942
2944
|
}
|
|
2943
2945
|
}
|
|
2944
2946
|
else {
|
|
@@ -8081,14 +8083,16 @@ function getImportBlock(dependencies, importAttributesKey, { _ }) {
|
|
|
8081
8083
|
}
|
|
8082
8084
|
function getExportBlock(exports, { _, cnst }) {
|
|
8083
8085
|
const exportBlock = [];
|
|
8084
|
-
const exportDeclaration =
|
|
8086
|
+
const exportDeclaration = new Array(exports.length);
|
|
8087
|
+
let index = 0;
|
|
8085
8088
|
for (const specifier of exports) {
|
|
8086
8089
|
if (specifier.expression) {
|
|
8087
8090
|
exportBlock.push(`${cnst} ${specifier.local}${_}=${_}${specifier.expression};`);
|
|
8088
8091
|
}
|
|
8089
|
-
exportDeclaration
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
+
exportDeclaration[index++] =
|
|
8093
|
+
specifier.exported === specifier.local
|
|
8094
|
+
? specifier.local
|
|
8095
|
+
: `${specifier.local} as ${stringifyIdentifierIfNeeded(specifier.exported)}`;
|
|
8092
8096
|
}
|
|
8093
8097
|
if (exportDeclaration.length > 0) {
|
|
8094
8098
|
exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
|
|
@@ -11409,9 +11413,10 @@ class ClassBody extends NodeBase {
|
|
|
11409
11413
|
}
|
|
11410
11414
|
}
|
|
11411
11415
|
parseNode(esTreeNode) {
|
|
11412
|
-
const body = (this.body =
|
|
11416
|
+
const body = (this.body = new Array(esTreeNode.body.length));
|
|
11417
|
+
let index = 0;
|
|
11413
11418
|
for (const definition of esTreeNode.body) {
|
|
11414
|
-
body
|
|
11419
|
+
body[index++] = new (this.scope.context.getNodeConstructor(definition.type))(this, definition.static ? this.scope : this.scope.instanceScope).parseNode(definition);
|
|
11415
11420
|
}
|
|
11416
11421
|
return super.parseNode(esTreeNode);
|
|
11417
11422
|
}
|
|
@@ -14474,14 +14479,17 @@ const bufferParsers = [
|
|
|
14474
14479
|
function classBody(node, position, buffer) {
|
|
14475
14480
|
const { scope } = node;
|
|
14476
14481
|
const bodyPosition = buffer[position];
|
|
14477
|
-
const body = (node.body = []);
|
|
14478
14482
|
if (bodyPosition) {
|
|
14479
14483
|
const length = buffer[bodyPosition];
|
|
14484
|
+
const body = (node.body = new Array(length));
|
|
14480
14485
|
for (let index = 0; index < length; index++) {
|
|
14481
14486
|
const nodePosition = buffer[bodyPosition + 1 + index];
|
|
14482
|
-
body
|
|
14487
|
+
body[index] = convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer);
|
|
14483
14488
|
}
|
|
14484
14489
|
}
|
|
14490
|
+
else {
|
|
14491
|
+
node.body = [];
|
|
14492
|
+
}
|
|
14485
14493
|
},
|
|
14486
14494
|
function classDeclaration(node, position, buffer) {
|
|
14487
14495
|
const { scope } = node;
|
|
@@ -14959,10 +14967,10 @@ function convertNodeList(parent, parentScope, position, buffer) {
|
|
|
14959
14967
|
if (position === 0)
|
|
14960
14968
|
return EMPTY_ARRAY;
|
|
14961
14969
|
const length = buffer[position++];
|
|
14962
|
-
const list =
|
|
14970
|
+
const list = new Array(length);
|
|
14963
14971
|
for (let index = 0; index < length; index++) {
|
|
14964
14972
|
const nodePosition = buffer[position++];
|
|
14965
|
-
list
|
|
14973
|
+
list[index] = nodePosition ? convertNode(parent, parentScope, nodePosition, buffer) : null;
|
|
14966
14974
|
}
|
|
14967
14975
|
return list;
|
|
14968
14976
|
}
|
|
@@ -17955,14 +17963,16 @@ function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log
|
|
|
17955
17963
|
return chunkDefinitions;
|
|
17956
17964
|
}
|
|
17957
17965
|
function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry) {
|
|
17958
|
-
const chunkDefinitions = [];
|
|
17959
17966
|
const modulesInManualChunks = new Set(manualChunkAliasByEntry.keys());
|
|
17960
17967
|
const manualChunkModulesByAlias = Object.create(null);
|
|
17961
17968
|
for (const [entry, alias] of manualChunkAliasByEntry) {
|
|
17962
17969
|
addStaticDependenciesToManualChunk(entry, (manualChunkModulesByAlias[alias] ||= []), modulesInManualChunks);
|
|
17963
17970
|
}
|
|
17964
|
-
|
|
17965
|
-
|
|
17971
|
+
const manualChunks = Object.entries(manualChunkModulesByAlias);
|
|
17972
|
+
const chunkDefinitions = new Array(manualChunks.length);
|
|
17973
|
+
let index = 0;
|
|
17974
|
+
for (const [alias, modules] of manualChunks) {
|
|
17975
|
+
chunkDefinitions[index++] = { alias, modules };
|
|
17966
17976
|
}
|
|
17967
17977
|
return { chunkDefinitions, modulesInManualChunks };
|
|
17968
17978
|
}
|
|
@@ -17981,12 +17991,12 @@ function addStaticDependenciesToManualChunk(entry, manualChunkModules, modulesIn
|
|
|
17981
17991
|
function analyzeModuleGraph(entries) {
|
|
17982
17992
|
const dynamicEntryModules = new Set();
|
|
17983
17993
|
const dependentEntriesByModule = new Map();
|
|
17984
|
-
const dynamicImportModulesByEntry = [];
|
|
17985
17994
|
const allEntriesSet = new Set(entries);
|
|
17995
|
+
const dynamicImportModulesByEntry = new Array(allEntriesSet.size);
|
|
17986
17996
|
let entryIndex = 0;
|
|
17987
17997
|
for (const currentEntry of allEntriesSet) {
|
|
17988
17998
|
const dynamicImportsForCurrentEntry = new Set();
|
|
17989
|
-
dynamicImportModulesByEntry
|
|
17999
|
+
dynamicImportModulesByEntry[entryIndex] = dynamicImportsForCurrentEntry;
|
|
17990
18000
|
const modulesToHandle = new Set([currentEntry]);
|
|
17991
18001
|
for (const module of modulesToHandle) {
|
|
17992
18002
|
getOrCreate(dependentEntriesByModule, module, (getNewSet)).add(entryIndex);
|
|
@@ -18031,13 +18041,14 @@ function getDynamicEntries(allEntries, dynamicEntryModules, dynamicImportModules
|
|
|
18031
18041
|
dynamicEntries.add(entryIndex);
|
|
18032
18042
|
}
|
|
18033
18043
|
}
|
|
18034
|
-
const dynamicImportsByEntry =
|
|
18044
|
+
const dynamicImportsByEntry = new Array(dynamicImportModulesByEntry.length);
|
|
18045
|
+
let index = 0;
|
|
18035
18046
|
for (const dynamicImportModules of dynamicImportModulesByEntry) {
|
|
18036
18047
|
const dynamicImports = new Set();
|
|
18037
18048
|
for (const dynamicEntry of dynamicImportModules) {
|
|
18038
18049
|
dynamicImports.add(entryIndexByModule.get(dynamicEntry));
|
|
18039
18050
|
}
|
|
18040
|
-
dynamicImportsByEntry
|
|
18051
|
+
dynamicImportsByEntry[index++] = dynamicImports;
|
|
18041
18052
|
}
|
|
18042
18053
|
return { dynamicEntries, dynamicImportsByEntry };
|
|
18043
18054
|
}
|
|
@@ -18142,9 +18153,10 @@ function removeUnnecessaryDependentEntries(chunkAtoms, alreadyLoadedAtomsByEntry
|
|
|
18142
18153
|
function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize) {
|
|
18143
18154
|
const chunksBySignature = Object.create(null);
|
|
18144
18155
|
const chunkByModule = new Map();
|
|
18145
|
-
const sizeByAtom =
|
|
18156
|
+
const sizeByAtom = new Array(chunkAtoms.length);
|
|
18146
18157
|
let sideEffectAtoms = 0n;
|
|
18147
18158
|
let atomMask = 1n;
|
|
18159
|
+
let index = 0;
|
|
18148
18160
|
for (const { dependentEntries, modules } of chunkAtoms) {
|
|
18149
18161
|
let chunkSignature = 0n;
|
|
18150
18162
|
let correlatedAtoms = -1n;
|
|
@@ -18182,7 +18194,7 @@ function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticD
|
|
|
18182
18194
|
if (!pure) {
|
|
18183
18195
|
sideEffectAtoms |= atomMask;
|
|
18184
18196
|
}
|
|
18185
|
-
sizeByAtom
|
|
18197
|
+
sizeByAtom[index++] = atomSize;
|
|
18186
18198
|
chunk.containedAtoms |= atomMask;
|
|
18187
18199
|
chunk.modules.push(...modules);
|
|
18188
18200
|
chunk.pure &&= pure;
|
|
@@ -19098,16 +19110,18 @@ class Bundle {
|
|
|
19098
19110
|
const includedModules = getIncludedModules(this.graph.modulesById);
|
|
19099
19111
|
const inputBase = commondir(getAbsoluteEntryModulePaths(includedModules, preserveModules));
|
|
19100
19112
|
const externalChunkByModule = getExternalChunkByModule(this.graph.modulesById, this.outputOptions, inputBase);
|
|
19101
|
-
const
|
|
19102
|
-
const chunkByModule = new Map();
|
|
19103
|
-
for (const { alias, modules } of inlineDynamicImports
|
|
19113
|
+
const executableModule = inlineDynamicImports
|
|
19104
19114
|
? [{ alias: null, modules: includedModules }]
|
|
19105
19115
|
: preserveModules
|
|
19106
19116
|
? includedModules.map(module => ({ alias: null, modules: [module] }))
|
|
19107
|
-
: getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog)
|
|
19117
|
+
: getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog);
|
|
19118
|
+
const chunks = new Array(executableModule.length);
|
|
19119
|
+
const chunkByModule = new Map();
|
|
19120
|
+
let index = 0;
|
|
19121
|
+
for (const { alias, modules } of executableModule) {
|
|
19108
19122
|
sortByExecutionOrder(modules);
|
|
19109
19123
|
const chunk = new Chunk(modules, this.inputOptions, this.outputOptions, this.unsetOptions, this.pluginDriver, this.graph.modulesById, chunkByModule, externalChunkByModule, this.facadeChunkByModule, this.includedNamespaces, alias, getHashPlaceholder, bundle, inputBase, snippets);
|
|
19110
|
-
chunks
|
|
19124
|
+
chunks[index++] = chunk;
|
|
19111
19125
|
}
|
|
19112
19126
|
for (const chunk of chunks) {
|
|
19113
19127
|
chunk.link();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.24.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.24.3
|
|
4
|
+
Tue, 29 Oct 2024 14:13:34 GMT - commit 69353a84d70294ecfcd5e1ab8e372e21e94c9f8e
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -112,9 +112,9 @@ const convertAnnotations = (position, buffer) => {
|
|
|
112
112
|
if (position === 0)
|
|
113
113
|
return EMPTY_ARRAY;
|
|
114
114
|
const length = buffer[position++];
|
|
115
|
-
const list =
|
|
115
|
+
const list = new Array(length);
|
|
116
116
|
for (let index = 0; index < length; index++) {
|
|
117
|
-
list
|
|
117
|
+
list[index] = convertAnnotation(buffer[position++], buffer);
|
|
118
118
|
}
|
|
119
119
|
return list;
|
|
120
120
|
};
|
|
@@ -2036,10 +2036,10 @@ function convertNodeList(position, buffer) {
|
|
|
2036
2036
|
if (position === 0)
|
|
2037
2037
|
return EMPTY_ARRAY;
|
|
2038
2038
|
const length = buffer[position++];
|
|
2039
|
-
const list =
|
|
2039
|
+
const list = new Array(length);
|
|
2040
2040
|
for (let index = 0; index < length; index++) {
|
|
2041
2041
|
const nodePosition = buffer[position++];
|
|
2042
|
-
list
|
|
2042
|
+
list[index] = nodePosition ? convertNode(nodePosition, buffer) : null;
|
|
2043
2043
|
}
|
|
2044
2044
|
return list;
|
|
2045
2045
|
}
|
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/parseAst.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/parseAst.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.24.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.24.3
|
|
4
|
+
Tue, 29 Oct 2024 14:13:34 GMT - commit 69353a84d70294ecfcd5e1ab8e372e21e94c9f8e
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -1121,9 +1121,9 @@ const convertAnnotations = (position, buffer) => {
|
|
|
1121
1121
|
if (position === 0)
|
|
1122
1122
|
return EMPTY_ARRAY;
|
|
1123
1123
|
const length = buffer[position++];
|
|
1124
|
-
const list =
|
|
1124
|
+
const list = new Array(length);
|
|
1125
1125
|
for (let index = 0; index < length; index++) {
|
|
1126
|
-
list
|
|
1126
|
+
list[index] = convertAnnotation(buffer[position++], buffer);
|
|
1127
1127
|
}
|
|
1128
1128
|
return list;
|
|
1129
1129
|
};
|
|
@@ -2099,10 +2099,10 @@ function convertNodeList(position, buffer) {
|
|
|
2099
2099
|
if (position === 0)
|
|
2100
2100
|
return EMPTY_ARRAY;
|
|
2101
2101
|
const length = buffer[position++];
|
|
2102
|
-
const list =
|
|
2102
|
+
const list = new Array(length);
|
|
2103
2103
|
for (let index = 0; index < length; index++) {
|
|
2104
2104
|
const nodePosition = buffer[position++];
|
|
2105
|
-
list
|
|
2105
|
+
list[index] = nodePosition ? convertNode(nodePosition, buffer) : null;
|
|
2106
2106
|
}
|
|
2107
2107
|
return list;
|
|
2108
2108
|
}
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.24.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.24.3
|
|
4
|
+
Tue, 29 Oct 2024 14:13:34 GMT - commit 69353a84d70294ecfcd5e1ab8e372e21e94c9f8e
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
|
|
32
32
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
33
33
|
|
|
34
|
-
var version = "4.24.
|
|
34
|
+
var version = "4.24.3";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -4488,11 +4488,13 @@ class NodeBase extends ExpressionEntity {
|
|
|
4488
4488
|
this[key] = value;
|
|
4489
4489
|
}
|
|
4490
4490
|
else if (Array.isArray(value)) {
|
|
4491
|
-
this[key] =
|
|
4491
|
+
this[key] = new Array(value.length);
|
|
4492
|
+
let index = 0;
|
|
4492
4493
|
for (const child of value) {
|
|
4493
|
-
this[key]
|
|
4494
|
-
|
|
4495
|
-
|
|
4494
|
+
this[key][index++] =
|
|
4495
|
+
child === null
|
|
4496
|
+
? null
|
|
4497
|
+
: new (this.scope.context.getNodeConstructor(child.type))(this, this.scope).parseNode(child);
|
|
4496
4498
|
}
|
|
4497
4499
|
}
|
|
4498
4500
|
else {
|
|
@@ -9623,14 +9625,16 @@ function getImportBlock(dependencies, importAttributesKey, { _ }) {
|
|
|
9623
9625
|
}
|
|
9624
9626
|
function getExportBlock(exports, { _, cnst }) {
|
|
9625
9627
|
const exportBlock = [];
|
|
9626
|
-
const exportDeclaration =
|
|
9628
|
+
const exportDeclaration = new Array(exports.length);
|
|
9629
|
+
let index = 0;
|
|
9627
9630
|
for (const specifier of exports) {
|
|
9628
9631
|
if (specifier.expression) {
|
|
9629
9632
|
exportBlock.push(`${cnst} ${specifier.local}${_}=${_}${specifier.expression};`);
|
|
9630
9633
|
}
|
|
9631
|
-
exportDeclaration
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
+
exportDeclaration[index++] =
|
|
9635
|
+
specifier.exported === specifier.local
|
|
9636
|
+
? specifier.local
|
|
9637
|
+
: `${specifier.local} as ${stringifyIdentifierIfNeeded(specifier.exported)}`;
|
|
9634
9638
|
}
|
|
9635
9639
|
if (exportDeclaration.length > 0) {
|
|
9636
9640
|
exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
|
|
@@ -12951,9 +12955,10 @@ class ClassBody extends NodeBase {
|
|
|
12951
12955
|
}
|
|
12952
12956
|
}
|
|
12953
12957
|
parseNode(esTreeNode) {
|
|
12954
|
-
const body = (this.body =
|
|
12958
|
+
const body = (this.body = new Array(esTreeNode.body.length));
|
|
12959
|
+
let index = 0;
|
|
12955
12960
|
for (const definition of esTreeNode.body) {
|
|
12956
|
-
body
|
|
12961
|
+
body[index++] = new (this.scope.context.getNodeConstructor(definition.type))(this, definition.static ? this.scope : this.scope.instanceScope).parseNode(definition);
|
|
12957
12962
|
}
|
|
12958
12963
|
return super.parseNode(esTreeNode);
|
|
12959
12964
|
}
|
|
@@ -16016,14 +16021,17 @@ const bufferParsers = [
|
|
|
16016
16021
|
function classBody(node, position, buffer) {
|
|
16017
16022
|
const { scope } = node;
|
|
16018
16023
|
const bodyPosition = buffer[position];
|
|
16019
|
-
const body = (node.body = []);
|
|
16020
16024
|
if (bodyPosition) {
|
|
16021
16025
|
const length = buffer[bodyPosition];
|
|
16026
|
+
const body = (node.body = new Array(length));
|
|
16022
16027
|
for (let index = 0; index < length; index++) {
|
|
16023
16028
|
const nodePosition = buffer[bodyPosition + 1 + index];
|
|
16024
|
-
body
|
|
16029
|
+
body[index] = convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer);
|
|
16025
16030
|
}
|
|
16026
16031
|
}
|
|
16032
|
+
else {
|
|
16033
|
+
node.body = [];
|
|
16034
|
+
}
|
|
16027
16035
|
},
|
|
16028
16036
|
function classDeclaration(node, position, buffer) {
|
|
16029
16037
|
const { scope } = node;
|
|
@@ -16501,10 +16509,10 @@ function convertNodeList(parent, parentScope, position, buffer) {
|
|
|
16501
16509
|
if (position === 0)
|
|
16502
16510
|
return parseAst_js.EMPTY_ARRAY;
|
|
16503
16511
|
const length = buffer[position++];
|
|
16504
|
-
const list =
|
|
16512
|
+
const list = new Array(length);
|
|
16505
16513
|
for (let index = 0; index < length; index++) {
|
|
16506
16514
|
const nodePosition = buffer[position++];
|
|
16507
|
-
list
|
|
16515
|
+
list[index] = nodePosition ? convertNode(parent, parentScope, nodePosition, buffer) : null;
|
|
16508
16516
|
}
|
|
16509
16517
|
return list;
|
|
16510
16518
|
}
|
|
@@ -19381,14 +19389,16 @@ function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log
|
|
|
19381
19389
|
return chunkDefinitions;
|
|
19382
19390
|
}
|
|
19383
19391
|
function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry) {
|
|
19384
|
-
const chunkDefinitions = [];
|
|
19385
19392
|
const modulesInManualChunks = new Set(manualChunkAliasByEntry.keys());
|
|
19386
19393
|
const manualChunkModulesByAlias = Object.create(null);
|
|
19387
19394
|
for (const [entry, alias] of manualChunkAliasByEntry) {
|
|
19388
19395
|
addStaticDependenciesToManualChunk(entry, (manualChunkModulesByAlias[alias] ||= []), modulesInManualChunks);
|
|
19389
19396
|
}
|
|
19390
|
-
|
|
19391
|
-
|
|
19397
|
+
const manualChunks = Object.entries(manualChunkModulesByAlias);
|
|
19398
|
+
const chunkDefinitions = new Array(manualChunks.length);
|
|
19399
|
+
let index = 0;
|
|
19400
|
+
for (const [alias, modules] of manualChunks) {
|
|
19401
|
+
chunkDefinitions[index++] = { alias, modules };
|
|
19392
19402
|
}
|
|
19393
19403
|
return { chunkDefinitions, modulesInManualChunks };
|
|
19394
19404
|
}
|
|
@@ -19407,12 +19417,12 @@ function addStaticDependenciesToManualChunk(entry, manualChunkModules, modulesIn
|
|
|
19407
19417
|
function analyzeModuleGraph(entries) {
|
|
19408
19418
|
const dynamicEntryModules = new Set();
|
|
19409
19419
|
const dependentEntriesByModule = new Map();
|
|
19410
|
-
const dynamicImportModulesByEntry = [];
|
|
19411
19420
|
const allEntriesSet = new Set(entries);
|
|
19421
|
+
const dynamicImportModulesByEntry = new Array(allEntriesSet.size);
|
|
19412
19422
|
let entryIndex = 0;
|
|
19413
19423
|
for (const currentEntry of allEntriesSet) {
|
|
19414
19424
|
const dynamicImportsForCurrentEntry = new Set();
|
|
19415
|
-
dynamicImportModulesByEntry
|
|
19425
|
+
dynamicImportModulesByEntry[entryIndex] = dynamicImportsForCurrentEntry;
|
|
19416
19426
|
const modulesToHandle = new Set([currentEntry]);
|
|
19417
19427
|
for (const module of modulesToHandle) {
|
|
19418
19428
|
getOrCreate(dependentEntriesByModule, module, (getNewSet)).add(entryIndex);
|
|
@@ -19457,13 +19467,14 @@ function getDynamicEntries(allEntries, dynamicEntryModules, dynamicImportModules
|
|
|
19457
19467
|
dynamicEntries.add(entryIndex);
|
|
19458
19468
|
}
|
|
19459
19469
|
}
|
|
19460
|
-
const dynamicImportsByEntry =
|
|
19470
|
+
const dynamicImportsByEntry = new Array(dynamicImportModulesByEntry.length);
|
|
19471
|
+
let index = 0;
|
|
19461
19472
|
for (const dynamicImportModules of dynamicImportModulesByEntry) {
|
|
19462
19473
|
const dynamicImports = new Set();
|
|
19463
19474
|
for (const dynamicEntry of dynamicImportModules) {
|
|
19464
19475
|
dynamicImports.add(entryIndexByModule.get(dynamicEntry));
|
|
19465
19476
|
}
|
|
19466
|
-
dynamicImportsByEntry
|
|
19477
|
+
dynamicImportsByEntry[index++] = dynamicImports;
|
|
19467
19478
|
}
|
|
19468
19479
|
return { dynamicEntries, dynamicImportsByEntry };
|
|
19469
19480
|
}
|
|
@@ -19568,9 +19579,10 @@ function removeUnnecessaryDependentEntries(chunkAtoms, alreadyLoadedAtomsByEntry
|
|
|
19568
19579
|
function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize) {
|
|
19569
19580
|
const chunksBySignature = Object.create(null);
|
|
19570
19581
|
const chunkByModule = new Map();
|
|
19571
|
-
const sizeByAtom =
|
|
19582
|
+
const sizeByAtom = new Array(chunkAtoms.length);
|
|
19572
19583
|
let sideEffectAtoms = 0n;
|
|
19573
19584
|
let atomMask = 1n;
|
|
19585
|
+
let index = 0;
|
|
19574
19586
|
for (const { dependentEntries, modules } of chunkAtoms) {
|
|
19575
19587
|
let chunkSignature = 0n;
|
|
19576
19588
|
let correlatedAtoms = -1n;
|
|
@@ -19608,7 +19620,7 @@ function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticD
|
|
|
19608
19620
|
if (!pure) {
|
|
19609
19621
|
sideEffectAtoms |= atomMask;
|
|
19610
19622
|
}
|
|
19611
|
-
sizeByAtom
|
|
19623
|
+
sizeByAtom[index++] = atomSize;
|
|
19612
19624
|
chunk.containedAtoms |= atomMask;
|
|
19613
19625
|
chunk.modules.push(...modules);
|
|
19614
19626
|
chunk.pure &&= pure;
|
|
@@ -20504,16 +20516,18 @@ class Bundle {
|
|
|
20504
20516
|
const includedModules = getIncludedModules(this.graph.modulesById);
|
|
20505
20517
|
const inputBase = commondir(getAbsoluteEntryModulePaths(includedModules, preserveModules));
|
|
20506
20518
|
const externalChunkByModule = getExternalChunkByModule(this.graph.modulesById, this.outputOptions, inputBase);
|
|
20507
|
-
const
|
|
20508
|
-
const chunkByModule = new Map();
|
|
20509
|
-
for (const { alias, modules } of inlineDynamicImports
|
|
20519
|
+
const executableModule = inlineDynamicImports
|
|
20510
20520
|
? [{ alias: null, modules: includedModules }]
|
|
20511
20521
|
: preserveModules
|
|
20512
20522
|
? includedModules.map(module => ({ alias: null, modules: [module] }))
|
|
20513
|
-
: getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog)
|
|
20523
|
+
: getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog);
|
|
20524
|
+
const chunks = new Array(executableModule.length);
|
|
20525
|
+
const chunkByModule = new Map();
|
|
20526
|
+
let index = 0;
|
|
20527
|
+
for (const { alias, modules } of executableModule) {
|
|
20514
20528
|
sortByExecutionOrder(modules);
|
|
20515
20529
|
const chunk = new Chunk(modules, this.inputOptions, this.outputOptions, this.unsetOptions, this.pluginDriver, this.graph.modulesById, chunkByModule, externalChunkByModule, this.facadeChunkByModule, this.includedNamespaces, alias, getHashPlaceholder, bundle, inputBase, snippets);
|
|
20516
|
-
chunks
|
|
20530
|
+
chunks[index++] = chunk;
|
|
20517
20531
|
}
|
|
20518
20532
|
for (const chunk of chunks) {
|
|
20519
20533
|
chunk.link();
|
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.24.
|
|
3
|
+
"version": "4.24.3",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -109,24 +109,24 @@
|
|
|
109
109
|
"homepage": "https://rollupjs.org/",
|
|
110
110
|
"optionalDependencies": {
|
|
111
111
|
"fsevents": "~2.3.2",
|
|
112
|
-
"@rollup/rollup-darwin-arm64": "4.24.
|
|
113
|
-
"@rollup/rollup-android-arm64": "4.24.
|
|
114
|
-
"@rollup/rollup-win32-arm64-msvc": "4.24.
|
|
115
|
-
"@rollup/rollup-freebsd-arm64": "4.24.
|
|
116
|
-
"@rollup/rollup-linux-arm64-gnu": "4.24.
|
|
117
|
-
"@rollup/rollup-linux-arm64-musl": "4.24.
|
|
118
|
-
"@rollup/rollup-android-arm-eabi": "4.24.
|
|
119
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.24.
|
|
120
|
-
"@rollup/rollup-linux-arm-musleabihf": "4.24.
|
|
121
|
-
"@rollup/rollup-win32-ia32-msvc": "4.24.
|
|
122
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.24.
|
|
123
|
-
"@rollup/rollup-linux-powerpc64le-gnu": "4.24.
|
|
124
|
-
"@rollup/rollup-linux-s390x-gnu": "4.24.
|
|
125
|
-
"@rollup/rollup-darwin-x64": "4.24.
|
|
126
|
-
"@rollup/rollup-win32-x64-msvc": "4.24.
|
|
127
|
-
"@rollup/rollup-freebsd-x64": "4.24.
|
|
128
|
-
"@rollup/rollup-linux-x64-gnu": "4.24.
|
|
129
|
-
"@rollup/rollup-linux-x64-musl": "4.24.
|
|
112
|
+
"@rollup/rollup-darwin-arm64": "4.24.3",
|
|
113
|
+
"@rollup/rollup-android-arm64": "4.24.3",
|
|
114
|
+
"@rollup/rollup-win32-arm64-msvc": "4.24.3",
|
|
115
|
+
"@rollup/rollup-freebsd-arm64": "4.24.3",
|
|
116
|
+
"@rollup/rollup-linux-arm64-gnu": "4.24.3",
|
|
117
|
+
"@rollup/rollup-linux-arm64-musl": "4.24.3",
|
|
118
|
+
"@rollup/rollup-android-arm-eabi": "4.24.3",
|
|
119
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.24.3",
|
|
120
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.24.3",
|
|
121
|
+
"@rollup/rollup-win32-ia32-msvc": "4.24.3",
|
|
122
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.24.3",
|
|
123
|
+
"@rollup/rollup-linux-powerpc64le-gnu": "4.24.3",
|
|
124
|
+
"@rollup/rollup-linux-s390x-gnu": "4.24.3",
|
|
125
|
+
"@rollup/rollup-darwin-x64": "4.24.3",
|
|
126
|
+
"@rollup/rollup-win32-x64-msvc": "4.24.3",
|
|
127
|
+
"@rollup/rollup-freebsd-x64": "4.24.3",
|
|
128
|
+
"@rollup/rollup-linux-x64-gnu": "4.24.3",
|
|
129
|
+
"@rollup/rollup-linux-x64-musl": "4.24.3"
|
|
130
130
|
},
|
|
131
131
|
"dependencies": {
|
|
132
132
|
"@types/estree": "1.0.6"
|