rollup 4.41.1 → 4.42.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/README.md CHANGED
@@ -125,7 +125,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
125
125
 
126
126
  ## Special Sponsor
127
127
 
128
- <a href="https://www.tngtech.com/en/index.html" target="_blank"><img src="https://www.tngtech.com/fileadmin/Public/Images/Logos/TNG_Logo_medium_400x64.svg" alt="TNG Logo" width="280"/></a>
128
+ <a href="https://www.tngtech.com/en/index.html" target="_blank"><img src="https://avatars.githubusercontent.com/u/432256?s=200&v=4" alt="TNG Logo"/></a>
129
129
 
130
130
  TNG has been supporting the work of [Lukas Taegert-Atkinson](https://github.com/lukastaegert) on Rollup since 2017.
131
131
 
package/dist/bin/rollup CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
3
  @license
4
- Rollup.js v4.41.1
5
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
4
+ Rollup.js v4.42.0
5
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
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 __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, defaults to 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.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 __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, defaults to 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.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
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.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,13 +1,13 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
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, MemberExpression as MemberExpression$1, Identifier as Identifier$1, ImportExpression as ImportExpression$1, AwaitExpression as AwaitExpression$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, ExpressionStatement as ExpressionStatement$1, logMissingExport, normalize, getImportPath, logMissingNodeBuiltins, logReservedNamespace, error, 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, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logInvalidFormatForTopLevelAwait, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, 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, logCannotAssignModuleToChunk, logAnonymousPluginCache, logDuplicatePluginName, logUnknownOption, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, relativeId, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, warnDeprecation, logChunkNotGeneratedForFileName, logAssetNotFinalisedForFileName, logFileNameConflict, URL_GENERATEBUNDLE, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidAddonPluginHook, logInvalidFunctionPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_JSX, URL_TREESHAKE_MODULESIDEEFFECTS, URL_TREESHAKE, 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, MemberExpression as MemberExpression$1, Identifier as Identifier$1, ImportExpression as ImportExpression$1, AwaitExpression as AwaitExpression$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, ExpressionStatement as ExpressionStatement$1, logMissingExport, normalize, getImportPath, logMissingNodeBuiltins, logReservedNamespace, error, 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, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logInvalidFormatForTopLevelAwait, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, 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, logCannotAssignModuleToChunk, logAnonymousPluginCache, logDuplicatePluginName, logUnknownOption, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, relativeId, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, warnDeprecation, logChunkNotGeneratedForFileName, logAssetNotFinalisedForFileName, logFileNameConflict, URL_GENERATEBUNDLE, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidAddonPluginHook, logInvalidFunctionPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_JSX, URL_TREESHAKE_MODULESIDEEFFECTS, URL_TREESHAKE, 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 } from 'node:path';
12
12
  import { posix, isAbsolute, resolve, win32 } from 'path';
13
13
  import { parseAsync, xxhashBase16, xxhashBase64Url, xxhashBase36 } from '../../native.js';
@@ -15,7 +15,7 @@ import process$1, { env } from 'node:process';
15
15
  import { performance } from 'node:perf_hooks';
16
16
  import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
17
17
 
18
- var version = "4.41.1";
18
+ var version = "4.42.0";
19
19
 
20
20
  const comma = ','.charCodeAt(0);
21
21
  const semicolon = ';'.charCodeAt(0);
@@ -2975,6 +2975,9 @@ function isPropertyNode(node) {
2975
2975
  function isArrowFunctionExpressionNode(node) {
2976
2976
  return node instanceof NodeBase && node.type === ArrowFunctionExpression$1;
2977
2977
  }
2978
+ function isFunctionExpressionNode(node) {
2979
+ return node instanceof NodeBase && node.type === FunctionExpression$1;
2980
+ }
2978
2981
  function isCallExpressionNode(node) {
2979
2982
  return node instanceof NodeBase && node.type === CallExpression$1;
2980
2983
  }
@@ -5129,7 +5132,8 @@ class LocalVariable extends Variable {
5129
5132
  * })
5130
5133
  */
