rollup 4.50.0 → 4.50.2-2

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.0
5
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
4
+ Rollup.js v4.50.2-2
5
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -11,7 +11,7 @@ const getLogFilter = filters => {
11
11
  if (filters.length === 0)
12
12
  return () => true;
13
13
  const normalizedFilters = filters.map(filter => filter.split('&').map(subFilter => {
14
- const inverted = subFilter.startsWith('!');
14
+ const inverted = subFilter[0] === '!';
15
15
  if (inverted)
16
16
  subFilter = subFilter.slice(1);
17
17
  const [key, ...value] = subFilter.split(':');
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0";
30
+ var version = "4.50.2-2";
31
31
 
32
32
  // src/vlq.ts
33
33
  var comma = ",".charCodeAt(0);
@@ -772,6 +772,10 @@ class MagicString {
772
772
  if (chunk.outro.length) mappings.advance(chunk.outro);
773
773
  });
774
774
 
775
+ if (this.outro) {
776
+ mappings.advance(this.outro);
777
+ }
778
+
775
779
  return {
776
780
  file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
777
781
  sources: [
@@ -1437,7 +1441,12 @@ class MagicString {
1437
1441
  const index = original.indexOf(string);
1438
1442
 
1439
1443
  if (index !== -1) {
1440
- this.overwrite(index, index + string.length, replacement);
1444
+ if (typeof replacement === 'function') {
1445
+ replacement = replacement(string, index, original);
1446
+ }
1447
+ if (string !== replacement) {
1448
+ this.overwrite(index, index + string.length, replacement);
1449
+ }
1441
1450
  }
1442
1451
 
1443
1452
  return this;
@@ -1460,7 +1469,11 @@ class MagicString {
1460
1469
  index = original.indexOf(string, index + stringLength)
1461
1470
  ) {
1462
1471
  const previous = original.slice(index, index + stringLength);
1463
- if (previous !== replacement) this.overwrite(index, index + stringLength, replacement);
1472
+ let _replacement = replacement;
1473
+ if (typeof replacement === 'function') {
1474
+ _replacement = replacement(previous, index, original);
1475
+ }
1476
+ if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);
1464
1477
  }
1465
1478
 
1466
1479
  return this;
@@ -5435,7 +5448,8 @@ class Identifier extends IdentifierBase {
5435
5448
  }
5436
5449
  const { propertyReadSideEffects } = this.scope.context.options
5437
5450
  .treeshake;
5438
- if ((this.included ||=
5451
+ let included = this.included;
5452
+ if ((included ||=
5439
5453
  destructuredInitPath.length > 0 &&
5440
5454
  !context.brokenFlow &&
5441
5455
  propertyReadSideEffects &&
@@ -5445,9 +5459,11 @@ class Identifier extends IdentifierBase {
5445
5459
  this.scope.context.includeVariableInModule(this.variable, EMPTY_PATH, context);
5446
5460
  }
5447
5461
  init.includePath(destructuredInitPath, context);
5448
- return true;
5449
5462
  }
5450
- return false;
5463
+ if (!this.included && included) {
5464
+ this.includeNode(context);
5465
+ }
5466
+ return this.included;
5451
5467
  }
5452
5468
  markDeclarationReached() {
5453
5469
  this.variable.initReached = true;
@@ -6574,8 +6590,11 @@ class RestElement extends NodeBase {
6574
6590
  return this.argument.hasEffectsWhenDestructuring(context, getIncludedPatternPath$1(destructuredInitPath), init);
6575
6591
  }
6576
6592
  includeDestructuredIfNecessary(context, destructuredInitPath, init) {
6577
- return (this.included =
6578
- this.argument.includeDestructuredIfNecessary(context, getIncludedPatternPath$1(destructuredInitPath), init) || this.included);
6593
+ const included = this.argument.includeDestructuredIfNecessary(context, getIncludedPatternPath$1(destructuredInitPath), init);
6594
+ if (!this.included && included) {
6595
+ this.includeNode(context);
6596
+ }
6597
+ return this.included;
6579
6598
  }
6580
6599
  include(context, includeChildrenRecursively) {
6581
6600
  if (!this.included)
@@ -7554,15 +7573,11 @@ class MemberExpression extends NodeBase {
7554
7573
  }
7555
7574
  }
7556
7575
  }
7557
- includeDestructuredIfNecessary(context, destructuredInitPath, init) {
7558
- if ((this.included ||=
7559
- destructuredInitPath.length > 0 &&
7560
- !context.brokenFlow &&
7561
- init.hasEffectsOnInteractionAtPath(destructuredInitPath, NODE_INTERACTION_UNKNOWN_ACCESS, createHasEffectsContext()))) {
7562
- init.include(context, false);
7563
- return true;
7564
- }
7565
- return false;
7576
+ includeDestructuredIfNecessary() {
7577
+ /* istanbul ignore next */
7578
+ this.scope.context.error({
7579
+ message: 'includeDestructuredIfNecessary is currently not supported for MemberExpressions'
7580
+ }, this.start);
7566
7581
  }
7567
7582
  initialise() {
7568
7583
  super.initialise();
@@ -11373,24 +11388,34 @@ class ArrayPattern extends NodeBase {
11373
11388
  includeDestructuredIfNecessary(context, destructuredInitPath, init) {
11374
11389
  let included = false;
11375
11390
  const includedPatternPath = getIncludedPatternPath(destructuredInitPath);
11376
- for (const element of this.elements) {
11391
+ for (const element of [...this.elements].reverse()) {
11377
11392
  if (element) {
11378
- element.included ||= included;
11393
+ if (included && !element.included) {
11394
+ element.includeNode(context);
11395
+ }
11379
11396
  included =
11380
11397
  element.includeDestructuredIfNecessary(context, includedPatternPath, init) || included;
11381
11398
  }
11382
11399
  }
11383
- if (included) {
11384
- // This is necessary so that if any pattern element is included, all are
11385
- // included for proper deconflicting
11386
- for (const element of this.elements) {
11387
- if (element && !element.included) {
11388
- element.included = true;
11389
- element.includeDestructuredIfNecessary(context, includedPatternPath, init);
11390
- }
11400
+ if (!this.included && included) {
11401
+ this.includeNode(context);
11402
+ }
11403
+ return this.included;
11404
+ }
11405
+ render(code, options) {
11406
+ let removedStart = this.start + 1;
11407
+ for (const element of this.elements) {
11408
+ if (!element)
11409
+ continue;
11410
+ if (element.included) {
11411
+ element.render(code, options);
11412
+ removedStart = element.end;
11413
+ }
11414
+ else {
11415
+ code.remove(removedStart, this.end - 1);
11416
+ break;
11391
11417
  }
11392
11418
  }
11393
- return (this.included ||= included);
11394
11419
  }
11395
11420
  markDeclarationReached() {
11396
11421
  for (const element of this.elements) {
@@ -11524,19 +11549,21 @@ class ObjectPattern extends NodeBase {
11524
11549
  }
11525
11550
  includeDestructuredIfNecessary(context, destructuredInitPath, init) {
11526
11551
  if (!this.properties.length)
11527
- return false;
11552
+ return this.included;
11528
11553
  const lastProperty = this.properties.at(-1);
11529
- const lastPropertyIncluded = lastProperty.includeDestructuredIfNecessary(context, destructuredInitPath, init);
11554
+ let included = lastProperty.includeDestructuredIfNecessary(context, destructuredInitPath, init);
11530
11555
  const lastPropertyIsRestElement = lastProperty.type === RestElement$1;
11531
- let included = lastPropertyIsRestElement ? lastPropertyIncluded : false;
11532
11556
  for (const property of this.properties.slice(0, -1)) {
11533
- if (lastPropertyIsRestElement && lastPropertyIncluded) {
11557
+ if (lastPropertyIsRestElement && included && !property.included) {
11534
11558
  property.includeNode(context);
11535
11559
  }
11536
11560
  included =
11537
11561
  property.includeDestructuredIfNecessary(context, destructuredInitPath, init) || included;
11538
11562
  }
11539
- return (this.included ||= included);
11563
+ if (!this.included && included) {
11564
+ this.includeNode(context);
11565
+ }
11566
+ return this.included;
11540
11567
  }
11541
11568
  markDeclarationReached() {
11542
11569
  for (const property of this.properties) {
@@ -11699,13 +11726,16 @@ class AssignmentPattern extends NodeBase {
11699
11726
  if ((included ||= this.right.shouldBeIncluded(context))) {
11700
11727
  this.right.include(context, false);
11701
11728
  if (!this.left.included) {
11702
- this.left.included = true;
11729
+ this.left.includeNode(context);
11703
11730
  // Unfortunately, we need to include the left side again now, so that
11704
11731
  // any declared variables are properly included.
11705
11732
  this.left.includeDestructuredIfNecessary(context, destructuredInitPath, init);
11706
11733
  }
11707
11734
  }
11708
- return (this.included = included);
11735
+ if (!this.included && included) {
11736
+ this.includeNode(context);
11737
+ }
11738
+ return this.included;
11709
11739
  }
11710
11740
  includeNode(context) {
11711
11741
  this.included = true;
@@ -14544,13 +14574,16 @@ class Property extends MethodBase {
14544
14574
  if ((included ||= this.key.hasEffects(createHasEffectsContext()))) {
14545
14575
  this.key.include(context, false);
14546
14576
  if (!this.value.included) {
14547
- this.value.included = true;
14577
+ this.value.includeNode(context);
14548
14578
  // Unfortunately, we need to include the value again now, so that any
14549
14579
  // declared variables are properly included.
14550
14580
  this.value.includeDestructuredIfNecessary(context, path, init);
14551
14581
  }
14552
14582
  }
14553
- return (this.included = included);
14583
+ if (!this.included && included) {
14584
+ this.includeNode(context);
14585
+ }
14586
+ return this.included;
14554
14587
  }
14555
14588
  include(context, includeChildrenRecursively) {
14556
14589
  this.included = true;
@@ -18729,7 +18762,7 @@ class Chunk {
18729
18762
  else if (variable.isNamespace &&
18730
18763
  namespaceInteropHelpersByInteropType[interop(module.id)] &&
18731
18764
  (this.imports.has(variable) ||
18732
- !this.exportNamesByVariable.get(variable)?.every(name => name.startsWith('*')))) {
18765
+ !this.exportNamesByVariable.get(variable)?.every(name => name[0] === '*'))) {
18733
18766
  // We only need to deconflict it if the namespace is actually
18734
18767
  // created as a variable, i.e. because it is used internally or
18735
18768
  // because it is reexported as an object
@@ -18887,7 +18920,7 @@ class Chunk {
18887
18920
  }
18888
18921
  else {
18889
18922
  // handle edge case in Windows
18890
- if (this.inputBase === '/' && !idWithoutExtension.startsWith('/')) {
18923
+ if (this.inputBase === '/' && idWithoutExtension[0] !== '/') {
18891
18924
  return relative$1(this.inputBase, idWithoutExtension.replace(/^[a-zA-Z]:[/\\]/, '/'));
18892
18925
  }
18893
18926
  return relative$1(this.inputBase, idWithoutExtension);
@@ -22841,7 +22874,7 @@ const getIdMatcher = (option) => {
22841
22874
  return () => true;
22842
22875
  }
22843
22876
  if (typeof option === 'function') {
22844
- return (id, ...parameters) => (!id.startsWith('\0') && option(id, ...parameters)) || false;
22877
+ return (id, ...parameters) => (id[0] !== '\0' && option(id, ...parameters)) || false;
22845
22878
  }
22846
22879
  if (option) {
22847
22880
  const ids = new Set();
@@ -22951,7 +22984,7 @@ const getHasModuleSideEffects = (moduleSideEffectsOption) => {
22951
22984
  return (_id, external) => !external;
22952
22985
  }
22953
22986
  if (typeof moduleSideEffectsOption === 'function') {
22954
- return (id, external) => id.startsWith('\0') ? true : moduleSideEffectsOption(id, external) !== false;
22987
+ return (id, external) => id[0] === '\0' ? true : moduleSideEffectsOption(id, external) !== false;
22955
22988
  }
22956
22989
  if (Array.isArray(moduleSideEffectsOption)) {
22957
22990
  const ids = new Set(moduleSideEffectsOption);
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -15,7 +15,7 @@ const getLogFilter = filters => {
15
15
  if (filters.length === 0)
16
16
  return () => true;
17
17
  const normalizedFilters = filters.map(filter => filter.split('&').map(subFilter => {
18
- const inverted = subFilter.startsWith('!');
18
+ const inverted = subFilter[0] === '!';
19
19
  if (inverted)
20
20
  subFilter = subFilter.slice(1);
21
21
  const [key, ...value] = subFilter.split(':');
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/native.js CHANGED
@@ -20,7 +20,7 @@ const bindingsByPlatformAndArch = {
20
20
  linux: {
21
21
  arm: { base: 'linux-arm-gnueabihf', musl: 'linux-arm-musleabihf' },
22
22
  arm64: { base: 'linux-arm64-gnu', musl: 'linux-arm64-musl' },
23
- loong64: { base: 'linux-loongarch64-gnu', musl: null },
23
+ loong64: { base: 'linux-loong64-gnu', musl: null },
24
24
  ppc64: { base: 'linux-ppc64-gnu', musl: null },
25
25
  riscv64: { base: 'linux-riscv64-gnu', musl: 'linux-riscv64-musl' },
26
26
  s390x: { base: 'linux-s390x-gnu', musl: null },
package/dist/parseAst.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0";
45
+ var version = "4.50.2-2";
46
46
 
47
47
  function ensureArray$1(items) {
48
48
  if (Array.isArray(items)) {
@@ -4578,6 +4578,10 @@ class MagicString {
4578
4578
  if (chunk.outro.length) mappings.advance(chunk.outro);
4579
4579
  });
4580
4580
 
4581
+ if (this.outro) {
4582
+ mappings.advance(this.outro);
4583
+ }
4584
+
4581
4585
  return {
4582
4586
  file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
4583
4587
  sources: [
@@ -5243,7 +5247,12 @@ class MagicString {
5243
5247
  const index = original.indexOf(string);
5244
5248
 
5245
5249
  if (index !== -1) {
5246
- this.overwrite(index, index + string.length, replacement);
5250
+ if (typeof replacement === 'function') {
5251
+ replacement = replacement(string, index, original);
5252
+ }
5253
+ if (string !== replacement) {
5254
+ this.overwrite(index, index + string.length, replacement);
5255
+ }
5247
5256
  }
5248
5257
 
5249
5258
  return this;
@@ -5266,7 +5275,11 @@ class MagicString {
5266
5275
  index = original.indexOf(string, index + stringLength)
5267
5276
  ) {
5268
5277
  const previous = original.slice(index, index + stringLength);
5269
- if (previous !== replacement) this.overwrite(index, index + stringLength, replacement);
5278
+ let _replacement = replacement;
5279
+ if (typeof replacement === 'function') {
5280
+ _replacement = replacement(previous, index, original);
5281
+ }
5282
+ if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);
5270
5283
  }
5271
5284
 
5272
5285
  return this;
@@ -9223,7 +9236,8 @@ class Identifier extends IdentifierBase {
9223
9236
  }
9224
9237
  const { propertyReadSideEffects } = this.scope.context.options
9225
9238
  .treeshake;
9226
- if ((this.included ||=
9239
+ let included = this.included;
9240
+ if ((included ||=
9227
9241
  destructuredInitPath.length > 0 &&
9228
9242
  !context.brokenFlow &&
9229
9243
  propertyReadSideEffects &&
@@ -9233,9 +9247,11 @@ class Identifier extends IdentifierBase {
9233
9247
  this.scope.context.includeVariableInModule(this.variable, EMPTY_PATH, context);
9234
9248
  }
9235
9249
  init.includePath(destructuredInitPath, context);
9236
- return true;
9237
9250
  }
9238
- return false;
9251
+ if (!this.included && included) {
9252
+ this.includeNode(context);
9253
+ }
9254
+ return this.included;
9239
9255
  }
9240
9256
  markDeclarationReached() {
9241
9257
  this.variable.initReached = true;
@@ -10350,8 +10366,11 @@ class RestElement extends NodeBase {
10350
10366
  return this.argument.hasEffectsWhenDestructuring(context, getIncludedPatternPath$1(destructuredInitPath), init);
10351
10367
  }
10352
10368
  includeDestructuredIfNecessary(context, destructuredInitPath, init) {
10353
- return (this.included =
10354
- this.argument.includeDestructuredIfNecessary(context, getIncludedPatternPath$1(destructuredInitPath), init) || this.included);
10369
+ const included = this.argument.includeDestructuredIfNecessary(context, getIncludedPatternPath$1(destructuredInitPath), init);
10370
+ if (!this.included && included) {
10371
+ this.includeNode(context);
10372
+ }
10373
+ return this.included;
10355
10374
  }
10356
10375
  include(context, includeChildrenRecursively) {
10357
10376
  if (!this.included)
@@ -11330,15 +11349,11 @@ class MemberExpression extends NodeBase {
11330
11349
  }
11331
11350
  }
11332
11351
  }
11333
- includeDestructuredIfNecessary(context, destructuredInitPath, init) {
11334
- if ((this.included ||=
11335
- destructuredInitPath.length > 0 &&
11336
- !context.brokenFlow &&
11337
- init.hasEffectsOnInteractionAtPath(destructuredInitPath, NODE_INTERACTION_UNKNOWN_ACCESS, createHasEffectsContext()))) {
11338
- init.include(context, false);
11339
- return true;
11340
- }
11341
- return false;
11352
+ includeDestructuredIfNecessary() {
11353
+ /* istanbul ignore next */
11354
+ this.scope.context.error({
11355
+ message: 'includeDestructuredIfNecessary is currently not supported for MemberExpressions'
11356
+ }, this.start);
11342
11357
  }
11343
11358
  initialise() {
11344
11359
  super.initialise();
@@ -12982,24 +12997,34 @@ class ArrayPattern extends NodeBase {
12982
12997
  includeDestructuredIfNecessary(context, destructuredInitPath, init) {
12983
12998
  let included = false;
12984
12999
  const includedPatternPath = getIncludedPatternPath(destructuredInitPath);
12985
- for (const element of this.elements) {
13000
+ for (const element of [...this.elements].reverse()) {
12986
13001
  if (element) {
12987
- element.included ||= included;
13002
+ if (included && !element.included) {
13003
+ element.includeNode(context);
13004
+ }
12988
13005
  included =
12989
13006
  element.includeDestructuredIfNecessary(context, includedPatternPath, init) || included;
12990
13007
  }
12991
13008
  }
12992
- if (included) {
12993
- // This is necessary so that if any pattern element is included, all are
12994
- // included for proper deconflicting
12995
- for (const element of this.elements) {
12996
- if (element && !element.included) {
12997
- element.included = true;
12998
- element.includeDestructuredIfNecessary(context, includedPatternPath, init);
12999
- }
13009
+ if (!this.included && included) {
13010
+ this.includeNode(context);
13011
+ }
13012
+ return this.included;
13013
+ }
13014
+ render(code, options) {
13015
+ let removedStart = this.start + 1;
13016
+ for (const element of this.elements) {
13017
+ if (!element)
13018
+ continue;
13019
+ if (element.included) {
13020
+ element.render(code, options);
13021
+ removedStart = element.end;
13022
+ }
13023
+ else {
13024
+ code.remove(removedStart, this.end - 1);
13025
+ break;
13000
13026
  }
13001
13027
  }
13002
- return (this.included ||= included);
13003
13028
  }
13004
13029
  markDeclarationReached() {
13005
13030
  for (const element of this.elements) {
@@ -13133,19 +13158,21 @@ class ObjectPattern extends NodeBase {
13133
13158
  }
13134
13159
  includeDestructuredIfNecessary(context, destructuredInitPath, init) {
13135
13160
  if (!this.properties.length)
13136
- return false;
13161
+ return this.included;
13137
13162
  const lastProperty = this.properties.at(-1);
13138
- const lastPropertyIncluded = lastProperty.includeDestructuredIfNecessary(context, destructuredInitPath, init);
13163
+ let included = lastProperty.includeDestructuredIfNecessary(context, destructuredInitPath, init);
13139
13164
  const lastPropertyIsRestElement = lastProperty.type === parseAst_js.RestElement;
13140
- let included = lastPropertyIsRestElement ? lastPropertyIncluded : false;
13141
13165
  for (const property of this.properties.slice(0, -1)) {
13142
- if (lastPropertyIsRestElement && lastPropertyIncluded) {
13166
+ if (lastPropertyIsRestElement && included && !property.included) {
13143
13167
  property.includeNode(context);
13144
13168
  }
13145
13169
  included =
13146
13170
  property.includeDestructuredIfNecessary(context, destructuredInitPath, init) || included;
13147
13171
  }
13148
- return (this.included ||= included);
13172
+ if (!this.included && included) {
13173
+ this.includeNode(context);
13174
+ }
13175
+ return this.included;
13149
13176
  }
13150
13177
  markDeclarationReached() {
13151
13178
  for (const property of this.properties) {
@@ -13308,13 +13335,16 @@ class AssignmentPattern extends NodeBase {
13308
13335
  if ((included ||= this.right.shouldBeIncluded(context))) {
13309
13336
  this.right.include(context, false);
13310
13337
  if (!this.left.included) {
13311
- this.left.included = true;
13338
+ this.left.includeNode(context);
13312
13339
  // Unfortunately, we need to include the left side again now, so that
13313
13340
  // any declared variables are properly included.
13314
13341
  this.left.includeDestructuredIfNecessary(context, destructuredInitPath, init);
13315
13342
  }
13316
13343
  }
13317
- return (this.included = included);
13344
+ if (!this.included && included) {
13345
+ this.includeNode(context);
13346
+ }
13347
+ return this.included;
13318
13348
  }
13319
13349
  includeNode(context) {
13320
13350
  this.included = true;
@@ -16153,13 +16183,16 @@ class Property extends MethodBase {
16153
16183
  if ((included ||= this.key.hasEffects(createHasEffectsContext()))) {
16154
16184
  this.key.include(context, false);
16155
16185
  if (!this.value.included) {
16156
- this.value.included = true;
16186
+ this.value.includeNode(context);
16157
16187
  // Unfortunately, we need to include the value again now, so that any
16158
16188
  // declared variables are properly included.
16159
16189
  this.value.includeDestructuredIfNecessary(context, path, init);
16160
16190
  }
16161
16191
  }
16162
- return (this.included = included);
16192
+ if (!this.included && included) {
16193
+ this.includeNode(context);
16194
+ }
16195
+ return this.included;
16163
16196
  }
16164
16197
  include(context, includeChildrenRecursively) {
16165
16198
  this.included = true;
@@ -20222,7 +20255,7 @@ class Chunk {
20222
20255
  else if (variable.isNamespace &&
20223
20256
  namespaceInteropHelpersByInteropType[interop(module.id)] &&
20224
20257
  (this.imports.has(variable) ||
20225
- !this.exportNamesByVariable.get(variable)?.every(name => name.startsWith('*')))) {
20258
+ !this.exportNamesByVariable.get(variable)?.every(name => name[0] === '*'))) {
20226
20259
  // We only need to deconflict it if the namespace is actually
20227
20260
  // created as a variable, i.e. because it is used internally or
20228
20261
  // because it is reexported as an object
@@ -20380,7 +20413,7 @@ class Chunk {
20380
20413
  }
20381
20414
  else {
20382
20415
  // handle edge case in Windows
20383
- if (this.inputBase === '/' && !idWithoutExtension.startsWith('/')) {
20416
+ if (this.inputBase === '/' && idWithoutExtension[0] !== '/') {
20384
20417
  return parseAst_js.relative(this.inputBase, idWithoutExtension.replace(/^[a-zA-Z]:[/\\]/, '/'));
20385
20418
  }
20386
20419
  return parseAst_js.relative(this.inputBase, idWithoutExtension);
@@ -23177,7 +23210,7 @@ const getIdMatcher = (option) => {
23177
23210
  return () => true;
23178
23211
  }
23179
23212
  if (typeof option === 'function') {
23180
- return (id, ...parameters) => (!id.startsWith('\0') && option(id, ...parameters)) || false;
23213
+ return (id, ...parameters) => (id[0] !== '\0' && option(id, ...parameters)) || false;
23181
23214
  }
23182
23215
  if (option) {
23183
23216
  const ids = new Set();
@@ -23287,7 +23320,7 @@ const getHasModuleSideEffects = (moduleSideEffectsOption) => {
23287
23320
  return (_id, external) => !external;
23288
23321
  }
23289
23322
  if (typeof moduleSideEffectsOption === 'function') {
23290
- return (id, external) => id.startsWith('\0') ? true : moduleSideEffectsOption(id, external) !== false;
23323
+ return (id, external) => id[0] === '\0' ? true : moduleSideEffectsOption(id, external) !== false;
23291
23324
  }
23292
23325
  if (Array.isArray(moduleSideEffectsOption)) {
23293
23326
  const ids = new Set(moduleSideEffectsOption);
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.50.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0
4
- Sun, 31 Aug 2025 07:37:46 GMT - commit 592e7d78f726bb038881f3c9ab4450d26c3db8c7
3
+ Rollup.js v4.50.2-2
4
+ Mon, 15 Sep 2025 05:32:50 GMT - commit 625576c5398dc1041f0069fc644ff97029eafa96
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.0",
3
+ "version": "4.50.2-2",
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.0",
109
- "@rollup/rollup-android-arm64": "4.50.0",
110
- "@rollup/rollup-win32-arm64-msvc": "4.50.0",
111
- "@rollup/rollup-freebsd-arm64": "4.50.0",
112
- "@rollup/rollup-linux-arm64-gnu": "4.50.0",
113
- "@rollup/rollup-linux-arm64-musl": "4.50.0",
114
- "@rollup/rollup-android-arm-eabi": "4.50.0",
115
- "@rollup/rollup-linux-arm-gnueabihf": "4.50.0",
116
- "@rollup/rollup-linux-arm-musleabihf": "4.50.0",
117
- "@rollup/rollup-win32-ia32-msvc": "4.50.0",
118
- "@rollup/rollup-linux-loongarch64-gnu": "4.50.0",
119
- "@rollup/rollup-linux-riscv64-gnu": "4.50.0",
120
- "@rollup/rollup-linux-riscv64-musl": "4.50.0",
121
- "@rollup/rollup-linux-ppc64-gnu": "4.50.0",
122
- "@rollup/rollup-linux-s390x-gnu": "4.50.0",
123
- "@rollup/rollup-darwin-x64": "4.50.0",
124
- "@rollup/rollup-win32-x64-msvc": "4.50.0",
125
- "@rollup/rollup-freebsd-x64": "4.50.0",
126
- "@rollup/rollup-linux-x64-gnu": "4.50.0",
127
- "@rollup/rollup-linux-x64-musl": "4.50.0",
128
- "@rollup/rollup-openharmony-arm64": "4.50.0"
108
+ "@rollup/rollup-darwin-arm64": "4.50.2-2",
109
+ "@rollup/rollup-android-arm64": "4.50.2-2",
110
+ "@rollup/rollup-win32-arm64-msvc": "4.50.2-2",
111
+ "@rollup/rollup-freebsd-arm64": "4.50.2-2",
112
+ "@rollup/rollup-linux-arm64-gnu": "4.50.2-2",
113
+ "@rollup/rollup-linux-arm64-musl": "4.50.2-2",
114
+ "@rollup/rollup-android-arm-eabi": "4.50.2-2",
115
+ "@rollup/rollup-linux-arm-gnueabihf": "4.50.2-2",
116
+ "@rollup/rollup-linux-arm-musleabihf": "4.50.2-2",
117
+ "@rollup/rollup-win32-ia32-msvc": "4.50.2-2",
118
+ "@rollup/rollup-linux-loong64-gnu": "4.50.2-2",
119
+ "@rollup/rollup-linux-riscv64-gnu": "4.50.2-2",
120
+ "@rollup/rollup-linux-riscv64-musl": "4.50.2-2",
121
+ "@rollup/rollup-linux-ppc64-gnu": "4.50.2-2",
122
+ "@rollup/rollup-linux-s390x-gnu": "4.50.2-2",
123
+ "@rollup/rollup-darwin-x64": "4.50.2-2",
124
+ "@rollup/rollup-win32-x64-msvc": "4.50.2-2",
125
+ "@rollup/rollup-freebsd-x64": "4.50.2-2",
126
+ "@rollup/rollup-linux-x64-gnu": "4.50.2-2",
127
+ "@rollup/rollup-linux-x64-musl": "4.50.2-2",
128
+ "@rollup/rollup-openharmony-arm64": "4.50.2-2"
129
129
  },
130
130
  "dependencies": {
131
131
  "@types/estree": "1.0.8"
@@ -139,9 +139,9 @@
139
139
  "@codemirror/language": "^6.11.3",
140
140
  "@codemirror/search": "^6.5.11",
141
141
  "@codemirror/state": "^6.5.2",
142
- "@codemirror/view": "^6.38.1",
143
- "@eslint/js": "^9.33.0",
144
- "@inquirer/prompts": "^7.8.3",
142
+ "@codemirror/view": "^6.38.2",
143
+ "@eslint/js": "^9.35.0",
144
+ "@inquirer/prompts": "^7.8.4",
145
145
  "@jridgewell/sourcemap-codec": "^1.5.5",
146
146
  "@mermaid-js/mermaid-cli": "^11.9.0",
147
147
  "@napi-rs/cli": "^3.1.5",
@@ -153,30 +153,30 @@
153
153
  "@rollup/plugin-replace": "^6.0.2",
154
154
  "@rollup/plugin-terser": "^0.4.4",
155
155
  "@rollup/plugin-typescript": "^12.1.4",
156
- "@rollup/pluginutils": "^5.2.0",
157
- "@shikijs/vitepress-twoslash": "^3.9.2",
156
+ "@rollup/pluginutils": "^5.3.0",
157
+ "@shikijs/vitepress-twoslash": "^3.12.2",
158
158
  "@types/mocha": "^10.0.10",
159
- "@types/node": "^20.19.11",
159
+ "@types/node": "^20.19.13",
160
160
  "@types/picomatch": "^4.0.2",
161
- "@types/semver": "^7.7.0",
161
+ "@types/semver": "^7.7.1",
162
162
  "@types/yargs-parser": "^21.0.3",
163
- "@vue/language-server": "^3.0.5",
163
+ "@vue/language-server": "^3.0.6",
164
164
  "acorn": "^8.15.0",
165
165
  "acorn-import-assertions": "^1.9.0",
166
166
  "acorn-jsx": "^5.3.2",
167
167
  "buble": "^0.20.0",
168
168
  "builtin-modules": "^5.0.0",
169
169
  "chokidar": "^3.6.0",
170
- "concurrently": "^9.2.0",
170
+ "concurrently": "^9.2.1",
171
171
  "core-js": "3.38.1",
172
172
  "cross-env": "^10.0.0",
173
173
  "date-time": "^4.0.0",
174
174
  "es5-shim": "^4.6.7",
175
175
  "es6-shim": "^0.35.8",
176
- "eslint": "^9.33.0",
176
+ "eslint": "^9.35.0",
177
177
  "eslint-config-prettier": "^10.1.8",
178
178
  "eslint-plugin-prettier": "^5.5.4",
179
- "eslint-plugin-unicorn": "^60.0.0",
179
+ "eslint-plugin-unicorn": "^61.0.2",
180
180
  "eslint-plugin-vue": "^10.4.0",
181
181
  "fixturify": "^3.0.0",
182
182
  "flru": "^1.0.2",
@@ -185,11 +185,11 @@
185
185
  "globals": "^16.3.0",
186
186
  "husky": "^9.1.7",
187
187
  "is-reference": "^3.0.3",
188
- "lint-staged": "^16.1.5",
188
+ "lint-staged": "^16.1.6",
189
189
  "locate-character": "^3.0.0",
190
- "magic-string": "^0.30.17",
191
- "memfs": "^4.36.3",
192
- "mocha": "^11.7.1",
190
+ "magic-string": "^0.30.19",
191
+ "memfs": "^4.38.2",
192
+ "mocha": "^11.7.2",
193
193
  "nodemon": "^3.1.10",
194
194
  "nyc": "^17.1.0",
195
195
  "picocolors": "^1.1.1",
@@ -200,7 +200,7 @@
200
200
  "pretty-bytes": "^7.0.1",
201
201
  "pretty-ms": "^9.2.0",
202
202
  "requirejs": "^2.3.7",
203
- "rollup": "^4.46.3",
203
+ "rollup": "^4.50.1",
204
204
  "rollup-plugin-license": "^3.6.0",
205
205
  "rollup-plugin-string": "^3.0.0",
206
206
  "semver": "^7.7.2",
@@ -209,13 +209,13 @@
209
209
  "source-map": "^0.7.6",
210
210
  "source-map-support": "^0.5.21",
211
211
  "systemjs": "^6.15.1",
212
- "terser": "^5.43.1",
212
+ "terser": "^5.44.0",
213
213
  "tslib": "^2.8.1",
214
214
  "typescript": "^5.9.2",
215
- "typescript-eslint": "^8.40.0",
216
- "vite": "^7.1.2",
215
+ "typescript-eslint": "^8.43.0",
216
+ "vite": "^7.1.5",
217
217
  "vitepress": "^1.6.4",
218
- "vue": "^3.5.18",
218
+ "vue": "^3.5.21",
219
219
  "vue-eslint-parser": "^10.2.0",
220
220
  "vue-tsc": "^2.2.12",
221
221
  "wasm-pack": "^0.13.1",