rollup 4.53.2 → 4.53.4

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.53.2
5
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
4
+ Rollup.js v4.53.4
5
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
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.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
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.53.2";
30
+ var version = "4.53.4";
31
31
 
32
32
  // src/vlq.ts
33
33
  var comma = ",".charCodeAt(0);
@@ -2002,6 +2002,10 @@ const UnknownKey = Symbol('Unknown Key');
2002
2002
  const UnknownNonAccessorKey = Symbol('Unknown Non-Accessor Key');
2003
2003
  const UnknownInteger = Symbol('Unknown Integer');
2004
2004
  const SymbolToStringTag = Symbol('Symbol.toStringTag');
2005
+ const SymbolDispose = Symbol('Symbol.asyncDispose');
2006
+ const SymbolAsyncDispose = Symbol('Symbol.dispose');
2007
+ const WELL_KNOWN_SYMBOLS_LIST = [SymbolToStringTag, SymbolDispose, SymbolAsyncDispose];
2008
+ const WELL_KNOWN_SYMBOLS = new Set(WELL_KNOWN_SYMBOLS_LIST);
2005
2009
  const EMPTY_PATH = [];
2006
2010
  const UNKNOWN_PATH = [UnknownKey];
2007
2011
  // For deoptimizations, this means we are modifying an unknown property but did
