rollup 3.8.1 → 3.9.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 CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  /*
4
4
  @license
5
- Rollup.js v3.8.1
6
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
5
+ Rollup.js v3.9.0
6
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
7
7
 
8
8
  https://github.com/rollup/rollup
9
9
 
package/dist/es/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -16,7 +16,7 @@ import { promises } from 'node:fs';
16
16
  import { EventEmitter } from 'node:events';
17
17
  import * as tty from 'tty';
18
18
 
19
- var version$1 = "3.8.1";
19
+ var version$1 = "3.9.0";
20
20
 
21
21
  var charToInteger = {};
22
22
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -5399,8 +5399,6 @@ const ChainExpression$1 = 'ChainExpression';
5399
5399
  const ConditionalExpression$1 = 'ConditionalExpression';
5400
5400
  const ExpressionStatement$1 = 'ExpressionStatement';
5401
5401
  const Identifier$1 = 'Identifier';
5402
- const ImportDefaultSpecifier$1 = 'ImportDefaultSpecifier';
5403
- const ImportNamespaceSpecifier$1 = 'ImportNamespaceSpecifier';
5404
5402
  const LogicalExpression$1 = 'LogicalExpression';
5405
5403
  const NewExpression$1 = 'NewExpression';
5406
5404
  const Program$1 = 'Program';
@@ -13360,15 +13358,15 @@ class Module {
13360
13358
  if (localVariable) {
13361
13359
  return localVariable;
13362
13360
  }
13363
- const importDeclaration = this.importDescriptions.get(name);
13364
- if (importDeclaration) {
13365
- const otherModule = importDeclaration.module;
13366
- if (otherModule instanceof Module && importDeclaration.name === '*') {
13361
+ const importDescription = this.importDescriptions.get(name);
13362
+ if (importDescription) {
13363
+ const otherModule = importDescription.module;
13364
+ if (otherModule instanceof Module && importDescription.name === '*') {
13367
13365
  return otherModule.namespace;
13368
13366
  }
13369
- const [declaration] = getVariableForExportNameRecursive(otherModule, importDeclaration.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
13367
+ const [declaration] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
13370
13368
  if (!declaration) {
13371
- return this.error(errorMissingExport(importDeclaration.name, this.id, otherModule.id), importDeclaration.start);
13369
+ return this.error(errorMissingExport(importDescription.name, this.id, otherModule.id), importDescription.start);
13372
13370
  }
13373
13371
  return declaration;
13374
13372
  }
@@ -13439,13 +13437,13 @@ class Module {
13439
13437
  // export { name } from './other'
13440
13438
  const source = node.source.value;
13441
13439
  this.addSource(source, node);
13442
- for (const specifier of node.specifiers) {
13443
- const name = specifier.exported.name;
13440
+ for (const { exported, local, start } of node.specifiers) {
13441
+ const name = exported instanceof Literal ? exported.value : exported.name;
13444
13442
  this.reexportDescriptions.set(name, {
13445
- localName: specifier.local.name,
13443
+ localName: local instanceof Literal ? local.value : local.name,
13446
13444
  module: null,
13447
13445
  source,
13448
- start: specifier.start
13446
+ start
13449
13447
  });
13450
13448
  }
13451
13449
  }
@@ -13468,9 +13466,10 @@ class Module {
13468
13466
  }
13469
13467
  else {
13470
13468
  // export { foo, bar, baz }
13471
- for (const specifier of node.specifiers) {
13472
- const localName = specifier.local.name;
13473
- const exportedName = specifier.exported.name;
13469
+ for (const { local, exported } of node.specifiers) {
13470
+ // except for reexports, local must be an Identifier
13471
+ const localName = local.name;
13472
+ const exportedName = exported instanceof Identifier ? exported.name : exported.value;
13474
13473
  this.exports.set(exportedName, { identifier: null, localName });
13475
13474
  }
13476
13475
  }
@@ -13479,9 +13478,13 @@ class Module {
13479
13478
  const source = node.source.value;
13480
13479
  this.addSource(source, node);
13481
13480
  for (const specifier of node.specifiers) {
13482
- const isDefault = specifier.type === ImportDefaultSpecifier$1;
13483
- const isNamespace = specifier.type === ImportNamespaceSpecifier$1;
13484
- const name = isDefault ? 'default' : isNamespace ? '*' : specifier.imported.name;
13481
+ const name = specifier instanceof ImportDefaultSpecifier
13482
+ ? 'default'
13483
+ : specifier instanceof ImportNamespaceSpecifier
13484
+ ? '*'
13485
+ : specifier.imported instanceof Identifier
13486
+ ? specifier.imported.name
13487
+ : specifier.imported.value;
13485
13488
  this.importDescriptions.set(specifier.local.name, {
13486
13489
  module: null,
13487
13490
  name,
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.d.ts CHANGED
@@ -456,6 +456,7 @@ export interface OutputPlugin
456
456
  Partial<{ [K in AddonHooks]: ObjectHook<AddonHook> }> {
457
457
  cacheKey?: string;
458
458
  name: string;
459
+ version?: string;
459
460
  }
460
461
 
461
462
  export interface Plugin extends OutputPlugin, Partial<PluginHooks> {
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
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.8.1";
34
+ var version$1 = "3.9.0";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -5915,8 +5915,6 @@ const ChainExpression$1 = 'ChainExpression';
5915
5915
  const ConditionalExpression$1 = 'ConditionalExpression';
5916
5916
  const ExpressionStatement$1 = 'ExpressionStatement';
5917
5917
  const Identifier$1 = 'Identifier';
5918
- const ImportDefaultSpecifier$1 = 'ImportDefaultSpecifier';
5919
- const ImportNamespaceSpecifier$1 = 'ImportNamespaceSpecifier';
5920
5918
  const LogicalExpression$1 = 'LogicalExpression';
5921
5919
  const NewExpression$1 = 'NewExpression';
5922
5920
  const Program$1 = 'Program';
@@ -13876,15 +13874,15 @@ class Module {
13876
13874
  if (localVariable) {
13877
13875
  return localVariable;
13878
13876
  }
13879
- const importDeclaration = this.importDescriptions.get(name);
13880
- if (importDeclaration) {
13881
- const otherModule = importDeclaration.module;
13882
- if (otherModule instanceof Module && importDeclaration.name === '*') {
13877
+ const importDescription = this.importDescriptions.get(name);
13878
+ if (importDescription) {
13879
+ const otherModule = importDescription.module;
13880
+ if (otherModule instanceof Module && importDescription.name === '*') {
13883
13881
  return otherModule.namespace;
13884
13882
  }
13885
- const [declaration] = getVariableForExportNameRecursive(otherModule, importDeclaration.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
13883
+ const [declaration] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
13886
13884
  if (!declaration) {
13887
- return this.error(errorMissingExport(importDeclaration.name, this.id, otherModule.id), importDeclaration.start);
13885
+ return this.error(errorMissingExport(importDescription.name, this.id, otherModule.id), importDescription.start);
13888
13886
  }
13889
13887
  return declaration;
13890
13888
  }
@@ -13955,13 +13953,13 @@ class Module {
13955
13953
  // export { name } from './other'
13956
13954
  const source = node.source.value;
13957
13955
  this.addSource(source, node);
13958
- for (const specifier of node.specifiers) {
13959
- const name = specifier.exported.name;
13956
+ for (const { exported, local, start } of node.specifiers) {
13957
+ const name = exported instanceof Literal ? exported.value : exported.name;
13960
13958
  this.reexportDescriptions.set(name, {
13961
- localName: specifier.local.name,
13959
+ localName: local instanceof Literal ? local.value : local.name,
13962
13960
  module: null,
13963
13961
  source,
13964
- start: specifier.start
13962
+ start
13965
13963
  });
13966
13964
  }
13967
13965
  }
@@ -13984,9 +13982,10 @@ class Module {
13984
13982
  }
13985
13983
  else {
13986
13984
  // export { foo, bar, baz }
13987
- for (const specifier of node.specifiers) {
13988
- const localName = specifier.local.name;
13989
- const exportedName = specifier.exported.name;
13985
+ for (const { local, exported } of node.specifiers) {
13986
+ // except for reexports, local must be an Identifier
13987
+ const localName = local.name;
13988
+ const exportedName = exported instanceof Identifier ? exported.name : exported.value;
13990
13989
  this.exports.set(exportedName, { identifier: null, localName });
13991
13990
  }
13992
13991
  }
@@ -13995,9 +13994,13 @@ class Module {
13995
13994
  const source = node.source.value;
13996
13995
  this.addSource(source, node);
13997
13996
  for (const specifier of node.specifiers) {
13998
- const isDefault = specifier.type === ImportDefaultSpecifier$1;
13999
- const isNamespace = specifier.type === ImportNamespaceSpecifier$1;
14000
- const name = isDefault ? 'default' : isNamespace ? '*' : specifier.imported.name;
13997
+ const name = specifier instanceof ImportDefaultSpecifier
13998
+ ? 'default'
13999
+ : specifier instanceof ImportNamespaceSpecifier
14000
+ ? '*'
14001
+ : specifier.imported instanceof Identifier
14002
+ ? specifier.imported.name
14003
+ : specifier.imported.value;
14001
14004
  this.importDescriptions.set(specifier.local.name, {
14002
14005
  module: null,
14003
14006
  name,
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.8.1
4
- Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
3
+ Rollup.js v3.9.0
4
+ Wed, 28 Dec 2022 05:59:30 GMT - commit 5aa1cce444e767c40cf86cdd96953201e4d32774
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup",
3
- "version": "3.8.1",
3
+ "version": "3.9.0",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",