@rollup/wasm-node 4.65.1 → 4.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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.1
5
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
4
+ Rollup.js v4.66.0
5
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.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";
30
+ const help = "rollup version 4.66.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";
31
31
 
32
32
  /**
33
33
  * @license
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,13 +1,13 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
8
8
  Released under the MIT License.
9
9
  */
10
- import { EMPTY_OBJECT, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, ArrowFunctionExpression as ArrowFunctionExpression$1, FunctionExpression as FunctionExpression$1, Identifier as Identifier$1, ExpressionStatement as ExpressionStatement$1, AwaitExpression as AwaitExpression$1, MemberExpression as MemberExpression$1, ObjectExpression as ObjectExpression$1, Property as Property$1, Program as Program$1, logIllegalImportReassignment, BLANK, logRedeclarationError, StaticBlock as StaticBlock$1, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, logMissingExport, normalize, getImportPath, error, logSourcePhaseFormatUnsupported, logMissingNodeBuiltins, logReservedNamespace, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, RestElement as RestElement$1, logConstVariableReassignError, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logMissingEntryExport, logSyntheticNamedExportsNeedNamespaceExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, logInvalidFormatForTopLevelAwait, logAddonNotGenerated, logIncompatibleExportOptionValue, logMixedExport, logFailedValidation, isPathFragment, logCyclicCrossChunkReexport, getAliasName, logUnexpectedNamedImport, isAbsolute as isAbsolute$1, relative as relative$1, logUnexpectedNamespaceReexport, logEmptyChunk, logMissingGlobalName, logOptimizeChunkStatus, logSourcemapBroken, logConflictingSourcemapSources, logChunkInvalid, logInvalidOption, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, logFileNameOutsideOutputDirectory, logCannotAssignModuleToChunk, logCircularChunk, logUnknownOption, printQuotedStringList, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, logAnonymousPluginCache, logDuplicatePluginName, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, warnDeprecation, URL_TRANSFORM, relativeId, logBadLoader, logNonExternalSourcePhaseImport, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logExternalModulesCannotBeTransformedToModules, URL_LOAD, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, logChunkNotGeneratedForFileName, logAssetNotFinalisedForFileName, logFileNameConflict, URL_GENERATEBUNDLE, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidAddonPluginHook, logInvalidFunctionPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_JSX, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_GENERATEDCODE, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_MANUALCHUNKS, logInvalidExportOptionValue, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_INTEROP, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, logAlreadyClosed, logMissingFileOrDirOption, logCannotEmitFromOptionsHook, URL_WATCH } from './parseAst.js';
10
+ import { EMPTY_OBJECT, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, ArrowFunctionExpression as ArrowFunctionExpression$1, FunctionExpression as FunctionExpression$1, Identifier as Identifier$1, ExpressionStatement as ExpressionStatement$1, AwaitExpression as AwaitExpression$1, MemberExpression as MemberExpression$1, ObjectExpression as ObjectExpression$1, Property as Property$1, Program as Program$1, logIllegalImportReassignment, BLANK, logRedeclarationError, StaticBlock as StaticBlock$1, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, logMissingExport, normalize, getImportPath, error, logSourcePhaseFormatUnsupported, logMissingNodeBuiltins, logReservedNamespace, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, RestElement as RestElement$1, logConstVariableReassignError, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, isAbsolute as isAbsolute$1, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logMissingEntryExport, logSyntheticNamedExportsNeedNamespaceExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, logInvalidFormatForTopLevelAwait, logAddonNotGenerated, logIncompatibleExportOptionValue, logMixedExport, logFailedValidation, isPathFragment, logCyclicCrossChunkReexport, getAliasName, logUnexpectedNamedImport, relative as relative$1, logUnexpectedNamespaceReexport, logEmptyChunk, logMissingGlobalName, logOptimizeChunkStatus, logSourcemapBroken, logConflictingSourcemapSources, logErrorInHook, logChunkInvalid, logInvalidOption, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, logFileNameOutsideOutputDirectory, logCannotAssignModuleToChunk, logCircularChunk, logUnknownOption, printQuotedStringList, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, logAnonymousPluginCache, logDuplicatePluginName, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, warnDeprecation, URL_TRANSFORM, relativeId, logBadLoader, logNonExternalSourcePhaseImport, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logExternalModulesCannotBeTransformedToModules, URL_LOAD, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, logChunkNotGeneratedForFileName, logAssetNotFinalisedForFileName, logFileNameConflict, URL_GENERATEBUNDLE, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidAddonPluginHook, logInvalidFunctionPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_JSX, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_GENERATEDCODE, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_MANUALCHUNKS, logInvalidExportOptionValue, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_INTEROP, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, logAlreadyClosed, logMissingFileOrDirOption, logCannotEmitFromOptionsHook, URL_WATCH } from './parseAst.js';
11
11
  import { relative, dirname, basename, extname, resolve as resolve$1, join } from 'node:path';
