rollup 4.50.2 → 4.51.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
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
3
  @license
4
- Rollup.js v4.50.2
5
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
4
+ Rollup.js v4.51.0
5
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1444,7 +1444,7 @@ function prettyMilliseconds(milliseconds, options) {
1444
1444
  if (
1445
1445
  options.separateMilliseconds
1446
1446
  || options.formatSubMilliseconds
1447
- || (!options.colonNotation && milliseconds < 1000)
1447
+ || (!options.colonNotation && milliseconds < 1000 && !options.subSecondsAsDecimals)
1448
1448
  ) {
1449
1449
  const seconds = Number(parsed.seconds);
1450
1450
  const milliseconds = Number(parsed.milliseconds);
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/es/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -27,7 +27,7 @@ function _mergeNamespaces(n, m) {
27
27
  return Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' });
28
28
  }
29
29
 
30
- var version = "4.50.2";
30
+ var version = "4.51.0";
31
31
 
32
32
  // src/vlq.ts
33
33
  var comma = ",".charCodeAt(0);
@@ -7692,6 +7692,7 @@ function resolveNamespaceVariables(baseVariable, path, astContext) {
7692
7692
  }
7693
7693
 
7694
7694
  const FILE_PREFIX = 'ROLLUP_FILE_URL_';
7695
+ const FILE_OBJ_PREFIX = 'ROLLUP_FILE_URL_OBJ_';
7695
7696
  const IMPORT = 'import';
7696
7697
  class MetaProperty extends NodeBase {
7697
7698
  constructor() {
@@ -7702,8 +7703,13 @@ class MetaProperty extends NodeBase {
7702
7703
  }
7703
7704
  getReferencedFileName(outputPluginDriver) {
7704
7705
  const { meta: { name }, metaProperty } = this;
7705
- if (name === IMPORT && metaProperty?.startsWith(FILE_PREFIX)) {
7706
- return outputPluginDriver.getFileName(metaProperty.slice(FILE_PREFIX.length));
7706
+ if (name === IMPORT) {
7707
+ if (metaProperty?.startsWith(FILE_OBJ_PREFIX)) {
7708
+ return outputPluginDriver.getFileName(metaProperty.slice(FILE_OBJ_PREFIX.length));
7709
+ }
7710
+ else if (metaProperty?.startsWith(FILE_PREFIX)) {
7711
+ return outputPluginDriver.getFileName(metaProperty.slice(FILE_PREFIX.length));
7712
+ }
7707
7713
  }
7708
7714
  return null;
7709
7715
  }
@@ -7726,7 +7732,10 @@ class MetaProperty extends NodeBase {
7726
7732
  parent instanceof MemberExpression && typeof parent.propertyKey === 'string'
7727
7733
  ? parent.propertyKey
7728
7734
  : null);
7729
- if (metaProperty?.startsWith(FILE_PREFIX)) {
7735
+ if (metaProperty?.startsWith(FILE_OBJ_PREFIX)) {
7736
+ this.referenceId = metaProperty.slice(FILE_OBJ_PREFIX.length);
7737
+ }
7738
+ else if (metaProperty?.startsWith(FILE_PREFIX)) {
7730
7739
  this.referenceId = metaProperty.slice(FILE_PREFIX.length);
7731
7740
  }
7732
7741
  }
@@ -7741,9 +7750,10 @@ class MetaProperty extends NodeBase {
7741
7750
  if (referenceId) {
7742
7751
  const fileName = pluginDriver.getFileName(referenceId);
7743
7752
  const relativePath = normalize(relative(dirname(chunkId), fileName));
7753
+ const isUrlObject = !!metaProperty?.startsWith(FILE_OBJ_PREFIX);
7744
7754
  const replacement = pluginDriver.hookFirstSync('resolveFileUrl', [
7745
7755
  { chunkId, fileName, format, moduleId, referenceId, relativePath }
7746
- ]) || relativeUrlMechanisms[format](relativePath);
7756
+ ]) || relativeUrlMechanisms[format](relativePath, isUrlObject);
7747
7757
  code.overwrite(parent.start, parent.end, replacement, { contentOnly: true });
7748
7758
  return;
7749
7759
  }
@@ -7767,7 +7777,9 @@ class MetaProperty extends NodeBase {
7767
7777
  }
7768
7778
  setResolution(format, accessedGlobalsByScope, preliminaryChunkId) {
7769
7779
  this.preliminaryChunkId = preliminaryChunkId;
7770
- const accessedGlobals = (this.metaProperty?.startsWith(FILE_PREFIX) ? accessedFileUrlGlobals : accessedMetaUrlGlobals)[format];
7780
+ const accessedGlobals = (this.metaProperty?.startsWith(FILE_PREFIX) || this.metaProperty?.startsWith(FILE_OBJ_PREFIX)
7781
+ ? accessedFileUrlGlobals
7782
+ : accessedMetaUrlGlobals)[format];
7771
7783
  if (accessedGlobals.length > 0) {
7772
7784
  this.scope.addAccessedGlobals(accessedGlobals, accessedGlobalsByScope);
7773
7785
  }
@@ -7790,8 +7802,8 @@ const accessedFileUrlGlobals = {
7790
7802
  system: ['module', 'URL'],
7791
7803
  umd: ['document', 'require', 'URL']
7792
7804
  };
7793
- const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
7794
- const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`);
7805
+ const getResolveUrl = (path, asObject, URL = 'URL') => `new ${URL}(${path})${asObject ? '' : '.href'}`;
7806
+ const getRelativeUrlFromDocument = (relativePath, asObject, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`, asObject);
7795
7807
  const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
7796
7808
  const urlMechanism = getUrl(chunkId);
7797
7809
  return property === null
@@ -7800,27 +7812,27 @@ const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
7800
7812
  ? urlMechanism
7801
7813
  : 'undefined';
7802
7814
  };
7803
- const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
7804
- const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`);
7815
+ const getFileUrlFromFullPath = (path, asObject) => `require('u' + 'rl').pathToFileURL(${path})${asObject ? '' : '.href'}`;
7816
+ const getFileUrlFromRelativePath = (path, asObject) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`, asObject);
7805
7817
  const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.tagName.toUpperCase() === 'SCRIPT' && ${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId(chunkId)}', document.baseURI).href)`;
7806
7818
  const relativeUrlMechanisms = {
7807
- amd: relativePath => {
7819
+ amd: (relativePath, asObject) => {
7808
7820
  if (relativePath[0] !== '.')
7809
7821
  relativePath = './' + relativePath;
7810
- return getResolveUrl(`require.toUrl('${escapeId(relativePath)}'), document.baseURI`);
7822
+ return getResolveUrl(`require.toUrl('${escapeId(relativePath)}'), document.baseURI`, asObject);
7811
7823
  },
7812
- cjs: relativePath => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath)})`,
7813
- es: relativePath => getResolveUrl(`'${escapeId(relativePath)}', import.meta.url`),
7814
- iife: relativePath => getRelativeUrlFromDocument(relativePath),
7815
- system: relativePath => getResolveUrl(`'${escapeId(relativePath)}', module.meta.url`),
7816
- umd: relativePath => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath, true)})`
7824
+ cjs: (relativePath, asObject) => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(relativePath, asObject)} : ${getRelativeUrlFromDocument(relativePath, asObject)})`,
7825
+ es: (relativePath, asObject) => getResolveUrl(`'${escapeId(relativePath)}', import.meta.url`, asObject),
7826
+ iife: (relativePath, asObject) => getRelativeUrlFromDocument(relativePath, asObject),
7827
+ system: (relativePath, asObject) => getResolveUrl(`'${escapeId(relativePath)}', module.meta.url`, asObject),
7828
+ umd: (relativePath, asObject) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(relativePath, asObject)} : ${getRelativeUrlFromDocument(relativePath, asObject, true)})`
7817
7829
  };
