@rollup/wasm-node 4.64.0 → 4.64.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.64.0
5
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
4
+ Rollup.js v4.64.2
5
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -27,7 +27,7 @@ require('node:perf_hooks');
27
27
  require('node:url');
28
28
  require('../getLogFilter.js');
29
29
 
30
- const help = "rollup version 4.64.0\n=====================================\n\nUsage: rollup [options] <entry file>\n\nOptions:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, Rollup will try to load configuration files in\n the following order:\n rollup.config.mjs -> rollup.config.cjs -> rollup.config.js)\n-d, --dir <dirname> Directory for chunks (if absent, prints to stdout)\n-e, --external <ids> Comma-separate list of module IDs to exclude\n-f, --format <format> Type of output (amd, cjs, es, iife, umd, system)\n-g, --globals <pairs> Comma-separate list of `moduleID:Global` pairs\n-h, --help Show this help message\n-i, --input <filename> Input (alternative to <entry file>)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-n, --name <name> Name for UMD export\n-o, --file <output> Single output file (if absent, prints to stdout)\n-p, --plugin <plugin> Use the plugin specified (may be repeated)\n-v, --version Show version number\n-w, --watch Watch files in bundle and rebuild on changes\n--amd.autoId Generate the AMD ID based off the chunk name\n--amd.basePath <prefix> Path to prepend to auto generated AMD ID\n--amd.define <name> Function to use in place of `define`\n--amd.forceJsExtensionForImports Use `.js` extension in AMD imports\n--amd.id <id> ID for AMD module (default is anonymous)\n--assetFileNames <pattern> Name pattern for emitted assets\n--banner <text> Code to insert at top of bundle (outside wrapper)\n--chunkFileNames <pattern> Name pattern for emitted secondary chunks\n--compact Minify wrapper code\n--context <variable> Specify top-level `this` value\n--no-dynamicImportInCjs Write external dynamic CommonJS imports as require\n--entryFileNames <pattern> Name pattern for emitted entry chunks\n--environment <values> Settings passed to config file (see example)\n--no-esModule Do not add __esModule property\n--exports <mode> Specify export mode (auto, default, named, none)\n--extend Extend global variable defined by --name\n--no-externalImportAttributes Omit import attributes in \"es\" output\n--no-externalLiveBindings Do not generate code to support live bindings\n--failAfterWarnings Exit with an error if the build produced warnings\n--filterLogs <filter> Filter log messages\n--footer <text> Code to insert at end of bundle (outside wrapper)\n--forceExit Force exit the process when done\n--no-freeze Do not freeze namespace objects\n--generatedCode <preset> Which code features to use (es5/es2015)\n--generatedCode.arrowFunctions Use arrow functions in generated code\n--generatedCode.constBindings Use \"const\" in generated code\n--generatedCode.objectShorthand Use shorthand properties in generated code\n--no-generatedCode.reservedNamesAsProps Always quote reserved names as props\n--generatedCode.symbols Use symbols in generated code\n--hashCharacters <name> Use the specified character set for file hashes\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--importAttributesKey <name> Use the specified keyword for import attributes\n--no-indent Don't indent result\n--inlineDynamicImports Create single bundle when using dynamic imports\n--no-interop Do not include interop block\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--logLevel <level> Which kind of logs to display\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileOps <value> How many files to read in parallel\n--minifyInternalExports Force or disable minification of internal exports\n--noConflict Generate a noConflict method for UMD globals\n--outro <text> Code to insert at end of bundle (inside wrapper)\n--perf Display performance timings\n--no-preserveEntrySignatures Avoid facade chunks for entry points\n--preserveModules Preserve module structure\n--preserveModulesRoot Put preserved modules under this path at root level\n--preserveSymlinks Do not follow symlinks when resolving files\n--no-reexportProtoFromExternal Ignore `__proto__` in star re-exports\n--no-sanitizeFileName Do not replace invalid characters in file names\n--shimMissingExports Create shim variables for missing exports\n--silent Don't print warnings\n--sourcemapBaseUrl <url> Emit absolute sourcemap URLs with given base\n--sourcemapDebugIds Emit unique debug ids in source and sourcemaps\n--sourcemapExcludeSources Do not include source code in source maps\n--sourcemapFile <file> Specify bundle position for source maps\n--sourcemapFileNames <pattern> Name pattern for emitted sourcemaps\n--stdin=ext Specify file extension used for stdin input\n--no-stdin Do not read \"-\" from stdin\n--no-strict Don't emit `\"use strict\";` in the generated modules\n--strictDeprecations Throw errors for deprecated features\n--no-systemNullSetters Do not replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\n--treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared\n--treeshake.manualPureFunctions <names> Manually declare functions as pure\n--no-treeshake.moduleSideEffects Assume modules have no side effects\n--no-treeshake.propertyReadSideEffects Ignore property access side effects\n--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking\n--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw\n--validate Validate output\n--waitForBundleInput Wait for bundle input files\n--watch.allowInputInsideOutputPath Whether the input path is allowed to be a\n subpath of the output path\n--watch.buildDelay <number> Throttle watch rebuilds\n--no-watch.clearScreen Do not clear the screen when rebuilding\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.skipWrite Do not write files to disk when watching\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --file=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
30
+ const help = "rollup version 4.64.2\n=====================================\n\nUsage: rollup [options] <entry file>\n\nOptions:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, Rollup will try to load configuration files in\n the following order:\n rollup.config.mjs -> rollup.config.cjs -> rollup.config.js)\n-d, --dir <dirname> Directory for chunks (if absent, prints to stdout)\n-e, --external <ids> Comma-separate list of module IDs to exclude\n-f, --format <format> Type of output (amd, cjs, es, iife, umd, system)\n-g, --globals <pairs> Comma-separate list of `moduleID:Global` pairs\n-h, --help Show this help message\n-i, --input <filename> Input (alternative to <entry file>)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-n, --name <name> Name for UMD export\n-o, --file <output> Single output file (if absent, prints to stdout)\n-p, --plugin <plugin> Use the plugin specified (may be repeated)\n-v, --version Show version number\n-w, --watch Watch files in bundle and rebuild on changes\n--amd.autoId Generate the AMD ID based off the chunk name\n--amd.basePath <prefix> Path to prepend to auto generated AMD ID\n--amd.define <name> Function to use in place of `define`\n--amd.forceJsExtensionForImports Use `.js` extension in AMD imports\n--amd.id <id> ID for AMD module (default is anonymous)\n--assetFileNames <pattern> Name pattern for emitted assets\n--banner <text> Code to insert at top of bundle (outside wrapper)\n--chunkFileNames <pattern> Name pattern for emitted secondary chunks\n--compact Minify wrapper code\n--context <variable> Specify top-level `this` value\n--no-dynamicImportInCjs Write external dynamic CommonJS imports as require\n--entryFileNames <pattern> Name pattern for emitted entry chunks\n--environment <values> Settings passed to config file (see example)\n--no-esModule Do not add __esModule property\n--exports <mode> Specify export mode (auto, default, named, none)\n--extend Extend global variable defined by --name\n--no-externalImportAttributes Omit import attributes in \"es\" output\n--no-externalLiveBindings Do not generate code to support live bindings\n--failAfterWarnings Exit with an error if the build produced warnings\n--filterLogs <filter> Filter log messages\n--footer <text> Code to insert at end of bundle (outside wrapper)\n--forceExit Force exit the process when done\n--no-freeze Do not freeze namespace objects\n--generatedCode <preset> Which code features to use (es5/es2015)\n--generatedCode.arrowFunctions Use arrow functions in generated code\n--generatedCode.constBindings Use \"const\" in generated code\n--generatedCode.objectShorthand Use shorthand properties in generated code\n--no-generatedCode.reservedNamesAsProps Always quote reserved names as props\n--generatedCode.symbols Use symbols in generated code\n--hashCharacters <name> Use the specified character set for file hashes\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--importAttributesKey <name> Use the specified keyword for import attributes\n--no-indent Don't indent result\n--inlineDynamicImports Create single bundle when using dynamic imports\n--no-interop Do not include interop block\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--logLevel <level> Which kind of logs to display\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileOps <value> How many files to read in parallel\n--minifyInternalExports Force or disable minification of internal exports\n--noConflict Generate a noConflict method for UMD globals\n--outro <text> Code to insert at end of bundle (inside wrapper)\n--perf Display performance timings\n--no-preserveEntrySignatures Avoid facade chunks for entry points\n--preserveModules Preserve module structure\n--preserveModulesRoot Put preserved modules under this path at root level\n--preserveSymlinks Do not follow symlinks when resolving files\n--no-reexportProtoFromExternal Ignore `__proto__` in star re-exports\n--no-sanitizeFileName Do not replace invalid characters in file names\n--shimMissingExports Create shim variables for missing exports\n--silent Don't print warnings\n--sourcemapBaseUrl <url> Emit absolute sourcemap URLs with given base\n--sourcemapDebugIds Emit unique debug ids in source and sourcemaps\n--sourcemapExcludeSources Do not include source code in source maps\n--sourcemapFile <file> Specify bundle position for source maps\n--sourcemapFileNames <pattern> Name pattern for emitted sourcemaps\n--stdin=ext Specify file extension used for stdin input\n--no-stdin Do not read \"-\" from stdin\n--no-strict Don't emit `\"use strict\";` in the generated modules\n--strictDeprecations Throw errors for deprecated features\n--no-systemNullSetters Do not replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\n--treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared\n--treeshake.manualPureFunctions <names> Manually declare functions as pure\n--no-treeshake.moduleSideEffects Assume modules have no side effects\n--no-treeshake.propertyReadSideEffects Ignore property access side effects\n--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking\n--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw\n--validate Validate output\n--waitForBundleInput Wait for bundle input files\n--watch.allowInputInsideOutputPath Whether the input path is allowed to be a\n subpath of the output path\n--watch.buildDelay <number> Throttle watch rebuilds\n--no-watch.clearScreen Do not clear the screen when rebuilding\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.skipWrite Do not write files to disk when watching\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --file=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
31
31
 
