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/dist/rollup.d.ts CHANGED
@@ -171,6 +171,7 @@ interface ModuleInfo {
171
171
  isEntry: boolean;
172
172
  isExternal: boolean;
173
173
  meta: CustomPluginOptions;
174
+ syntheticNamedExports: boolean | string;
174
175
  }
175
176
 
176
177
  export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.33.0
4
- Sun, 01 Nov 2020 06:52:02 GMT - commit 3d719bb543063288e64035c5fcd7892e0d204533
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
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.33.0
4
- Sun, 01 Nov 2020 06:52:02 GMT - commit 3d719bb543063288e64035c5fcd7892e0d204533
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
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.33.0
4
- Sun, 01 Nov 2020 06:52:02 GMT - commit 3d719bb543063288e64035c5fcd7892e0d204533
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
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.33.0
4
- Sun, 01 Nov 2020 06:52:02 GMT - commit 3d719bb543063288e64035c5fcd7892e0d204533
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
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.33.0
4
- Sun, 01 Nov 2020 06:52:02 GMT - commit 3d719bb543063288e64035c5fcd7892e0d204533
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
@@ -19,7 +19,7 @@ function _interopNamespaceDefaultOnly(e) {
19
19
  return {__proto__: null, 'default': e};
20
20
  }
21
21
 
22
- var version = "2.33.0";
22
+ var version = "2.33.1";
23
23
 
24
24
  function ensureArray(items) {
25
25
  if (Array.isArray(items)) {
@@ -2415,7 +2415,8 @@ class ExternalModule {
2415
2415
  },
2416
2416
  isEntry: false,
2417
2417
  isExternal: true,
2418
- meta
2418
+ meta,
2419
+ syntheticNamedExports: false
2419
2420
  };
2420
2421
  }