7818
7830
  const importMetaMechanisms = {
7819
- amd: getGenericImportMetaMechanism(() => getResolveUrl(`module.uri, document.baseURI`)),
7820
- cjs: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' ? ${getFileUrlFromFullPath('__filename')} : ${getUrlFromDocument(chunkId)})`),
7831
+ amd: getGenericImportMetaMechanism(() => getResolveUrl(`module.uri, document.baseURI`, false)),
7832
+ cjs: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' ? ${getFileUrlFromFullPath('__filename', false)} : ${getUrlFromDocument(chunkId)})`),
7821
7833
  iife: getGenericImportMetaMechanism(chunkId => getUrlFromDocument(chunkId)),
7822
7834
  system: (property, { snippets: { getPropertyAccess } }) => property === null ? `module.meta` : `module.meta${getPropertyAccess(property)}`,
7823
- umd: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromFullPath('__filename')} : ${getUrlFromDocument(chunkId, true)})`)
7835
+ umd: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromFullPath('__filename', false)} : ${getUrlFromDocument(chunkId, true)})`)
7824
7836
  };
7825
7837
 
7826
7838
  class UndefinedVariable extends Variable {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/parseAst.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
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 v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -42,7 +42,7 @@ function _mergeNamespaces(n, m) {
42
42
 
43
43
  const promises__namespace = /*#__PURE__*/_interopNamespaceDefault(promises);
44
44
 
45
- var version = "4.50.2";
45
+ var version = "4.51.0";
46
46
 
47
47
  function ensureArray$1(items) {
48
48
  if (Array.isArray(items)) {
@@ -11468,6 +11468,7 @@ function resolveNamespaceVariables(baseVariable, path, astContext) {
11468
11468
  }
11469
11469
 
11470
11470
  const FILE_PREFIX = 'ROLLUP_FILE_URL_';
11471
+ const FILE_OBJ_PREFIX = 'ROLLUP_FILE_URL_OBJ_';
11471
11472
  const IMPORT = 'import';
11472
11473
  class MetaProperty extends NodeBase {
11473
11474
  constructor() {
@@ -11478,8 +11479,13 @@ class MetaProperty extends NodeBase {
11478
11479
  }
11479
11480
  getReferencedFileName(outputPluginDriver) {
11480
11481
  const { meta: { name }, metaProperty } = this;
11481
- if (name === IMPORT && metaProperty?.startsWith(FILE_PREFIX)) {
11482
- return outputPluginDriver.getFileName(metaProperty.slice(FILE_PREFIX.length));
11482
+ if (name === IMPORT) {
11483
+ if (metaProperty?.startsWith(FILE_OBJ_PREFIX)) {
11484
+ return outputPluginDriver.getFileName(metaProperty.slice(FILE_OBJ_PREFIX.length));
11485
+ }
11486
+ else if (metaProperty?.startsWith(FILE_PREFIX)) {
11487
+ return outputPluginDriver.getFileName(metaProperty.slice(FILE_PREFIX.length));
11488
+ }
11483
11489
  }
11484
11490
  return null;
11485
11491
  }
@@ -11502,7 +11508,10 @@ class MetaProperty extends NodeBase {
11502
11508
  parent instanceof MemberExpression && typeof parent.propertyKey === 'string'
11503
11509
  ? parent.propertyKey
11504
11510
  : null);
11505
- if (metaProperty?.startsWith(FILE_PREFIX)) {
11511
+ if (metaProperty?.startsWith(FILE_OBJ_PREFIX)) {
11512
+ this.referenceId = metaProperty.slice(FILE_OBJ_PREFIX.length);
11513
+ }
11514
+ else if (metaProperty?.startsWith(FILE_PREFIX)) {
11506
11515
  this.referenceId = metaProperty.slice(FILE_PREFIX.length);
11507
11516
  }
11508
11517
  }
@@ -11517,9 +11526,10 @@ class MetaProperty extends NodeBase {
11517
11526
  if (referenceId) {
11518
11527
  const fileName = pluginDriver.getFileName(referenceId);
11519
11528
  const relativePath = parseAst_js.normalize(path.relative(path.dirname(chunkId), fileName));
11529
+ const isUrlObject = !!metaProperty?.startsWith(FILE_OBJ_PREFIX);
11520
11530
  const replacement = pluginDriver.hookFirstSync('resolveFileUrl', [
11521
11531
  { chunkId, fileName, format, moduleId, referenceId, relativePath }
11522
- ]) || relativeUrlMechanisms[format](relativePath);
11532
+ ]) || relativeUrlMechanisms[format](relativePath, isUrlObject);
11523
11533
  code.overwrite(parent.start, parent.end, replacement, { contentOnly: true });
11524
11534
  return;
11525
11535
  }
@@ -11543,7 +11553,9 @@ class MetaProperty extends NodeBase {
11543
11553
  }
11544
11554
  setResolution(format, accessedGlobalsByScope, preliminaryChunkId) {
11545
11555
  this.preliminaryChunkId = preliminaryChunkId;
11546
- const accessedGlobals = (this.metaProperty?.startsWith(FILE_PREFIX) ? accessedFileUrlGlobals : accessedMetaUrlGlobals)[format];
11556
+ const accessedGlobals = (this.metaProperty?.startsWith(FILE_PREFIX) || this.metaProperty?.startsWith(FILE_OBJ_PREFIX)
11557
+ ? accessedFileUrlGlobals
11558
+ : accessedMetaUrlGlobals)[format];
11547
11559
  if (accessedGlobals.length > 0) {
11548
11560
  this.scope.addAccessedGlobals(accessedGlobals, accessedGlobalsByScope);
11549
11561
  }
@@ -11566,8 +11578,8 @@ const accessedFileUrlGlobals = {
11566
11578
  system: ['module', 'URL'],
11567
11579
  umd: ['document', 'require', 'URL']
11568
11580
  };
11569
- const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
11570
- const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`);
11581
+ const getResolveUrl = (path, asObject, URL = 'URL') => `new ${URL}(${path})${asObject ? '' : '.href'}`;
11582
+ const getRelativeUrlFromDocument = (relativePath, asObject, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`, asObject);
11571
11583
  const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
11572
11584
  const urlMechanism = getUrl(chunkId);
11573
11585
  return property === null
@@ -11576,27 +11588,27 @@ const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
11576
11588
  ? urlMechanism
11577
11589
  : 'undefined';
11578
11590
  };
11579
- const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
11580
- const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`);
11591
+ const getFileUrlFromFullPath = (path, asObject) => `require('u' + 'rl').pathToFileURL(${path})${asObject ? '' : '.href'}`;
11592
+ const getFileUrlFromRelativePath = (path, asObject) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`, asObject);
11581
11593
  const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(${DOCUMENT_CURRENT_SCRIPT} && ${DOCUMENT_CURRENT_SCRIPT}.tagName.toUpperCase() === 'SCRIPT' && ${DOCUMENT_CURRENT_SCRIPT}.src || new URL('${escapeId(chunkId)}', document.baseURI).href)`;
11582
11594
  const relativeUrlMechanisms = {
11583
- amd: relativePath => {
11595
+ amd: (relativePath, asObject) => {
11584
11596
  if (relativePath[0] !== '.')
11585
11597
  relativePath = './' + relativePath;
11586
- return getResolveUrl(`require.toUrl('${escapeId(relativePath)}'), document.baseURI`);
11598
+ return getResolveUrl(`require.toUrl('${escapeId(relativePath)}'), document.baseURI`, asObject);
11587
11599
  },
11588
- cjs: relativePath => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath)})`,
11589
- es: relativePath => getResolveUrl(`'${escapeId(relativePath)}', import.meta.url`),
11590
- iife: relativePath => getRelativeUrlFromDocument(relativePath),
11591
- system: relativePath => getResolveUrl(`'${escapeId(relativePath)}', module.meta.url`),
11592
- umd: relativePath => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath, true)})`
11600
+ cjs: (relativePath, asObject) => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(relativePath, asObject)} : ${getRelativeUrlFromDocument(relativePath, asObject)})`,
11601
+ es: (relativePath, asObject) => getResolveUrl(`'${escapeId(relativePath)}', import.meta.url`, asObject),
11602
+ iife: (relativePath, asObject) => getRelativeUrlFromDocument(relativePath, asObject),
11603
+ system: (relativePath, asObject) => getResolveUrl(`'${escapeId(relativePath)}', module.meta.url`, asObject),
11604
+ umd: (relativePath, asObject) => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(relativePath, asObject)} : ${getRelativeUrlFromDocument(relativePath, asObject, true)})`
11593
11605
  };
11594
11606
  const importMetaMechanisms = {
11595
- amd: getGenericImportMetaMechanism(() => getResolveUrl(`module.uri, document.baseURI`)),
11596
- cjs: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' ? ${getFileUrlFromFullPath('__filename')} : ${getUrlFromDocument(chunkId)})`),
11607
+ amd: getGenericImportMetaMechanism(() => getResolveUrl(`module.uri, document.baseURI`, false)),
11608
+ cjs: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' ? ${getFileUrlFromFullPath('__filename', false)} : ${getUrlFromDocument(chunkId)})`),
11597
11609
  iife: getGenericImportMetaMechanism(chunkId => getUrlFromDocument(chunkId)),