5131
5134
  if (this.kind === 'parameter' &&
5132
- isArrowFunctionExpressionNode(declaration.parent) &&
5135
+ (isArrowFunctionExpressionNode(declaration.parent) ||
5136
+ isFunctionExpressionNode(declaration.parent)) &&
5133
5137
  isCallExpressionNode(declaration.parent.parent) &&
5134
5138
  isMemberExpressionNode(declaration.parent.parent.callee) &&
5135
5139
  isIdentifierNode(declaration.parent.parent.callee.property) &&
@@ -15101,8 +15105,11 @@ class UnaryExpression extends NodeBase {
15101
15105
  if (!this.deoptimized)
15102
15106
  this.applyDeoptimizations();
15103
15107
  this.included = true;
15108
+ // Check if the argument is an identifier that should be preserved as a reference for readability
15109
+ const shouldPreserveArgument = this.argument instanceof Identifier && this.argument.variable?.included;
15104
15110
  if (typeof this.getRenderedLiteralValue(includeChildrenRecursively) === 'symbol' ||
15105
- this.argument.shouldBeIncluded(context)) {
15111
+ this.argument.shouldBeIncluded(context) ||
15112
+ shouldPreserveArgument) {
15106
15113
  this.argument.include(context, includeChildrenRecursively);
15107
15114
  this.renderedLiteralValue = UnknownValue;
15108
15115
  }
@@ -23608,6 +23615,29 @@ async function mergeOutputOptions(config, overrides, log) {
23608
23615
  return outputOptions;
23609
23616
  }
23610
23617
 
23618
+ let fsEvents;
23619
+ let fsEventsImportError;
23620
+ async function loadFsEvents() {
23621
+ try {
23622
+ ({ default: fsEvents } = await import('fsevents'));
23623
+ }
23624
+ catch (error) {
23625
+ fsEventsImportError = error;
23626
+ }
23627
+ }
23628
+ // A call to this function will be injected into the chokidar code
23629
+ function getFsEvents() {
23630
+ if (fsEventsImportError)
23631
+ throw fsEventsImportError;
23632
+ return fsEvents;
23633
+ }
23634
+
23635
+ const fseventsImporter = /*#__PURE__*/Object.defineProperty({
23636
+ __proto__: null,
23637
+ getFsEvents,
23638
+ loadFsEvents
23639
+ }, Symbol.toStringTag, { value: 'Module' });
23640
+
23611
23641
  class WatchEmitter {
23612
23642
  constructor() {
23613
23643
  this.currentHandlers = Object.create(null);
@@ -23661,29 +23691,6 @@ class WatchEmitter {
23661
23691
  }
23662
23692
  }
23663
23693
 
23664
- let fsEvents;
23665
- let fsEventsImportError;
23666
- async function loadFsEvents() {
23667
- try {
23668
- ({ default: fsEvents } = await import('fsevents'));
23669
- }
23670
- catch (error) {
23671
- fsEventsImportError = error;
23672
- }
23673
- }
23674
- // A call to this function will be injected into the chokidar code
23675
- function getFsEvents() {
23676
- if (fsEventsImportError)
23677
- throw fsEventsImportError;
23678
- return fsEvents;
23679
- }
23680
-
23681
- const fseventsImporter = /*#__PURE__*/Object.defineProperty({
23682
- __proto__: null,
23683
- getFsEvents,
23684
- loadFsEvents
23685
- }, Symbol.toStringTag, { value: 'Module' });
23686
-
23687
23694
  function watch(configs) {
23688
23695
  const emitter = new WatchEmitter();
23689
23696
  watchInternal(configs, emitter).catch(error => {
@@ -23691,7 +23698,7 @@ function watch(configs) {
23691
23698
  });
23692
23699
  return emitter;
23693
23700
  }
23694
- function withTrailingSlash(path) {
23701
+ function ensureTrailingSlash(path) {
23695
23702
  if (path[path.length - 1] !== '/') {
23696
23703
  return `${path}/`;
23697
23704
  }
@@ -23699,21 +23706,20 @@ function withTrailingSlash(path) {
23699
23706
  }
23700
23707
  function checkWatchConfig(config) {
23701
23708
  for (const item of config) {
23709
+ if (typeof item.watch !== 'boolean' && item.watch?.allowInputInsideOutputPath) {
23710
+ break;
23711
+ }
23702
23712
  if (item.input && item.output) {
23703
23713
  const input = typeof item.input === 'string' ? ensureArray(item.input) : item.input;
23704
- const output = ensureArray(item.output);
23714
+ const outputs = ensureArray(item.output);
23705
23715
  for (const index in input) {
23706
23716
  const inputPath = input[index];
23707
- const subPath = output.find(o => {
23708
- if (!o.dir || typeof inputPath !== 'string') {
23709
- return false;
23710
- }
23711
- const _outPath = withTrailingSlash(o.dir);
23712
- const _inputPath = withTrailingSlash(inputPath);
23713
- return _inputPath.startsWith(_outPath);
23714
- });
23715
- if (subPath) {
23716
- error(logInvalidOption('watch', URL_WATCH, `the input "${inputPath}" is a subpath of the output "${subPath.dir}"`));
23717
+ if (typeof inputPath !== 'string') {
23718
+ continue;
23719
+ }
23720
+ const outputWithInputAsSubPath = outputs.find(({ dir }) => dir && ensureTrailingSlash(inputPath).startsWith(ensureTrailingSlash(dir)));
23721
+ if (outputWithInputAsSubPath) {
23722
+ error(logInvalidOption('watch', URL_WATCH, `the input "${inputPath}" is a subpath of the output "${outputWithInputAsSubPath.dir}"`));
23717
23723
  }
23718
23724
  }
23719
23725
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -19,6 +19,7 @@ const CallExpression = 'CallExpression';
19
19
  const CatchClause = 'CatchClause';
20
20
  const ExportDefaultDeclaration = 'ExportDefaultDeclaration';
21
21
  const ExpressionStatement = 'ExpressionStatement';
22
+ const FunctionExpression = 'FunctionExpression';
22
23
  const Identifier = 'Identifier';
23
24
  const ImportExpression = 'ImportExpression';
24
25
  const Literal = 'Literal';
@@ -2073,4 +2074,4 @@ function getAstBuffer(astBuffer) {
2073
2074
  const parseAst = (input, { allowReturnOutsideFunction = false, jsx = false } = {}) => convertProgram(getAstBuffer(parse(input, allowReturnOutsideFunction, jsx)));
2074
2075
  const parseAstAsync = async (input, { allowReturnOutsideFunction = false, jsx = false, signal } = {}) => convertProgram(getAstBuffer(await parseAsync(input, allowReturnOutsideFunction, jsx, signal)));
2075
2076
 
2076
- export { ANNOTATION_KEY, ArrowFunctionExpression, AwaitExpression, BLANK, BlockStatement, CallExpression, CatchClause, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, INVALID_ANNOTATION_KEY, Identifier, ImportExpression, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, MemberExpression, ObjectExpression, Program, Property, RestElement, ReturnStatement, StaticBlock, TemplateLiteral, URL_GENERATEBUNDLE, URL_JSX, 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_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, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, 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, logOptimizeChunkStatus, logParseError, logPluginError, logRedeclarationError, logReservedNamespace, logShimmedExport, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };
2077
+ export { ANNOTATION_KEY, ArrowFunctionExpression, AwaitExpression, BLANK, BlockStatement, CallExpression, CatchClause, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, FunctionExpression, INVALID_ANNOTATION_KEY, Identifier, ImportExpression, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, MemberExpression, ObjectExpression, Program, Property, RestElement, ReturnStatement, StaticBlock, TemplateLiteral, URL_GENERATEBUNDLE, URL_JSX, 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_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, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, 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, logOptimizeChunkStatus, logParseError, logPluginError, logRedeclarationError, logReservedNamespace, logShimmedExport, 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.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
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.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.d.ts CHANGED
@@ -1009,6 +1009,7 @@ export interface ChokidarOptions {
1009
1009
  export type RollupWatchHooks = 'onError' | 'onStart' | 'onBundleStart' | 'onBundleEnd' | 'onEnd';
1010
1010
 
1011
1011
  export interface WatcherOptions {
1012
+ allowInputInsideOutputPath?: boolean;
1012
1013
  buildDelay?: number;
1013
1014
  chokidar?: ChokidarOptions;
1014
1015
  clearScreen?: boolean;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -81,7 +81,7 @@ function watch(configs) {
81
81
  });
82
82
  return emitter;
83
83
  }
84
- function withTrailingSlash(path) {
84
+ function ensureTrailingSlash(path) {
85
85
  if (path[path.length - 1] !== '/') {
86
86
  return `${path}/`;
87
87
  }
@@ -89,21 +89,20 @@ function withTrailingSlash(path) {
89
89
  }
90
90
  function checkWatchConfig(config) {
91
91
  for (const item of config) {
92
+ if (typeof item.watch !== 'boolean' && item.watch?.allowInputInsideOutputPath) {
93
+ break;
94
+ }
92
95
  if (item.input && item.output) {
93
96
  const input = typeof item.input === 'string' ? rollup.ensureArray(item.input) : item.input;
94
- const output = rollup.ensureArray(item.output);
97
+ const outputs = rollup.ensureArray(item.output);
95
98
  for (const index in input) {
96
99
  const inputPath = input[index];
97
- const subPath = output.find(o => {
98
- if (!o.dir || typeof inputPath !== 'string') {
99
- return false;
100
- }
101
- const _outPath = withTrailingSlash(o.dir);
102
- const _inputPath = withTrailingSlash(inputPath);
103
- return _inputPath.startsWith(_outPath);
104
- });
105
- if (subPath) {
106
- parseAst_js.error(parseAst_js.logInvalidOption('watch', parseAst_js.URL_WATCH, `the input "${inputPath}" is a subpath of the output "${subPath.dir}"`));
100
+ if (typeof inputPath !== 'string') {
101
+ continue;
102
+ }
103
+ const outputWithInputAsSubPath = outputs.find(({ dir }) => dir && ensureTrailingSlash(inputPath).startsWith(ensureTrailingSlash(dir)));
104
+ if (outputWithInputAsSubPath) {
105
+ parseAst_js.error(parseAst_js.logInvalidOption('watch', parseAst_js.URL_WATCH, `the input "${inputPath}" is a subpath of the output "${outputWithInputAsSubPath.dir}"`));
107
106
  }
108
107
  }
109
108
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1037,6 +1037,7 @@ const CallExpression = 'CallExpression';
1037
1037
  const CatchClause = 'CatchClause';
1038
1038
  const ExportDefaultDeclaration = 'ExportDefaultDeclaration';
1039
1039
  const ExpressionStatement = 'ExpressionStatement';
1040
+ const FunctionExpression = 'FunctionExpression';
1040
1041
  const Identifier = 'Identifier';
1041
1042
  const ImportExpression = 'ImportExpression';
1042
1043
  const Literal = 'Literal';
@@ -2149,6 +2150,7 @@ exports.EMPTY_SET = EMPTY_SET;
2149
2150
  exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
2150
2151
  exports.ExpressionStatement = ExpressionStatement;
2151
2152
  exports.FIXED_STRINGS = FIXED_STRINGS;
2153
+ exports.FunctionExpression = FunctionExpression;
2152
2154
  exports.INVALID_ANNOTATION_KEY = INVALID_ANNOTATION_KEY;
2153
2155
  exports.Identifier = Identifier;
2154
2156
  exports.ImportExpression = ImportExpression;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -17,7 +17,7 @@ const native_js = require('../native.js');
17
17
  const node_perf_hooks = require('node:perf_hooks');
18
18
  const promises = require('node:fs/promises');
19
19
 
20
- var version = "4.41.1";
20
+ var version = "4.42.0";
21
21
 
22
22
  function ensureArray$1(items) {
23
23
  if (Array.isArray(items)) {
@@ -6743,6 +6743,9 @@ function isPropertyNode(node) {
6743
6743
  function isArrowFunctionExpressionNode(node) {
6744
6744
  return node instanceof NodeBase && node.type === parseAst_js.ArrowFunctionExpression;
6745
6745
  }
6746
+ function isFunctionExpressionNode(node) {
6747
+ return node instanceof NodeBase && node.type === parseAst_js.FunctionExpression;
6748
+ }
6746
6749
  function isCallExpressionNode(node) {
6747
6750
  return node instanceof NodeBase && node.type === parseAst_js.CallExpression;
6748
6751
  }
@@ -8897,7 +8900,8 @@ class LocalVariable extends Variable {
8897
8900
  * })
8898
8901
  */
8899
8902
  if (this.kind === 'parameter' &&
8900
- isArrowFunctionExpressionNode(declaration.parent) &&
8903
+ (isArrowFunctionExpressionNode(declaration.parent) ||
8904
+ isFunctionExpressionNode(declaration.parent)) &&
8901
8905
  isCallExpressionNode(declaration.parent.parent) &&
8902
8906
  isMemberExpressionNode(declaration.parent.parent.callee) &&
8903
8907
  isIdentifierNode(declaration.parent.parent.callee.property) &&
@@ -16695,8 +16699,11 @@ class UnaryExpression extends NodeBase {
16695
16699
  if (!this.deoptimized)
16696
16700
  this.applyDeoptimizations();
16697
16701
  this.included = true;
16702
+ // Check if the argument is an identifier that should be preserved as a reference for readability
16703
+ const shouldPreserveArgument = this.argument instanceof Identifier && this.argument.variable?.included;
16698
16704
  if (typeof this.getRenderedLiteralValue(includeChildrenRecursively) === 'symbol' ||
16699
- this.argument.shouldBeIncluded(context)) {
16705
+ this.argument.shouldBeIncluded(context) ||
16706
+ shouldPreserveArgument) {
16700
16707
  this.argument.include(context, includeChildrenRecursively);
16701
16708
  this.renderedLiteralValue = UnknownValue;
16702
16709
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.1
4
- Sat, 24 May 2025 06:13:57 GMT - commit 7c469dc4eb8e1cb6def9fdc04581fdfce9975da3
3
+ Rollup.js v4.42.0
4
+ Fri, 06 Jun 2025 14:47:38 GMT - commit f76339428586620ff3e4c32fce48f923e7be7b05
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.41.1",
3
+ "version": "4.42.0",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -109,26 +109,26 @@
109
109
  "homepage": "https://rollupjs.org/",
110
110
  "optionalDependencies": {
111
111
  "fsevents": "~2.3.2",
112
- "@rollup/rollup-darwin-arm64": "4.41.1",
113
- "@rollup/rollup-android-arm64": "4.41.1",
114
- "@rollup/rollup-win32-arm64-msvc": "4.41.1",
115
- "@rollup/rollup-freebsd-arm64": "4.41.1",
116
- "@rollup/rollup-linux-arm64-gnu": "4.41.1",
117
- "@rollup/rollup-linux-arm64-musl": "4.41.1",
118
- "@rollup/rollup-android-arm-eabi": "4.41.1",
119
- "@rollup/rollup-linux-arm-gnueabihf": "4.41.1",
120
- "@rollup/rollup-linux-arm-musleabihf": "4.41.1",
121
- "@rollup/rollup-win32-ia32-msvc": "4.41.1",
122
- "@rollup/rollup-linux-loongarch64-gnu": "4.41.1",
123
- "@rollup/rollup-linux-riscv64-gnu": "4.41.1",
124
- "@rollup/rollup-linux-riscv64-musl": "4.41.1",
125
- "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1",
126
- "@rollup/rollup-linux-s390x-gnu": "4.41.1",
127
- "@rollup/rollup-darwin-x64": "4.41.1",
128
- "@rollup/rollup-win32-x64-msvc": "4.41.1",
129
- "@rollup/rollup-freebsd-x64": "4.41.1",
130
- "@rollup/rollup-linux-x64-gnu": "4.41.1",
131
- "@rollup/rollup-linux-x64-musl": "4.41.1"
112
+ "@rollup/rollup-darwin-arm64": "4.42.0",
113
+ "@rollup/rollup-android-arm64": "4.42.0",
114
+ "@rollup/rollup-win32-arm64-msvc": "4.42.0",
115
+ "@rollup/rollup-freebsd-arm64": "4.42.0",
116
+ "@rollup/rollup-linux-arm64-gnu": "4.42.0",
117
+ "@rollup/rollup-linux-arm64-musl": "4.42.0",
118
+ "@rollup/rollup-android-arm-eabi": "4.42.0",
119
+ "@rollup/rollup-linux-arm-gnueabihf": "4.42.0",
120
+ "@rollup/rollup-linux-arm-musleabihf": "4.42.0",
121
+ "@rollup/rollup-win32-ia32-msvc": "4.42.0",
122
+ "@rollup/rollup-linux-loongarch64-gnu": "4.42.0",
123
+ "@rollup/rollup-linux-riscv64-gnu": "4.42.0",
124
+ "@rollup/rollup-linux-riscv64-musl": "4.42.0",
125
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.42.0",
126
+ "@rollup/rollup-linux-s390x-gnu": "4.42.0",
127
+ "@rollup/rollup-darwin-x64": "4.42.0",
128
+ "@rollup/rollup-win32-x64-msvc": "4.42.0",
129
+ "@rollup/rollup-freebsd-x64": "4.42.0",
130
+ "@rollup/rollup-linux-x64-gnu": "4.42.0",
131
+ "@rollup/rollup-linux-x64-musl": "4.42.0"
132
132
  },
133
133
  "dependencies": {
134
134
  "@types/estree": "1.0.7"
@@ -139,12 +139,12 @@
139
139
  "devDependencies": {
140
140
  "@codemirror/commands": "^6.8.1",
141
141
  "@codemirror/lang-javascript": "^6.2.4",
142
- "@codemirror/language": "^6.11.0",
142
+ "@codemirror/language": "^6.11.1",
143
143
  "@codemirror/search": "^6.5.11",
144
144
  "@codemirror/state": "^6.5.2",
145
- "@codemirror/view": "^6.36.8",
146
- "@eslint/js": "^9.27.0",
147
- "@inquirer/prompts": "^7.5.1",
145
+ "@codemirror/view": "^6.37.1",
146
+ "@eslint/js": "^9.28.0",
147
+ "@inquirer/prompts": "^7.5.3",
148
148
  "@jridgewell/sourcemap-codec": "^1.5.0",
149
149
  "@mermaid-js/mermaid-cli": "^11.4.2",
150
150
  "@napi-rs/cli": "^2.18.4",
@@ -159,7 +159,7 @@
159
159
  "@rollup/pluginutils": "^5.1.4",
160
160
  "@shikijs/vitepress-twoslash": "^3.4.2",
161
161
  "@types/mocha": "^10.0.10",
162
- "@types/node": "^18.19.101",
162
+ "@types/node": "^18.19.110",
163
163
  "@types/picomatch": "^4.0.0",
164
164
  "@types/semver": "^7.7.0",
165
165
  "@types/yargs-parser": "^21.0.3",
@@ -176,22 +176,22 @@
176
176
  "date-time": "^4.0.0",
177
177
  "es5-shim": "^4.6.7",
178
178
  "es6-shim": "^0.35.8",
179
- "eslint": "^9.27.0",
179
+ "eslint": "^9.28.0",
180
180
  "eslint-config-prettier": "^10.1.5",
181
- "eslint-plugin-prettier": "^5.4.0",
181
+ "eslint-plugin-prettier": "^5.4.1",
182
182
  "eslint-plugin-unicorn": "^59.0.1",
183
183
  "eslint-plugin-vue": "^10.1.0",
184
184
  "fixturify": "^3.0.0",
185
185
  "flru": "^1.0.2",
186
186
  "fs-extra": "^11.3.0",
187
187
  "github-api": "^3.4.0",
188
- "globals": "^16.1.0",
188
+ "globals": "^16.2.0",
189
189
  "husky": "^9.1.7",
190
190
  "is-reference": "^3.0.3",
191
- "lint-staged": "^16.0.0",
191
+ "lint-staged": "^16.1.0",
192
192
  "locate-character": "^3.0.0",
193
193
  "magic-string": "^0.30.17",
194
- "mocha": "^11.4.0",
194
+ "mocha": "^11.5.0",
195
195
  "nodemon": "^3.1.10",
196
196
  "nyc": "^17.1.0",
197
197
  "picocolors": "^1.1.1",
@@ -202,7 +202,7 @@
202
202
  "pretty-bytes": "^7.0.0",
203
203
  "pretty-ms": "^9.2.0",
204
204
  "requirejs": "^2.3.7",
205
- "rollup": "^4.41.0",
205
+ "rollup": "^4.41.1",
206
206
  "rollup-plugin-license": "^3.6.0",
207
207
  "rollup-plugin-string": "^3.0.0",
208
208
  "semver": "^7.7.2",
@@ -211,13 +211,13 @@
211
211
  "source-map": "^0.7.4",
212
212
  "source-map-support": "^0.5.21",
213
213
  "systemjs": "^6.15.1",
214
- "terser": "^5.39.2",
214
+ "terser": "^5.40.0",
215
215
  "tslib": "^2.8.1",
216
216
  "typescript": "^5.8.3",
217
- "typescript-eslint": "^8.32.1",
217
+ "typescript-eslint": "^8.33.1",
218
218
  "vite": "^6.3.5",
219
219
  "vitepress": "^1.6.3",
220
- "vue": "^3.5.14",
220
+ "vue": "^3.5.16",
221
221
  "vue-tsc": "^2.2.10",
222
222
  "wasm-pack": "^0.13.1",
223
223
  "yargs-parser": "^21.1.1"