rollup 2.33.0 → 2.33.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/CHANGELOG.md +10 -0
- package/dist/bin/rollup +2 -2
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +23 -19
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.d.ts +1 -0
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +23 -19
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +1 -1
package/dist/es/rollup.js
CHANGED
package/dist/es/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.33.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.33.1
|
|
4
|
+
Mon, 02 Nov 2020 06:50:50 GMT - commit d861c91c068bc4e64d84db3b84232d3fb7f1d073
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -13,7 +13,7 @@ import { createHash as createHash$1 } from 'crypto';
|
|
|
13
13
|
import { writeFile as writeFile$1, readdirSync, mkdirSync, readFile as readFile$1, lstatSync, realpathSync } from 'fs';
|
|
14
14
|
import { EventEmitter } from 'events';
|
|
15
15
|
|
|
16
|
-
var version = "2.33.
|
|
16
|
+
var version = "2.33.1";
|
|
17
17
|
|
|
18
18
|
var charToInteger = {};
|
|
19
19
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
@@ -2338,7 +2338,8 @@ class ExternalModule {
|
|
|
2338
2338
|
},
|
|
2339
2339
|
isEntry: false,
|
|
2340
2340
|
isExternal: true,
|
|
2341
|
-
meta
|
|
2341
|
+
meta,
|
|
2342
|
+
syntheticNamedExports: false
|
|
2342
2343
|
};
|
|
2343
2344
|
}
|
|
2344
2345
|
getVariableForExportName(name) {
|
|
@@ -4513,7 +4514,7 @@ class NamespaceVariable extends Variable {
|
|
|
4513
4514
|
}
|
|
4514
4515
|
const memberVariables = Object.create(null);
|
|
4515
4516
|
for (const name of this.context.getExports().concat(this.context.getReexports())) {
|
|
4516
|
-
if (name[0] !== '*' && name !== this.module.syntheticNamedExports) {
|
|
4517
|
+
if (name[0] !== '*' && name !== this.module.info.syntheticNamedExports) {
|
|
4517
4518
|
memberVariables[name] = this.context.traceExport(name);
|
|
4518
4519
|
}
|
|
4519
4520
|
}
|
|
@@ -9668,7 +9669,6 @@ class Module {
|
|
|
9668
9669
|
this.graph = graph;
|
|
9669
9670
|
this.id = id;
|
|
9670
9671
|
this.options = options;
|
|
9671
|
-
this.syntheticNamedExports = syntheticNamedExports;
|
|
9672
9672
|
this.ast = null;
|
|
9673
9673
|
this.chunkFileNames = new Set();
|
|
9674
9674
|
this.chunkName = null;
|
|
@@ -9738,7 +9738,8 @@ class Module {
|
|
|
9738
9738
|
},
|
|
9739
9739
|
isEntry,
|
|
9740
9740
|
isExternal: false,
|
|
9741
|
-
meta
|
|
9741
|
+
meta,
|
|
9742
|
+
syntheticNamedExports
|
|
9742
9743
|
};
|
|
9743
9744
|
}
|
|
9744
9745
|
basename() {
|
|
@@ -9836,7 +9837,7 @@ class Module {
|
|
|
9836
9837
|
}
|
|
9837
9838
|
const exportNamesByVariable = new Map();
|
|
9838
9839
|
for (const exportName of this.getAllExportNames()) {
|
|
9839
|
-
if (exportName === this.syntheticNamedExports)
|
|
9840
|
+
if (exportName === this.info.syntheticNamedExports)
|
|
9840
9841
|
continue;
|
|
9841
9842
|
let tracedVariable = this.getVariableForExportName(exportName);
|
|
9842
9843
|
if (tracedVariable instanceof ExportDefaultVariable) {
|
|
@@ -9895,14 +9896,17 @@ class Module {
|
|
|
9895
9896
|
getSyntheticNamespace() {
|
|
9896
9897
|
if (this.syntheticNamespace === null) {
|
|
9897
9898
|
this.syntheticNamespace = undefined;
|
|
9898
|
-
this.syntheticNamespace = this.getVariableForExportName(typeof this.syntheticNamedExports === 'string'
|
|
9899
|
+
this.syntheticNamespace = this.getVariableForExportName(typeof this.info.syntheticNamedExports === 'string'
|
|
9900
|
+
? this.info.syntheticNamedExports
|
|
9901
|
+
: 'default');
|
|
9899
9902
|
}
|
|
9900
9903
|
if (!this.syntheticNamespace) {
|
|
9901
9904
|
return error({
|
|
9902
9905
|
code: Errors.SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT,
|
|
9903
9906
|
id: this.id,
|
|
9904
|
-
message: `Module "${relativeId(this.id)}" that is marked with 'syntheticNamedExports: ${JSON.stringify(this.syntheticNamedExports)}' needs ${typeof this.syntheticNamedExports === 'string' &&
|
|
9905
|
-
|
|
9907
|
+
message: `Module "${relativeId(this.id)}" that is marked with 'syntheticNamedExports: ${JSON.stringify(this.info.syntheticNamedExports)}' needs ${typeof this.info.syntheticNamedExports === 'string' &&
|
|
9908
|
+
this.info.syntheticNamedExports !== 'default'
|
|
9909
|
+
? `an export named "${this.info.syntheticNamedExports}"`
|
|
9906
9910
|
: 'a default export'}.`
|
|
9907
9911
|
});
|
|
9908
9912
|
}
|
|
@@ -9946,7 +9950,7 @@ class Module {
|
|
|
9946
9950
|
// we don't want to create shims when we are just
|
|
9947
9951
|
// probing export * modules for exports
|
|
9948
9952
|
if (!isExportAllSearch) {
|
|
9949
|
-
if (this.syntheticNamedExports) {
|
|
9953
|
+
if (this.info.syntheticNamedExports) {
|
|
9950
9954
|
let syntheticExport = this.syntheticExports.get(name);
|
|
9951
9955
|
if (!syntheticExport) {
|
|
9952
9956
|
const syntheticNamespace = this.getSyntheticNamespace();
|
|
@@ -9978,7 +9982,7 @@ class Module {
|
|
|
9978
9982
|
markModuleAndImpureDependenciesAsExecuted(this);
|
|
9979
9983
|
}
|
|
9980
9984
|
for (const exportName of this.getExports()) {
|
|
9981
|
-
if (includeNamespaceMembers || exportName !== this.syntheticNamedExports) {
|
|
9985
|
+
if (includeNamespaceMembers || exportName !== this.info.syntheticNamedExports) {
|
|
9982
9986
|
const variable = this.getVariableForExportName(exportName);
|
|
9983
9987
|
variable.deoptimizePath(UNKNOWN_PATH);
|
|
9984
9988
|
if (!variable.included) {
|
|
@@ -10104,7 +10108,7 @@ class Module {
|
|
|
10104
10108
|
warn: this.warn.bind(this)
|
|
10105
10109
|
};
|
|
10106
10110
|
this.scope = new ModuleScope(this.graph.scope, this.astContext);
|
|
10107
|
-
this.namespace = new NamespaceVariable(this.astContext, this.syntheticNamedExports);
|
|
10111
|
+
this.namespace = new NamespaceVariable(this.astContext, this.info.syntheticNamedExports);
|
|
10108
10112
|
this.ast = new Program$1(ast, { type: 'Module', context: this.astContext }, this.scope);
|
|
10109
10113
|
this.info.ast = ast;
|
|
10110
10114
|
timeEnd('analyse ast', 3);
|
|
@@ -10123,7 +10127,7 @@ class Module {
|
|
|
10123
10127
|
originalSourcemap: this.originalSourcemap,
|
|
10124
10128
|
resolvedIds: this.resolvedIds,
|
|
10125
10129
|
sourcemapChain: this.sourcemapChain,
|
|
10126
|
-
syntheticNamedExports: this.syntheticNamedExports,
|
|
10130
|
+
syntheticNamedExports: this.info.syntheticNamedExports,
|
|
10127
10131
|
transformDependencies: this.transformDependencies,
|
|
10128
10132
|
transformFiles: this.transformFiles
|
|
10129
10133
|
};
|
|
@@ -10152,7 +10156,7 @@ class Module {
|
|
|
10152
10156
|
this.info.hasModuleSideEffects = moduleSideEffects;
|
|
10153
10157
|
}
|
|
10154
10158
|
if (syntheticNamedExports != null) {
|
|
10155
|
-
this.syntheticNamedExports = syntheticNamedExports;
|
|
10159
|
+
this.info.syntheticNamedExports = syntheticNamedExports;
|
|
10156
10160
|
}
|
|
10157
10161
|
if (meta != null) {
|
|
10158
10162
|
this.info.meta = { ...this.info.meta, ...meta };
|
|
@@ -10302,7 +10306,7 @@ class Module {
|
|
|
10302
10306
|
this.imports.add(externalVariable);
|
|
10303
10307
|
mergedNamespaces.push(externalVariable);
|
|
10304
10308
|
}
|
|
10305
|
-
else if (module.syntheticNamedExports) {
|
|
10309
|
+
else if (module.info.syntheticNamedExports) {
|
|
10306
10310
|
const syntheticNamespace = module.getSyntheticNamespace();
|
|
10307
10311
|
syntheticNamespace.include();
|
|
10308
10312
|
this.imports.add(syntheticNamespace);
|
|
@@ -10922,7 +10926,7 @@ class Chunk$1 {
|
|
|
10922
10926
|
if (!chunkModules.has(importer)) {
|
|
10923
10927
|
this.dynamicEntryModules.push(module);
|
|
10924
10928
|
// Modules with synthetic exports need an artificial namespace for dynamic imports
|
|
10925
|
-
if (module.syntheticNamedExports && !outputOptions.preserveModules) {
|
|
10929
|
+
if (module.info.syntheticNamedExports && !outputOptions.preserveModules) {
|
|
10926
10930
|
includedNamespaces.add(module);
|
|
10927
10931
|
this.exports.add(module.namespace);
|
|
10928
10932
|
}
|
|
@@ -11045,7 +11049,7 @@ class Chunk$1 {
|
|
|
11045
11049
|
}
|
|
11046
11050
|
}
|
|
11047
11051
|
for (const module of this.dynamicEntryModules) {
|
|
11048
|
-
if (module.syntheticNamedExports)
|
|
11052
|
+
if (module.info.syntheticNamedExports)
|
|
11049
11053
|
continue;
|
|
11050
11054
|
if (!this.facadeModule && this.canModuleBeFacade(module, exposedVariables)) {
|
|
11051
11055
|
this.facadeModule = module;
|
package/dist/es/shared/watch.js
CHANGED
package/dist/loadConfigFile.js
CHANGED