rollup 4.65.0 → 4.65.1

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.65.0
5
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
4
+ Rollup.js v4.65.1
5
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
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.65.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.65.1\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.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
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.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
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.65.0";
30
+ var version = "4.65.1";
31
31
  const pkg = {
32
32
  version: version};
33
33
 
@@ -2214,8 +2214,8 @@ const UnknownNonAccessorKey = Symbol('Unknown Non-Accessor Key');
2214
2214
  const UnknownInteger = Symbol('Unknown Integer');
2215
2215
  const UnknownWellKnown = Symbol('Unknown Well-Known');
2216
2216
  const SymbolToStringTag = Symbol('Symbol.toStringTag');
2217
- const SymbolDispose = Symbol('Symbol.asyncDispose');
2218
- const SymbolAsyncDispose = Symbol('Symbol.dispose');
2217
+ const SymbolDispose = Symbol('Symbol.dispose');
2218
+ const SymbolAsyncDispose = Symbol('Symbol.asyncDispose');
2219
2219
  const SymbolHasInstance = Symbol('Symbol.hasInstance');
2220
2220
  const WELL_KNOWN_SYMBOLS_LIST = [
2221
2221
  SymbolToStringTag,
@@ -2322,6 +2322,25 @@ class IncludedFullPathTracker {
2322
2322
  }
2323
2323
  return included;
2324
2324
  }
2325
+ includeAllPaths(entity, context, basePath) {
2326
+ if (this.includedPaths) {
2327
+ includeAllSubPaths(entity, context, basePath, this.includedPaths);
2328
+ }
2329
+ }
2330
+ }
2331
+ function includeAllSubPaths(entity, context, path, includedPaths) {
2332
+ if (includedPaths[UnknownKey]) {
2333
+ entity.includePath([...path, UnknownKey], context);
2334
+ return;
2335
+ }
2336
+ const keys = Reflect.ownKeys(includedPaths);
2337
+ if (keys.length === 0) {
2338
+ entity.includePath(path, context);
2339
+ return;
2340
+ }
2341
+ for (const key of keys) {
2342
+ includeAllSubPaths(entity, context, [...path, key], includedPaths[key]);
2343
+ }
2325
2344
  }
