rollup 3.19.1 → 3.20.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/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +23 -17
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.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/rollup.js +23 -17
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch-proxy.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +1 -1
package/dist/bin/rollup
CHANGED
package/dist/es/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.20.0
|
|
4
|
+
Mon, 20 Mar 2023 06:08:57 GMT - commit eb9777c1a8a9923951037294b56ceccb1921a5c0
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/pr
|
|
|
16
16
|
import { EventEmitter } from 'node:events';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version$1 = "3.
|
|
19
|
+
var version$1 = "3.20.0";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -15278,7 +15278,7 @@ class Chunk {
|
|
|
15278
15278
|
const chunkModules = new Set(orderedModules);
|
|
15279
15279
|
for (const module of orderedModules) {
|
|
15280
15280
|
chunkByModule.set(module, this);
|
|
15281
|
-
if (module.namespace.included) {
|
|
15281
|
+
if (module.namespace.included && !outputOptions.preserveModules) {
|
|
15282
15282
|
includedNamespaces.add(module);
|
|
15283
15283
|
}
|
|
15284
15284
|
if (this.isEmpty && module.isIncluded()) {
|
|
@@ -15291,7 +15291,7 @@ class Chunk {
|
|
|
15291
15291
|
if (!chunkModules.has(importer)) {
|
|
15292
15292
|
this.dynamicEntryModules.push(module);
|
|
15293
15293
|
// Modules with synthetic exports need an artificial namespace for dynamic imports
|
|
15294
|
-
if (module.info.syntheticNamedExports
|
|
15294
|
+
if (module.info.syntheticNamedExports) {
|
|
15295
15295
|
includedNamespaces.add(module);
|
|
15296
15296
|
this.exports.add(module.namespace);
|
|
15297
15297
|
}
|
|
@@ -15407,12 +15407,11 @@ class Chunk {
|
|
|
15407
15407
|
requiredFacades.push({});
|
|
15408
15408
|
}
|
|
15409
15409
|
if (!this.facadeModule) {
|
|
15410
|
-
const needsStrictFacade =
|
|
15411
|
-
(module.preserveSignature === '
|
|
15412
|
-
module.
|
|
15413
|
-
|
|
15414
|
-
|
|
15415
|
-
this.canModuleBeFacade(module, exposedVariables)) {
|
|
15410
|
+
const needsStrictFacade = !this.outputOptions.preserveModules &&
|
|
15411
|
+
(module.preserveSignature === 'strict' ||
|
|
15412
|
+
(module.preserveSignature === 'exports-only' &&
|
|
15413
|
+
module.getExportNamesByVariable().size > 0));
|
|
15414
|
+
if (!needsStrictFacade || this.canModuleBeFacade(module, exposedVariables)) {
|
|
15416
15415
|
this.facadeModule = module;
|
|
15417
15416
|
this.facadeChunkByModule.set(module, this);
|
|
15418
15417
|
if (module.preserveSignature) {
|
|
@@ -16000,7 +15999,7 @@ class Chunk {
|
|
|
16000
15999
|
// This method changes properties on the AST before rendering and must not be async
|
|
16001
16000
|
renderModules(fileName) {
|
|
16002
16001
|
const { accessedGlobalsByScope, dependencies, exportNamesByVariable, includedNamespaces, inputOptions: { onwarn }, isEmpty, orderedModules, outputOptions, pluginDriver, renderedModules, snippets } = this;
|
|
16003
|
-
const { compact, dynamicImportFunction, format, freeze, namespaceToStringTag
|
|
16002
|
+
const { compact, dynamicImportFunction, format, freeze, namespaceToStringTag } = outputOptions;
|
|
16004
16003
|
const { _, cnst, n } = snippets;
|
|
16005
16004
|
this.setDynamicImportResolutions(fileName);
|
|
16006
16005
|
this.setImportMetaResolutions(fileName);
|
|
@@ -16039,7 +16038,7 @@ class Chunk {
|
|
|
16039
16038
|
usedModules.push(module);
|
|
16040
16039
|
}
|
|
16041
16040
|
const namespace = module.namespace;
|
|
16042
|
-
if (includedNamespaces.has(module)
|
|
16041
|
+
if (includedNamespaces.has(module)) {
|
|
16043
16042
|
const rendered = namespace.renderBlock(renderOptions);
|
|
16044
16043
|
if (namespace.renderFirst())
|
|
16045
16044
|
hoistedSource += n + rendered;
|
|
@@ -16148,12 +16147,12 @@ class Chunk {
|
|
|
16148
16147
|
deconflictChunk(this.orderedModules, this.getDependenciesToBeDeconflicted(format !== 'es' && format !== 'system', format === 'amd' || format === 'umd' || format === 'iife', interop), this.imports, usedNames, format, interop, preserveModules, externalLiveBindings, this.chunkByModule, this.externalChunkByModule, syntheticExports, this.exportNamesByVariable, this.accessedGlobalsByScope, this.includedNamespaces);
|
|
16149
16148
|
}
|
|
16150
16149
|
setImportMetaResolutions(fileName) {
|
|
16151
|
-
const { accessedGlobalsByScope, includedNamespaces, orderedModules, outputOptions: { format
|
|
16150
|
+
const { accessedGlobalsByScope, includedNamespaces, orderedModules, outputOptions: { format } } = this;
|
|
16152
16151
|
for (const module of orderedModules) {
|
|
16153
16152
|
for (const importMeta of module.importMetas) {
|
|
16154
16153
|
importMeta.setResolution(format, accessedGlobalsByScope, fileName);
|
|
16155
16154
|
}
|
|
16156
|
-
if (includedNamespaces.has(module)
|
|
16155
|
+
if (includedNamespaces.has(module)) {
|
|
16157
16156
|
module.namespace.prepare(accessedGlobalsByScope);
|
|
16158
16157
|
}
|
|
16159
16158
|
}
|
|
@@ -24090,8 +24089,15 @@ class FileEmitter {
|
|
|
24090
24089
|
if (!fileName) {
|
|
24091
24090
|
const sourceHash = getSourceHash(source);
|
|
24092
24091
|
fileName = fileNamesBySource.get(sourceHash);
|
|
24093
|
-
|
|
24094
|
-
|
|
24092
|
+
const newFileName = generateAssetFileName(consumedFile.name, source, sourceHash, outputOptions, bundle);
|
|
24093
|
+
// make sure file name deterministic in parallel emits, always use the shorter and smaller file name
|
|
24094
|
+
if (!fileName ||
|
|
24095
|
+
fileName.length > newFileName.length ||
|
|
24096
|
+
(fileName.length === newFileName.length && fileName > newFileName)) {
|
|
24097
|
+
if (fileName) {
|
|
24098
|
+
delete bundle[fileName];
|
|
24099
|
+
}
|
|
24100
|
+
fileName = newFileName;
|
|
24095
24101
|
fileNamesBySource.set(sourceHash, fileName);
|
|
24096
24102
|
}
|
|
24097
24103
|
}
|
package/dist/es/shared/watch.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.20.0
|
|
4
|
+
Mon, 20 Mar 2023 06:08:57 GMT - commit eb9777c1a8a9923951037294b56ceccb1921a5c0
|
|
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$1 = "3.
|
|
34
|
+
var version$1 = "3.20.0";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -15776,7 +15776,7 @@ class Chunk {
|
|
|
15776
15776
|
const chunkModules = new Set(orderedModules);
|
|
15777
15777
|
for (const module of orderedModules) {
|
|
15778
15778
|
chunkByModule.set(module, this);
|
|
15779
|
-
if (module.namespace.included) {
|
|
15779
|
+
if (module.namespace.included && !outputOptions.preserveModules) {
|
|
15780
15780
|
includedNamespaces.add(module);
|
|
15781
15781
|
}
|
|
15782
15782
|
if (this.isEmpty && module.isIncluded()) {
|
|
@@ -15789,7 +15789,7 @@ class Chunk {
|
|
|
15789
15789
|
if (!chunkModules.has(importer)) {
|
|
15790
15790
|
this.dynamicEntryModules.push(module);
|
|
15791
15791
|
// Modules with synthetic exports need an artificial namespace for dynamic imports
|
|
15792
|
-
if (module.info.syntheticNamedExports
|
|
15792
|
+
if (module.info.syntheticNamedExports) {
|
|
15793
15793
|
includedNamespaces.add(module);
|
|
15794
15794
|
this.exports.add(module.namespace);
|
|
15795
15795
|
}
|
|
@@ -15905,12 +15905,11 @@ class Chunk {
|
|
|
15905
15905
|
requiredFacades.push({});
|
|
15906
15906
|
}
|
|
15907
15907
|
if (!this.facadeModule) {
|
|
15908
|
-
const needsStrictFacade =
|
|
15909
|
-
(module.preserveSignature === '
|
|
15910
|
-
module.
|
|
15911
|
-
|
|
15912
|
-
|
|
15913
|
-
this.canModuleBeFacade(module, exposedVariables)) {
|
|
15908
|
+
const needsStrictFacade = !this.outputOptions.preserveModules &&
|
|
15909
|
+
(module.preserveSignature === 'strict' ||
|
|
15910
|
+
(module.preserveSignature === 'exports-only' &&
|
|
15911
|
+
module.getExportNamesByVariable().size > 0));
|
|
15912
|
+
if (!needsStrictFacade || this.canModuleBeFacade(module, exposedVariables)) {
|
|
15914
15913
|
this.facadeModule = module;
|
|
15915
15914
|
this.facadeChunkByModule.set(module, this);
|
|
15916
15915
|
if (module.preserveSignature) {
|
|
@@ -16498,7 +16497,7 @@ class Chunk {
|
|
|
16498
16497
|
// This method changes properties on the AST before rendering and must not be async
|
|
16499
16498
|
renderModules(fileName) {
|
|
16500
16499
|
const { accessedGlobalsByScope, dependencies, exportNamesByVariable, includedNamespaces, inputOptions: { onwarn }, isEmpty, orderedModules, outputOptions, pluginDriver, renderedModules, snippets } = this;
|
|
16501
|
-
const { compact, dynamicImportFunction, format, freeze, namespaceToStringTag
|
|
16500
|
+
const { compact, dynamicImportFunction, format, freeze, namespaceToStringTag } = outputOptions;
|
|
16502
16501
|
const { _, cnst, n } = snippets;
|
|
16503
16502
|
this.setDynamicImportResolutions(fileName);
|
|
16504
16503
|
this.setImportMetaResolutions(fileName);
|
|
@@ -16537,7 +16536,7 @@ class Chunk {
|
|
|
16537
16536
|
usedModules.push(module);
|
|
16538
16537
|
}
|
|
16539
16538
|
const namespace = module.namespace;
|
|
16540
|
-
if (includedNamespaces.has(module)
|
|
16539
|
+
if (includedNamespaces.has(module)) {
|
|
16541
16540
|
const rendered = namespace.renderBlock(renderOptions);
|
|
16542
16541
|
if (namespace.renderFirst())
|
|
16543
16542
|
hoistedSource += n + rendered;
|
|
@@ -16646,12 +16645,12 @@ class Chunk {
|
|
|
16646
16645
|
deconflictChunk(this.orderedModules, this.getDependenciesToBeDeconflicted(format !== 'es' && format !== 'system', format === 'amd' || format === 'umd' || format === 'iife', interop), this.imports, usedNames, format, interop, preserveModules, externalLiveBindings, this.chunkByModule, this.externalChunkByModule, syntheticExports, this.exportNamesByVariable, this.accessedGlobalsByScope, this.includedNamespaces);
|
|
16647
16646
|
}
|
|
16648
16647
|
setImportMetaResolutions(fileName) {
|
|
16649
|
-
const { accessedGlobalsByScope, includedNamespaces, orderedModules, outputOptions: { format
|
|
16648
|
+
const { accessedGlobalsByScope, includedNamespaces, orderedModules, outputOptions: { format } } = this;
|
|
16650
16649
|
for (const module of orderedModules) {
|
|
16651
16650
|
for (const importMeta of module.importMetas) {
|
|
16652
16651
|
importMeta.setResolution(format, accessedGlobalsByScope, fileName);
|
|
16653
16652
|
}
|
|
16654
|
-
if (includedNamespaces.has(module)
|
|
16653
|
+
if (includedNamespaces.has(module)) {
|
|
16655
16654
|
module.namespace.prepare(accessedGlobalsByScope);
|
|
16656
16655
|
}
|
|
16657
16656
|
}
|
|
@@ -24588,8 +24587,15 @@ class FileEmitter {
|
|
|
24588
24587
|
if (!fileName) {
|
|
24589
24588
|
const sourceHash = getSourceHash(source);
|
|
24590
24589
|
fileName = fileNamesBySource.get(sourceHash);
|
|
24591
|
-
|
|
24592
|
-
|
|
24590
|
+
const newFileName = generateAssetFileName(consumedFile.name, source, sourceHash, outputOptions, bundle);
|
|
24591
|
+
// make sure file name deterministic in parallel emits, always use the shorter and smaller file name
|
|
24592
|
+
if (!fileName ||
|
|
24593
|
+
fileName.length > newFileName.length ||
|
|
24594
|
+
(fileName.length === newFileName.length && fileName > newFileName)) {
|
|
24595
|
+
if (fileName) {
|
|
24596
|
+
delete bundle[fileName];
|
|
24597
|
+
}
|
|
24598
|
+
fileName = newFileName;
|
|
24593
24599
|
fileNamesBySource.set(sourceHash, fileName);
|
|
24594
24600
|
}
|
|
24595
24601
|
}
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED