rollup 2.79.1 → 2.80.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/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.79.1
4
- Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8
3
+ Rollup.js v2.80.0
4
+ Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.79.1
4
- Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8
3
+ Rollup.js v2.80.0
4
+ Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.79.1
4
- Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8
3
+ Rollup.js v2.80.0
4
+ Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.79.1
4
- Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8
3
+ Rollup.js v2.80.0
4
+ Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.79.1
4
- Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8
3
+ Rollup.js v2.80.0
4
+ Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -27,7 +27,7 @@ function _interopNamespaceDefault(e) {
27
27
  return n;
28
28
  }
29
29
 
30
- var version$1 = "2.79.1";
30
+ var version$1 = "2.80.0";
31
31
 
32
32
  function ensureArray$1(items) {
33
33
  if (Array.isArray(items)) {
@@ -229,6 +229,7 @@ var Errors;
229
229
  Errors["DEPRECATED_FEATURE"] = "DEPRECATED_FEATURE";
230
230
  Errors["EXTERNAL_SYNTHETIC_EXPORTS"] = "EXTERNAL_SYNTHETIC_EXPORTS";
231
231
  Errors["FILE_NAME_CONFLICT"] = "FILE_NAME_CONFLICT";
232
+ Errors["FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY"] = "FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY";
232
233
  Errors["FILE_NOT_FOUND"] = "FILE_NOT_FOUND";
233
234
  Errors["INPUT_HOOK_IN_OUTPUT_PLUGIN"] = "INPUT_HOOK_IN_OUTPUT_PLUGIN";
234
235
  Errors["INVALID_CHUNK"] = "INVALID_CHUNK";
@@ -335,6 +336,12 @@ function errFileNameConflict(fileName) {
335
336
  message: `The emitted file "${fileName}" overwrites a previously emitted file of the same name.`
336
337
  };
337
338
  }
339
+ function errFileNameOutsideOutputDirectory(fileName) {
340
+ return {
341
+ code: Errors.FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY,
342
+ message: `The output file name "${fileName}" is not contained in the output directory. Make sure all file names are relative paths without ".." segments.`
343
+ };
344
+ }
338
345
  function errInputHookInOutputPlugin(pluginName, hookName) {
339
346
  return {
340
347
  code: Errors.INPUT_HOOK_IN_OUTPUT_PLUGIN,
@@ -10837,7 +10844,7 @@ const accessedFileUrlGlobals = {
10837
10844
  umd: ['document', 'require', 'URL']
10838
10845
  };
10839
10846
  const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
10840
- const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${relativePath}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
10847
+ const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${relativePath}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`);
10841
10848
  const getGenericImportMetaMechanism = (getUrl) => (prop, { chunkId }) => {
10842
10849
  const urlMechanism = getUrl(chunkId);
10843
10850
  return prop === null
@@ -10846,7 +10853,7 @@ const getGenericImportMetaMechanism = (getUrl) => (prop, { chunkId }) => {
10846
10853
  ? urlMechanism
10847
10854
  : 'undefined';
10848
10855
  };
10849
- const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(document.currentScript && document.currentScript.src || new URL('${chunkId}', document.baseURI).href)`;
10856
+ const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || new URL('${chunkId}', document.baseURI).href)`;
10850
10857
  const relativeUrlMechanisms = {
10851
10858
  amd: relativePath => {
10852
10859
  if (relativePath[0] !== '.')
@@ -15930,6 +15937,7 @@ class Bundle {
15930
15937
  isWrite
15931
15938
  ]);
15932
15939
  this.finaliseAssets(outputBundle);
15940
+ validateOutputBundleFileNames(outputBundle);
15933
15941
  timeEnd('GENERATE', 1);
15934
15942
  return outputBundleBase;
15935
15943
  }
@@ -16092,6 +16100,28 @@ function addModuleToManualChunk(alias, module, manualChunkAliasByEntry) {
16092
16100
  }
16093
16101
  manualChunkAliasByEntry.set(module, alias);
16094
16102
  }
16103
+ function isFileNameOutsideOutputDirectory(fileName) {
16104
+ // Use join() to normalize ".." segments, then replace backslashes so the
16105
+ // string checks below work identically on Windows and POSIX.
16106
+ const normalized = require$$0.join(fileName).replace(/\\/g, '/');
16107
+ return (normalized === '..' ||
16108
+ normalized.startsWith('../') ||
16109
+ normalized === '.' ||
16110
+ isAbsolute(normalized));
16111
+ }
16112
+ function validateOutputBundleFileNames(bundle) {
16113
+ for (const [bundleKey, entry] of Object.entries(bundle)) {
16114
+ if (isFileNameOutsideOutputDirectory(bundleKey)) {
16115
+ return error(errFileNameOutsideOutputDirectory(bundleKey));
16116
+ }
16117
+ if (entry.type !== 'placeholder') {
16118
+ const { fileName } = entry;
16119
+ if (fileName !== bundleKey && isFileNameOutsideOutputDirectory(fileName)) {
16120
+ return error(errFileNameOutsideOutputDirectory(fileName));
16121
+ }
16122
+ }
16123
+ }
16124
+ }
16095
16125
 
16096
16126
  // This file was generated. Do not modify manually!
16097
16127
  var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.79.1
4
- Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8
3
+ Rollup.js v2.80.0
4
+ Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.79.1
4
- Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8
3
+ Rollup.js v2.80.0
4
+ Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
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": "2.79.1",
3
+ "version": "2.80.0",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -24,7 +24,6 @@
24
24
  "perf:init": "node scripts/perf-init.js",
25
25
  "postpublish": "git push && git push --tags",
26
26
  "prepare": "husky install && npm run build",
27
- "prepublishOnly": "git pull --ff-only && npm ci && npm run lint:nofix && npm run security && npm run build:bootstrap && npm run test:all",
28
27
  "security": "npm audit",
29
28
  "test": "npm run build && npm run test:all",
30
29
  "test:cjs": "npm run build:cjs && npm run test:only",