2421
2422
  getVariableForExportName(name) {
@@ -4590,7 +4591,7 @@ class NamespaceVariable extends Variable {
4590
4591
  }
4591
4592
  const memberVariables = Object.create(null);
4592
4593
  for (const name of this.context.getExports().concat(this.context.getReexports())) {
4593
- if (name[0] !== '*' && name !== this.module.syntheticNamedExports) {
4594
+ if (name[0] !== '*' && name !== this.module.info.syntheticNamedExports) {
4594
4595
  memberVariables[name] = this.context.traceExport(name);
4595
4596
  }
4596
4597
  }
@@ -9724,7 +9725,6 @@ class Module {
9724
9725
  this.graph = graph;
9725
9726
  this.id = id;
9726
9727
  this.options = options;
9727
- this.syntheticNamedExports = syntheticNamedExports;
9728
9728
  this.ast = null;
9729
9729
  this.chunkFileNames = new Set();
9730
9730
  this.chunkName = null;
@@ -9794,7 +9794,8 @@ class Module {
9794
9794
  },
9795
9795
  isEntry,
9796
9796
  isExternal: false,
9797
- meta
9797
+ meta,
9798
+ syntheticNamedExports
9798
9799
  };
9799
9800
  }
9800
9801
  basename() {
@@ -9892,7 +9893,7 @@ class Module {
9892
9893
  }
9893
9894
  const exportNamesByVariable = new Map();
9894
9895
  for (const exportName of this.getAllExportNames()) {
9895
- if (exportName === this.syntheticNamedExports)
9896
+ if (exportName === this.info.syntheticNamedExports)
9896
9897
  continue;
9897
9898
  let tracedVariable = this.getVariableForExportName(exportName);
9898
9899
  if (tracedVariable instanceof ExportDefaultVariable) {
@@ -9951,14 +9952,17 @@ class Module {
9951
9952
  getSyntheticNamespace() {
9952
9953
  if (this.syntheticNamespace === null) {
9953
9954
  this.syntheticNamespace = undefined;
9954
- this.syntheticNamespace = this.getVariableForExportName(typeof this.syntheticNamedExports === 'string' ? this.syntheticNamedExports : 'default');
9955
+ this.syntheticNamespace = this.getVariableForExportName(typeof this.info.syntheticNamedExports === 'string'
9956
+ ? this.info.syntheticNamedExports
9957
+ : 'default');
9955
9958
  }
9956
9959
  if (!this.syntheticNamespace) {
9957
9960
  return error({
9958
9961
  code: Errors.SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT,
9959
9962
  id: this.id,
9960
- message: `Module "${relativeId(this.id)}" that is marked with 'syntheticNamedExports: ${JSON.stringify(this.syntheticNamedExports)}' needs ${typeof this.syntheticNamedExports === 'string' && this.syntheticNamedExports !== 'default'
9961
- ? `an export named "${this.syntheticNamedExports}"`
9963
+ message: `Module "${relativeId(this.id)}" that is marked with 'syntheticNamedExports: ${JSON.stringify(this.info.syntheticNamedExports)}' needs ${typeof this.info.syntheticNamedExports === 'string' &&
9964
+ this.info.syntheticNamedExports !== 'default'
9965
+ ? `an export named "${this.info.syntheticNamedExports}"`
9962
9966
  : 'a default export'}.`
9963
9967
  });
9964
9968
  }
@@ -10002,7 +10006,7 @@ class Module {
10002
10006
  // we don't want to create shims when we are just
10003
10007
  // probing export * modules for exports
10004
10008
  if (!isExportAllSearch) {
10005
- if (this.syntheticNamedExports) {
10009
+ if (this.info.syntheticNamedExports) {
10006
10010
  let syntheticExport = this.syntheticExports.get(name);
10007
10011
  if (!syntheticExport) {
10008
10012
  const syntheticNamespace = this.getSyntheticNamespace();
@@ -10034,7 +10038,7 @@ class Module {
10034
10038
  markModuleAndImpureDependenciesAsExecuted(this);
10035
10039
  }
10036
10040
  for (const exportName of this.getExports()) {
10037
- if (includeNamespaceMembers || exportName !== this.syntheticNamedExports) {
10041
+ if (includeNamespaceMembers || exportName !== this.info.syntheticNamedExports) {
10038
10042
  const variable = this.getVariableForExportName(exportName);
10039
10043
  variable.deoptimizePath(UNKNOWN_PATH);
10040
10044
  if (!variable.included) {
@@ -10160,7 +10164,7 @@ class Module {
10160
10164
  warn: this.warn.bind(this)
10161
10165
  };
10162
10166
  this.scope = new ModuleScope(this.graph.scope, this.astContext);
10163
- this.namespace = new NamespaceVariable(this.astContext, this.syntheticNamedExports);
10167
+ this.namespace = new NamespaceVariable(this.astContext, this.info.syntheticNamedExports);
10164
10168
  this.ast = new Program$1(ast, { type: 'Module', context: this.astContext }, this.scope);
10165
10169
  this.info.ast = ast;
10166
10170
  timeEnd('analyse ast', 3);
@@ -10179,7 +10183,7 @@ class Module {
10179
10183
  originalSourcemap: this.originalSourcemap,
10180
10184
  resolvedIds: this.resolvedIds,
10181
10185
  sourcemapChain: this.sourcemapChain,
10182
- syntheticNamedExports: this.syntheticNamedExports,
10186
+ syntheticNamedExports: this.info.syntheticNamedExports,
10183
10187
  transformDependencies: this.transformDependencies,
10184
10188
  transformFiles: this.transformFiles
10185
10189
  };
@@ -10208,7 +10212,7 @@ class Module {
10208
10212
  this.info.hasModuleSideEffects = moduleSideEffects;
10209
10213
  }
10210
10214
  if (syntheticNamedExports != null) {
10211
- this.syntheticNamedExports = syntheticNamedExports;
10215
+ this.info.syntheticNamedExports = syntheticNamedExports;
10212
10216
  }
10213
10217
  if (meta != null) {
10214
10218
  this.info.meta = { ...this.info.meta, ...meta };
@@ -10358,7 +10362,7 @@ class Module {
10358
10362
  this.imports.add(externalVariable);
10359
10363
  mergedNamespaces.push(externalVariable);
10360
10364
  }
10361
- else if (module.syntheticNamedExports) {
10365
+ else if (module.info.syntheticNamedExports) {
10362
10366
  const syntheticNamespace = module.getSyntheticNamespace();
10363
10367
  syntheticNamespace.include();
10364
10368
  this.imports.add(syntheticNamespace);
@@ -10978,7 +10982,7 @@ class Chunk$1 {
10978
10982
  if (!chunkModules.has(importer)) {
10979
10983
  this.dynamicEntryModules.push(module);
10980
10984
  // Modules with synthetic exports need an artificial namespace for dynamic imports
10981
- if (module.syntheticNamedExports && !outputOptions.preserveModules) {
10985
+ if (module.info.syntheticNamedExports && !outputOptions.preserveModules) {
10982
10986
  includedNamespaces.add(module);
10983
10987
  this.exports.add(module.namespace);
10984
10988
  }
@@ -11101,7 +11105,7 @@ class Chunk$1 {
11101
11105
  }
11102
11106
  }
11103
11107
  for (const module of this.dynamicEntryModules) {
11104
- if (module.syntheticNamedExports)
11108
+ if (module.info.syntheticNamedExports)
11105
11109
  continue;
11106
11110
  if (!this.facadeModule && this.canModuleBeFacade(module, exposedVariables)) {
11107
11111
  this.facadeModule = module;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.33.0
4
- Sun, 01 Nov 2020 06:52:02 GMT - commit 3d719bb543063288e64035c5fcd7892e0d204533
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
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.33.0
4
- Sun, 01 Nov 2020 06:52:02 GMT - commit 3d719bb543063288e64035c5fcd7892e0d204533
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup",
3
- "version": "2.33.0",
3
+ "version": "2.33.1",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",