32
32
  /**
33
33
  * @license
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
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.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
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.64.0";
30
+ var version = "4.64.2";
31
31
  const pkg = {
32
32
  version: version};
33
33
 
@@ -2586,6 +2586,9 @@ class Variable extends ExpressionEntity {
2586
2586
  markReassigned() {
2587
2587
  this.isReassigned = true;
2588
2588
  }
2589
+ markTargetOfAssignment() {
2590
+ this.isTargetOfAssignment = true;
2591
+ }
2589
2592
  constructor(name) {
2590
2593
  super();
2591
2594
  this.name = name;
@@ -2598,6 +2601,9 @@ class Variable extends ExpressionEntity {
2598
2601
  this.renderBaseName = null;
2599
2602
  this.renderName = null;
2600
2603
  this.isReassigned = false;
2604
+ // Unlike isReassigned, set eagerly during binding for every assignment,
2605
+ // including ones that are never included
2606
+ this.isTargetOfAssignment = false;
2601
2607
  this.onlyFunctionCallUsed = true;
2602
2608
  }
2603
2609
  /**
@@ -5727,6 +5733,9 @@ class Identifier extends IdentifierBase {
5727
5733
  this.variable = this.scope.findVariable(this.name);
5728
5734
  this.variable.addReference(this);
5729
5735
  this.isVariableReference = true;
5736
+ if (this.assignmentInteraction) {
5737
+ this.variable.markTargetOfAssignment();
5738
+ }
5730
5739
  }
5731
5740
  }
5732
5741
  declare(kind, destructuredInitPath, init) {
@@ -6523,6 +6532,31 @@ class ThisVariable extends ParameterVariable {
6523
6532
  }
6524
6533
  }
6525
6534
 
6535
+ /**
6536
+ * Represents the return value of a function where all return statements return
6537
+ * the same variable that is the target of an assignment. As the assigned value
6538
+ * may replace the declaration initializer before the function returns, value
6539
+ * queries resolve to unknown, and call arguments are deoptimized directly
6540
+ * instead of being forwarded to the initializer alone.
6541
+ */
6542
+ class ReturnedIdentifier extends ExpressionEntity {
6543
+ constructor(returnedIdentifier) {
6544
+ super();
6545
+ this.returnedIdentifier = returnedIdentifier;
6546
+ }
6547
+ deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
6548
+ // The initializer may never be the value that is returned
6549
+ deoptimizeInteraction(interaction);
6550
+ this.returnedIdentifier.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
6551
+ }
6552
+ deoptimizePath(path) {
6553
+ this.returnedIdentifier.deoptimizePath(path);
6554
+ }
6555
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
6556
+ this.returnedIdentifier.includeCallArgumentsWhenCalledAtPath(path, interaction, context);
6557
+ }
6558
+ }
6559
+
6526
6560
  class CatchBodyScope extends ChildScope {
6527
6561
  constructor(parent) {
6528
6562
  super(parent, parent.context);
@@ -6754,21 +6788,21 @@ class ReturnValueScope extends ParameterScope {
6754
6788
  addArgumentToBeDeoptimized(_argument) { }
6755
6789
  updateReturnExpression() {
6756
6790
  const { returnExpressions } = this;
6757
- if (returnExpressions.length === 1) {
6758
- this.returnExpression = returnExpressions[0];
6791
+ const [firstExpression] = returnExpressions;
6792
+ // A single return, or the same variable returned on all paths, can be
6793
+ // resolved to that variable
6794
+ if (firstExpression && this.returnExpressionsResolveToSameVariable(firstExpression)) {
6795
+ this.returnExpression = firstExpression.variable.isTargetOfAssignment
6796
+ ? new ReturnedIdentifier(firstExpression)
6797
+ : firstExpression;
6798
+ }
6799
+ else if (returnExpressions.length === 1) {
6800
+ this.returnExpression = firstExpression;
6759
6801
  }
6760
6802
  else {
6761
- // Returning the same variable on all paths is equivalent to a single
6762
- // return, so the return expression can be resolved to that variable
6763
- const [firstExpression] = returnExpressions;
6764
- if (firstExpression && this.returnExpressionsResolveToSameVariable(firstExpression)) {
6765
- this.returnExpression = firstExpression;
6766
- }
6767
- else {
6768
- this.returnExpression = UNKNOWN_EXPRESSION;
6769
- for (const expression of returnExpressions) {
6770
- expression.deoptimizePath(UNKNOWN_PATH);
6771
- }
6803
+ this.returnExpression = UNKNOWN_EXPRESSION;
6804
+ for (const expression of returnExpressions) {
6805
+ expression.deoptimizePath(UNKNOWN_PATH);
6772
6806
  }
6773
6807
  }
6774
6808
  }
@@ -6949,6 +6983,9 @@ class RestElement extends NodeBase {
6949
6983
  markDeclarationReached() {
6950
6984
  this.argument.markDeclarationReached();
6951
6985
  }
6986
+ setAssignedValue(value) {
6987
+ this.argument.setAssignedValue(value);
6988
+ }
6952
6989
  applyDeoptimizations() {
6953
6990
  this.deoptimized = true;
6954
6991
  if (this.declarationInit !== null) {
@@ -12228,6 +12265,14 @@ class ArrayPattern extends NodeBase {
12228
12265
  }
12229
12266
  }
12230
12267
  }
12268
+ setAssignedValue(value) {
12269
+ super.setAssignedValue(value);
12270
+ // Destructuring assigns each target only some subpath of the assigned
12271
+ // value, which is not tracked
12272
+ for (const element of this.elements) {
12273
+ element?.setAssignedValue(UNKNOWN_EXPRESSION);
12274
+ }
12275
+ }
12231
12276
  markDeclarationReached() {
12232
12277
  for (const element of this.elements) {
12233
12278
  element?.markDeclarationReached();
@@ -12398,6 +12443,14 @@ class ObjectPattern extends NodeBase {
12398
12443
  }
12399
12444
  }
12400
12445
  }
12446
+ setAssignedValue(value) {
12447
+ super.setAssignedValue(value);
12448
+ // Destructuring assigns each target only some subpath of the assigned
12449
+ // value, which is not tracked
12450
+ for (const property of this.properties) {
12451
+ property.setAssignedValue(UNKNOWN_EXPRESSION);
12452
+ }
12453
+ }
12401
12454
  }
12402
12455
  ObjectPattern.prototype.includeNode = onlyIncludeSelfNoDeoptimize;
12403
12456
  ObjectPattern.prototype.applyDeoptimizations = doNotDeoptimize;
@@ -12562,6 +12615,9 @@ class AssignmentPattern extends NodeBase {
12562
12615
  this.left.render(code, options, { isShorthandProperty });
12563
12616
  this.right.render(code, options);
12564
12617
  }
12618
+ setAssignedValue(value) {
12619
+ this.left.setAssignedValue(value);
12620
+ }
12565
12621
  applyDeoptimizations() {
12566
12622
  this.deoptimized = true;
12567
12623
  this.left.deoptimizePath(EMPTY_PATH);
@@ -15361,6 +15417,9 @@ class Property extends MethodBase {
15361
15417
  }
15362
15418
  this.value.render(code, options, { isShorthandProperty: this.shorthand });
15363
15419
  }
15420
+ setAssignedValue(value) {
15421
+ this.value.setAssignedValue(value);
15422
+ }
15364
15423
  getPathInProperty(destructuredInitPath) {
15365
15424
  return destructuredInitPath.at(-1) === UnknownKey
15366
15425
  ? destructuredInitPath
@@ -19421,6 +19480,7 @@ class Chunk {
19421
19480
  const { accessedGlobals, indent, magicString, renderedSource, usedModules, usesTopLevelAwait } = this.renderModules(preliminaryFileName.fileName);
19422
19481
  const renderedDependencies = [...this.getRenderedDependencies().values()];
19423
19482
  const renderedExports = exportMode === 'none' ? [] : this.getChunkExportDeclarations(format);
19483
+ const renderedExportNames = format === 'es' && new Set(renderedExports.map(({ exported }) => exported));
19424
19484
  let hasExports = renderedExports.length > 0;
19425
19485
  let hasDefaultExport = false;
19426
19486
  for (const renderedDependency of renderedDependencies) {
@@ -19430,8 +19490,8 @@ class Chunk {
19430
19490
  if (!hasDefaultExport && reexports.some(reexport => reexport.reexported === 'default')) {
19431
19491
  hasDefaultExport = true;
19432
19492
  }
19433
- if (format === 'es') {
19434
- renderedDependency.reexports = reexports.filter(({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
19493
+ if (renderedExportNames) {
19494
+ renderedDependency.reexports = reexports.filter(({ reexported }) => !renderedExportNames.has(reexported));
19435
19495
  }
19436
19496
  }
19437
19497
  }
@@ -24355,17 +24415,17 @@ async function rollupInternal(rawInputOptions, registerWatchHooks) {
24355
24415
  ...error_,
24356
24416
  message: `There was an error during the build:\n ${error_.message}\nAdditionally, handling the error in the 'buildEnd' hook caused the following error:\n ${buildEndError.message}`
24357
24417
  });
24358
- await graph.pluginDriver.hookParallel('closeBundle', [compoundError]);
24418
+ await graph.pluginDriver.hookParallel('closeBundle', [compoundError]).catch(() => { });
24359
24419
  throw compoundError;
24360
24420
  }
24361
- await graph.pluginDriver.hookParallel('closeBundle', [error_]);
24421
+ await graph.pluginDriver.hookParallel('closeBundle', [error_]).catch(() => { });
24362
24422
  throw error_;
24363
24423
  }
24364
24424
  try {
24365
24425
  await graph.pluginDriver.hookParallel('buildEnd', []);
24366
24426
  }
24367
24427
  catch (buildEndError) {
24368
- await graph.pluginDriver.hookParallel('closeBundle', [buildEndError]);
24428
+ await graph.pluginDriver.hookParallel('closeBundle', [buildEndError]).catch(() => { });
24369
24429
  throw buildEndError;
24370
24430
  }
24371
24431
  });
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
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.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
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.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
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.64.0";
45
+ var version = "4.64.2";
46
46
  const package_ = {
47
47
  version: version};
48
48
 
@@ -6760,6 +6760,9 @@ class Variable extends ExpressionEntity {
6760
6760
  markReassigned() {
6761
6761
  this.isReassigned = true;
6762
6762
  }
6763
+ markTargetOfAssignment() {
6764
+ this.isTargetOfAssignment = true;
6765
+ }
6763
6766
  constructor(name) {
6764
6767
  super();
6765
6768
  this.name = name;
@@ -6772,6 +6775,9 @@ class Variable extends ExpressionEntity {
6772
6775
  this.renderBaseName = null;
6773
6776
  this.renderName = null;
6774
6777
  this.isReassigned = false;
6778
+ // Unlike isReassigned, set eagerly during binding for every assignment,
6779
+ // including ones that are never included
6780
+ this.isTargetOfAssignment = false;
6775
6781
  this.onlyFunctionCallUsed = true;
6776
6782
  }
6777
6783
  /**
@@ -9899,6 +9905,9 @@ class Identifier extends IdentifierBase {
9899
9905
  this.variable = this.scope.findVariable(this.name);
9900
9906
  this.variable.addReference(this);
9901
9907
  this.isVariableReference = true;
9908
+ if (this.assignmentInteraction) {
9909
+ this.variable.markTargetOfAssignment();
9910
+ }
9902
9911
  }
9903
9912
  }
9904
9913
  declare(kind, destructuredInitPath, init) {
@@ -10683,6 +10692,31 @@ class ThisVariable extends ParameterVariable {
10683
10692
  }
10684
10693
  }
10685
10694
 
10695
+ /**
10696
+ * Represents the return value of a function where all return statements return
10697
+ * the same variable that is the target of an assignment. As the assigned value
10698
+ * may replace the declaration initializer before the function returns, value
10699
+ * queries resolve to unknown, and call arguments are deoptimized directly
10700
+ * instead of being forwarded to the initializer alone.
10701
+ */
10702
+ class ReturnedIdentifier extends ExpressionEntity {
10703
+ constructor(returnedIdentifier) {
10704
+ super();
10705
+ this.returnedIdentifier = returnedIdentifier;
10706
+ }
10707
+ deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
10708
+ // The initializer may never be the value that is returned
10709
+ deoptimizeInteraction(interaction);
10710
+ this.returnedIdentifier.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
10711
+ }
10712
+ deoptimizePath(path) {
10713
+ this.returnedIdentifier.deoptimizePath(path);
10714
+ }
10715
+ includeCallArgumentsWhenCalledAtPath(path, interaction, context) {
10716
+ this.returnedIdentifier.includeCallArgumentsWhenCalledAtPath(path, interaction, context);
10717
+ }
10718
+ }
10719
+
10686
10720
  class CatchBodyScope extends ChildScope {
10687
10721
  constructor(parent) {
10688
10722
  super(parent, parent.context);
@@ -10914,21 +10948,21 @@ class ReturnValueScope extends ParameterScope {
10914
10948
  addArgumentToBeDeoptimized(_argument) { }
10915
10949
  updateReturnExpression() {
10916
10950
  const { returnExpressions } = this;
10917
- if (returnExpressions.length === 1) {
10918
- this.returnExpression = returnExpressions[0];
10951
+ const [firstExpression] = returnExpressions;
10952
+ // A single return, or the same variable returned on all paths, can be
10953
+ // resolved to that variable
10954
+ if (firstExpression && this.returnExpressionsResolveToSameVariable(firstExpression)) {
10955
+ this.returnExpression = firstExpression.variable.isTargetOfAssignment
10956
+ ? new ReturnedIdentifier(firstExpression)
10957
+ : firstExpression;
10958
+ }
10959
+ else if (returnExpressions.length === 1) {
10960
+ this.returnExpression = firstExpression;
10919
10961
  }
10920
10962
  else {
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
- }
10963
+ this.returnExpression = UNKNOWN_EXPRESSION;
10964
+ for (const expression of returnExpressions) {
10965
+ expression.deoptimizePath(UNKNOWN_PATH);
10932
10966
  }
10933
10967
  }
10934
10968
  }
@@ -11109,6 +11143,9 @@ class RestElement extends NodeBase {
11109
11143
  markDeclarationReached() {
11110
11144
  this.argument.markDeclarationReached();
11111
11145
  }
11146
+ setAssignedValue(value) {
11147
+ this.argument.setAssignedValue(value);
11148
+ }
11112
11149
  applyDeoptimizations() {
11113
11150
  this.deoptimized = true;
11114
11151
  if (this.declarationInit !== null) {
@@ -13845,6 +13882,14 @@ class ArrayPattern extends NodeBase {
13845
13882
  }
13846
13883
  }
13847
13884
  }
13885
+ setAssignedValue(value) {
13886
+ super.setAssignedValue(value);
13887
+ // Destructuring assigns each target only some subpath of the assigned
13888
+ // value, which is not tracked
13889
+ for (const element of this.elements) {
13890
+ element?.setAssignedValue(UNKNOWN_EXPRESSION);
13891
+ }
13892
+ }
13848
13893
  markDeclarationReached() {
13849
13894
  for (const element of this.elements) {
13850
13895
  element?.markDeclarationReached();
@@ -14015,6 +14060,14 @@ class ObjectPattern extends NodeBase {
14015
14060
  }
14016
14061
  }
14017
14062
  }
14063
+ setAssignedValue(value) {
14064
+ super.setAssignedValue(value);
14065
+ // Destructuring assigns each target only some subpath of the assigned
14066
+ // value, which is not tracked
14067
+ for (const property of this.properties) {
14068
+ property.setAssignedValue(UNKNOWN_EXPRESSION);
14069
+ }
14070
+ }
14018
14071
  }
14019
14072
  ObjectPattern.prototype.includeNode = onlyIncludeSelfNoDeoptimize;
14020
14073
  ObjectPattern.prototype.applyDeoptimizations = doNotDeoptimize;
@@ -14179,6 +14232,9 @@ class AssignmentPattern extends NodeBase {
14179
14232
  this.left.render(code, options, { isShorthandProperty });
14180
14233
  this.right.render(code, options);
14181
14234
  }
14235
+ setAssignedValue(value) {
14236
+ this.left.setAssignedValue(value);
14237
+ }
14182
14238
  applyDeoptimizations() {
14183
14239
  this.deoptimized = true;
14184
14240
  this.left.deoptimizePath(EMPTY_PATH);
@@ -16978,6 +17034,9 @@ class Property extends MethodBase {
16978
17034
  }
16979
17035
  this.value.render(code, options, { isShorthandProperty: this.shorthand });
16980
17036
  }
17037
+ setAssignedValue(value) {
17038
+ this.value.setAssignedValue(value);
17039
+ }
16981
17040
  getPathInProperty(destructuredInitPath) {
16982
17041
  return destructuredInitPath.at(-1) === UnknownKey
16983
17042
  ? destructuredInitPath
@@ -20917,6 +20976,7 @@ class Chunk {
20917
20976
  const { accessedGlobals, indent, magicString, renderedSource, usedModules, usesTopLevelAwait } = this.renderModules(preliminaryFileName.fileName);
20918
20977
  const renderedDependencies = [...this.getRenderedDependencies().values()];
20919
20978
  const renderedExports = exportMode === 'none' ? [] : this.getChunkExportDeclarations(format);
20979
+ const renderedExportNames = format === 'es' && new Set(renderedExports.map(({ exported }) => exported));
20920
20980
  let hasExports = renderedExports.length > 0;
20921
20981
  let hasDefaultExport = false;
20922
20982
  for (const renderedDependency of renderedDependencies) {
@@ -20926,8 +20986,8 @@ class Chunk {
20926
20986
  if (!hasDefaultExport && reexports.some(reexport => reexport.reexported === 'default')) {
20927
20987
  hasDefaultExport = true;
20928
20988
  }
20929
- if (format === 'es') {
20930
- renderedDependency.reexports = reexports.filter(({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
20989
+ if (renderedExportNames) {
20990
+ renderedDependency.reexports = reexports.filter(({ reexported }) => !renderedExportNames.has(reexported));
20931
20991
  }
20932
20992
  }
20933
20993
  }
@@ -24692,17 +24752,17 @@ async function rollupInternal(rawInputOptions, registerWatchHooks) {
24692
24752
  ...error_,
24693
24753
  message: `There was an error during the build:\n ${error_.message}\nAdditionally, handling the error in the 'buildEnd' hook caused the following error:\n ${buildEndError.message}`
24694
24754
  });
24695
- await graph.pluginDriver.hookParallel('closeBundle', [compoundError]);
24755
+ await graph.pluginDriver.hookParallel('closeBundle', [compoundError]).catch(() => { });
24696
24756
  throw compoundError;
24697
24757
  }
24698
- await graph.pluginDriver.hookParallel('closeBundle', [error_]);
24758
+ await graph.pluginDriver.hookParallel('closeBundle', [error_]).catch(() => { });
24699
24759
  throw error_;
24700
24760
  }
24701
24761
  try {
24702
24762
  await graph.pluginDriver.hookParallel('buildEnd', []);
24703
24763
  }
24704
24764
  catch (buildEndError) {
24705
- await graph.pluginDriver.hookParallel('closeBundle', [buildEndError]);
24765
+ await graph.pluginDriver.hookParallel('closeBundle', [buildEndError]).catch(() => { });
24706
24766
  throw buildEndError;
24707
24767
  }
24708
24768
  });
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.64.0
4
- Fri, 02 Oct 2026 15:38:16 GMT - commit 77773bf8ee9130c4edbde14c017855c41e500692
3
+ Rollup.js v4.64.2
4
+ Wed, 07 Oct 2026 17:38:44 GMT - commit 19e0dcbf5aaeab7cc8efd92f7604ca3a20406cd2
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/wasm-node",
3
- "version": "4.64.0",
3
+ "version": "4.64.2",
4
4
  "description": "Next-generation ES module bundler with Node wasm",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",