@@ -2584,6 +2588,7 @@ class ExternalModule {
2584
2588
  this.reexported = false;
2585
2589
  this.used = false;
2586
2590
  this.declarations = new Map();
2591
+ this.importersByExportedName = new Map();
2587
2592
  this.mostCommonSuggestion = 0;
2588
2593
  this.nameSuggestions = new Map();
2589
2594
  this.suggestedVariableName = makeLegal(id.split(/[/\\]/).pop());
@@ -2620,8 +2625,11 @@ class ExternalModule {
2620
2625
  cacheInfoGetters() {
2621
2626
  cacheObjectGetters(this.info, ['dynamicImporters', 'importers']);
2622
2627
  }
2623
- getVariableForExportName(name) {
2628
+ getVariableForExportName(name, { importChain }) {
2624
2629
  const declaration = this.declarations.get(name);
2630
+ for (const module of importChain) {
2631
+ getOrCreate(this.importersByExportedName, name, getNewSet).add(module);
2632
+ }
2625
2633
  if (declaration)
2626
2634
  return [declaration];
2627
2635
  const externalVariable = new ExternalVariable(this, name);
@@ -2645,7 +2653,10 @@ class ExternalModule {
2645
2653
  return;
2646
2654
  const importersSet = new Set();
2647
2655
  for (const name of unused) {
2648
- for (const importer of this.declarations.get(name).module.importers) {
2656
+ const importersOfName = this.importersByExportedName.get(name);
2657
+ for (const importer of this.importers) {
2658
+ if (!importersOfName?.has(importer))
2659
+ continue;
2649
2660
  importersSet.add(importer);
2650
2661
  }
2651
2662
  }
@@ -4263,6 +4274,27 @@ const knownGlobals = {
4263
4274
  for: PF,
4264
4275
  keyFor: PF,
4265
4276
  prototype: O,
4277
+ asyncDispose: {
4278
+ __proto__: null,
4279
+ [ValueProperties]: {
4280
+ deoptimizeArgumentsOnCall: doNothing,
4281
+ getLiteralValue() {
4282
+ return SymbolAsyncDispose;
4283
+ },
4284
+ // This might not be needed, but then we need to check a few more cases
4285
+ hasEffectsWhenCalled: returnTrue
4286
+ }
4287
+ },
4288
+ dispose: {
4289
+ __proto__: null,
4290
+ [ValueProperties]: {
4291
+ deoptimizeArgumentsOnCall: doNothing,
4292
+ getLiteralValue() {
4293
+ return SymbolDispose;
4294
+ },
4295
+ hasEffectsWhenCalled: returnTrue
4296
+ }
4297
+ },
4266
4298
  toStringTag: {
4267
4299
  __proto__: null,
4268
4300
  [ValueProperties]: {
@@ -5110,6 +5142,7 @@ class LocalVariable extends Variable {
5110
5142
  return true;
5111
5143
  if (path.length === 0)
5112
5144
  return false;
5145
+ // if (this.isReassigned || this.init.included) return true;
5113
5146
  if (this.isReassigned)
5114
5147
  return true;
5115
5148
  return (!context.assigned.trackEntityAtPathAndGetIfTracked(path, this) &&
@@ -7662,11 +7695,11 @@ class MemberExpression extends NodeBase {
7662
7695
  this.dynamicPropertyKey = this.propertyKey;
7663
7696
  const value = this.property.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
7664
7697
  return (this.dynamicPropertyKey =
7665
- value === SymbolToStringTag
7666
- ? value
7667
- : typeof value === 'symbol'
7668
- ? UnknownKey
7669
- : String(value));
7698
+ typeof value === 'symbol'
7699
+ ? WELL_KNOWN_SYMBOLS.has(value)
7700
+ ? value
7701
+ : UnknownKey
7702
+ : String(value));
7670
7703
  }
7671
7704
  return this.dynamicPropertyKey;
7672
7705
  }
@@ -11626,7 +11659,8 @@ class AssignmentExpression extends NodeBase {
11626
11659
  this.left.hasEffectsWhenDestructuring?.(context, EMPTY_PATH, right));
11627
11660
  }
11628
11661
  hasEffectsOnInteractionAtPath(path, interaction, context) {
11629
- return this.right.hasEffectsOnInteractionAtPath(path, interaction, context);
11662
+ return ((interaction.type === INTERACTION_ASSIGNED && this.left.included) ||
11663
+ this.right.hasEffectsOnInteractionAtPath(path, interaction, context));
11630
11664
  }
11631
11665
  include(context, includeChildrenRecursively) {
11632
11666
  const { deoptimized, isConstReassignment, left, right, operator } = this;
@@ -13043,8 +13077,9 @@ function isReassignedExportsMember(variable, exportNamesByVariable) {
13043
13077
  }
13044
13078
 
13045
13079
  class VariableDeclarator extends NodeBase {
13046
- declareDeclarator(kind, isUsingDeclaration) {
13047
- this.isUsingDeclaration = isUsingDeclaration;
13080
+ declareDeclarator(kind) {
13081
+ this.isUsingDeclaration = kind === 'using';
13082
+ this.isAsyncUsingDeclaration = kind === 'await using';
13048
13083
  this.id.declare(kind, EMPTY_PATH, this.init || UNDEFINED_EXPRESSION);
13049
13084
  }
13050
13085
  deoptimizePath(path) {
@@ -13055,6 +13090,7 @@ class VariableDeclarator extends NodeBase {
13055
13090
  this.id.markDeclarationReached();
13056
13091
  return (initEffect ||
13057
13092
  this.isUsingDeclaration ||
13093
+ this.isAsyncUsingDeclaration ||
13058
13094
  this.id.hasEffects(context) ||
13059
13095
  (this.scope.context.options.treeshake
13060
13096
  .propertyReadSideEffects &&
@@ -13063,7 +13099,7 @@ class VariableDeclarator extends NodeBase {
13063
13099
  include(context, includeChildrenRecursively) {
13064
13100
  const { id, init } = this;
13065
13101
  if (!this.included)
13066
- this.includeNode();
13102
+ this.includeNode(context);
13067
13103
  init?.include(context, includeChildrenRecursively);
13068
13104
  id.markDeclarationReached();
13069
13105
  if (includeChildrenRecursively) {
@@ -13079,7 +13115,7 @@ class VariableDeclarator extends NodeBase {
13079
13115
  render(code, options) {
13080
13116
  const { exportNamesByVariable, snippets: { _, getPropertyAccess } } = options;
13081
13117
  const { end, id, init, start } = this;
13082
- const renderId = id.included || this.isUsingDeclaration;
13118
+ const renderId = id.included || this.isUsingDeclaration || this.isAsyncUsingDeclaration;
13083
13119
  if (renderId) {
13084
13120
  id.render(code, options);
13085
13121
  }
@@ -13101,20 +13137,30 @@ class VariableDeclarator extends NodeBase {
13101
13137
  code.appendLeft(end, `${_}=${_}void 0`);
13102
13138
  }
13103
13139
  }
13104
- includeNode() {
13140
+ includeNode(context) {
13105
13141
  this.included = true;
13106
13142
  const { id, init } = this;
13107
- if (init && id instanceof Identifier && init instanceof ClassExpression && !init.id) {
13108
- const { name, variable } = id;
13109
- for (const accessedVariable of init.scope.accessedOutsideVariables.values()) {
13110
- if (accessedVariable !== variable) {
13111
- accessedVariable.forbidName(name);
13143
+ if (init) {
13144
+ if (this.isUsingDeclaration) {
13145
+ init.includePath(SYMBOL_DISPOSE_PATH, context);
13146
+ }
13147
+ else if (this.isAsyncUsingDeclaration) {
13148
+ init.includePath(SYMBOL_ASYNC_DISPOSE_PATH, context);
13149
+ }
13150
+ if (id instanceof Identifier && init instanceof ClassExpression && !init.id) {
13151
+ const { name, variable } = id;
13152
+ for (const accessedVariable of init.scope.accessedOutsideVariables.values()) {
13153
+ if (accessedVariable !== variable) {
13154
+ accessedVariable.forbidName(name);
13155
+ }
13112
13156
  }
13113
13157
  }
13114
13158
  }
13115
13159
  }
13116
13160
  }
13117
13161
  VariableDeclarator.prototype.applyDeoptimizations = doNotDeoptimize;
13162
+ const SYMBOL_DISPOSE_PATH = [SymbolDispose];
13163
+ const SYMBOL_ASYNC_DISPOSE_PATH = [SymbolAsyncDispose];
13118
13164
 
13119
13165
  function getChunkInfoWithPath(chunk) {
13120
13166
  return { fileName: chunk.getFileName(), ...chunk.getPreRenderedChunkInfo() };
@@ -15352,23 +15398,6 @@ class UpdateExpression extends NodeBase {
15352
15398
  }
15353
15399
  UpdateExpression.prototype.includeNode = onlyIncludeSelf;
15354
15400
 
15355
- function areAllDeclarationsIncludedAndNotExported(declarations, exportNamesByVariable) {
15356
- for (const declarator of declarations) {
15357
- if (!declarator.id.included)
15358
- return false;
15359
- if (declarator.id.type === Identifier$1) {
15360
- if (exportNamesByVariable.has(declarator.id.variable))
15361
- return false;
15362
- }
15363
- else {
15364
- const exportedVariables = [];
15365
- declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
15366
- if (exportedVariables.length > 0)
15367
- return false;
15368
- }
15369
- }
15370
- return true;
15371
- }
15372
15401
  class VariableDeclaration extends NodeBase {
15373
15402
  deoptimizePath() {
15374
15403
  for (const declarator of this.declarations) {
@@ -15398,17 +15427,15 @@ class VariableDeclaration extends NodeBase {
15398
15427
  }
15399
15428
  initialise() {
15400
15429
  super.initialise();
15401
- this.isUsingDeclaration = this.kind === 'await using' || this.kind === 'using';
15402
15430
  for (const declarator of this.declarations) {
15403
- declarator.declareDeclarator(this.kind, this.isUsingDeclaration);
15431
+ declarator.declareDeclarator(this.kind);
15404
15432
  }
15405
15433
  }
15406
15434
  removeAnnotations(code) {
15407
15435
  this.declarations[0].removeAnnotations(code);
15408
15436
  }
15409
15437
  render(code, options, nodeRenderOptions = BLANK) {
15410
- if (this.isUsingDeclaration ||
15411
- areAllDeclarationsIncludedAndNotExported(this.declarations, options.exportNamesByVariable)) {
15438
+ if (this.areAllDeclarationsIncludedAndNotExported(options.exportNamesByVariable)) {
15412
15439
  for (const declarator of this.declarations) {
15413
15440
  declarator.render(code, options);
15414
15441
  }
@@ -15508,6 +15535,26 @@ class VariableDeclaration extends NodeBase {
15508
15535
  }
15509
15536
  this.renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, aggregatedSystemExports, options);
15510
15537
  }
15538
+ areAllDeclarationsIncludedAndNotExported(exportNamesByVariable) {
15539
+ if (this.kind === 'await using' || this.kind === 'using') {
15540
+ return true;
15541
+ }
15542
+ for (const declarator of this.declarations) {
15543
+ if (!declarator.id.included)
15544
+ return false;
15545
+ if (declarator.id.type === Identifier$1) {
15546
+ if (exportNamesByVariable.has(declarator.id.variable))
15547
+ return false;
15548
+ }
15549
+ else {
15550
+ const exportedVariables = [];
15551
+ declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
15552
+ if (exportedVariables.length > 0)
15553
+ return false;
15554
+ }
15555
+ }
15556
+ return true;
15557
+ }
15511
15558
  }
15512
15559
  function gatherSystemExportsAndGetSingleExport(separatedNodes, options, aggregatedSystemExports) {
15513
15560
  let singleSystemExport = null;
@@ -16750,7 +16797,7 @@ const MISSING_EXPORT_SHIM_DESCRIPTION = {
16750
16797
  identifier: null,
16751
16798
  localName: MISSING_EXPORT_SHIM_VARIABLE
16752
16799
  };
16753
- function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map()) {
16800
+ function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map(), importChain) {
16754
16801
  const searchedModules = searchedNamesAndModules.get(name);
16755
16802
  if (searchedModules) {
16756
16803
  if (searchedModules.has(target)) {
@@ -16762,6 +16809,7 @@ function getVariableForExportNameRecursive(target, name, importerForSideEffects,
16762
16809
  searchedNamesAndModules.set(name, new Set([target]));
16763
16810
  }
16764
16811
  return target.getVariableForExportName(name, {
16812
+ importChain,
16765
16813
  importerForSideEffects,
16766
16814
  isExportAllSearch,
16767
16815
  searchedNamesAndModules
@@ -17092,7 +17140,7 @@ class Module {
17092
17140
  }
17093
17141
  return this.syntheticNamespace;
17094
17142
  }
17095
- getVariableForExportName(name, { importerForSideEffects, isExportAllSearch, onlyExplicit, searchedNamesAndModules } = EMPTY_OBJECT) {
17143
+ getVariableForExportName(name, { importerForSideEffects, importChain = [], isExportAllSearch, onlyExplicit, searchedNamesAndModules } = EMPTY_OBJECT) {
17096
17144
  if (name[0] === '*') {
17097
17145
  if (name.length === 1) {
17098
17146
  // export * from './other'
@@ -17100,12 +17148,14 @@ class Module {
17100
17148
  }
17101
17149
  // export * from 'external'
17102
17150
  const module = this.graph.modulesById.get(name.slice(1));
17103
- return module.getVariableForExportName('*');
17151
+ return module.getVariableForExportName('*', {
17152
+ importChain: [...importChain, this.id]
17153
+ });
17104
17154
  }
17105
17155
  // export { foo } from './other'
17106
17156
  const reexportDeclaration = this.reexportDescriptions.get(name);
17107
17157
  if (reexportDeclaration) {
17108
- const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules);
17158
+ const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules, [...importChain, this.id]);
17109
17159
  if (!variable) {
17110
17160
  return this.error(logMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id, !!options?.missingButExportExists), reexportDeclaration.start);
17111
17161
  }
@@ -17141,7 +17191,7 @@ class Module {
17141
17191
  }
17142
17192
  if (name !== 'default') {
17143
17193
  const foundNamespaceReexport = this.namespaceReexportsByName.get(name) ??
17144
- this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules);
17194
+ this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, [...importChain, this.id]);
17145
17195
  this.namespaceReexportsByName.set(name, foundNamespaceReexport);
17146
17196
  if (foundNamespaceReexport[0]) {
17147
17197
  return foundNamespaceReexport;
@@ -17395,7 +17445,7 @@ class Module {
17395
17445
  if (otherModule instanceof Module && importDescription.name === '*') {
17396
17446
  return otherModule.namespace;
17397
17447
  }
17398
- const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
17448
+ const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules, [this.id]);
17399
17449
  if (!declaration) {
17400
17450
  return this.error(logMissingExport(importDescription.name, this.id, otherModule.id, !!options?.missingButExportExists), importDescription.start);
17401
17451
  }
@@ -17600,13 +17650,13 @@ class Module {
17600
17650
  getImportedJsxFactoryVariable(baseName, nodeStart, importSource) {
17601
17651
  const { id } = this.resolvedIds[importSource];
17602
17652
  const module = this.graph.modulesById.get(id);
17603
- const [variable] = module.getVariableForExportName(baseName);
17653
+ const [variable] = module.getVariableForExportName(baseName, { importChain: [this.id] });
17604
17654
  if (!variable) {
17605
17655
  return this.error(logMissingJsxExport(baseName, id, this.id), nodeStart);
17606
17656
  }
17607
17657
  return variable;
17608
17658
  }
17609
- getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules) {
17659
+ getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, importChain) {
17610
17660
  let foundSyntheticDeclaration = null;
17611
17661
  const foundInternalDeclarations = new Map();
17612
17662
  const foundExternalDeclarations = new Set();
@@ -17618,7 +17668,7 @@ class Module {
17618
17668
  const [variable, options] = getVariableForExportNameRecursive(module, name, importerForSideEffects, true,
17619
17669
  // We are creating a copy to handle the case where the same binding is
17620
17670
  // imported through different namespace reexports gracefully
17621
- copyNameToModulesMap(searchedNamesAndModules));
17671
+ copyNameToModulesMap(searchedNamesAndModules), importChain);
17622
17672
  if (module instanceof ExternalModule || options?.indirectExternal) {
17623
17673
  foundExternalDeclarations.add(variable);
17624
17674
  }
@@ -17659,7 +17709,9 @@ class Module {
17659
17709
  const syntheticNamespaces = new Set();
17660
17710
  for (const module of [this, ...this.exportAllModules]) {
17661
17711
  if (module instanceof ExternalModule) {
17662
- const [externalVariable] = module.getVariableForExportName('*');
17712
+ const [externalVariable] = module.getVariableForExportName('*', {
17713
+ importChain: [this.id]
17714
+ });
17663
17715
  externalVariable.includePath(UNKNOWN_PATH, createInclusionContext());
17664
17716
  this.includedImports.add(externalVariable);
17665
17717
  externalNamespaces.add(externalVariable);
@@ -21818,7 +21870,7 @@ class FileEmitter {
21818
21870
  }
21819
21871
  else {
21820
21872
  const sourceHash = getHash(consumedFile.source);
21821
- getOrCreate(consumedAssetsByHash, sourceHash, () => []).push(consumedFile);
21873
+ getOrCreate(consumedAssetsByHash, sourceHash, getNewArray).push(consumedFile);
21822
21874
  }
21823
21875
  }
21824
21876
  else if (consumedFile.type === 'prebuilt-chunk') {
@@ -22737,7 +22789,7 @@ class Graph {
22737
22789
  for (const module of this.modules) {
22738
22790
  for (const importDescription of module.importDescriptions.values()) {
22739
22791
  if (importDescription.name !== '*') {
22740
- const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name);
22792
+ const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name, { importChain: [module.id] });
22741
22793
  if (!variable) {
22742
22794
  module.log(LOGLEVEL_WARN, logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start);
22743
22795
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
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.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.d.ts CHANGED
@@ -562,7 +562,8 @@ export type PluginHooks = {
562
562
  };
563
563
 
564
564
  export interface OutputPlugin
565
- extends Partial<{ [K in OutputPluginHooks]: PluginHooks[K] }>,
565
+ extends
566
+ Partial<{ [K in OutputPluginHooks]: PluginHooks[K] }>,
566
567
  Partial<Record<AddonHooks, ObjectHook<AddonHook>>> {
567
568
  cacheKey?: string | undefined;
568
569
  name: string;
@@ -618,8 +619,9 @@ export interface NormalizedTreeshakingOptions {
618
619
  unknownGlobalSideEffects: boolean;
619
620
  }
620
621
 
621
- export interface TreeshakingOptions
622
- extends Partial<Omit<NormalizedTreeshakingOptions, 'moduleSideEffects'>> {
622
+ export interface TreeshakingOptions extends Partial<
623
+ Omit<NormalizedTreeshakingOptions, 'moduleSideEffects'>
624
+ > {
623
625
  moduleSideEffects?: ModuleSideEffectsOption | undefined;
624
626
  preset?: TreeshakingPreset | undefined;
625
627
  }
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
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.53.2";
45
+ var version = "4.53.4";
46
46
 
47
47
  function ensureArray$1(items) {
48
48
  if (Array.isArray(items)) {
@@ -369,7 +369,7 @@ class FileEmitter {
369
369
  }
370
370
  else {
371
371
  const sourceHash = getHash(consumedFile.source);
372
- getOrCreate(consumedAssetsByHash, sourceHash, () => []).push(consumedFile);
372
+ getOrCreate(consumedAssetsByHash, sourceHash, getNewArray).push(consumedFile);
373
373
  }
374
374
  }
375
375
  else if (consumedFile.type === 'prebuilt-chunk') {
@@ -5793,6 +5793,10 @@ const UnknownKey = Symbol('Unknown Key');
5793
5793
  const UnknownNonAccessorKey = Symbol('Unknown Non-Accessor Key');
5794
5794
  const UnknownInteger = Symbol('Unknown Integer');
5795
5795
  const SymbolToStringTag = Symbol('Symbol.toStringTag');
5796
+ const SymbolDispose = Symbol('Symbol.asyncDispose');
5797
+ const SymbolAsyncDispose = Symbol('Symbol.dispose');
5798
+ const WELL_KNOWN_SYMBOLS_LIST = [SymbolToStringTag, SymbolDispose, SymbolAsyncDispose];
5799
+ const WELL_KNOWN_SYMBOLS = new Set(WELL_KNOWN_SYMBOLS_LIST);
5796
5800
  const EMPTY_PATH = [];
5797
5801
  const UNKNOWN_PATH = [UnknownKey];
5798
5802
  // For deoptimizations, this means we are modifying an unknown property but did
@@ -6375,6 +6379,7 @@ class ExternalModule {
6375
6379
  this.reexported = false;
6376
6380
  this.used = false;
6377
6381
  this.declarations = new Map();
6382
+ this.importersByExportedName = new Map();
6378
6383
  this.mostCommonSuggestion = 0;
6379
6384
  this.nameSuggestions = new Map();
6380
6385
  this.suggestedVariableName = makeLegal(id.split(/[/\\]/).pop());
@@ -6411,8 +6416,11 @@ class ExternalModule {
6411
6416
  cacheInfoGetters() {
6412
6417
  cacheObjectGetters(this.info, ['dynamicImporters', 'importers']);
6413
6418
  }
6414
- getVariableForExportName(name) {
6419
+ getVariableForExportName(name, { importChain }) {
6415
6420
  const declaration = this.declarations.get(name);
6421
+ for (const module of importChain) {
6422
+ getOrCreate(this.importersByExportedName, name, getNewSet).add(module);
6423
+ }
6416
6424
  if (declaration)
6417
6425
  return [declaration];
6418
6426
  const externalVariable = new ExternalVariable(this, name);
@@ -6436,7 +6444,10 @@ class ExternalModule {
6436
6444
  return;
6437
6445
  const importersSet = new Set();
6438
6446
  for (const name of unused) {
6439
- for (const importer of this.declarations.get(name).module.importers) {
6447
+ const importersOfName = this.importersByExportedName.get(name);
6448
+ for (const importer of this.importers) {
6449
+ if (!importersOfName?.has(importer))
6450
+ continue;
6440
6451
  importersSet.add(importer);
6441
6452
  }
6442
6453
  }
@@ -8052,6 +8063,27 @@ const knownGlobals = {
8052
8063
  for: PF,
8053
8064
  keyFor: PF,
8054
8065
  prototype: O,
8066
+ asyncDispose: {
8067
+ __proto__: null,
8068
+ [ValueProperties]: {
8069
+ deoptimizeArgumentsOnCall: doNothing,
8070
+ getLiteralValue() {
8071
+ return SymbolAsyncDispose;
8072
+ },
8073
+ // This might not be needed, but then we need to check a few more cases
8074
+ hasEffectsWhenCalled: returnTrue
8075
+ }
8076
+ },
8077
+ dispose: {
8078
+ __proto__: null,
8079
+ [ValueProperties]: {
8080
+ deoptimizeArgumentsOnCall: doNothing,
8081
+ getLiteralValue() {
8082
+ return SymbolDispose;
8083
+ },
8084
+ hasEffectsWhenCalled: returnTrue
8085
+ }
8086
+ },
8055
8087
  toStringTag: {
8056
8088
  __proto__: null,
8057
8089
  [ValueProperties]: {
@@ -8899,6 +8931,7 @@ class LocalVariable extends Variable {
8899
8931
  return true;
8900
8932
  if (path.length === 0)
8901
8933
  return false;
8934
+ // if (this.isReassigned || this.init.included) return true;
8902
8935
  if (this.isReassigned)
8903
8936
  return true;
8904
8937
  return (!context.assigned.trackEntityAtPathAndGetIfTracked(path, this) &&
@@ -11439,11 +11472,11 @@ class MemberExpression extends NodeBase {
11439
11472
  this.dynamicPropertyKey = this.propertyKey;
11440
11473
  const value = this.property.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this);
11441
11474
  return (this.dynamicPropertyKey =
11442
- value === SymbolToStringTag
11443
- ? value
11444
- : typeof value === 'symbol'
11445
- ? UnknownKey
11446
- : String(value));
11475
+ typeof value === 'symbol'
11476
+ ? WELL_KNOWN_SYMBOLS.has(value)
11477
+ ? value
11478
+ : UnknownKey
11479
+ : String(value));
11447
11480
  }
11448
11481
  return this.dynamicPropertyKey;
11449
11482
  }
@@ -13236,7 +13269,8 @@ class AssignmentExpression extends NodeBase {
13236
13269
  this.left.hasEffectsWhenDestructuring?.(context, EMPTY_PATH, right));
13237
13270
  }
13238
13271
  hasEffectsOnInteractionAtPath(path, interaction, context) {
13239
- return this.right.hasEffectsOnInteractionAtPath(path, interaction, context);
13272
+ return ((interaction.type === INTERACTION_ASSIGNED && this.left.included) ||
13273
+ this.right.hasEffectsOnInteractionAtPath(path, interaction, context));
13240
13274
  }
13241
13275
  include(context, includeChildrenRecursively) {
13242
13276
  const { deoptimized, isConstReassignment, left, right, operator } = this;
@@ -14653,8 +14687,9 @@ function isReassignedExportsMember(variable, exportNamesByVariable) {
14653
14687
  }
14654
14688
 
14655
14689
  class VariableDeclarator extends NodeBase {
14656
- declareDeclarator(kind, isUsingDeclaration) {
14657
- this.isUsingDeclaration = isUsingDeclaration;
14690
+ declareDeclarator(kind) {
14691
+ this.isUsingDeclaration = kind === 'using';
14692
+ this.isAsyncUsingDeclaration = kind === 'await using';
14658
14693
  this.id.declare(kind, EMPTY_PATH, this.init || UNDEFINED_EXPRESSION);
14659
14694
  }
14660
14695
  deoptimizePath(path) {
@@ -14665,6 +14700,7 @@ class VariableDeclarator extends NodeBase {
14665
14700
  this.id.markDeclarationReached();
14666
14701
  return (initEffect ||
14667
14702
  this.isUsingDeclaration ||
14703
+ this.isAsyncUsingDeclaration ||
14668
14704
  this.id.hasEffects(context) ||
14669
14705
  (this.scope.context.options.treeshake
14670
14706
  .propertyReadSideEffects &&
@@ -14673,7 +14709,7 @@ class VariableDeclarator extends NodeBase {
14673
14709
  include(context, includeChildrenRecursively) {
14674
14710
  const { id, init } = this;
14675
14711
  if (!this.included)
14676
- this.includeNode();
14712
+ this.includeNode(context);
14677
14713
  init?.include(context, includeChildrenRecursively);
14678
14714
  id.markDeclarationReached();
14679
14715
  if (includeChildrenRecursively) {
@@ -14689,7 +14725,7 @@ class VariableDeclarator extends NodeBase {
14689
14725
  render(code, options) {
14690
14726
  const { exportNamesByVariable, snippets: { _, getPropertyAccess } } = options;
14691
14727
  const { end, id, init, start } = this;
14692
- const renderId = id.included || this.isUsingDeclaration;
14728
+ const renderId = id.included || this.isUsingDeclaration || this.isAsyncUsingDeclaration;
14693
14729
  if (renderId) {
14694
14730
  id.render(code, options);
14695
14731
  }
@@ -14711,20 +14747,30 @@ class VariableDeclarator extends NodeBase {
14711
14747
  code.appendLeft(end, `${_}=${_}void 0`);
14712
14748
  }
14713
14749
  }
14714
- includeNode() {
14750
+ includeNode(context) {
14715
14751
  this.included = true;
14716
14752
  const { id, init } = this;
14717
- if (init && id instanceof Identifier && init instanceof ClassExpression && !init.id) {
14718
- const { name, variable } = id;
14719
- for (const accessedVariable of init.scope.accessedOutsideVariables.values()) {
14720
- if (accessedVariable !== variable) {
14721
- accessedVariable.forbidName(name);
14753
+ if (init) {
14754
+ if (this.isUsingDeclaration) {
14755
+ init.includePath(SYMBOL_DISPOSE_PATH, context);
14756
+ }
14757
+ else if (this.isAsyncUsingDeclaration) {
14758
+ init.includePath(SYMBOL_ASYNC_DISPOSE_PATH, context);
14759
+ }
14760
+ if (id instanceof Identifier && init instanceof ClassExpression && !init.id) {
14761
+ const { name, variable } = id;
14762
+ for (const accessedVariable of init.scope.accessedOutsideVariables.values()) {
14763
+ if (accessedVariable !== variable) {
14764
+ accessedVariable.forbidName(name);
14765
+ }
14722
14766
  }
14723
14767
  }
14724
14768
  }
14725
14769
  }
14726
14770
  }
14727
14771
  VariableDeclarator.prototype.applyDeoptimizations = doNotDeoptimize;
14772
+ const SYMBOL_DISPOSE_PATH = [SymbolDispose];
14773
+ const SYMBOL_ASYNC_DISPOSE_PATH = [SymbolAsyncDispose];
14728
14774
 
14729
14775
  function getChunkInfoWithPath(chunk) {
14730
14776
  return { fileName: chunk.getFileName(), ...chunk.getPreRenderedChunkInfo() };
@@ -16962,23 +17008,6 @@ class UpdateExpression extends NodeBase {
16962
17008
  }
16963
17009
  UpdateExpression.prototype.includeNode = onlyIncludeSelf;
16964
17010
 
16965
- function areAllDeclarationsIncludedAndNotExported(declarations, exportNamesByVariable) {
16966
- for (const declarator of declarations) {
16967
- if (!declarator.id.included)
16968
- return false;
16969
- if (declarator.id.type === parseAst_js.Identifier) {
16970
- if (exportNamesByVariable.has(declarator.id.variable))
16971
- return false;
16972
- }
16973
- else {
16974
- const exportedVariables = [];
16975
- declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
16976
- if (exportedVariables.length > 0)
16977
- return false;
16978
- }
16979
- }
16980
- return true;
16981
- }
16982
17011
  class VariableDeclaration extends NodeBase {
16983
17012
  deoptimizePath() {
16984
17013
  for (const declarator of this.declarations) {
@@ -17008,17 +17037,15 @@ class VariableDeclaration extends NodeBase {
17008
17037
  }
17009
17038
  initialise() {
17010
17039
  super.initialise();
17011
- this.isUsingDeclaration = this.kind === 'await using' || this.kind === 'using';
17012
17040
  for (const declarator of this.declarations) {
17013
- declarator.declareDeclarator(this.kind, this.isUsingDeclaration);
17041
+ declarator.declareDeclarator(this.kind);
17014
17042
  }
17015
17043
  }
17016
17044
  removeAnnotations(code) {
17017
17045
  this.declarations[0].removeAnnotations(code);
17018
17046
  }
17019
17047
  render(code, options, nodeRenderOptions = parseAst_js.BLANK) {
17020
- if (this.isUsingDeclaration ||
17021
- areAllDeclarationsIncludedAndNotExported(this.declarations, options.exportNamesByVariable)) {
17048
+ if (this.areAllDeclarationsIncludedAndNotExported(options.exportNamesByVariable)) {
17022
17049
  for (const declarator of this.declarations) {
17023
17050
  declarator.render(code, options);
17024
17051
  }
@@ -17118,6 +17145,26 @@ class VariableDeclaration extends NodeBase {
17118
17145
  }
17119
17146
  this.renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, aggregatedSystemExports, options);
17120
17147
  }
17148
+ areAllDeclarationsIncludedAndNotExported(exportNamesByVariable) {
17149
+ if (this.kind === 'await using' || this.kind === 'using') {
17150
+ return true;
17151
+ }
17152
+ for (const declarator of this.declarations) {
17153
+ if (!declarator.id.included)
17154
+ return false;
17155
+ if (declarator.id.type === parseAst_js.Identifier) {
17156
+ if (exportNamesByVariable.has(declarator.id.variable))
17157
+ return false;
17158
+ }
17159
+ else {
17160
+ const exportedVariables = [];
17161
+ declarator.id.addExportedVariables(exportedVariables, exportNamesByVariable);
17162
+ if (exportedVariables.length > 0)
17163
+ return false;
17164
+ }
17165
+ }
17166
+ return true;
17167
+ }
17121
17168
  }
17122
17169
  function gatherSystemExportsAndGetSingleExport(separatedNodes, options, aggregatedSystemExports) {
17123
17170
  let singleSystemExport = null;
@@ -18353,7 +18400,7 @@ const MISSING_EXPORT_SHIM_DESCRIPTION = {
18353
18400
  identifier: null,
18354
18401
  localName: MISSING_EXPORT_SHIM_VARIABLE
18355
18402
  };
18356
- function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map()) {
18403
+ function getVariableForExportNameRecursive(target, name, importerForSideEffects, isExportAllSearch, searchedNamesAndModules = new Map(), importChain) {
18357
18404
  const searchedModules = searchedNamesAndModules.get(name);
18358
18405
  if (searchedModules) {
18359
18406
  if (searchedModules.has(target)) {
@@ -18365,6 +18412,7 @@ function getVariableForExportNameRecursive(target, name, importerForSideEffects,
18365
18412
  searchedNamesAndModules.set(name, new Set([target]));
18366
18413
  }
18367
18414
  return target.getVariableForExportName(name, {
18415
+ importChain,
18368
18416
  importerForSideEffects,
18369
18417
  isExportAllSearch,
18370
18418
  searchedNamesAndModules
@@ -18695,7 +18743,7 @@ class Module {
18695
18743
  }
18696
18744
  return this.syntheticNamespace;
18697
18745
  }
18698
- getVariableForExportName(name, { importerForSideEffects, isExportAllSearch, onlyExplicit, searchedNamesAndModules } = parseAst_js.EMPTY_OBJECT) {
18746
+ getVariableForExportName(name, { importerForSideEffects, importChain = [], isExportAllSearch, onlyExplicit, searchedNamesAndModules } = parseAst_js.EMPTY_OBJECT) {
18699
18747
  if (name[0] === '*') {
18700
18748
  if (name.length === 1) {
18701
18749
  // export * from './other'
@@ -18703,12 +18751,14 @@ class Module {
18703
18751
  }
18704
18752
  // export * from 'external'
18705
18753
  const module = this.graph.modulesById.get(name.slice(1));
18706
- return module.getVariableForExportName('*');
18754
+ return module.getVariableForExportName('*', {
18755
+ importChain: [...importChain, this.id]
18756
+ });
18707
18757
  }
18708
18758
  // export { foo } from './other'
18709
18759
  const reexportDeclaration = this.reexportDescriptions.get(name);
18710
18760
  if (reexportDeclaration) {
18711
- const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules);
18761
+ const [variable, options] = getVariableForExportNameRecursive(reexportDeclaration.module, reexportDeclaration.localName, importerForSideEffects, false, searchedNamesAndModules, [...importChain, this.id]);
18712
18762
  if (!variable) {
18713
18763
  return this.error(parseAst_js.logMissingExport(reexportDeclaration.localName, this.id, reexportDeclaration.module.id, !!options?.missingButExportExists), reexportDeclaration.start);
18714
18764
  }
@@ -18744,7 +18794,7 @@ class Module {
18744
18794
  }
18745
18795
  if (name !== 'default') {
18746
18796
  const foundNamespaceReexport = this.namespaceReexportsByName.get(name) ??
18747
- this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules);
18797
+ this.getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, [...importChain, this.id]);
18748
18798
  this.namespaceReexportsByName.set(name, foundNamespaceReexport);
18749
18799
  if (foundNamespaceReexport[0]) {
18750
18800
  return foundNamespaceReexport;
@@ -18998,7 +19048,7 @@ class Module {
18998
19048
  if (otherModule instanceof Module && importDescription.name === '*') {
18999
19049
  return otherModule.namespace;
19000
19050
  }
19001
- const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules);
19051
+ const [declaration, options] = getVariableForExportNameRecursive(otherModule, importDescription.name, importerForSideEffects || this, isExportAllSearch, searchedNamesAndModules, [this.id]);
19002
19052
  if (!declaration) {
19003
19053
  return this.error(parseAst_js.logMissingExport(importDescription.name, this.id, otherModule.id, !!options?.missingButExportExists), importDescription.start);
19004
19054
  }
@@ -19203,13 +19253,13 @@ class Module {
19203
19253
  getImportedJsxFactoryVariable(baseName, nodeStart, importSource) {
19204
19254
  const { id } = this.resolvedIds[importSource];
19205
19255
  const module = this.graph.modulesById.get(id);
19206
- const [variable] = module.getVariableForExportName(baseName);
19256
+ const [variable] = module.getVariableForExportName(baseName, { importChain: [this.id] });
19207
19257
  if (!variable) {
19208
19258
  return this.error(parseAst_js.logMissingJsxExport(baseName, id, this.id), nodeStart);
19209
19259
  }
19210
19260
  return variable;
19211
19261
  }
19212
- getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules) {
19262
+ getVariableFromNamespaceReexports(name, importerForSideEffects, searchedNamesAndModules, importChain) {
19213
19263
  let foundSyntheticDeclaration = null;
19214
19264
  const foundInternalDeclarations = new Map();
19215
19265
  const foundExternalDeclarations = new Set();
@@ -19221,7 +19271,7 @@ class Module {
19221
19271
  const [variable, options] = getVariableForExportNameRecursive(module, name, importerForSideEffects, true,
19222
19272
  // We are creating a copy to handle the case where the same binding is
19223
19273
  // imported through different namespace reexports gracefully
19224
- copyNameToModulesMap(searchedNamesAndModules));
19274
+ copyNameToModulesMap(searchedNamesAndModules), importChain);
19225
19275
  if (module instanceof ExternalModule || options?.indirectExternal) {
19226
19276
  foundExternalDeclarations.add(variable);
19227
19277
  }
@@ -19262,7 +19312,9 @@ class Module {
19262
19312
  const syntheticNamespaces = new Set();
19263
19313
  for (const module of [this, ...this.exportAllModules]) {
19264
19314
  if (module instanceof ExternalModule) {
19265
- const [externalVariable] = module.getVariableForExportName('*');
19315
+ const [externalVariable] = module.getVariableForExportName('*', {
19316
+ importChain: [this.id]
19317
+ });
19266
19318
  externalVariable.includePath(UNKNOWN_PATH, createInclusionContext());
19267
19319
  this.includedImports.add(externalVariable);
19268
19320
  externalNamespaces.add(externalVariable);
@@ -23109,7 +23161,7 @@ class Graph {
23109
23161
  for (const module of this.modules) {
23110
23162
  for (const importDescription of module.importDescriptions.values()) {
23111
23163
  if (importDescription.name !== '*') {
23112
- const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name);
23164
+ const [variable, options] = importDescription.module.getVariableForExportName(importDescription.name, { importChain: [module.id] });
23113
23165
  if (!variable) {
23114
23166
  module.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logMissingExport(importDescription.name, module.id, importDescription.module.id, !!options?.missingButExportExists), importDescription.start);
23115
23167
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.53.2
4
- Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
3
+ Rollup.js v4.53.4
4
+ Mon, 15 Dec 2025 12:00:59 GMT - commit 7df7947fdb51ead87b71d38ece3752796bd0249c
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.53.2",
3
+ "version": "4.53.4",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -57,9 +57,8 @@
57
57
  "preview:docs": "vitepress preview docs",
58
58
  "ci:artifacts": "napi artifacts",
59
59
  "ci:lint": "concurrently -c red,yellow,green,blue 'npm:lint:js:nofix' 'npm:lint:native-js' 'npm:lint:markdown:nofix' 'npm:lint:rust:nofix'",
60
- "ci:test:only": "npm run build:cjs && npm run build:copy-native && npm run build:bootstrap && npm run build:copy-native && npm run test:only",
61
- "ci:test:all": "npm run build:cjs && npm run build:copy-native && npm run build:bootstrap && npm run build:copy-native && concurrently --kill-others-on-fail -c green,blue,magenta,cyan 'npm:test:only' 'npm:test:typescript' 'npm:test:leak' 'npm:test:browser'",
62
- "ci:coverage": "npm run build:cjs && npm run build:copy-native && npm run build:bootstrap && npm run build:copy-native && NODE_OPTIONS=--no-experimental-require-module nyc --reporter lcovonly mocha",
60
+ "ci:test:all": "concurrently --kill-others-on-fail -c green,blue,magenta,cyan 'npm:test:only' 'npm:test:typescript' 'npm:test:leak' 'npm:test:browser'",
61
+ "ci:coverage": "NODE_OPTIONS=--no-experimental-require-module nyc --reporter lcovonly mocha",
63
62
  "lint": "concurrently -c red,yellow,green,blue 'npm:lint:js' 'npm:lint:native-js' 'npm:lint:markdown' 'npm:lint:rust'",
64
63
  "lint:js": "eslint . --fix --cache --concurrency auto",
65
64
  "lint:js:nofix": "eslint . --cache --concurrency auto",
@@ -69,12 +68,15 @@
69
68
  "lint:rust": "cd rust && cargo fmt && cargo clippy --fix --allow-dirty",
70
69
  "lint:rust:nofix": "cd rust && cargo fmt --check && cargo clippy",
71
70
  "perf": "npm run build:bootstrap:cjs && node --expose-gc scripts/perf-report/index.js",
72
- "prepare": "husky && patch-package && node scripts/check-release.js || npm run build:prepare",
71
+ "prepare": "husky && npm run prepare:patch && node scripts/check-release.js || npm run build:prepare",
72
+ "prepare:patch": "patch-package",
73
73
  "prepublishOnly": "node scripts/check-release.js && node scripts/prepublish.js",
74
74
  "postpublish": "node scripts/postpublish.js",
75
75
  "prepublish:napi": "napi prepublish --no-gh-release",
76
76
  "release": "node scripts/prepare-release.js",
77
77
  "release:docs": "git fetch --update-head-ok origin master:master && git branch --force documentation-published master && git push origin documentation-published",
78
+ "check-audit": "check-audit",
79
+ "resolve-audit": "resolve-audit",
78
80
  "test": "npm run build && npm run test:all",
79
81
  "test:update-snapshots": "node scripts/update-snapshots.js",
80
82
  "test:cjs": "npm run build:cjs && npm run test:only",
@@ -86,7 +88,7 @@
86
88
  "test:package": "node scripts/test-package.js",
87
89
  "test:options": "node scripts/test-options.js",
88
90
  "test:only": "mocha test/test.js",
89
- "test:typescript": "echo skipped",
91
+ "test:typescript": "shx rm -rf test/typescript/dist && shx cp -r dist test/typescript/ && tsc --noEmit -p test/typescript && tsc --noEmit -p . && tsc --noEmit -p scripts && vue-tsc --noEmit -p docs",
90
92
  "test:browser": "mocha test/browser/index.js",
91
93
  "watch": "rollup --config rollup.config.ts --configPlugin typescript --watch"
92
94
  },
@@ -109,28 +111,28 @@
109
111
  "homepage": "https://rollupjs.org/",
110
112
  "optionalDependencies": {
111
113
  "fsevents": "~2.3.2",
112
- "@rollup/rollup-darwin-arm64": "4.53.2",
113
- "@rollup/rollup-android-arm64": "4.53.2",
114
- "@rollup/rollup-win32-arm64-msvc": "4.53.2",
115
- "@rollup/rollup-freebsd-arm64": "4.53.2",
116
- "@rollup/rollup-linux-arm64-gnu": "4.53.2",
117
- "@rollup/rollup-linux-arm64-musl": "4.53.2",
118
- "@rollup/rollup-android-arm-eabi": "4.53.2",
119
- "@rollup/rollup-linux-arm-gnueabihf": "4.53.2",
120
- "@rollup/rollup-linux-arm-musleabihf": "4.53.2",
121
- "@rollup/rollup-win32-ia32-msvc": "4.53.2",
122
- "@rollup/rollup-linux-loong64-gnu": "4.53.2",
123
- "@rollup/rollup-linux-riscv64-gnu": "4.53.2",
124
- "@rollup/rollup-linux-riscv64-musl": "4.53.2",
125
- "@rollup/rollup-linux-ppc64-gnu": "4.53.2",
126
- "@rollup/rollup-linux-s390x-gnu": "4.53.2",
127
- "@rollup/rollup-darwin-x64": "4.53.2",
128
- "@rollup/rollup-win32-x64-gnu": "4.53.2",
129
- "@rollup/rollup-win32-x64-msvc": "4.53.2",
130
- "@rollup/rollup-freebsd-x64": "4.53.2",
131
- "@rollup/rollup-linux-x64-gnu": "4.53.2",
132
- "@rollup/rollup-linux-x64-musl": "4.53.2",
133
- "@rollup/rollup-openharmony-arm64": "4.53.2"
114
+ "@rollup/rollup-darwin-arm64": "4.53.4",
115
+ "@rollup/rollup-android-arm64": "4.53.4",
116
+ "@rollup/rollup-win32-arm64-msvc": "4.53.4",
117
+ "@rollup/rollup-freebsd-arm64": "4.53.4",
118
+ "@rollup/rollup-linux-arm64-gnu": "4.53.4",
119
+ "@rollup/rollup-linux-arm64-musl": "4.53.4",
120
+ "@rollup/rollup-android-arm-eabi": "4.53.4",
121
+ "@rollup/rollup-linux-arm-gnueabihf": "4.53.4",
122
+ "@rollup/rollup-linux-arm-musleabihf": "4.53.4",
123
+ "@rollup/rollup-win32-ia32-msvc": "4.53.4",
124
+ "@rollup/rollup-linux-loong64-gnu": "4.53.4",
125
+ "@rollup/rollup-linux-riscv64-gnu": "4.53.4",
126
+ "@rollup/rollup-linux-riscv64-musl": "4.53.4",
127
+ "@rollup/rollup-linux-ppc64-gnu": "4.53.4",
128
+ "@rollup/rollup-linux-s390x-gnu": "4.53.4",
129
+ "@rollup/rollup-darwin-x64": "4.53.4",
130
+ "@rollup/rollup-win32-x64-gnu": "4.53.4",
131
+ "@rollup/rollup-win32-x64-msvc": "4.53.4",
132
+ "@rollup/rollup-freebsd-x64": "4.53.4",
133
+ "@rollup/rollup-linux-x64-gnu": "4.53.4",
134
+ "@rollup/rollup-linux-x64-musl": "4.53.4",
135
+ "@rollup/rollup-openharmony-arm64": "4.53.4"
134
136
  },
135
137
  "dependencies": {
136
138
  "@types/estree": "1.0.8"
@@ -144,12 +146,12 @@
144
146
  "@codemirror/language": "^6.11.3",
145
147
  "@codemirror/search": "^6.5.11",
146
148
  "@codemirror/state": "^6.5.2",
147
- "@codemirror/view": "^6.38.6",
149
+ "@codemirror/view": "^6.39.3",
148
150
  "@eslint/js": "^9.39.1",
149
- "@inquirer/prompts": "^7.9.0",
151
+ "@inquirer/prompts": "^7.10.1",
150
152
  "@jridgewell/sourcemap-codec": "^1.5.5",
151
- "@mermaid-js/mermaid-cli": "^11.4.0",
152
- "@napi-rs/cli": "^3.4.1",
153
+ "@mermaid-js/mermaid-cli": "^11.12.0",
154
+ "@napi-rs/cli": "3.4.1",
153
155
  "@rollup/plugin-alias": "^6.0.0",
154
156
  "@rollup/plugin-buble": "^1.0.3",
155
157
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -159,13 +161,13 @@
159
161
  "@rollup/plugin-terser": "^0.4.4",
160
162
  "@rollup/plugin-typescript": "^12.3.0",
161
163
  "@rollup/pluginutils": "^5.3.0",
162
- "@shikijs/vitepress-twoslash": "^3.14.0",
164
+ "@shikijs/vitepress-twoslash": "^3.19.0",
163
165
  "@types/mocha": "^10.0.10",
164
- "@types/node": "^20.19.24",
166
+ "@types/node": "^20.19.26",
165
167
  "@types/picomatch": "^4.0.2",
166
168
  "@types/semver": "^7.7.1",
167
169
  "@types/yargs-parser": "^21.0.3",
168
- "@vue/language-server": "^3.1.3",
170
+ "@vue/language-server": "^3.1.8",
169
171
  "acorn": "^8.15.0",
170
172
  "acorn-import-assertions": "^1.9.0",
171
173
  "acorn-jsx": "^5.3.2",
@@ -182,7 +184,7 @@
182
184
  "eslint-config-prettier": "^10.1.8",
183
185
  "eslint-plugin-prettier": "^5.5.4",
184
186
  "eslint-plugin-unicorn": "^62.0.0",
185
- "eslint-plugin-vue": "^10.5.1",
187
+ "eslint-plugin-vue": "^10.6.2",
186
188
  "fixturify": "^3.0.0",
187
189
  "flru": "^1.0.2",
188
190
  "fs-extra": "^11.3.2",
@@ -190,23 +192,24 @@
190
192
  "globals": "^16.5.0",
191
193
  "husky": "^9.1.7",
192
194
  "is-reference": "^3.0.3",
193
- "lint-staged": "^16.2.6",
195
+ "lint-staged": "^16.2.7",
194
196
  "locate-character": "^3.0.0",
195
197
  "magic-string": "^0.30.21",
196
- "memfs": "^4.50.0",
197
- "mocha": "^11.7.4",
198
- "nodemon": "^3.1.10",
198
+ "memfs": "^4.51.1",
199
+ "mocha": "^11.7.5",
200
+ "nodemon": "^3.1.11",
201
+ "npm-audit-resolver": "^3.0.0-RC.0",
199
202
  "nyc": "^17.1.0",
200
203
  "patch-package": "^8.0.1",
201
204
  "picocolors": "^1.1.1",
202
205
  "picomatch": "^4.0.3",
203
- "pinia": "^3.0.3",
204
- "prettier": "^3.6.2",
206
+ "pinia": "^3.0.4",
207
+ "prettier": "^3.7.4",
205
208
  "prettier-plugin-organize-imports": "^4.3.0",
206
209
  "pretty-bytes": "^7.1.0",
207
210
  "pretty-ms": "^9.3.0",
208
- "requirejs": "^2.3.7",
209
- "rollup": "^4.52.5",
211
+ "requirejs": "^2.3.8",
212
+ "rollup": "^4.53.3",
210
213
  "rollup-plugin-license": "^3.6.0",
211
214
  "rollup-plugin-string": "^3.0.0",
212
215
  "semver": "^7.7.3",
@@ -215,20 +218,20 @@
215
218
  "source-map": "^0.7.6",
216
219
  "source-map-support": "^0.5.21",
217
220
  "systemjs": "^6.15.1",
218
- "terser": "^5.44.0",
221
+ "terser": "^5.44.1",
219
222
  "tslib": "^2.8.1",
220
223
  "typescript": "^5.9.3",
221
- "typescript-eslint": "^8.46.3",
222
- "vite": "^7.1.12",
224
+ "typescript-eslint": "^8.49.0",
225
+ "vite": "^7.2.7",
223
226
  "vitepress": "^1.6.4",
224
- "vue": "^3.5.22",
227
+ "vue": "^3.5.25",
225
228
  "vue-eslint-parser": "^10.2.0",
226
- "vue-tsc": "^3.1.3",
229
+ "vue-tsc": "^3.1.8",
227
230
  "wasm-pack": "^0.13.1",
228
231
  "yargs-parser": "^21.1.1"
229
232
  },
230
233
  "overrides": {
231
- "axios": "^1.13.1",
234
+ "axios": "^1.13.2",
232
235
  "esbuild": ">0.24.2",
233
236
  "readable-stream": "npm:@built-in/readable-stream@1",
234
237
  "semver": "^7.7.3",