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/es/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,20 +1,20 @@
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
 
8
8
  Released under the MIT License.
9
9
  */
10
- import require$$0, { resolve, basename, extname, dirname, relative as relative$1, win32, posix, isAbsolute as isAbsolute$1 } from 'path';
10
+ import require$$0, { resolve, basename, extname, dirname, relative as relative$1, win32, posix, isAbsolute as isAbsolute$1, join } from 'path';
11
11
  import process$1 from 'process';
12
12
  import { performance } from 'perf_hooks';
13
13
  import { createHash as createHash$1 } from 'crypto';
14
14
  import { promises } from 'fs';
15
15
  import { EventEmitter } from 'events';
16
16
 
17
- var version$1 = "2.79.1";
17
+ var version$1 = "2.80.0";
18
18
 
19
19
  var charToInteger = {};
20
20
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -1889,6 +1889,7 @@ var Errors;
1889
1889
  Errors["DEPRECATED_FEATURE"] = "DEPRECATED_FEATURE";
1890
1890
  Errors["EXTERNAL_SYNTHETIC_EXPORTS"] = "EXTERNAL_SYNTHETIC_EXPORTS";
1891
1891
  Errors["FILE_NAME_CONFLICT"] = "FILE_NAME_CONFLICT";
1892
+ Errors["FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY"] = "FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY";
1892
1893
  Errors["FILE_NOT_FOUND"] = "FILE_NOT_FOUND";
1893
1894
  Errors["INPUT_HOOK_IN_OUTPUT_PLUGIN"] = "INPUT_HOOK_IN_OUTPUT_PLUGIN";
1894
1895
  Errors["INVALID_CHUNK"] = "INVALID_CHUNK";
@@ -1995,6 +1996,12 @@ function errFileNameConflict(fileName) {
1995
1996
  message: `The emitted file "${fileName}" overwrites a previously emitted file of the same name.`
1996
1997
  };
1997
1998
  }
1999
+ function errFileNameOutsideOutputDirectory(fileName) {
2000
+ return {
2001
+ code: Errors.FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY,
2002
+ message: `The output file name "${fileName}" is not contained in the output directory. Make sure all file names are relative paths without ".." segments.`
2003
+ };
2004
+ }
1998
2005
  function errInputHookInOutputPlugin(pluginName, hookName) {
1999
2006
  return {
2000
2007
  code: Errors.INPUT_HOOK_IN_OUTPUT_PLUGIN,
@@ -10706,7 +10713,7 @@ const accessedFileUrlGlobals = {
10706
10713
  umd: ['document', 'require', 'URL']
10707
10714
  };
10708
10715
  const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
10709
- const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${relativePath}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
10716
+ 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`);
10710
10717
  const getGenericImportMetaMechanism = (getUrl) => (prop, { chunkId }) => {
10711
10718
  const urlMechanism = getUrl(chunkId);
10712
10719
  return prop === null
@@ -10715,7 +10722,7 @@ const getGenericImportMetaMechanism = (getUrl) => (prop, { chunkId }) => {
10715
10722
  ? urlMechanism
10716
10723
  : 'undefined';
10717
10724
  };
10718
- const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(document.currentScript && document.currentScript.src || new URL('${chunkId}', document.baseURI).href)`;
10725
+ 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)`;
10719
10726
  const relativeUrlMechanisms = {
10720
10727
  amd: relativePath => {
10721
10728
  if (relativePath[0] !== '.')
@@ -15799,6 +15806,7 @@ class Bundle {
15799
15806
  isWrite
15800
15807
  ]);
15801
15808
  this.finaliseAssets(outputBundle);
15809
+ validateOutputBundleFileNames(outputBundle);
15802
15810
  timeEnd('GENERATE', 1);
15803
15811
  return outputBundleBase;
15804
15812
  }
@@ -15961,6 +15969,28 @@ function addModuleToManualChunk(alias, module, manualChunkAliasByEntry) {
15961
15969
  }
15962
15970
  manualChunkAliasByEntry.set(module, alias);
15963
15971
  }
15972
+ function isFileNameOutsideOutputDirectory(fileName) {
15973
+ // Use join() to normalize ".." segments, then replace backslashes so the
15974
+ // string checks below work identically on Windows and POSIX.
15975
+ const normalized = join(fileName).replace(/\\/g, '/');
15976
+ return (normalized === '..' ||
15977
+ normalized.startsWith('../') ||
15978
+ normalized === '.' ||
15979
+ isAbsolute(normalized));
15980
+ }
15981
+ function validateOutputBundleFileNames(bundle) {
15982
+ for (const [bundleKey, entry] of Object.entries(bundle)) {
15983
+ if (isFileNameOutsideOutputDirectory(bundleKey)) {
15984
+ return error(errFileNameOutsideOutputDirectory(bundleKey));
15985
+ }
15986
+ if (entry.type !== 'placeholder') {
15987
+ const { fileName } = entry;
15988
+ if (fileName !== bundleKey && isFileNameOutsideOutputDirectory(fileName)) {
15989
+ return error(errFileNameOutsideOutputDirectory(fileName));
15990
+ }
15991
+ }
15992
+ }
15993
+ }
15964
15994
 
15965
15995
  // This file was generated. Do not modify manually!
15966
15996
  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