11598
11610
  system: (property, { snippets: { getPropertyAccess } }) => property === null ? `module.meta` : `module.meta${getPropertyAccess(property)}`,
11599
- umd: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromFullPath('__filename')} : ${getUrlFromDocument(chunkId, true)})`)
11611
+ umd: getGenericImportMetaMechanism(chunkId => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromFullPath('__filename', false)} : ${getUrlFromDocument(chunkId, true)})`)
11600
11612
  };
11601
11613
 
11602
11614
  class UndefinedVariable extends Variable {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.2
4
- Mon, 15 Sep 2025 07:13:55 GMT - commit 76a3b8ede4729a71eb522fc29f7d550a4358827b
3
+ Rollup.js v4.51.0
4
+ Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
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": "4.50.2",
3
+ "version": "4.51.0",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -105,27 +105,27 @@
105
105
  "homepage": "https://rollupjs.org/",
106
106
  "optionalDependencies": {
107
107
  "fsevents": "~2.3.2",
108
- "@rollup/rollup-darwin-arm64": "4.50.2",
109
- "@rollup/rollup-android-arm64": "4.50.2",
110
- "@rollup/rollup-win32-arm64-msvc": "4.50.2",
111
- "@rollup/rollup-freebsd-arm64": "4.50.2",
112
- "@rollup/rollup-linux-arm64-gnu": "4.50.2",
113
- "@rollup/rollup-linux-arm64-musl": "4.50.2",
114
- "@rollup/rollup-android-arm-eabi": "4.50.2",
115
- "@rollup/rollup-linux-arm-gnueabihf": "4.50.2",
116
- "@rollup/rollup-linux-arm-musleabihf": "4.50.2",
117
- "@rollup/rollup-win32-ia32-msvc": "4.50.2",
118
- "@rollup/rollup-linux-loong64-gnu": "4.50.2",
119
- "@rollup/rollup-linux-riscv64-gnu": "4.50.2",
120
- "@rollup/rollup-linux-riscv64-musl": "4.50.2",
121
- "@rollup/rollup-linux-ppc64-gnu": "4.50.2",
122
- "@rollup/rollup-linux-s390x-gnu": "4.50.2",
123
- "@rollup/rollup-darwin-x64": "4.50.2",
124
- "@rollup/rollup-win32-x64-msvc": "4.50.2",
125
- "@rollup/rollup-freebsd-x64": "4.50.2",
126
- "@rollup/rollup-linux-x64-gnu": "4.50.2",
127
- "@rollup/rollup-linux-x64-musl": "4.50.2",
128
- "@rollup/rollup-openharmony-arm64": "4.50.2"
108
+ "@rollup/rollup-darwin-arm64": "4.51.0",
109
+ "@rollup/rollup-android-arm64": "4.51.0",
110
+ "@rollup/rollup-win32-arm64-msvc": "4.51.0",
111
+ "@rollup/rollup-freebsd-arm64": "4.51.0",
112
+ "@rollup/rollup-linux-arm64-gnu": "4.51.0",
113
+ "@rollup/rollup-linux-arm64-musl": "4.51.0",
114
+ "@rollup/rollup-android-arm-eabi": "4.51.0",
115
+ "@rollup/rollup-linux-arm-gnueabihf": "4.51.0",
116
+ "@rollup/rollup-linux-arm-musleabihf": "4.51.0",
117
+ "@rollup/rollup-win32-ia32-msvc": "4.51.0",
118
+ "@rollup/rollup-linux-loong64-gnu": "4.51.0",
119
+ "@rollup/rollup-linux-riscv64-gnu": "4.51.0",
120
+ "@rollup/rollup-linux-riscv64-musl": "4.51.0",
121
+ "@rollup/rollup-linux-ppc64-gnu": "4.51.0",
122
+ "@rollup/rollup-linux-s390x-gnu": "4.51.0",
123
+ "@rollup/rollup-darwin-x64": "4.51.0",
124
+ "@rollup/rollup-win32-x64-msvc": "4.51.0",
125
+ "@rollup/rollup-freebsd-x64": "4.51.0",
126
+ "@rollup/rollup-linux-x64-gnu": "4.51.0",
127
+ "@rollup/rollup-linux-x64-musl": "4.51.0",
128
+ "@rollup/rollup-openharmony-arm64": "4.51.0"
129
129
  },
130
130
  "dependencies": {
131
131
  "@types/estree": "1.0.8"
@@ -141,10 +141,10 @@
141
141
  "@codemirror/state": "^6.5.2",
142
142
  "@codemirror/view": "^6.38.2",
143
143
  "@eslint/js": "^9.35.0",
144
- "@inquirer/prompts": "^7.8.4",
144
+ "@inquirer/prompts": "^7.8.6",
145
145
  "@jridgewell/sourcemap-codec": "^1.5.5",
146
- "@mermaid-js/mermaid-cli": "^11.9.0",
147
- "@napi-rs/cli": "^3.1.5",
146
+ "@mermaid-js/mermaid-cli": "^11.10.1",
147
+ "@napi-rs/cli": "^3.2.0",
148
148
  "@rollup/plugin-alias": "^5.1.1",
149
149
  "@rollup/plugin-buble": "^1.0.3",
150
150
  "@rollup/plugin-commonjs": "^28.0.6",
@@ -156,11 +156,11 @@
156
156
  "@rollup/pluginutils": "^5.3.0",
157
157
  "@shikijs/vitepress-twoslash": "^3.12.2",
158
158
  "@types/mocha": "^10.0.10",
159
- "@types/node": "^20.19.13",
159
+ "@types/node": "^20.19.15",
160
160
  "@types/picomatch": "^4.0.2",
161
161
  "@types/semver": "^7.7.1",
162
162
  "@types/yargs-parser": "^21.0.3",
163
- "@vue/language-server": "^3.0.6",
163
+ "@vue/language-server": "^3.0.7",
164
164
  "acorn": "^8.15.0",
165
165
  "acorn-import-assertions": "^1.9.0",
166
166
  "acorn-jsx": "^5.3.2",
@@ -180,15 +180,15 @@
180
180
  "eslint-plugin-vue": "^10.4.0",
181
181
  "fixturify": "^3.0.0",
182
182
  "flru": "^1.0.2",
183
- "fs-extra": "^11.3.1",
183
+ "fs-extra": "^11.3.2",
184
184
  "github-api": "^3.4.0",
185
- "globals": "^16.3.0",
185
+ "globals": "^16.4.0",
186
186
  "husky": "^9.1.7",
187
187
  "is-reference": "^3.0.3",
188
188
  "lint-staged": "^16.1.6",
189
189
  "locate-character": "^3.0.0",
190
190
  "magic-string": "^0.30.19",
191
- "memfs": "^4.38.2",
191
+ "memfs": "^4.39.0",
192
192
  "mocha": "^11.7.2",
193
193
  "nodemon": "^3.1.10",
194
194
  "nyc": "^17.1.0",
@@ -198,9 +198,9 @@
198
198
  "prettier": "^3.6.2",
199
199
  "prettier-plugin-organize-imports": "^4.2.0",
200
200
  "pretty-bytes": "^7.0.1",
201
- "pretty-ms": "^9.2.0",
201
+ "pretty-ms": "^9.3.0",
202
202
  "requirejs": "^2.3.7",
203
- "rollup": "^4.50.1",
203
+ "rollup": "^4.50.2",
204
204
  "rollup-plugin-license": "^3.6.0",
205
205
  "rollup-plugin-string": "^3.0.0",
206
206
  "semver": "^7.7.2",
@@ -212,7 +212,7 @@
212
212
  "terser": "^5.44.0",
213
213
  "tslib": "^2.8.1",
214
214
  "typescript": "^5.9.2",
215
- "typescript-eslint": "^8.43.0",
215
+ "typescript-eslint": "^8.44.0",
216
216
  "vite": "^7.1.5",
217
217
  "vitepress": "^1.6.4",
218
218
  "vue": "^3.5.21",
@@ -222,7 +222,7 @@
222
222
  "yargs-parser": "^21.1.1"
223
223
  },
224
224
  "overrides": {
225
- "axios": "^1.11.0",
225
+ "axios": "^1.12.2",
226
226
  "semver": "^7.7.2",
227
227
  "readable-stream": "npm:@built-in/readable-stream@1",
228
228
  "esbuild": ">0.24.2"