@rollup/wasm-node 4.63.5 → 4.64.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.
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.63.5
4
- Thu, 24 Sep 2026 10:07:23 GMT - commit 3722484c33c58b3ab0cbbfcca09b8f267d420329
3
+ Rollup.js v4.64.0
4
+ Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
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.63.5";
45
+ var version = "4.64.0";
46
46
  const package_ = {
47
47
  version: version};
48
48
 
@@ -4507,7 +4507,7 @@ var Chunk$1 = class Chunk {
4507
4507
  this.outro = "";
4508
4508
  this.end = index;
4509
4509
  if (this.edited) {
4510
- newChunk.edit("", false);
4510
+ newChunk.edit("", false, true);
4511
4511
  this.content = "";
4512
4512
  } else this.content = originalBefore;
4513
4513
  newChunk.next = this.next;
@@ -5485,7 +5485,7 @@ var MagicString = class MagicString {
5485
5485
  * Content appended or prepended at positions strictly inside the range is removed with it, while
5486
5486
  * content attached at `start` or `end` is preserved — use `s.overwrite(start, end, '')` to remove
5487
5487
  * the range including its edge inserts.
5488
- * Removing the same content twice, or making removals that partially overlap, will cause an error.
5488
+ * Repeated removals and removals with partially overlapping ranges are allowed.
5489
5489
  */
5490
5490
  remove(start, end) {
5491
5491
  start = start + this.offset;
@@ -5767,10 +5767,16 @@ var MagicString = class MagicString {
5767
5767
  * @internal
5768
5768
  */
5769
5769
  _hasRemovedContent(start, end) {
5770
- let chunk = this.firstChunk;
5771
- while (chunk) {
5772
- if (chunk.content === "" && chunk.start < end && chunk.end > start) return true;
5773
- chunk = chunk.next;
5770
+ let chunk = this.byStart.get(start);
5771
+ if (!chunk) {
5772
+ chunk = this.lastSearchedChunk;
5773
+ const searchForward = start >= chunk.end;
5774
+ while (chunk && !chunk.contains(start)) chunk = searchForward ? this.byStart.get(chunk.end) : this.byEnd.get(chunk.start);
5775
+ if (chunk) this.lastSearchedChunk = chunk;
5776
+ }
5777
+ while (chunk && chunk.start < end) {
5778
+ if (chunk.content === "") return true;
5779
+ chunk = this.byStart.get(chunk.end);
5774
5780
  }
5775
5781
  return false;
5776
5782
  }
@@ -5834,6 +5840,7 @@ var MagicString = class MagicString {
5834
5840
  const stringLength = string.length;
5835
5841
  if (stringLength === 0) {
5836
5842
  for (let index = 0; index <= original.length; index += 1) {
5843
+ if (this._hasRemovedContent(index, index)) continue;
5837
5844
  const _replacement = typeof replacement === "function" ? replacement("", index, original) : expandReplacement(replacement, "", index, original, [], void 0);
5838
5845
  if (_replacement !== "") this.appendRight(index, _replacement);
5839
5846
  }
@@ -6604,6 +6611,7 @@ function createInclusionContext() {
6604
6611
  hasBreak: false,
6605
6612
  hasContinue: false,
6606
6613
  includedCallArguments: new Set(),
6614
+ includedCallArgumentsOfPossibleValues: null,
6607
6615
  includedLabels: new Set()
6608
6616
  };
6609
6617
  }
@@ -6677,11 +6685,7 @@ class ExpressionEntity {
6677
6685
  if (!this.included)
6678
6686
  this.includeNode(context);
6679
6687
  }
6680
- /* We are both including and including an unknown path here as the former
6681
- * ensures that nested nodes are included while the latter ensures that all
6682
- * paths of the expression are included.
6683
- * */
6684
- includeCallArguments(interaction, context) {
6688
+ includeCallArgumentsWhenCalledAtPath(_path, interaction, context) {
6685
6689
  includeInteraction(interaction, context);
6686
6690
  }
6687
6691
  shouldBeIncluded(_context) {
@@ -6705,6 +6709,10 @@ const includeInteraction = (interaction, context) => {
6705
6709
  interaction.args[0]?.includePath(UNKNOWN_PATH, context);
6706
6710
  includeInteractionWithoutThis(interaction, context);
6707
6711
  };
6712
+ /* We are running both include() and includePath(UNKNOWN_PATH) here as the former
6713
+ * ensures that nested nodes are included while the latter ensures that all
6714
+ * paths of the expression are included.
6715
+ * */
6708
6716
  const includeInteractionWithoutThis = ({ args }, context) => {
6709
6717
  for (let argumentIndex = 1; argumentIndex < args.length; argumentIndex++) {
6710
6718
  const argument = args[argumentIndex];
@@ -6836,6 +6844,7 @@ class Variable extends ExpressionEntity {
6836
6844
  this.renderedLikeHoisted = variable;
6837
6845
  }
6838
6846
  markCalledFromTryStatement() { }
6847
+ addReassignedValue(_value) { }
6839
6848
  setRenderNames(baseName, name) {
6840
6849
  this.renderBaseName = baseName;
6841
6850
  this.renderName = name;
@@ -8016,6 +8025,37 @@ class ObjectEntity extends ExpressionEntity {
8016
8025
  }
8017
8026
  this.prototypeExpression?.includePath(path, context);
8018
8027
  }
8028
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
8029
+ // Mirrors deoptimizeArgumentsOnInteractionAtPath, falling back to
8030
+ // including all arguments when the exact property cannot be tracked
8031
+ const [key, ...subPath] = path;
8032
+ if (this.hasLostTrack ||
8033
+ this.hasUnknownDeoptimizedProperty ||
8034
+ !isConcreteKey(key) ||
8035
+ this.deoptimizedPaths.get(key) ||
8036
+ (typeof key === 'string' && INTEGER_REG_EXP.test(key) && this.hasUnknownDeoptimizedInteger)) {
8037
+ includeInteraction(interaction, context);
8038
+ return;
8039
+ }
8040
+ const properties = this.propertiesAndGettersByKey.get(key);
8041
+ if (properties !== undefined) {
8042
+ // This mirrors the "this" argument inclusion of includeInteraction
8043
+ interaction.args[0]?.includePath(UNKNOWN_PATH, context);
8044
+ for (const property of properties) {
8045
+ property.includeCallArgumentsWhenCalledAtPath(subPath, interaction, context);
8046
+ }
8047
+ return;
8048
+ }
8049
+ if (this.unmatchablePropertiesAndGetters.length > 0 ||
8050
+ (typeof key === 'string' &&
8051
+ INTEGER_REG_EXP.test(key) &&
8052
+ this.unknownIntegerProps.length > 0) ||
8053
+ !this.prototypeExpression) {
8054
+ includeInteraction(interaction, context);
8055
+ return;
8056
+ }
8057
+ this.prototypeExpression.includeCallArgumentsWhenCalledAtPath(path, interaction, context);
8058
+ }
8019
8059
  buildPropertyMaps(properties) {
8020
8060
  const { allProperties, alwaysIncludedProperties, propertiesAndGettersByKey, propertiesAndSettersByKey, settersByKey, gettersByKey, unknownIntegerProps, unmatchablePropertiesAndGetters, unmatchablePropertiesAndSetters, unmatchableGetters, unmatchableSetters } = this;
8021
8061
  for (let index = properties.length - 1; index >= 0; index--) {
@@ -9457,6 +9497,10 @@ class LocalVariable extends Variable {
9457
9497
  this.kind = kind;
9458
9498
  this.calledFromTryStatement = false;
9459
9499
  this.additionalInitializers = null;
9500
+ // A possibly incomplete list of values assigned to this variable after its
9501
+ // declaration; as it is incomplete, it must never be used for value queries
9502
+ // but only to forward call arguments to possible values
9503
+ this.reassignedValues = null;
9460
9504
  this.includedPathTracker = new IncludedFullPathTracker();
9461
9505
  this.expressionsToBeDeoptimized = [];
9462
9506
  this.declarations = declarator ? [declarator] : [];
@@ -9580,20 +9624,49 @@ class LocalVariable extends Variable {
9580
9624
  }
9581
9625
  }
9582
9626
  }
9583
- includeCallArguments(interaction, context) {
9584
- if (this.isReassigned ||
9585
- context.includedCallArguments.has(this.init) ||
9586
- // This can be removed again once we can include arguments when called at
9587
- // a specific path
9588
- this.initPath.length > 0) {
9627
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
9628
+ if (this.isReassigned) {
9629
+ // Even when the value is unknown, it may be one of the assigned values;
9630
+ // forwarding to all of them retains the arguments of try-catch helpers
9589
9631
  includeInteraction(interaction, context);
9632
+ // Each possible value is visited at most once per path and call
9633
+ // per traversal so that dense assignment graphs do not repeat work
9634
+ // for every simple path
9635
+ const previousTracker = context.includedCallArgumentsOfPossibleValues;
9636
+ context.includedCallArgumentsOfPossibleValues ??= new DiscriminatedPathTracker();
9637
+ this.includeCallArgumentsOfPossibleValues(path, interaction, context, context.includedCallArgumentsOfPossibleValues);
9638
+ context.includedCallArgumentsOfPossibleValues = previousTracker;
9639
+ return;
9590
9640
  }
9591
- else {
9592
- context.includedCallArguments.add(this.init);
9593
- this.init.includeCallArguments(interaction, context);
9594
- context.includedCallArguments.delete(this.init);
9641
+ if (context.includedCallArguments.has(this.init) ||
9642
+ path.length + this.initPath.length > MAX_PATH_DEPTH) {
9643
+ includeInteraction(interaction, context);
9644
+ return;
9645
+ }
9646
+ context.includedCallArguments.add(this.init);
9647
+ this.init.includeCallArgumentsWhenCalledAtPath([...this.initPath, ...path], interaction, context);
9648
+ context.includedCallArguments.delete(this.init);
9649
+ }
9650
+ includeCallArgumentsOfPossibleValues(path, interaction, context, tracker) {
9651
+ if (this.reassignedValues === null || path.length + this.initPath.length > MAX_PATH_DEPTH) {
9652
+ return;
9653
+ }
9654
+ this.includeCallArgumentsOfPossibleValue(this.init, [...this.initPath, ...path], interaction, context, tracker);
9655
+ for (const entity of this.reassignedValues) {
9656
+ this.includeCallArgumentsOfPossibleValue(entity, path, interaction, context, tracker);
9595
9657
  }
9596
9658
  }
9659
+ includeCallArgumentsOfPossibleValue(entity, path, interaction, context, tracker) {
9660
+ if (entity === UNKNOWN_EXPRESSION ||
9661
+ entity === UNDEFINED_EXPRESSION ||
9662
+ tracker.trackEntityAtPathAndGetIfTracked(path, interaction, entity)) {
9663
+ return;
9664
+ }
9665
+ entity.includeCallArgumentsWhenCalledAtPath(path, interaction, context);
9666
+ }
9667
+ addReassignedValue(value) {
9668
+ (this.reassignedValues ??= []).push(value);
9669
+ }
9597
9670
  markCalledFromTryStatement() {
9598
9671
  this.calledFromTryStatement = true;
9599
9672
  }
@@ -9698,8 +9771,8 @@ class IdentifierBase extends NodeBase {
9698
9771
  this.variable?.includePath(path, context);
9699
9772
  }
9700
9773
  }
9701
- includeCallArguments(interaction, context) {
9702
- this.variable.includeCallArguments(interaction, context);
9774
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
9775
+ this.variable.includeCallArgumentsWhenCalledAtPath(path, interaction, context);
9703
9776
  }
9704
9777
  isPossibleTDZ() {
9705
9778
  // return cached value to avoid issues with the next tree-shaking pass
@@ -9845,6 +9918,9 @@ class Identifier extends IdentifierBase {
9845
9918
  }
9846
9919
  deoptimizeAssignment(destructuredInitPath, init) {
9847
9920
  this.deoptimizePath(EMPTY_PATH);
9921
+ if (destructuredInitPath.length === 0) {
9922
+ this.variable?.addReassignedValue(init);
9923
+ }
9848
9924
  init.deoptimizePath([...destructuredInitPath, UnknownKey]);
9849
9925
  }
9850
9926
  hasEffectsWhenDestructuring(context, destructuredInitPath, init) {
@@ -10087,6 +10163,9 @@ class MethodBase extends NodeBase {
10087
10163
  }
10088
10164
  this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
10089
10165
  }
10166
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
10167
+ this.getAccessedValue()[0].includeCallArgumentsWhenCalledAtPath(path, interaction, context);
10168
+ }
10090
10169
  // As getter properties directly receive their values from fixed function
10091
10170
  // expressions, there is no known situation where a getter is deoptimized.
10092
10171
  deoptimizeCache() { }
@@ -10834,16 +10913,31 @@ class ReturnValueScope extends ParameterScope {
10834
10913
  }
10835
10914
  addArgumentToBeDeoptimized(_argument) { }
10836
10915
  updateReturnExpression() {
10837
- if (this.returnExpressions.length === 1) {
10838
- this.returnExpression = this.returnExpressions[0];
10916
+ const { returnExpressions } = this;
10917
+ if (returnExpressions.length === 1) {
10918
+ this.returnExpression = returnExpressions[0];
10839
10919
  }
10840
10920
  else {
10841
- this.returnExpression = UNKNOWN_EXPRESSION;
10842
- for (const expression of this.returnExpressions) {
10843
- expression.deoptimizePath(UNKNOWN_PATH);
10921
+ // Returning the same variable on all paths is equivalent to a single
10922
+ // return, so the return expression can be resolved to that variable
10923
+ const [firstExpression] = returnExpressions;
10924
+ if (firstExpression && this.returnExpressionsResolveToSameVariable(firstExpression)) {
10925
+ this.returnExpression = firstExpression;
10926
+ }
10927
+ else {
10928
+ this.returnExpression = UNKNOWN_EXPRESSION;
10929
+ for (const expression of returnExpressions) {
10930
+ expression.deoptimizePath(UNKNOWN_PATH);
10931
+ }
10844
10932
  }
10845
10933
  }
10846
10934
  }
10935
+ returnExpressionsResolveToSameVariable(firstExpression) {
10936
+ if (!isIdentifierNode(firstExpression) || firstExpression.variable === null) {
10937
+ return false;
10938
+ }
10939
+ return this.returnExpressions.every(expression => isIdentifierNode(expression) && expression.variable === firstExpression.variable);
10940
+ }
10847
10941
  }
10848
10942
 
10849
10943
  class FunctionScope extends ReturnValueScope {
@@ -11032,7 +11126,6 @@ class FunctionBase extends NodeBase {
11032
11126
  constructor() {
11033
11127
  super(...arguments);
11034
11128
  this.parameterVariableValuesDeoptimized = false;
11035
- this.includeCallArguments = this.scope.includeCallArguments.bind(this.scope);
11036
11129
  }
11037
11130
  get async() {
11038
11131
  return isFlagSet(this.flags, 256 /* Flag.async */);
@@ -11149,6 +11242,14 @@ class FunctionBase extends NodeBase {
11149
11242
  this.body.include(context, includeChildrenRecursively);
11150
11243
  context.brokenFlow = brokenFlow;
11151
11244
  }
11245
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
11246
+ if (path.length === 0) {
11247
+ this.scope.includeCallArguments(interaction, context);
11248
+ }
11249
+ else {
11250
+ this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(path, interaction, context);
11251
+ }
11252
+ }
11152
11253
  initialise() {
11153
11254
  super.initialise();
11154
11255
  if (this.body instanceof BlockStatement) {
@@ -11672,9 +11773,9 @@ class Literal extends NodeBase {
11672
11773
  this.regex = esTreeNode.regex;
11673
11774
  return super.parseNode(esTreeNode);
11674
11775
  }
11675
- render(code) {
11776
+ render() {
11676
11777
  if (typeof this.value === 'string') {
11677
- code.indentExclusionRanges.push([this.start + 1, this.end - 1]);
11778
+ this.scope.context.addIndentExclusionRange([this.start + 1, this.end - 1]);
11678
11779
  }
11679
11780
  }
11680
11781
  }
@@ -11980,12 +12081,20 @@ class MemberExpression extends NodeBase {
11980
12081
  this.object.include(context, includeChildrenRecursively);
11981
12082
  this.property.include(context, includeChildrenRecursively);
11982
12083
  }
11983
- includeCallArguments(interaction, context) {
12084
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
11984
12085
  if (this.promiseHandler) {
11985
- this.promiseHandler.includeCallArguments(interaction, context);
12086
+ if (path.length === 0) {
12087
+ this.promiseHandler.includeCallArguments(interaction, context);
12088
+ }
12089
+ else {
12090
+ includeInteraction(interaction, context);
12091
+ }
11986
12092
  }
11987
12093
  else if (this.variable) {
11988
- this.variable.includeCallArguments(interaction, context);
12094
+ this.variable.includeCallArgumentsWhenCalledAtPath(path, interaction, context);
12095
+ }
12096
+ else if (!this.isUndefined && path.length < MAX_PATH_DEPTH) {
12097
+ this.object.includeCallArgumentsWhenCalledAtPath(this.propertyKey === UnknownKey ? UNKNOWN_PATH : [this.propertyKey, ...path], interaction, context);
11989
12098
  }
11990
12099
  else {
11991
12100
  includeInteraction(interaction, context);
@@ -14403,6 +14512,19 @@ class CallExpressionBase extends NodeBase {
14403
14512
  return ((type === INTERACTION_ASSIGNED || !isPure) &&
14404
14513
  returnExpression.hasEffectsOnInteractionAtPath(path, interaction, context));
14405
14514
  }
14515
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
14516
+ // Mirrors deoptimizeArgumentsOnInteractionAtPath
14517
+ const [returnExpression, isPure] = this.getReturnExpression();
14518
+ if (isPure ||
14519
+ returnExpression === UNKNOWN_EXPRESSION ||
14520
+ context.includedCallArguments.has(returnExpression)) {
14521
+ includeInteraction(interaction, context);
14522
+ return;
14523
+ }
14524
+ context.includedCallArguments.add(returnExpression);
14525
+ returnExpression.includeCallArgumentsWhenCalledAtPath(path, interaction, context);
14526
+ context.includedCallArguments.delete(returnExpression);
14527
+ }
14406
14528
  }
14407
14529
 
14408
14530
  class CallExpression extends CallExpressionBase {
@@ -14481,7 +14603,7 @@ class CallExpression extends CallExpressionBase {
14481
14603
  }
14482
14604
  else {
14483
14605
  this.callee.include(context, false);
14484
- this.callee.includeCallArguments(this.interaction, context);
14606
+ this.callee.includeCallArgumentsWhenCalledAtPath(EMPTY_PATH, this.interaction, context);
14485
14607
  }
14486
14608
  }
14487
14609
  includeNode(_context) {
@@ -14775,14 +14897,19 @@ class ConditionalExpression extends NodeBase {
14775
14897
  usedBranch.includePath(path, context);
14776
14898
  }
14777
14899
  }
14778
- includeCallArguments(interaction, context) {
14779
- const usedBranch = this.getUsedBranch();
14780
- if (usedBranch) {
14781
- usedBranch.includeCallArguments(interaction, context);
14900
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
14901
+ if (path.length === 0) {
14902
+ const usedBranch = this.getUsedBranch();
14903
+ if (usedBranch) {
14904
+ usedBranch.includeCallArgumentsWhenCalledAtPath(EMPTY_PATH, interaction, context);
14905
+ }
14906
+ else {
14907
+ this.consequent.includeCallArgumentsWhenCalledAtPath(EMPTY_PATH, interaction, context);
14908
+ this.alternate.includeCallArgumentsWhenCalledAtPath(EMPTY_PATH, interaction, context);
14909
+ }
14782
14910
  }
14783
14911
  else {
14784
- this.consequent.includeCallArguments(interaction, context);
14785
- this.alternate.includeCallArguments(interaction, context);
14912
+ includeInteraction(interaction, context);
14786
14913
  }
14787
14914
  }
14788
14915
  removeAnnotations(code) {
@@ -15368,7 +15495,7 @@ class ObjectPromiseHandler {
15368
15495
  if (interaction.type === INTERACTION_CALLED &&
15369
15496
  (isFunctionExpressionNode(interaction.args[1]) ||
15370
15497
  isArrowFunctionExpressionNode(interaction.args[1]))) {
15371
- interaction.args[1].includeCallArguments(this.interaction, context);
15498
+ interaction.args[1].includeCallArgumentsWhenCalledAtPath(EMPTY_PATH, this.interaction, context);
15372
15499
  }
15373
15500
  }
15374
15501
  }
@@ -16548,7 +16675,7 @@ class NewExpression extends NodeBase {
16548
16675
  }
16549
16676
  else {
16550
16677
  this.callee.include(context, false);
16551
- this.callee.includeCallArguments(this.interaction, context);
16678
+ this.callee.includeCallArgumentsWhenCalledAtPath(EMPTY_PATH, this.interaction, context);
16552
16679
  }
16553
16680
  }
16554
16681
  includeNode(context) {
@@ -16619,6 +16746,9 @@ class ObjectExpression extends NodeBase {
16619
16746
  this.includeNode(context);
16620
16747
  this.getObjectEntity().includePath(path, context);
16621
16748
  }
16749
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
16750
+ this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(path, interaction, context);
16751
+ }
16622
16752
  render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
16623
16753
  if (renderedSurroundingElement === parseAst_js.ExpressionStatement ||
16624
16754
  renderedSurroundingElement === parseAst_js.ArrowFunctionExpression) {
@@ -17180,7 +17310,7 @@ class TaggedTemplateExpression extends CallExpressionBase {
17180
17310
  else {
17181
17311
  this.quasi.include(context, false);
17182
17312
  this.tag.include(context, false);
17183
- this.tag.includeCallArguments(this.interaction, context);
17313
+ this.tag.includeCallArgumentsWhenCalledAtPath(EMPTY_PATH, this.interaction, context);
17184
17314
  }
17185
17315
  }
17186
17316
  initialise() {
@@ -17274,7 +17404,7 @@ class TemplateLiteral extends NodeBase {
17274
17404
  }
17275
17405
  }
17276
17406
  render(code, options) {
17277
- code.indentExclusionRanges.push([this.start, this.end]);
17407
+ this.scope.context.addIndentExclusionRange([this.start, this.end]);
17278
17408
  super.render(code, options);
17279
17409
  }
17280
17410
  }
@@ -19168,6 +19298,7 @@ class Module {
19168
19298
  this.exportedVariablesByName = null;
19169
19299
  this.exportNamesByVariable = null;
19170
19300
  this.exportShimVariable = new ExportShimVariable(this);
19301
+ this.indentExclusionRanges = [];
19171
19302
  this.namespaceReexportsByName = new Map();
19172
19303
  this.reexportDescriptions = new Map();
19173
19304
  this.relevantDependencies = null;
@@ -19573,6 +19704,7 @@ class Module {
19573
19704
  this.options.onLog(level, properties);
19574
19705
  }
19575
19706
  render(options) {
19707
+ this.indentExclusionRanges = [];
19576
19708
  const source = this.magicString.clone();
19577
19709
  this.ast.render(source, options);
19578
19710
  source.trim();
@@ -19580,7 +19712,7 @@ class Module {
19580
19712
  if (usesTopLevelAwait && options.format !== 'es' && options.format !== 'system') {
19581
19713
  return parseAst_js.error(parseAst_js.logInvalidFormatForTopLevelAwait(this.id, options.format));
19582
19714
  }
19583
- return { source, usesTopLevelAwait };
19715
+ return { indentExclusionRanges: this.indentExclusionRanges, source, usesTopLevelAwait };
19584
19716
  }
19585
19717
  async setSource({ ast, code, customTransformCache, originalCode, originalSourcemap, resolvedIds, sourcemapChain, transformDependencies, transformFiles, safeVariableNames, ...moduleOptions }) {
19586
19718
  timeStart('generate ast', 3);
@@ -19609,8 +19741,7 @@ class Module {
19609
19741
  // can change that, but it makes sense to use it for the source file name
19610
19742
  const fileName = this.id;
19611
19743
  this.magicString = new MagicString(code, {
19612
- filename: (this.excludeFromSourcemap ? null : fileName), // don't include plugin helpers in sourcemap
19613
- indentExclusionRanges: []
19744
+ filename: (this.excludeFromSourcemap ? null : fileName) // don't include plugin helpers in sourcemap
19614
19745
  });
19615
19746
  this.astContext = {
19616
19747
  addDynamicImport: this.addDynamicImport.bind(this),
@@ -19618,6 +19749,7 @@ class Module {
19618
19749
  addImport: this.addImport.bind(this),
19619
19750
  addImportMeta: this.addImportMeta.bind(this),
19620
19751
  addImportSource: this.addImportSource.bind(this),
19752
+ addIndentExclusionRange: (range) => this.indentExclusionRanges.push(range),
19621
19753
  code, // Only needed for debugging
19622
19754
  deoptimizationTracker: this.graph.deoptimizationTracker,
19623
19755
  error: this.error.bind(this),
@@ -20912,6 +21044,9 @@ class Chunk {
20912
21044
  }
20913
21045
  }
20914
21046
  }
21047
+ else if (exportingModule instanceof ExternalModule && importedVariable.included) {
21048
+ includedReexports.push(importedVariable);
21049
+ }
20915
21050
  }
20916
21051
  }
20917
21052
  if (includedReexports.length > 0) {
@@ -21342,7 +21477,10 @@ class Chunk {
21342
21477
  if (renderedLength) {
21343
21478
  if (compact && source.lastLine().includes('//'))
21344
21479
  source.append('\n');
21345
- magicString.addSource(source);
21480
+ magicString.addSource({
21481
+ content: source,
21482
+ indentExclusionRanges: rendered.indentExclusionRanges
21483
+ });
21346
21484
  usedModules.push(module);
21347
21485
  }
21348
21486
  const namespace = module.namespace;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.63.5
4
- Thu, 24 Sep 2026 10:07:23 GMT - commit 3722484c33c58b3ab0cbbfcca09b8f267d420329
3
+ Rollup.js v4.64.0
4
+ Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.63.5
4
- Thu, 24 Sep 2026 10:07:23 GMT - commit 3722484c33c58b3ab0cbbfcca09b8f267d420329
3
+ Rollup.js v4.64.0
4
+ Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -91,7 +91,7 @@ exports.xxhashBase64Url = xxhashBase64Url;
91
91
  function __wbg_get_imports() {
92
92
  const import0 = {
93
93
  __proto__: null,
94
- __wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
94
+ __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
95
95
  throw new Error(getStringFromWasm0(arg0, arg1));
96
96
  },
97
97
  __wbg_error_757e9472f8410341: function(arg0, arg1) {
@@ -105,7 +105,7 @@ function __wbg_get_imports() {
105
105
  wasm.__wbindgen_export(deferred0_0, deferred0_1, 1);
106
106
  }
107
107
  },
108
- __wbg_length_31bdaf014f5fbde2: function(arg0) {
108
+ __wbg_length_7f3c00c40364105e: function(arg0) {
109
109
  const ret = getObject(arg0).length;
110
110
  return ret;
111
111
  },
@@ -113,7 +113,7 @@ function __wbg_get_imports() {
113
113
  const ret = new Error();
114
114
  return addHeapObject(ret);
115
115
  },
116
- __wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
116
+ __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
117
117
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
118
118
  },
119
119
  __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollup/wasm-node",
3
- "version": "4.63.5",
3
+ "version": "4.64.0",
4
4
  "description": "Next-generation ES module bundler with Node wasm",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -36,18 +36,18 @@
36
36
  "core-js": "We only update manually as every update requires a snapshot update"
37
37
  },
38
38
  "devDependencies": {
39
- "@codemirror/commands": "^6.11.0",
39
+ "@codemirror/commands": "^6.11.1",
40
40
  "@codemirror/lang-javascript": "^6.2.5",
41
41
  "@codemirror/language": "^6.12.4",
42
42
  "@codemirror/search": "^6.7.2",
43
- "@codemirror/state": "^6.7.4",
44
- "@codemirror/view": "^6.43.11",
43
+ "@codemirror/state": "^6.7.6",
44
+ "@codemirror/view": "^6.43.13",
45
45
  "@emnapi/core": "^1.11.3",
46
46
  "@emnapi/runtime": "^1.11.3",
47
47
  "@eslint/js": "^10.0.1",
48
48
  "@inquirer/prompts": "^7.10.1",
49
49
  "@jridgewell/sourcemap-codec": "^1.6.0",
50
- "@mermaid-js/mermaid-cli": "^11.17.0",
50
+ "@mermaid-js/mermaid-cli": "^12.0.0",
51
51
  "@napi-rs/cli": "3.4.1",
52
52
  "@rollup/plugin-alias": "^6.0.0",
53
53
  "@rollup/plugin-buble": "^1.0.3",
@@ -70,29 +70,29 @@
70
70
  "acorn-import-phases": "^1.0.4",
71
71
  "acorn-jsx": "^5.3.2",
72
72
  "buble": "^0.20.0",
73
- "builtin-modules": "^5.3.0",
73
+ "builtin-modules": "^5.4.0",
74
74
  "chokidar": "^3.6.0",
75
75
  "concurrently": "^9.2.4",
76
76
  "core-js": "3.38.1",
77
77
  "date-time": "^4.0.0",
78
78
  "es5-shim": "^4.6.7",
79
79
  "es6-shim": "^0.35.8",
80
- "eslint": "^10.10.0",
80
+ "eslint": "^10.11.0",
81
81
  "eslint-config-prettier": "^10.1.8",
82
82
  "eslint-plugin-prettier": "^5.5.6",
83
- "eslint-plugin-unicorn": "^74.0.0",
84
- "eslint-plugin-vue": "^10.11.0",
83
+ "eslint-plugin-unicorn": "^76.0.0",
84
+ "eslint-plugin-vue": "^10.11.1",
85
85
  "fixturify": "^3.0.0",
86
86
  "flru": "^1.0.2",
87
- "fs-extra": "^11.4.0",
87
+ "fs-extra": "^11.4.1",
88
88
  "github-api": "^3.4.0",
89
89
  "globals": "^17.12.0",
90
90
  "husky": "^9.1.7",
91
91
  "is-reference": "^3.0.3",
92
- "lint-staged": "^17.5.1",
92
+ "lint-staged": "^17.6.0",
93
93
  "locate-character": "^3.0.0",
94
- "magic-string": "^1.4.1",
95
- "memfs": "^4.78.0",
94
+ "magic-string": "^1.4.2",
95
+ "memfs": "^4.79.0",
96
96
  "mocha": "^11.8.0",
97
97
  "nodemon": "^3.1.14",
98
98
  "npm-audit-resolver": "^3.0.0-RC.0",
@@ -101,12 +101,12 @@
101
101
  "picocolors": "^1.1.1",
102
102
  "picomatch": "^4.0.7",
103
103
  "pinia": "^4.0.3",
104
- "prettier": "^3.9.6",
104
+ "prettier": "^3.9.9",
105
105
  "prettier-plugin-organize-imports": "^4.3.0",
106
- "pretty-bytes": "^7.1.3",
106
+ "pretty-bytes": "^7.2.0",
107
107
  "pretty-ms": "^9.3.1",
108
108
  "requirejs": "^2.3.8",
109
- "rollup": "^4.63.3",
109
+ "rollup": "^4.63.5",
110
110
  "rollup-plugin-license": "^3.7.1",
111
111
  "semver": "^7.8.5",
112
112
  "shx": "^0.4.0",
@@ -117,10 +117,10 @@
117
117
  "terser": "^5.51.2",
118
118
  "tslib": "^2.8.1",
119
119
  "typescript": "^5.9.3",
120
- "typescript-eslint": "^8.70.0",
120
+ "typescript-eslint": "^8.71.0",
121
121
  "vite": "^7.3.6",
122
122
  "vitepress": "^1.6.4",
123
- "vue": "^3.5.42",
123
+ "vue": "^3.5.43",
124
124
  "vue-eslint-parser": "^10.4.1",
125
125
  "vue-tsc": "^3.3.11",
126
126
  "wasm-pack": "^0.15.0",