rollup 3.7.2 → 3.7.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 CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  /*
4
4
  @license
5
- Rollup.js v3.7.2
6
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
5
+ Rollup.js v3.7.3
6
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
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.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
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.7.2";
19
+ var version$1 = "3.7.3";
20
20
 
21
21
  var charToInteger = {};
22
22
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -14775,7 +14775,6 @@ class Chunk {
14775
14775
  this.entryModules = [];
14776
14776
  this.exportMode = 'named';
14777
14777
  this.facadeModule = null;
14778
- this.id = null;
14779
14778
  this.namespaceVariableName = '';
14780
14779
  this.variableName = '';
14781
14780
  this.accessedGlobalsByScope = new Map();
@@ -14866,6 +14865,25 @@ class Chunk {
14866
14865
  }
14867
14866
  return true;
14868
14867
  }
14868
+ finalizeChunk(code, map, hashesByPlaceholder) {
14869
+ const renderedChunkInfo = this.getRenderedChunkInfo();
14870
+ const finalize = (code) => replacePlaceholders(code, hashesByPlaceholder);
14871
+ const fileName = (this.fileName = finalize(renderedChunkInfo.fileName));
14872
+ return {
14873
+ ...renderedChunkInfo,
14874
+ code,
14875
+ dynamicImports: renderedChunkInfo.dynamicImports.map(finalize),
14876
+ fileName,
14877
+ implicitlyLoadedBefore: renderedChunkInfo.implicitlyLoadedBefore.map(finalize),
14878
+ importedBindings: Object.fromEntries(Object.entries(renderedChunkInfo.importedBindings).map(([fileName, bindings]) => [
14879
+ finalize(fileName),
14880
+ bindings
14881
+ ])),
14882
+ imports: renderedChunkInfo.imports.map(finalize),
14883
+ map,
14884
+ referencedFiles: renderedChunkInfo.referencedFiles.map(finalize)
14885
+ };
14886
+ }
14869
14887
  generateExports() {
14870
14888
  this.sortedExportNames = null;
14871
14889
  const remainingExports = new Set(this.exports);
@@ -14958,24 +14976,6 @@ class Chunk {
14958
14976
  }
14959
14977
  return facades;
14960
14978
  }
14961
- generateOutputChunk(code, map, hashesByPlaceholder) {
14962
- const renderedChunkInfo = this.getRenderedChunkInfo();
14963
- const finalize = (code) => replacePlaceholders(code, hashesByPlaceholder);
14964
- return {
14965
- ...renderedChunkInfo,
14966
- code,
14967
- dynamicImports: renderedChunkInfo.dynamicImports.map(finalize),
14968
- fileName: finalize(renderedChunkInfo.fileName),
14969
- implicitlyLoadedBefore: renderedChunkInfo.implicitlyLoadedBefore.map(finalize),
14970
- importedBindings: Object.fromEntries(Object.entries(renderedChunkInfo.importedBindings).map(([fileName, bindings]) => [
14971
- finalize(fileName),
14972
- bindings
14973
- ])),
14974
- imports: renderedChunkInfo.imports.map(finalize),
14975
- map,
14976
- referencedFiles: renderedChunkInfo.referencedFiles.map(finalize)
14977
- };
14978
- }
14979
14979
  getChunkName() {
14980
14980
  return (this.name ?? (this.name = this.outputOptions.sanitizeFileName(this.getFallbackChunkName())));
14981
14981
  }
@@ -14983,7 +14983,7 @@ class Chunk {
14983
14983
  return (this.sortedExportNames ?? (this.sortedExportNames = [...this.exportsByName.keys()].sort()));
14984
14984
  }
14985
14985
  getFileName() {
14986
- return this.preliminaryFileName?.fileName || this.getPreliminaryFileName().fileName;
14986
+ return this.fileName || this.getPreliminaryFileName().fileName;
14987
14987
  }
14988
14988
  getImportPath(importer) {
14989
14989
  return escapeId(getImportPath(importer, this.getFileName(), this.outputOptions.format === 'amd' && !this.outputOptions.amd.forceJsExtensionForImports, true));
@@ -16458,14 +16458,14 @@ function addChunksToBundle(renderedChunksByPlaceholder, hashesByPlaceholder, bun
16458
16458
  map.file = replacePlaceholders(map.file, hashesByPlaceholder);
16459
16459
  updatedCode += emitSourceMapAndGetComment(finalFileName, map, pluginDriver, options);
16460
16460
  }
16461
- bundle[finalFileName] = chunk.generateOutputChunk(updatedCode, map, hashesByPlaceholder);
16461
+ bundle[finalFileName] = chunk.finalizeChunk(updatedCode, map, hashesByPlaceholder);
16462
16462
  }
16463
16463
  for (const { chunk, code, fileName, map } of nonHashedChunksWithPlaceholders) {
16464
16464
  let updatedCode = hashesByPlaceholder.size > 0 ? replacePlaceholders(code, hashesByPlaceholder) : code;
16465
16465
  if (map) {
16466
16466
  updatedCode += emitSourceMapAndGetComment(fileName, map, pluginDriver, options);
16467
16467
  }
16468
- bundle[fileName] = chunk.generateOutputChunk(updatedCode, map, hashesByPlaceholder);
16468
+ bundle[fileName] = chunk.finalizeChunk(updatedCode, map, hashesByPlaceholder);
16469
16469
  }
16470
16470
  }
16471
16471
  function emitSourceMapAndGetComment(fileName, map, pluginDriver, { sourcemap, sourcemapBaseUrl }) {
@@ -23008,8 +23008,7 @@ function getChunkFileName(file, facadeChunkByModule) {
23008
23008
  return file.fileName;
23009
23009
  }
23010
23010
  if (facadeChunkByModule) {
23011
- const chunk = facadeChunkByModule.get(file.module);
23012
- return chunk.id || chunk.getFileName();
23011
+ return facadeChunkByModule.get(file.module).getFileName();
23013
23012
  }
23014
23013
  return error(errorChunkNotGeneratedForFileName(file.fileName || file.name));
23015
23014
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
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.7.2";
34
+ var version$1 = "3.7.3";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -15290,7 +15290,6 @@ class Chunk {
15290
15290
  this.entryModules = [];
15291
15291
  this.exportMode = 'named';
15292
15292
  this.facadeModule = null;
15293
- this.id = null;
15294
15293
  this.namespaceVariableName = '';
15295
15294
  this.variableName = '';
15296
15295
  this.accessedGlobalsByScope = new Map();
@@ -15381,6 +15380,25 @@ class Chunk {
15381
15380
  }
15382
15381
  return true;
15383
15382
  }
15383
+ finalizeChunk(code, map, hashesByPlaceholder) {
15384
+ const renderedChunkInfo = this.getRenderedChunkInfo();
15385
+ const finalize = (code) => replacePlaceholders(code, hashesByPlaceholder);
15386
+ const fileName = (this.fileName = finalize(renderedChunkInfo.fileName));
15387
+ return {
15388
+ ...renderedChunkInfo,
15389
+ code,
15390
+ dynamicImports: renderedChunkInfo.dynamicImports.map(finalize),
15391
+ fileName,
15392
+ implicitlyLoadedBefore: renderedChunkInfo.implicitlyLoadedBefore.map(finalize),
15393
+ importedBindings: Object.fromEntries(Object.entries(renderedChunkInfo.importedBindings).map(([fileName, bindings]) => [
15394
+ finalize(fileName),
15395
+ bindings
15396
+ ])),
15397
+ imports: renderedChunkInfo.imports.map(finalize),
15398
+ map,
15399
+ referencedFiles: renderedChunkInfo.referencedFiles.map(finalize)
15400
+ };
15401
+ }
15384
15402
  generateExports() {
15385
15403
  this.sortedExportNames = null;
15386
15404
  const remainingExports = new Set(this.exports);
@@ -15473,24 +15491,6 @@ class Chunk {
15473
15491
  }
15474
15492
  return facades;
15475
15493
  }
15476
- generateOutputChunk(code, map, hashesByPlaceholder) {
15477
- const renderedChunkInfo = this.getRenderedChunkInfo();
15478
- const finalize = (code) => replacePlaceholders(code, hashesByPlaceholder);
15479
- return {
15480
- ...renderedChunkInfo,
15481
- code,
15482
- dynamicImports: renderedChunkInfo.dynamicImports.map(finalize),
15483
- fileName: finalize(renderedChunkInfo.fileName),
15484
- implicitlyLoadedBefore: renderedChunkInfo.implicitlyLoadedBefore.map(finalize),
15485
- importedBindings: Object.fromEntries(Object.entries(renderedChunkInfo.importedBindings).map(([fileName, bindings]) => [
15486
- finalize(fileName),
15487
- bindings
15488
- ])),
15489
- imports: renderedChunkInfo.imports.map(finalize),
15490
- map,
15491
- referencedFiles: renderedChunkInfo.referencedFiles.map(finalize)
15492
- };
15493
- }
15494
15494
  getChunkName() {
15495
15495
  return (this.name ?? (this.name = this.outputOptions.sanitizeFileName(this.getFallbackChunkName())));
15496
15496
  }
@@ -15498,7 +15498,7 @@ class Chunk {
15498
15498
  return (this.sortedExportNames ?? (this.sortedExportNames = [...this.exportsByName.keys()].sort()));
15499
15499
  }
15500
15500
  getFileName() {
15501
- return this.preliminaryFileName?.fileName || this.getPreliminaryFileName().fileName;
15501
+ return this.fileName || this.getPreliminaryFileName().fileName;
15502
15502
  }
15503
15503
  getImportPath(importer) {
15504
15504
  return escapeId(getImportPath(importer, this.getFileName(), this.outputOptions.format === 'amd' && !this.outputOptions.amd.forceJsExtensionForImports, true));
@@ -16973,14 +16973,14 @@ function addChunksToBundle(renderedChunksByPlaceholder, hashesByPlaceholder, bun
16973
16973
  map.file = replacePlaceholders(map.file, hashesByPlaceholder);
16974
16974
  updatedCode += emitSourceMapAndGetComment(finalFileName, map, pluginDriver, options);
16975
16975
  }
16976
- bundle[finalFileName] = chunk.generateOutputChunk(updatedCode, map, hashesByPlaceholder);
16976
+ bundle[finalFileName] = chunk.finalizeChunk(updatedCode, map, hashesByPlaceholder);
16977
16977
  }
16978
16978
  for (const { chunk, code, fileName, map } of nonHashedChunksWithPlaceholders) {
16979
16979
  let updatedCode = hashesByPlaceholder.size > 0 ? replacePlaceholders(code, hashesByPlaceholder) : code;
16980
16980
  if (map) {
16981
16981
  updatedCode += emitSourceMapAndGetComment(fileName, map, pluginDriver, options);
16982
16982
  }
16983
- bundle[fileName] = chunk.generateOutputChunk(updatedCode, map, hashesByPlaceholder);
16983
+ bundle[fileName] = chunk.finalizeChunk(updatedCode, map, hashesByPlaceholder);
16984
16984
  }
16985
16985
  }
16986
16986
  function emitSourceMapAndGetComment(fileName, map, pluginDriver, { sourcemap, sourcemapBaseUrl }) {
@@ -23523,8 +23523,7 @@ function getChunkFileName(file, facadeChunkByModule) {
23523
23523
  return file.fileName;
23524
23524
  }
23525
23525
  if (facadeChunkByModule) {
23526
- const chunk = facadeChunkByModule.get(file.module);
23527
- return chunk.id || chunk.getFileName();
23526
+ return facadeChunkByModule.get(file.module).getFileName();
23528
23527
  }
23529
23528
  return error(errorChunkNotGeneratedForFileName(file.fileName || file.name));
23530
23529
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.2
4
- Sat, 10 Dec 2022 06:16:44 GMT - commit f368adf4943a11207157ec44a83345da7a905a13
3
+ Rollup.js v3.7.3
4
+ Sun, 11 Dec 2022 15:24:30 GMT - commit a0d4d69092484a0879377e16425b737ec541ae55
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.7.2",
3
+ "version": "3.7.3",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",