2326
2345
  const UNKNOWN_INCLUDED_TOP_LEVEL_PATH = Object.freeze({
2327
2346
  [UnknownKey]: true
@@ -2365,13 +2384,15 @@ class IncludedTopLevelPathTracker {
2365
2384
  entity.includePath([...basePath, UnknownKey], context);
2366
2385
  }
2367
2386
  else {
2368
- const inclusionEntries = Object.entries(includedPaths);
2369
- if (inclusionEntries.length === 0) {
2387
+ const keys = Reflect.ownKeys(includedPaths);
2388
+ if (keys.length === 0) {
2370
2389
  entity.includePath(basePath, context);
2371
2390
  }
2372
2391
  else {
2373
- for (const [key, value] of inclusionEntries) {
2374
- entity.includePath(value === UnknownKey ? [...basePath, key, UnknownKey] : [...basePath, key], context);
2392
+ for (const key of keys) {
2393
+ entity.includePath(includedPaths[key] === UnknownKey
2394
+ ? [...basePath, key, UnknownKey]
2395
+ : [...basePath, key], context);
2375
2396
  }
2376
2397
  }
2377
2398
  }
@@ -2485,6 +2506,9 @@ class ExpressionEntity {
2485
2506
  deoptimizeInteraction(interaction);
2486
2507
  }
2487
2508
  deoptimizePath(_path) { }
2509
+ getKnownFunctionAtPath(_path, _recursionTracker, _origin) {
2510
+ return null;
2511
+ }
2488
2512
  /**
2489
2513
  * If possible it returns a stringifyable literal value for this node that
2490
2514
  * can be used for inlining or comparing values. Otherwise, it should return
@@ -3740,6 +3764,17 @@ class ObjectEntity extends ExpressionEntity {
3740
3764
  }
3741
3765
  this.prototypeExpression?.deoptimizePath(path.length === 1 ? [path[0], UnknownKey] : path);
3742
3766
  }
3767
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
3768
+ const key = path[0];
3769
+ // Setters can shadow data properties or inherited methods without appearing in the getter map.
3770
+ if (!isConcreteKey(key) || this.settersByKey.has(key) || this.unmatchableSetters.length > 0) {
3771
+ return null;
3772
+ }
3773
+ const expressionAtPath = this.getMemberExpressionAndTrackDeopt(key, origin);
3774
+ return expressionAtPath
3775
+ ? expressionAtPath.getKnownFunctionAtPath(path.slice(1), recursionTracker, origin)
3776
+ : this.prototypeExpression?.getKnownFunctionAtPath(path, recursionTracker, origin) || null;
3777
+ }
3743
3778
  getLiteralValueAtPath(path, recursionTracker, origin) {
3744
3779
  if (path.length === 0) {
3745
3780
  // This should actually be "UnknownTruthyValue". However, this currently
@@ -3996,22 +4031,25 @@ class ObjectEntity extends ExpressionEntity {
3996
4031
  }
3997
4032
  }
3998
4033
 
3999
- const isInteger = (property) => typeof property === 'string' && /^\d+$/.test(property);
4034
+ const isKnownToBeMissing = (property) => property === SymbolDispose ||
4035
+ property === SymbolAsyncDispose ||
4036
+ (typeof property === 'string' && /^\d+$/.test(property));
4000
4037
  // This makes sure unknown properties are not handled as "undefined" but as
4001
4038
  // "unknown" but without access side effects. An exception is done for numeric
4002
4039
  // properties as we do not expect new builtin properties to be numbers, this
4003
- // will improve tree-shaking for out-of-bounds array properties
4040
+ // will improve tree-shaking for out-of-bounds array properties. Disposal
4041
+ // methods are also known to be missing so that "await using" can rely on the
4042
+ // fallback to Symbol.dispose for plain objects.
4004
4043
  const OBJECT_PROTOTYPE_FALLBACK = new (class ObjectPrototypeFallbackExpression extends ExpressionEntity {
4005
4044
  deoptimizeArgumentsOnInteractionAtPath(interaction, path) {
4006
- if (interaction.type === INTERACTION_CALLED && path.length === 1 && !isInteger(path[0])) {
4045
+ if (interaction.type === INTERACTION_CALLED &&
4046
+ path.length === 1 &&
4047
+ !isKnownToBeMissing(path[0])) {
4007
4048
  deoptimizeInteraction(interaction);
4008
4049
  }
4009
4050
  }
4010
4051
  getLiteralValueAtPath(path) {
4011
- // We ignore number properties as we do not expect new properties to be
4012
- // numbers and also want to keep handling out-of-bound array elements as
4013
- // "undefined"
4014
- return path.length === 1 && isInteger(path[0]) ? undefined : UnknownValue;
4052
+ return path.length === 1 && isKnownToBeMissing(path[0]) ? undefined : UnknownValue;
4015
4053
  }
4016
4054
  hasEffectsOnInteractionAtPath(path, { type }) {
4017
4055
  return path.length > 1 || type === INTERACTION_CALLED;
@@ -4025,6 +4063,9 @@ const OBJECT_PROTOTYPE = new ObjectEntity(new Map([
4025
4063
  ['toString', METHOD_RETURNS_STRING],
4026
4064
  ['valueOf', METHOD_RETURNS_UNKNOWN]
4027
4065
  ]), OBJECT_PROTOTYPE_FALLBACK, true);
4066
+ // Generator prototypes inherit disposal methods from the iterator prototypes
4067
+ const GENERATOR_PROTOTYPE = new ObjectEntity([{ key: SymbolDispose, kind: 'init', property: UNKNOWN_EXPRESSION }], OBJECT_PROTOTYPE, true);
4068
+ const ASYNC_GENERATOR_PROTOTYPE = new ObjectEntity([{ key: SymbolAsyncDispose, kind: 'init', property: UNKNOWN_EXPRESSION }], OBJECT_PROTOTYPE, true);
4028
4069
 
4029
4070
  const NEW_ARRAY_PROPERTIES = [
4030
4071
  { key: UnknownInteger, kind: 'init', property: UNKNOWN_EXPRESSION },
@@ -4169,7 +4210,8 @@ const ARRAY_PROTOTYPE = new ObjectEntity(new Map([
4169
4210
 
4170
4211
  class SpreadElement extends NodeBase {
4171
4212
  deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
4172
- if (path.length > 0) {
4213
+ // Spread values are copied as data properties, so only calling them can still reach the argument
4214
+ if (path.length > 0 || interaction.type === INTERACTION_CALLED) {
4173
4215
  this.argument.deoptimizeArgumentsOnInteractionAtPath(interaction, UNKNOWN_PATH, recursionTracker);
4174
4216
  }
4175
4217
  }
@@ -5389,6 +5431,15 @@ class LocalVariable extends Variable {
5389
5431
  this.init.deoptimizePath(limitConcatenatedPathDepth(this.initPath, path));
5390
5432
  }
5391
5433
  }
5434
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
5435
+ if (this.isReassigned || path.length + this.initPath.length > MAX_PATH_DEPTH) {
5436
+ return null;
5437
+ }
5438
+ return recursionTracker.withTrackedEntityAtPath(path, this.init, () => {
5439
+ this.expressionsToBeDeoptimized.push(origin);
5440
+ return this.init.getKnownFunctionAtPath([...this.initPath, ...path], recursionTracker, origin);
5441
+ }, null);
5442
+ }
5392
5443
  getLiteralValueAtPath(path, recursionTracker, origin) {
5393
5444
  if (this.isReassigned || path.length + this.initPath.length > MAX_PATH_DEPTH) {
5394
5445
  return UnknownValue;
@@ -5548,6 +5599,9 @@ class IdentifierBase extends NodeBase {
5548
5599
  // Identifier as property that might be deoptimized by default
5549
5600
  this.variable?.deoptimizePath(path);
5550
5601
  }
5602
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
5603
+ return this.getVariableRespectingTDZ().getKnownFunctionAtPath(path, recursionTracker, origin);
5604
+ }
5551
5605
  getLiteralValueAtPath(path, recursionTracker, origin) {
5552
5606
  return this.getVariableRespectingTDZ().getLiteralValueAtPath(path, recursionTracker, origin);
5553
5607
  }
@@ -6027,6 +6081,11 @@ class MethodBase extends NodeBase {
6027
6081
  deoptimizePath(path) {
6028
6082
  this.getAccessedValue()[0].deoptimizePath(path);
6029
6083
  }
6084
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
6085
+ return this.kind === 'get' || this.kind === 'set'
6086
+ ? null
6087
+ : this.value.getKnownFunctionAtPath(path, recursionTracker, origin);
6088
+ }
6030
6089
  getLiteralValueAtPath(path, recursionTracker, origin) {
6031
6090
  return this.getAccessedValue()[0].getLiteralValueAtPath(path, recursionTracker, origin);
6032
6091
  }
@@ -6608,6 +6667,8 @@ class ParameterVariable extends LocalVariable {
6608
6667
  class ThisVariable extends ParameterVariable {
6609
6668
  constructor(context) {
6610
6669
  super('this', null, EMPTY_PATH, context);
6670
+ // Unlike parameters, track nested paths so receivers only keep what is accessed via "this"
6671
+ this.includedPathTracker = new IncludedFullPathTracker();
6611
6672
  }
6612
6673
  hasEffectsOnInteractionAtPath(path, interaction, context) {
6613
6674
  return (context.replacedVariableInits.get(this) || UNKNOWN_EXPRESSION).hasEffectsOnInteractionAtPath(path, interaction, context);
@@ -6912,8 +6973,11 @@ class FunctionScope extends ReturnValueScope {
6912
6973
  }
6913
6974
  includeCallArguments(interaction, context) {
6914
6975
  super.includeCallArguments(interaction, context);
6976
+ const { args } = interaction;
6977
+ if (args[0]) {
6978
+ this.thisVariable.includeArgumentPaths(args[0], context);
6979
+ }
6915
6980
  if (this.argumentsVariable.included) {
6916
- const { args } = interaction;
6917
6981
  for (let argumentIndex = 1; argumentIndex < args.length; argumentIndex++) {
6918
6982
  const argument = args[argumentIndex];
6919
6983
  if (argument) {
@@ -7130,6 +7194,11 @@ class FunctionBase extends NodeBase {
7130
7194
  this.scope.deoptimizeAllParameters();
7131
7195
  }
7132
7196
  }
7197
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
7198
+ return path.length === 0
7199
+ ? this
7200
+ : this.getObjectEntity().getKnownFunctionAtPath(path, recursionTracker, origin);
7201
+ }
7133
7202
  getLiteralValueAtPath(path, recursionTracker, origin) {
7134
7203
  return this.getObjectEntity().getLiteralValueAtPath(path, recursionTracker, origin);
7135
7204
  }
@@ -7137,7 +7206,7 @@ class FunctionBase extends NodeBase {
7137
7206
  if (path.length > 0) {
7138
7207
  return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
7139
7208
  }
7140
- if (this.async) {
7209
+ if (this.async || this.generator) {
7141
7210
  if (!this.deoptimizedReturn) {
7142
7211
  this.deoptimizedReturn = true;
7143
7212
  this.scope.getReturnExpression().deoptimizePath(UNKNOWN_PATH);
@@ -7333,10 +7402,15 @@ class FunctionNode extends FunctionBase {
7333
7402
  {
7334
7403
  key: 'prototype',
7335
7404
  kind: 'init',
7336
- property: new ObjectEntity([], OBJECT_PROTOTYPE)
7405
+ property: new ObjectEntity([], this.getPrototypeOfPrototype())
7337
7406
  }
7338
7407
  ], OBJECT_PROTOTYPE));
7339
7408
  }
7409
+ getPrototypeOfPrototype() {
7410
+ if (!this.generator)
7411
+ return OBJECT_PROTOTYPE;
7412
+ return this.async ? ASYNC_GENERATOR_PROTOTYPE : GENERATOR_PROTOTYPE;
7413
+ }
7340
7414
  }
7341
7415
 
7342
7416
  class FunctionDeclaration extends FunctionNode {
@@ -7900,6 +7974,20 @@ class MemberExpression extends NodeBase {
7900
7974
  ]);
7901
7975
  }
7902
7976
  }
7977
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
7978
+ if (this.variable) {
7979
+ return this.variable.getKnownFunctionAtPath(path, recursionTracker, origin);
7980
+ }
7981
+ if (this.isUndefined)
7982
+ return null;
7983
+ const propertyKey = this.getDynamicPropertyKey();
7984
+ if (propertyKey !== UnknownKey && path.length < MAX_PATH_DEPTH) {
7985
+ if (propertyKey !== this.propertyKey)
7986
+ this.expressionsToBeDeoptimized.push(origin);
7987
+ return this.object.getKnownFunctionAtPath([propertyKey, ...path], recursionTracker, origin);
7988
+ }
7989
+ return null;
7990
+ }
7903
7991
  getLiteralValueAtPath(path, recursionTracker, origin) {
7904
7992
  if (this.variable) {
7905
7993
  return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
@@ -15257,6 +15345,9 @@ class ObjectExpression extends NodeBase {
15257
15345
  deoptimizePath(path) {
15258
15346
  this.getObjectEntity().deoptimizePath(path);
15259
15347
  }
15348
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
15349
+ return this.getObjectEntity().getKnownFunctionAtPath(path, recursionTracker, origin);
15350
+ }
15260
15351
  getLiteralValueAtPath(path, recursionTracker, origin) {
15261
15352
  return this.getObjectEntity().getLiteralValueAtPath(path, recursionTracker, origin);
15262
15353
  }
@@ -16425,6 +16516,14 @@ class VariableDeclarator extends NodeBase {
16425
16516
  deoptimizePath(path) {
16426
16517
  this.id.deoptimizePath(path);
16427
16518
  }
16519
+ deoptimizeCache() {
16520
+ if (!this.hasDeoptimizedDisposal && this.init) {
16521
+ this.hasDeoptimizedDisposal = true;
16522
+ this.init.deoptimizePath(UNKNOWN_PATH);
16523
+ this.init.includePath(UNKNOWN_PATH, createInclusionContext());
16524
+ this.scope.context.requestTreeshakingPass();
16525
+ }
16526
+ }
16428
16527
  hasEffects(context) {
16429
16528
  const initEffect = this.init?.hasEffects(context);
16430
16529
  this.id.markDeclarationReached();
@@ -16440,6 +16539,11 @@ class VariableDeclarator extends NodeBase {
16440
16539
  const { id, init } = this;
16441
16540
  if (!this.included)
16442
16541
  this.includeNode(context);
16542
+ const { disposalCall, disposalFunction } = this;
16543
+ // Before including init so that newly included receiver paths are included in this pass
16544
+ if (disposalFunction && disposalCall) {
16545
+ disposalFunction.includeCallArgumentsWhenCalledAtPath(EMPTY_PATH, disposalCall, context);
16546
+ }
16443
16547
  init?.include(context, includeChildrenRecursively);
16444
16548
  id.markDeclarationReached();
16445
16549
  if (includeChildrenRecursively) {
@@ -16481,11 +16585,16 @@ class VariableDeclarator extends NodeBase {
16481
16585
  this.included = true;
16482
16586
  const { id, init } = this;
16483
16587
  if (init) {
16484
- if (this.isUsingDeclaration) {
16485
- init.includePath(SYMBOL_DISPOSE_PATH, context);
16486
- }
16487
- else if (this.isAsyncUsingDeclaration) {
16488
- init.includePath(SYMBOL_ASYNC_DISPOSE_PATH, context);
16588
+ if (this.isUsingDeclaration || this.isAsyncUsingDeclaration) {
16589
+ const disposalInteractions = {
16590
+ access: { args: [init], type: INTERACTION_ACCESSED },
16591
+ call: { args: [init], type: INTERACTION_CALLED, withNew: false }
16592
+ };
16593
+ if (this.isUsingDeclaration ||
16594
+ !this.includeDisposalMethodAndCheckIfKnownFunction(init, SYMBOL_ASYNC_DISPOSE_PATH, disposalInteractions, context)) {
16595
+ this.includeDisposalMethodAndCheckIfKnownFunction(init, SYMBOL_DISPOSE_PATH, disposalInteractions, context);
16596
+ }
16597
+ this.scope.context.requestTreeshakingPass();
16489
16598
  }
16490
16599
  if (id instanceof Identifier && init instanceof ClassExpression && !init.id) {
16491
16600
  const { name, variable } = id;
@@ -16497,6 +16606,23 @@ class VariableDeclarator extends NodeBase {
16497
16606
  }
16498
16607
  }
16499
16608
  }
16609
+ includeDisposalMethodAndCheckIfKnownFunction(init, path, { access, call }, context) {
16610
+ init.deoptimizeArgumentsOnInteractionAtPath(access, path, SHARED_RECURSION_TRACKER);
16611
+ const disposalFunction = init.getKnownFunctionAtPath(path, SHARED_RECURSION_TRACKER, this);
16612
+ init.includePath(path, context);
16613
+ if (!disposalFunction) {
16614
+ const disposalValue = init.getLiteralValueAtPath(path, SHARED_RECURSION_TRACKER, this);
16615
+ if (disposalValue !== null && disposalValue !== undefined) {
16616
+ init.deoptimizeArgumentsOnInteractionAtPath(call, path, SHARED_RECURSION_TRACKER);
16617
+ init.includeCallArgumentsWhenCalledAtPath(path, call, context);
16618
+ }
16619
+ return false;
16620
+ }
16621
+ this.disposalFunction = disposalFunction;
16622
+ this.disposalCall = call;
16623
+ disposalFunction.deoptimizeArgumentsOnInteractionAtPath(call, EMPTY_PATH, SHARED_RECURSION_TRACKER);
16624
+ return true;
16625
+ }
16500
16626
  }
16501
16627
  VariableDeclarator.prototype.applyDeoptimizations = doNotDeoptimize;
16502
16628
  const SYMBOL_DISPOSE_PATH = [SymbolDispose];
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
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.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
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.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
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.65.0";
45
+ var version = "4.65.1";
46
46
  const package_ = {
47
47
  version: version};
48
48
 
@@ -6388,8 +6388,8 @@ const UnknownNonAccessorKey = Symbol('Unknown Non-Accessor Key');
6388
6388
  const UnknownInteger = Symbol('Unknown Integer');
6389
6389
  const UnknownWellKnown = Symbol('Unknown Well-Known');
6390
6390
  const SymbolToStringTag = Symbol('Symbol.toStringTag');
6391
- const SymbolDispose = Symbol('Symbol.asyncDispose');
6392
- const SymbolAsyncDispose = Symbol('Symbol.dispose');
6391
+ const SymbolDispose = Symbol('Symbol.dispose');
6392
+ const SymbolAsyncDispose = Symbol('Symbol.asyncDispose');
6393
6393
  const SymbolHasInstance = Symbol('Symbol.hasInstance');
6394
6394
  const WELL_KNOWN_SYMBOLS_LIST = [
6395
6395
  SymbolToStringTag,
@@ -6496,6 +6496,25 @@ class IncludedFullPathTracker {
6496
6496
  }
6497
6497
  return included;
6498
6498
  }
6499
+ includeAllPaths(entity, context, basePath) {
6500
+ if (this.includedPaths) {
6501
+ includeAllSubPaths(entity, context, basePath, this.includedPaths);
6502
+ }
6503
+ }
6504
+ }
6505
+ function includeAllSubPaths(entity, context, path, includedPaths) {
6506
+ if (includedPaths[UnknownKey]) {
6507
+ entity.includePath([...path, UnknownKey], context);
6508
+ return;
6509
+ }
6510
+ const keys = Reflect.ownKeys(includedPaths);
6511
+ if (keys.length === 0) {
6512
+ entity.includePath(path, context);
6513
+ return;
6514
+ }
6515
+ for (const key of keys) {
6516
+ includeAllSubPaths(entity, context, [...path, key], includedPaths[key]);
6517
+ }
6499
6518
  }
6500
6519
  const UNKNOWN_INCLUDED_TOP_LEVEL_PATH = Object.freeze({
6501
6520
  [UnknownKey]: true
@@ -6539,13 +6558,15 @@ class IncludedTopLevelPathTracker {
6539
6558
  entity.includePath([...basePath, UnknownKey], context);
6540
6559
  }
6541
6560
  else {
6542
- const inclusionEntries = Object.entries(includedPaths);
6543
- if (inclusionEntries.length === 0) {
6561
+ const keys = Reflect.ownKeys(includedPaths);
6562
+ if (keys.length === 0) {
6544
6563
  entity.includePath(basePath, context);
6545
6564
  }
6546
6565
  else {
6547
- for (const [key, value] of inclusionEntries) {
6548
- entity.includePath(value === UnknownKey ? [...basePath, key, UnknownKey] : [...basePath, key], context);
6566
+ for (const key of keys) {
6567
+ entity.includePath(includedPaths[key] === UnknownKey
6568
+ ? [...basePath, key, UnknownKey]
6569
+ : [...basePath, key], context);
6549
6570
  }
6550
6571
  }
6551
6572
  }
@@ -6659,6 +6680,9 @@ class ExpressionEntity {
6659
6680
  deoptimizeInteraction(interaction);
6660
6681
  }
6661
6682
  deoptimizePath(_path) { }
6683
+ getKnownFunctionAtPath(_path, _recursionTracker, _origin) {
6684
+ return null;
6685
+ }
6662
6686
  /**
6663
6687
  * If possible it returns a stringifyable literal value for this node that
6664
6688
  * can be used for inlining or comparing values. Otherwise, it should return
@@ -7912,6 +7936,17 @@ class ObjectEntity extends ExpressionEntity {
7912
7936
  }
7913
7937
  this.prototypeExpression?.deoptimizePath(path.length === 1 ? [path[0], UnknownKey] : path);
7914
7938
  }
7939
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
7940
+ const key = path[0];
7941
+ // Setters can shadow data properties or inherited methods without appearing in the getter map.
7942
+ if (!isConcreteKey(key) || this.settersByKey.has(key) || this.unmatchableSetters.length > 0) {
7943
+ return null;
7944
+ }
7945
+ const expressionAtPath = this.getMemberExpressionAndTrackDeopt(key, origin);
7946
+ return expressionAtPath
7947
+ ? expressionAtPath.getKnownFunctionAtPath(path.slice(1), recursionTracker, origin)
7948
+ : this.prototypeExpression?.getKnownFunctionAtPath(path, recursionTracker, origin) || null;
7949
+ }
7915
7950
  getLiteralValueAtPath(path, recursionTracker, origin) {
7916
7951
  if (path.length === 0) {
7917
7952
  // This should actually be "UnknownTruthyValue". However, this currently
@@ -8168,22 +8203,25 @@ class ObjectEntity extends ExpressionEntity {
8168
8203
  }
8169
8204
  }
8170
8205
 
8171
- const isInteger = (property) => typeof property === 'string' && /^\d+$/.test(property);
8206
+ const isKnownToBeMissing = (property) => property === SymbolDispose ||
8207
+ property === SymbolAsyncDispose ||
8208
+ (typeof property === 'string' && /^\d+$/.test(property));
8172
8209
  // This makes sure unknown properties are not handled as "undefined" but as
8173
8210
  // "unknown" but without access side effects. An exception is done for numeric
8174
8211
  // properties as we do not expect new builtin properties to be numbers, this
8175
- // will improve tree-shaking for out-of-bounds array properties
8212
+ // will improve tree-shaking for out-of-bounds array properties. Disposal
8213
+ // methods are also known to be missing so that "await using" can rely on the
8214
+ // fallback to Symbol.dispose for plain objects.
8176
8215
  const OBJECT_PROTOTYPE_FALLBACK = new (class ObjectPrototypeFallbackExpression extends ExpressionEntity {
8177
8216
  deoptimizeArgumentsOnInteractionAtPath(interaction, path) {
8178
- if (interaction.type === INTERACTION_CALLED && path.length === 1 && !isInteger(path[0])) {
8217
+ if (interaction.type === INTERACTION_CALLED &&
8218
+ path.length === 1 &&
8219
+ !isKnownToBeMissing(path[0])) {
8179
8220
  deoptimizeInteraction(interaction);
8180
8221
  }
8181
8222
  }
8182
8223
  getLiteralValueAtPath(path) {
8183
- // We ignore number properties as we do not expect new properties to be
8184
- // numbers and also want to keep handling out-of-bound array elements as
8185
- // "undefined"
8186
- return path.length === 1 && isInteger(path[0]) ? undefined : UnknownValue;
8224
+ return path.length === 1 && isKnownToBeMissing(path[0]) ? undefined : UnknownValue;
8187
8225
  }
8188
8226
  hasEffectsOnInteractionAtPath(path, { type }) {
8189
8227
  return path.length > 1 || type === INTERACTION_CALLED;
@@ -8197,6 +8235,9 @@ const OBJECT_PROTOTYPE = new ObjectEntity(new Map([
8197
8235
  ['toString', METHOD_RETURNS_STRING],
8198
8236
  ['valueOf', METHOD_RETURNS_UNKNOWN]
8199
8237
  ]), OBJECT_PROTOTYPE_FALLBACK, true);
8238
+ // Generator prototypes inherit disposal methods from the iterator prototypes
8239
+ const GENERATOR_PROTOTYPE = new ObjectEntity([{ key: SymbolDispose, kind: 'init', property: UNKNOWN_EXPRESSION }], OBJECT_PROTOTYPE, true);
8240
+ const ASYNC_GENERATOR_PROTOTYPE = new ObjectEntity([{ key: SymbolAsyncDispose, kind: 'init', property: UNKNOWN_EXPRESSION }], OBJECT_PROTOTYPE, true);
8200
8241
 
8201
8242
  const NEW_ARRAY_PROPERTIES = [
8202
8243
  { key: UnknownInteger, kind: 'init', property: UNKNOWN_EXPRESSION },
@@ -8341,7 +8382,8 @@ const ARRAY_PROTOTYPE = new ObjectEntity(new Map([
8341
8382
 
8342
8383
  class SpreadElement extends NodeBase {
8343
8384
  deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
8344
- if (path.length > 0) {
8385
+ // Spread values are copied as data properties, so only calling them can still reach the argument
8386
+ if (path.length > 0 || interaction.type === INTERACTION_CALLED) {
8345
8387
  this.argument.deoptimizeArgumentsOnInteractionAtPath(interaction, UNKNOWN_PATH, recursionTracker);
8346
8388
  }
8347
8389
  }
@@ -9561,6 +9603,15 @@ class LocalVariable extends Variable {
9561
9603
  this.init.deoptimizePath(limitConcatenatedPathDepth(this.initPath, path));
9562
9604
  }
9563
9605
  }
9606
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
9607
+ if (this.isReassigned || path.length + this.initPath.length > MAX_PATH_DEPTH) {
9608
+ return null;
9609
+ }
9610
+ return recursionTracker.withTrackedEntityAtPath(path, this.init, () => {
9611
+ this.expressionsToBeDeoptimized.push(origin);
9612
+ return this.init.getKnownFunctionAtPath([...this.initPath, ...path], recursionTracker, origin);
9613
+ }, null);
9614
+ }
9564
9615
  getLiteralValueAtPath(path, recursionTracker, origin) {
9565
9616
  if (this.isReassigned || path.length + this.initPath.length > MAX_PATH_DEPTH) {
9566
9617
  return UnknownValue;
@@ -9720,6 +9771,9 @@ class IdentifierBase extends NodeBase {
9720
9771
  // Identifier as property that might be deoptimized by default
9721
9772
  this.variable?.deoptimizePath(path);
9722
9773
  }
9774
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
9775
+ return this.getVariableRespectingTDZ().getKnownFunctionAtPath(path, recursionTracker, origin);
9776
+ }
9723
9777
  getLiteralValueAtPath(path, recursionTracker, origin) {
9724
9778
  return this.getVariableRespectingTDZ().getLiteralValueAtPath(path, recursionTracker, origin);
9725
9779
  }
@@ -10187,6 +10241,11 @@ class MethodBase extends NodeBase {
10187
10241
  deoptimizePath(path) {
10188
10242
  this.getAccessedValue()[0].deoptimizePath(path);
10189
10243
  }
10244
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
10245
+ return this.kind === 'get' || this.kind === 'set'
10246
+ ? null
10247
+ : this.value.getKnownFunctionAtPath(path, recursionTracker, origin);
10248
+ }
10190
10249
  getLiteralValueAtPath(path, recursionTracker, origin) {
10191
10250
  return this.getAccessedValue()[0].getLiteralValueAtPath(path, recursionTracker, origin);
10192
10251
  }
@@ -10768,6 +10827,8 @@ class ParameterVariable extends LocalVariable {
10768
10827
  class ThisVariable extends ParameterVariable {
10769
10828
  constructor(context) {
10770
10829
  super('this', null, EMPTY_PATH, context);
10830
+ // Unlike parameters, track nested paths so receivers only keep what is accessed via "this"
10831
+ this.includedPathTracker = new IncludedFullPathTracker();
10771
10832
  }
10772
10833
  hasEffectsOnInteractionAtPath(path, interaction, context) {
10773
10834
  return (context.replacedVariableInits.get(this) || UNKNOWN_EXPRESSION).hasEffectsOnInteractionAtPath(path, interaction, context);
@@ -11072,8 +11133,11 @@ class FunctionScope extends ReturnValueScope {
11072
11133
  }
11073
11134
  includeCallArguments(interaction, context) {
11074
11135
  super.includeCallArguments(interaction, context);
11136
+ const { args } = interaction;
11137
+ if (args[0]) {
11138
+ this.thisVariable.includeArgumentPaths(args[0], context);
11139
+ }
11075
11140
  if (this.argumentsVariable.included) {
11076
- const { args } = interaction;
11077
11141
  for (let argumentIndex = 1; argumentIndex < args.length; argumentIndex++) {
11078
11142
  const argument = args[argumentIndex];
11079
11143
  if (argument) {
@@ -11290,6 +11354,11 @@ class FunctionBase extends NodeBase {
11290
11354
  this.scope.deoptimizeAllParameters();
11291
11355
  }
11292
11356
  }
11357
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
11358
+ return path.length === 0
11359
+ ? this
11360
+ : this.getObjectEntity().getKnownFunctionAtPath(path, recursionTracker, origin);
11361
+ }
11293
11362
  getLiteralValueAtPath(path, recursionTracker, origin) {
11294
11363
  return this.getObjectEntity().getLiteralValueAtPath(path, recursionTracker, origin);
11295
11364
  }
@@ -11297,7 +11366,7 @@ class FunctionBase extends NodeBase {
11297
11366
  if (path.length > 0) {
11298
11367
  return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
11299
11368
  }
11300
- if (this.async) {
11369
+ if (this.async || this.generator) {
11301
11370
  if (!this.deoptimizedReturn) {
11302
11371
  this.deoptimizedReturn = true;
11303
11372
  this.scope.getReturnExpression().deoptimizePath(UNKNOWN_PATH);
@@ -11493,10 +11562,15 @@ class FunctionNode extends FunctionBase {
11493
11562
  {
11494
11563
  key: 'prototype',
11495
11564
  kind: 'init',
11496
- property: new ObjectEntity([], OBJECT_PROTOTYPE)
11565
+ property: new ObjectEntity([], this.getPrototypeOfPrototype())
11497
11566
  }
11498
11567
  ], OBJECT_PROTOTYPE));
11499
11568
  }
11569
+ getPrototypeOfPrototype() {
11570
+ if (!this.generator)
11571
+ return OBJECT_PROTOTYPE;
11572
+ return this.async ? ASYNC_GENERATOR_PROTOTYPE : GENERATOR_PROTOTYPE;
11573
+ }
11500
11574
  }
11501
11575
 
11502
11576
  class FunctionDeclaration extends FunctionNode {
@@ -12060,6 +12134,20 @@ class MemberExpression extends NodeBase {
12060
12134
  ]);
12061
12135
  }
12062
12136
  }
12137
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
12138
+ if (this.variable) {
12139
+ return this.variable.getKnownFunctionAtPath(path, recursionTracker, origin);
12140
+ }
12141
+ if (this.isUndefined)
12142
+ return null;
12143
+ const propertyKey = this.getDynamicPropertyKey();
12144
+ if (propertyKey !== UnknownKey && path.length < MAX_PATH_DEPTH) {
12145
+ if (propertyKey !== this.propertyKey)
12146
+ this.expressionsToBeDeoptimized.push(origin);
12147
+ return this.object.getKnownFunctionAtPath([propertyKey, ...path], recursionTracker, origin);
12148
+ }
12149
+ return null;
12150
+ }
12063
12151
  getLiteralValueAtPath(path, recursionTracker, origin) {
12064
12152
  if (this.variable) {
12065
12153
  return this.variable.getLiteralValueAtPath(path, recursionTracker, origin);
@@ -16874,6 +16962,9 @@ class ObjectExpression extends NodeBase {
16874
16962
  deoptimizePath(path) {
16875
16963
  this.getObjectEntity().deoptimizePath(path);
16876
16964
  }
16965
+ getKnownFunctionAtPath(path, recursionTracker, origin) {
16966
+ return this.getObjectEntity().getKnownFunctionAtPath(path, recursionTracker, origin);
16967
+ }
16877
16968
  getLiteralValueAtPath(path, recursionTracker, origin) {
16878
16969
  return this.getObjectEntity().getLiteralValueAtPath(path, recursionTracker, origin);
16879
16970
  }
@@ -18042,6 +18133,14 @@ class VariableDeclarator extends NodeBase {
18042
18133
  deoptimizePath(path) {
18043
18134
  this.id.deoptimizePath(path);
18044
18135
  }
18136
+ deoptimizeCache() {
18137
+ if (!this.hasDeoptimizedDisposal && this.init) {
18138
+ this.hasDeoptimizedDisposal = true;
18139
+ this.init.deoptimizePath(UNKNOWN_PATH);
18140
+ this.init.includePath(UNKNOWN_PATH, createInclusionContext());
18141
+ this.scope.context.requestTreeshakingPass();
18142
+ }
18143
+ }
18045
18144
  hasEffects(context) {
18046
18145
  const initEffect = this.init?.hasEffects(context);
18047
18146
  this.id.markDeclarationReached();
@@ -18057,6 +18156,11 @@ class VariableDeclarator extends NodeBase {
18057
18156
  const { id, init } = this;
18058
18157
  if (!this.included)
18059
18158
  this.includeNode(context);
18159
+ const { disposalCall, disposalFunction } = this;
18160
+ // Before including init so that newly included receiver paths are included in this pass
18161
+ if (disposalFunction && disposalCall) {
18162
+ disposalFunction.includeCallArgumentsWhenCalledAtPath(EMPTY_PATH, disposalCall, context);
18163
+ }
18060
18164
  init?.include(context, includeChildrenRecursively);
18061
18165
  id.markDeclarationReached();
18062
18166
  if (includeChildrenRecursively) {
@@ -18098,11 +18202,16 @@ class VariableDeclarator extends NodeBase {
18098
18202
  this.included = true;
18099
18203
  const { id, init } = this;
18100
18204
  if (init) {
18101
- if (this.isUsingDeclaration) {
18102
- init.includePath(SYMBOL_DISPOSE_PATH, context);
18103
- }
18104
- else if (this.isAsyncUsingDeclaration) {
18105
- init.includePath(SYMBOL_ASYNC_DISPOSE_PATH, context);
18205
+ if (this.isUsingDeclaration || this.isAsyncUsingDeclaration) {
18206
+ const disposalInteractions = {
18207
+ access: { args: [init], type: INTERACTION_ACCESSED },
18208
+ call: { args: [init], type: INTERACTION_CALLED, withNew: false }
18209
+ };
18210
+ if (this.isUsingDeclaration ||
18211
+ !this.includeDisposalMethodAndCheckIfKnownFunction(init, SYMBOL_ASYNC_DISPOSE_PATH, disposalInteractions, context)) {
18212
+ this.includeDisposalMethodAndCheckIfKnownFunction(init, SYMBOL_DISPOSE_PATH, disposalInteractions, context);
18213
+ }
18214
+ this.scope.context.requestTreeshakingPass();
18106
18215
  }
18107
18216
  if (id instanceof Identifier && init instanceof ClassExpression && !init.id) {
18108
18217
  const { name, variable } = id;
@@ -18114,6 +18223,23 @@ class VariableDeclarator extends NodeBase {
18114
18223
  }
18115
18224
  }
18116
18225
  }
18226
+ includeDisposalMethodAndCheckIfKnownFunction(init, path, { access, call }, context) {
18227
+ init.deoptimizeArgumentsOnInteractionAtPath(access, path, SHARED_RECURSION_TRACKER);
18228
+ const disposalFunction = init.getKnownFunctionAtPath(path, SHARED_RECURSION_TRACKER, this);
18229
+ init.includePath(path, context);
18230
+ if (!disposalFunction) {
18231
+ const disposalValue = init.getLiteralValueAtPath(path, SHARED_RECURSION_TRACKER, this);
18232
+ if (disposalValue !== null && disposalValue !== undefined) {
18233
+ init.deoptimizeArgumentsOnInteractionAtPath(call, path, SHARED_RECURSION_TRACKER);
18234
+ init.includeCallArgumentsWhenCalledAtPath(path, call, context);
18235
+ }
18236
+ return false;
18237
+ }
18238
+ this.disposalFunction = disposalFunction;
18239
+ this.disposalCall = call;
18240
+ disposalFunction.deoptimizeArgumentsOnInteractionAtPath(call, EMPTY_PATH, SHARED_RECURSION_TRACKER);
18241
+ return true;
18242
+ }
18117
18243
  }
18118
18244
  VariableDeclarator.prototype.applyDeoptimizations = doNotDeoptimize;
18119
18245
  const SYMBOL_DISPOSE_PATH = [SymbolDispose];
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.0
4
- Thu, 22 Oct 2026 08:51:29 GMT - commit 9aac09a39dc1fa297a7b06f1ad6907f7bd41b310
3
+ Rollup.js v4.65.1
4
+ Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
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.65.0",
3
+ "version": "4.65.1",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -116,31 +116,31 @@
116
116
  "optionalDependencies": {
117
117
  "@napi-rs/lzma-linux-x64-gnu": "1.5.1",
118
118
  "fsevents": "~2.3.2",
119
- "@rollup/rollup-darwin-arm64": "4.65.0",
120
- "@rollup/rollup-android-arm64": "4.65.0",
121
- "@rollup/rollup-win32-arm64-msvc": "4.65.0",
122
- "@rollup/rollup-freebsd-arm64": "4.65.0",
123
- "@rollup/rollup-linux-arm64-gnu": "4.65.0",
124
- "@rollup/rollup-linux-arm64-musl": "4.65.0",
125
- "@rollup/rollup-android-arm-eabi": "4.65.0",
126
- "@rollup/rollup-linux-arm-gnueabihf": "4.65.0",
127
- "@rollup/rollup-linux-arm-musleabihf": "4.65.0",
128
- "@rollup/rollup-win32-ia32-msvc": "4.65.0",
129
- "@rollup/rollup-linux-loong64-gnu": "4.65.0",
130
- "@rollup/rollup-linux-loong64-musl": "4.65.0",
131
- "@rollup/rollup-linux-riscv64-gnu": "4.65.0",
132
- "@rollup/rollup-linux-riscv64-musl": "4.65.0",
133
- "@rollup/rollup-linux-ppc64-gnu": "4.65.0",
134
- "@rollup/rollup-linux-ppc64-musl": "4.65.0",
135
- "@rollup/rollup-linux-s390x-gnu": "4.65.0",
136
- "@rollup/rollup-darwin-x64": "4.65.0",
137
- "@rollup/rollup-win32-x64-gnu": "4.65.0",
138
- "@rollup/rollup-win32-x64-msvc": "4.65.0",
139
- "@rollup/rollup-freebsd-x64": "4.65.0",
140
- "@rollup/rollup-linux-x64-gnu": "4.65.0",
141
- "@rollup/rollup-linux-x64-musl": "4.65.0",
142
- "@rollup/rollup-openbsd-x64": "4.65.0",
143
- "@rollup/rollup-openharmony-arm64": "4.65.0"
119
+ "@rollup/rollup-darwin-arm64": "4.65.1",
120
+ "@rollup/rollup-android-arm64": "4.65.1",
121
+ "@rollup/rollup-win32-arm64-msvc": "4.65.1",
122
+ "@rollup/rollup-freebsd-arm64": "4.65.1",
123
+ "@rollup/rollup-linux-arm64-gnu": "4.65.1",
124
+ "@rollup/rollup-linux-arm64-musl": "4.65.1",
125
+ "@rollup/rollup-android-arm-eabi": "4.65.1",
126
+ "@rollup/rollup-linux-arm-gnueabihf": "4.65.1",
127
+ "@rollup/rollup-linux-arm-musleabihf": "4.65.1",
128
+ "@rollup/rollup-win32-ia32-msvc": "4.65.1",
129
+ "@rollup/rollup-linux-loong64-gnu": "4.65.1",
130
+ "@rollup/rollup-linux-loong64-musl": "4.65.1",
131
+ "@rollup/rollup-linux-riscv64-gnu": "4.65.1",
132
+ "@rollup/rollup-linux-riscv64-musl": "4.65.1",
133
+ "@rollup/rollup-linux-ppc64-gnu": "4.65.1",
134
+ "@rollup/rollup-linux-ppc64-musl": "4.65.1",
135
+ "@rollup/rollup-linux-s390x-gnu": "4.65.1",
136
+ "@rollup/rollup-darwin-x64": "4.65.1",
137
+ "@rollup/rollup-win32-x64-gnu": "4.65.1",
138
+ "@rollup/rollup-win32-x64-msvc": "4.65.1",
139
+ "@rollup/rollup-freebsd-x64": "4.65.1",
140
+ "@rollup/rollup-linux-x64-gnu": "4.65.1",
141
+ "@rollup/rollup-linux-x64-musl": "4.65.1",
142
+ "@rollup/rollup-openbsd-x64": "4.65.1",
143
+ "@rollup/rollup-openharmony-arm64": "4.65.1"
144
144
  },
145
145
  "dependencies": {
146
146
  "@types/estree": "1.0.9"
@@ -154,7 +154,7 @@
154
154
  "@codemirror/language": "^6.13.1",
155
155
  "@codemirror/search": "^6.7.2",
156
156
  "@codemirror/state": "^6.7.6",
157
- "@codemirror/view": "^6.43.14",
157
+ "@codemirror/view": "^6.43.15",
158
158
  "@emnapi/core": "^1.11.3",
159
159
  "@emnapi/runtime": "^1.11.3",
160
160
  "@eslint/js": "^10.0.1",
@@ -190,9 +190,9 @@
190
190
  "date-time": "^4.0.0",
191
191
  "es5-shim": "^4.6.7",
192
192
  "es6-shim": "^0.35.8",
193
- "eslint": "^10.12.0",
193
+ "eslint": "^10.13.0",
194
194
  "eslint-config-prettier": "^10.1.8",
195
- "eslint-plugin-prettier": "^5.5.6",
195
+ "eslint-plugin-prettier": "^5.5.7",
196
196
  "eslint-plugin-unicorn": "^78.0.0",
197
197
  "eslint-plugin-vue": "^10.11.1",
198
198
  "fixturify": "^3.0.0",
@@ -213,13 +213,13 @@
213
213
  "patch-package": "^8.0.1",
214
214
  "picocolors": "^1.1.1",
215
215
  "picomatch": "^4.0.7",
216
- "pinia": "^4.0.3",
216
+ "pinia": "^4.1.0",
217
217
  "prettier": "^3.9.10",
218
218
  "prettier-plugin-organize-imports": "^4.3.0",
219
219
  "pretty-bytes": "^7.2.0",
220
220
  "pretty-ms": "^9.3.1",
221
221
  "requirejs": "^2.3.8",
222
- "rollup": "^4.64.5",
222
+ "rollup": "^4.64.10",
223
223
  "rollup-plugin-license": "^3.7.1",
224
224
  "semver": "^7.8.5",
225
225
  "shx": "^0.4.0",
@@ -230,10 +230,10 @@
230
230
  "terser": "^5.51.2",
231
231
  "tslib": "^2.8.1",
232
232
  "typescript": "^5.9.3",
233
- "typescript-eslint": "^8.71.2",
233
+ "typescript-eslint": "^8.72.0",
234
234
  "vite": "^7.3.7",
235
235
  "vitepress": "^1.6.4",
236
- "vue": "^3.5.43",
236
+ "vue": "^3.5.44",
237
237
  "vue-eslint-parser": "^10.4.1",
238
238
  "vue-tsc": "^3.3.13",
239
239
  "wasm-pack": "^0.15.0",