12
12
  import { posix, isAbsolute, resolve, win32 } from 'path';
13
13
  import { parseAsync, xxhashBase16, xxhashBase64Url, xxhashBase36 } from '../../native.js';
@@ -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.1";
30
+ var version = "4.66.0";
31
31
  const pkg = {
32
32
  version: version};
33
33
 
@@ -17607,6 +17607,9 @@ function decodedSourcemap(map) {
17607
17607
  if (typeof map === 'string') {
17608
17608
  map = JSON.parse(map);
17609
17609
  }
17610
+ if ('sections' in map) {
17611
+ map = flattenIndexSourceMap(map);
17612
+ }
17610
17613
  if (!map.mappings) {
17611
17614
  return {
17612
17615
  mappings: [],
@@ -17642,6 +17645,74 @@ function decodedSourcemap(map) {
17642
17645
  sourceMapCache.set(decodedMap, cache);
17643
17646
  return decodedMap;
17644
17647
  }
17648
+ function flattenIndexSourceMap({ file, sections }) {
17649
+ const mappings = [];
17650
+ const names = [];
17651
+ const sources = [];
17652
+ const sourcesContent = [];
17653
+ // As when collapsing sourcemaps, sources with the same name are shared unless their contents differ
17654
+ const sourceIndicesByName = new Map();
17655
+ for (const { map, offset } of sections) {
17656
+ const section = decodedSourcemap(map);
17657
+ const { sourceRoot } = section;
17658
+ const sourcePrefix = sourceRoot
17659
+ ? sourceRoot.endsWith('/')
17660
+ ? sourceRoot
17661
+ : `${sourceRoot}/`
17662
+ : '';
17663
+ const sourceIndices = section.sources.map((source, index) => {
17664
+ const name = source == null || isAbsolute$1(source) ? source : sourcePrefix + source;
17665
+ const content = section.sourcesContent?.[index] ?? null;
17666
+ let indices = sourceIndicesByName.get(name);
17667
+ if (!indices) {
17668
+ sourceIndicesByName.set(name, (indices = []));
17669
+ }
17670
+ let sourceIndex = indices.find(candidate => content == null ||
17671
+ sourcesContent[candidate] == null ||
17672
+ sourcesContent[candidate] === content);
17673
+ if (sourceIndex === undefined) {
17674
+ sourceIndex = sources.push(name) - 1;
17675
+ sourcesContent.push(content);
17676
+ indices.push(sourceIndex);
17677
+ }
17678
+ else {
17679
+ sourcesContent[sourceIndex] ??= content;
17680
+ }
17681
+ return sourceIndex;
17682
+ });
17683
+ const namesOffset = names.length;
17684
+ for (const name of section.names ?? []) {
17685
+ names.push(name);
17686
+ }
17687
+ for (const [lineIndex, line] of section.mappings.entries()) {
17688
+ const generatedLine = offset.line + lineIndex;
17689
+ while (mappings.length <= generatedLine) {
17690
+ mappings.push([]);
17691
+ }
17692
+ // Only the first line of a section starts at the column offset
17693
+ const columnOffset = lineIndex === 0 ? offset.column : 0;
17694
+ for (const segment of line) {
17695
+ const flatSegment = segment.slice();
17696
+ flatSegment[0] += columnOffset;
17697
+ if (flatSegment.length !== 1) {
17698
+ flatSegment[1] = sourceIndices[flatSegment[1]];
17699
+ if (flatSegment.length === 5) {
17700
+ flatSegment[4] += namesOffset;
17701
+ }
17702
+ }
17703
+ mappings[generatedLine].push(flatSegment);
17704
+ }
17705
+ }
17706
+ }
17707
+ return {
17708
+ file,
17709
+ mappings,
17710
+ names,
17711
+ sources,
17712
+ sourcesContent,
17713
+ version: 3
17714
+ };
17715
+ }
17645
17716
 
17646
17717
  function getId(m) {
17647
17718
  return m.id;
@@ -21497,7 +21568,10 @@ function getCollapsedSourcemap(id, originalCode, originalSourcemap, sourcemapCha
21497
21568
  const sourcesContent = originalSourcemap.sourcesContent || [];
21498
21569
  const directory = dirname(id) || '.';
21499
21570
  const sourceRoot = originalSourcemap.sourceRoot || '.';
21500
- const baseSources = sources.map((source, index) => new Source(resolve$1(directory, sourceRoot, source), sourcesContent[index]));
21571
+ // A source whose name is not known is null, and mappings to it are treated as unmapped
21572
+ const baseSources = sources.map((source, index) => source == null
21573
+ ? null
21574
+ : new Source(resolve$1(directory, sourceRoot, source), sourcesContent[index]));
21501
21575
  source = new Link(originalSourcemap, baseSources);
21502
21576
  }
21503
21577
  else {
@@ -21530,13 +21604,17 @@ function collapseSourcemaps(file, map, modules, bundleSourcemapChain, excludeCon
21530
21604
  });
21531
21605
  }
21532
21606
  function collapseSourcemap(id, originalCode, originalSourcemap, sourcemapChain, log) {
21533
- if (sourcemapChain.length === 0) {
21607
+ if (sourcemapChain.length === 0 &&
21608
+ (!originalSourcemap || hasOnlyNamedSources(originalSourcemap))) {
21534
21609
  return originalSourcemap;
21535
21610
  }
21536
21611
  const source = getCollapsedSourcemap(id, originalCode, originalSourcemap, sourcemapChain, getLinkMap(log));
21537
21612
  const map = source.traceMappings();
21538
21613
  return decodedSourcemap({ version: 3, ...map });
21539
21614
  }
21615
+ function hasOnlyNamedSources(map) {
21616
+ return map.sources.every(source => source != null);
21617
+ }
21540
21618
 
21541
21619
  let textEncoder;
21542
21620
  const getHash64 = input => xxhashBase64Url(ensureBuffer(input));
@@ -21866,7 +21944,12 @@ class Bundle {
21866
21944
  await renderChunks(chunks, outputBundle, this.pluginDriver, this.outputOptions, this.inputOptions.onLog);
21867
21945
  }
21868
21946
  catch (error_) {
21869
- await this.pluginDriver.hookParallel('renderError', [error_]);
21947
+ try {
21948
+ await this.pluginDriver.hookParallel('renderError', [error_]);
21949
+ }
21950
+ catch (hookError) {
21951
+ error(logErrorInHook(error_, hookError, 'renderError'));
21952
+ }
21870
21953
  throw error_;
21871
21954
  }
21872
21955
  removeUnreferencedAssets(outputBundle);
@@ -24721,11 +24804,7 @@ async function rollupInternal(rawInputOptions, registerWatchHooks) {
24721
24804
  await graph.pluginDriver.hookParallel('buildEnd', [error_]);
24722
24805
  }
24723
24806
  catch (buildEndError) {
24724
- // Create a compound error object to include both errors, based on the original error
24725
- const compoundError = getRollupError({
24726
- ...error_,
24727
- 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}`
24728
- });
24807
+ const compoundError = getRollupError(logErrorInHook(error_, buildEndError, 'buildEnd'));
24729
24808
  await graph.pluginDriver.hookParallel('closeBundle', [compoundError]).catch(() => { });
24730
24809
  throw compoundError;
24731
24810
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -341,6 +341,15 @@ function getRollupError(base) {
341
341
  });
342
342
  return errorInstance;
343
343
  }
344
+ function logErrorInHook(originalError, hookError, hookName) {
345
+ augmentLogMessage(originalError);
346
+ augmentLogMessage(hookError);
347
+ const phase = hookName === 'buildEnd' ? 'the build' : 'rendering';
348
+ return {
349
+ ...originalError,
350
+ message: `There was an error during ${phase}:\n ${originalError.message}\nAdditionally, handling the error in the '${hookName}' hook caused the following error:\n ${hookError.message}`
351
+ };
352
+ }
344
353
  function augmentCodeLocation(properties, pos, source, id) {
345
354
  if (typeof pos === 'object') {
346
355
  const { line, column } = pos;
@@ -2141,4 +2150,4 @@ function getAstBuffer(astBuffer) {
2141
2150
  const parseAst = (input, { allowReturnOutsideFunction = false, jsx = false } = {}) => convertProgram(getAstBuffer(parse(input, allowReturnOutsideFunction, jsx)));
2142
2151
  const parseAstAsync = async (input, { allowReturnOutsideFunction = false, jsx = false, signal } = {}) => convertProgram(getAstBuffer(await parseAsync(input, allowReturnOutsideFunction, jsx, signal)));
2143
2152
 
2144
- export { ANNOTATION_KEY, ArrowFunctionExpression, AwaitExpression, BLANK, BlockStatement, CallExpression, CatchClause, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, FunctionExpression, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, MemberExpression, ObjectExpression, Program, Property, RestElement, ReturnStatement, StaticBlock, TemplateLiteral, URL_GENERATEBUNDLE, URL_JSX, URL_LOAD, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_AMD_ID, URL_OUTPUT_DIR, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TRANSFORM, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, VariableDeclarator, addTrailingSlashIfMissed, augmentCodeLocation, augmentLogMessage, convertAnnotations, convertNode, error, getAliasName, getAstBuffer, getImportPath, getRollupError, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularChunk, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileNameOutsideOutputDirectory, logFileReferenceIdNotFoundForFilename, logFirstSideEffect, logIllegalIdentifierAsName, logIllegalImportReassignment, logImplicitDependantCannotBeExternal, logImplicitDependantIsNotIncluded, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logIncompatibleExportOptionValue, logInconsistentImportAttributes, logInputHookInOutputPlugin, logInternalIdCannotBeExternal, logInvalidAddonPluginHook, logInvalidAnnotation, logInvalidExportOptionValue, logInvalidFormatForTopLevelAwait, logInvalidFunctionPluginHook, logInvalidLogPosition, logInvalidOption, logInvalidRollupPhaseForChunkEmission, logInvalidSetAssetSourceCall, logInvalidSourcemapForError, logLevelPriority, logMissingEntryExport, logMissingExport, logMissingFileOrDirOption, logMissingGlobalName, logMissingJsxExport, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logNonExternalSourcePhaseImport, logOptimizeChunkStatus, logParseError, logPluginError, logRedeclarationError, logReservedNamespace, logShimmedExport, logSourcePhaseFormatUnsupported, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };
2153
+ export { ANNOTATION_KEY, ArrowFunctionExpression, AwaitExpression, BLANK, BlockStatement, CallExpression, CatchClause, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, FunctionExpression, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, MemberExpression, ObjectExpression, Program, Property, RestElement, ReturnStatement, StaticBlock, TemplateLiteral, URL_GENERATEBUNDLE, URL_JSX, URL_LOAD, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_AMD_ID, URL_OUTPUT_DIR, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TRANSFORM, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, VariableDeclarator, addTrailingSlashIfMissed, augmentCodeLocation, augmentLogMessage, convertAnnotations, convertNode, error, getAliasName, getAstBuffer, getImportPath, getRollupError, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularChunk, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logErrorInHook, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileNameOutsideOutputDirectory, logFileReferenceIdNotFoundForFilename, logFirstSideEffect, logIllegalIdentifierAsName, logIllegalImportReassignment, logImplicitDependantCannotBeExternal, logImplicitDependantIsNotIncluded, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logIncompatibleExportOptionValue, logInconsistentImportAttributes, logInputHookInOutputPlugin, logInternalIdCannotBeExternal, logInvalidAddonPluginHook, logInvalidAnnotation, logInvalidExportOptionValue, logInvalidFormatForTopLevelAwait, logInvalidFunctionPluginHook, logInvalidLogPosition, logInvalidOption, logInvalidRollupPhaseForChunkEmission, logInvalidSetAssetSourceCall, logInvalidSourcemapForError, logLevelPriority, logMissingEntryExport, logMissingExport, logMissingFileOrDirOption, logMissingGlobalName, logMissingJsxExport, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logNonExternalSourcePhaseImport, logOptimizeChunkStatus, logParseError, logPluginError, logRedeclarationError, logReservedNamespace, logShimmedExport, logSourcePhaseFormatUnsupported, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.d.ts CHANGED
@@ -69,8 +69,8 @@ export interface ExistingDecodedSourceMap {
69
69
  readonly mappings: SourceMapSegment[][];
70
70
  names: string[];
71
71
  sourceRoot?: string | undefined;
72
- sources: string[];
73
- sourcesContent?: string[] | undefined;
72
+ sources: (string | null)[];
73
+ sourcesContent?: (string | null)[] | undefined;
74
74
  version: number;
75
75
  x_google_ignoreList?: number[] | undefined;
76
76
  }
@@ -80,8 +80,8 @@ export interface ExistingRawSourceMap {
80
80
  mappings: string;
81
81
  names: string[];
82
82
  sourceRoot?: string | undefined;
83
- sources: string[];
84
- sourcesContent?: string[] | undefined;
83
+ sources: (string | null)[];
84
+ sourcesContent?: (string | null)[] | undefined;
85
85
  version: number;
86
86
  x_google_ignoreList?: number[] | undefined;
87
87
  }
@@ -105,7 +105,17 @@ export interface SourceMap {
105
105
  toUrl(): string;
106
106
  }
107
107
 
108
- export type SourceMapInput = ExistingRawSourceMap | string | null | { mappings: '' };
108
+ export type SourceMapInput =
109
+ ExistingRawSourceMap | IndexSourceMap | string | null | { mappings: '' };
110
+
111
+ export interface IndexSourceMap {
112
+ file?: string | undefined;
113
+ sections: {
114
+ map: ExistingRawSourceMap | IndexSourceMap;
115
+ offset: { column: number; line: number };
116
+ }[];
117
+ version: number;
118
+ }
109
119
 
110
120
  interface ModuleOptions {
111
121
  attributes: Record<string, string>;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -322,6 +322,15 @@ function getRollupError(base) {
322
322
  });
323
323
  return errorInstance;
324
324
  }
325
+ function logErrorInHook(originalError, hookError, hookName) {
326
+ augmentLogMessage(originalError);
327
+ augmentLogMessage(hookError);
328
+ const phase = hookName === 'buildEnd' ? 'the build' : 'rendering';
329
+ return {
330
+ ...originalError,
331
+ message: `There was an error during ${phase}:\n ${originalError.message}\nAdditionally, handling the error in the '${hookName}' hook caused the following error:\n ${hookError.message}`
332
+ };
333
+ }
325
334
  function augmentCodeLocation(properties, pos, source, id) {
326
335
  if (typeof pos === 'object') {
327
336
  const { line, column } = pos;
@@ -2304,6 +2313,7 @@ exports.logDuplicateImportOptions = logDuplicateImportOptions;
2304
2313
  exports.logDuplicatePluginName = logDuplicatePluginName;
2305
2314
  exports.logEmptyChunk = logEmptyChunk;
2306
2315
  exports.logEntryCannotBeExternal = logEntryCannotBeExternal;
2316
+ exports.logErrorInHook = logErrorInHook;
2307
2317
  exports.logEval = logEval;
2308
2318
  exports.logExternalModulesCannotBeIncludedInManualChunks = logExternalModulesCannotBeIncludedInManualChunks;
2309
2319
  exports.logExternalModulesCannotBeTransformedToModules = logExternalModulesCannotBeTransformedToModules;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1";
45
+ var version = "4.66.0";
46
46
  const package_ = {
47
47
  version: version};
48
48
 
@@ -19217,6 +19217,9 @@ function decodedSourcemap(map) {
19217
19217
  if (typeof map === 'string') {
19218
19218
  map = JSON.parse(map);
19219
19219
  }
19220
+ if ('sections' in map) {
19221
+ map = flattenIndexSourceMap(map);
19222
+ }
19220
19223
  if (!map.mappings) {
19221
19224
  return {
19222
19225
  mappings: [],
@@ -19252,6 +19255,74 @@ function decodedSourcemap(map) {
19252
19255
  sourceMapCache.set(decodedMap, cache);
19253
19256
  return decodedMap;
19254
19257
  }
19258
+ function flattenIndexSourceMap({ file, sections }) {
19259
+ const mappings = [];
19260
+ const names = [];
19261
+ const sources = [];
19262
+ const sourcesContent = [];
19263
+ // As when collapsing sourcemaps, sources with the same name are shared unless their contents differ
19264
+ const sourceIndicesByName = new Map();
19265
+ for (const { map, offset } of sections) {
19266
+ const section = decodedSourcemap(map);
19267
+ const { sourceRoot } = section;
19268
+ const sourcePrefix = sourceRoot
19269
+ ? sourceRoot.endsWith('/')
19270
+ ? sourceRoot
19271
+ : `${sourceRoot}/`
19272
+ : '';
19273
+ const sourceIndices = section.sources.map((source, index) => {
19274
+ const name = source == null || parseAst_js.isAbsolute(source) ? source : sourcePrefix + source;
19275
+ const content = section.sourcesContent?.[index] ?? null;
19276
+ let indices = sourceIndicesByName.get(name);
19277
+ if (!indices) {
19278
+ sourceIndicesByName.set(name, (indices = []));
19279
+ }
19280
+ let sourceIndex = indices.find(candidate => content == null ||
19281
+ sourcesContent[candidate] == null ||
19282
+ sourcesContent[candidate] === content);
19283
+ if (sourceIndex === undefined) {
19284
+ sourceIndex = sources.push(name) - 1;
19285
+ sourcesContent.push(content);
19286
+ indices.push(sourceIndex);
19287
+ }
19288
+ else {
19289
+ sourcesContent[sourceIndex] ??= content;
19290
+ }
19291
+ return sourceIndex;
19292
+ });
19293
+ const namesOffset = names.length;
19294
+ for (const name of section.names ?? []) {
19295
+ names.push(name);
19296
+ }
19297
+ for (const [lineIndex, line] of section.mappings.entries()) {
19298
+ const generatedLine = offset.line + lineIndex;
19299
+ while (mappings.length <= generatedLine) {
19300
+ mappings.push([]);
19301
+ }
19302
+ // Only the first line of a section starts at the column offset
19303
+ const columnOffset = lineIndex === 0 ? offset.column : 0;
19304
+ for (const segment of line) {
19305
+ const flatSegment = segment.slice();
19306
+ flatSegment[0] += columnOffset;
19307
+ if (flatSegment.length !== 1) {
19308
+ flatSegment[1] = sourceIndices[flatSegment[1]];
19309
+ if (flatSegment.length === 5) {
19310
+ flatSegment[4] += namesOffset;
19311
+ }
19312
+ }
19313
+ mappings[generatedLine].push(flatSegment);
19314
+ }
19315
+ }
19316
+ }
19317
+ return {
19318
+ file,
19319
+ mappings,
19320
+ names,
19321
+ sources,
19322
+ sourcesContent,
19323
+ version: 3
19324
+ };
19325
+ }
19255
19326
 
19256
19327
  function getId(m) {
19257
19328
  return m.id;
@@ -22993,7 +23064,10 @@ function getCollapsedSourcemap(id, originalCode, originalSourcemap, sourcemapCha
22993
23064
  const sourcesContent = originalSourcemap.sourcesContent || [];
22994
23065
  const directory = path.dirname(id) || '.';
22995
23066
  const sourceRoot = originalSourcemap.sourceRoot || '.';
22996
- const baseSources = sources.map((source, index) => new Source(path.resolve(directory, sourceRoot, source), sourcesContent[index]));
23067
+ // A source whose name is not known is null, and mappings to it are treated as unmapped
23068
+ const baseSources = sources.map((source, index) => source == null
23069
+ ? null
23070
+ : new Source(path.resolve(directory, sourceRoot, source), sourcesContent[index]));
22997
23071
  source = new Link(originalSourcemap, baseSources);
22998
23072
  }
22999
23073
  else {
@@ -23026,13 +23100,17 @@ function collapseSourcemaps(file, map, modules, bundleSourcemapChain, excludeCon
23026
23100
  });
23027
23101
  }
23028
23102
  function collapseSourcemap(id, originalCode, originalSourcemap, sourcemapChain, log) {
23029
- if (sourcemapChain.length === 0) {
23103
+ if (sourcemapChain.length === 0 &&
23104
+ (!originalSourcemap || hasOnlyNamedSources(originalSourcemap))) {
23030
23105
  return originalSourcemap;
23031
23106
  }
23032
23107
  const source = getCollapsedSourcemap(id, originalCode, originalSourcemap, sourcemapChain, getLinkMap(log));
23033
23108
  const map = source.traceMappings();
23034
23109
  return decodedSourcemap({ version: 3, ...map });
23035
23110
  }
23111
+ function hasOnlyNamedSources(map) {
23112
+ return map.sources.every(source => source != null);
23113
+ }
23036
23114
 
23037
23115
  // this looks ridiculous, but it prevents sourcemap tooling from mistaking
23038
23116
  // this for an actual sourceMappingURL
@@ -23342,7 +23420,12 @@ class Bundle {
23342
23420
  await renderChunks(chunks, outputBundle, this.pluginDriver, this.outputOptions, this.inputOptions.onLog);
23343
23421
  }
23344
23422
  catch (error_) {
23345
- await this.pluginDriver.hookParallel('renderError', [error_]);
23423
+ try {
23424
+ await this.pluginDriver.hookParallel('renderError', [error_]);
23425
+ }
23426
+ catch (hookError) {
23427
+ parseAst_js.error(parseAst_js.logErrorInHook(error_, hookError, 'renderError'));
23428
+ }
23346
23429
  throw error_;
23347
23430
  }
23348
23431
  removeUnreferencedAssets(outputBundle);
@@ -25058,11 +25141,7 @@ async function rollupInternal(rawInputOptions, registerWatchHooks) {
25058
25141
  await graph.pluginDriver.hookParallel('buildEnd', [error_]);
25059
25142
  }
25060
25143
  catch (buildEndError) {
25061
- // Create a compound error object to include both errors, based on the original error
25062
- const compoundError = parseAst_js.getRollupError({
25063
- ...error_,
25064
- 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}`
25065
- });
25144
+ const compoundError = parseAst_js.getRollupError(parseAst_js.logErrorInHook(error_, buildEndError, 'buildEnd'));
25066
25145
  await graph.pluginDriver.hookParallel('closeBundle', [compoundError]).catch(() => { });
25067
25146
  throw compoundError;
25068
25147
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.65.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.1
4
- Mon, 26 Oct 2026 10:55:37 GMT - commit 7879c65994dd591d287b177b8d0b88d7d76c2a49
3
+ Rollup.js v4.66.0
4
+ Wed, 28 Oct 2026 13:27:47 GMT - commit 4de8104f55fe5c0df06aab54c1f9f2967dbe66ac
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.65.1",
3
+ "version": "4.66.0",
4
4
  "description": "Next-generation ES module bundler with Node wasm",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",