rollup 4.41.0 → 4.41.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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.0
5
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
4
+ Rollup.js v4.41.2
5
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0";
18
+ var version = "4.41.2";
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
  }
@@ -20592,6 +20599,16 @@ function resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolve
20592
20599
  ...pluginContext,
20593
20600
  resolve: (source, importer, { attributes, custom, isEntry, skipSelf } = BLANK) => {
20594
20601
  skipSelf ??= true;
20602
+ if (skipSelf &&
20603
+ skip.findIndex(skippedCall => {
20604
+ return (skippedCall.plugin === plugin &&
20605
+ skippedCall.source === source &&
20606
+ skippedCall.importer === importer);
20607
+ }) !== -1) {
20608
+ // This means that the plugin recursively called itself
20609
+ // Thus returning Promise.resolve(null) in purpose of fallback to default behavior of `resolveId` plugin hook.
20610
+ return Promise.resolve(null);
20611
+ }
20595
20612
  return moduleLoaderResolveId(source, importer, custom, isEntry, attributes || EMPTY_OBJECT, skipSelf ? [...skip, { importer, plugin, source }] : skip);
20596
20613
  }
20597
20614
  });
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0";
20
+ var version = "4.41.2";
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
  }
@@ -22050,6 +22057,16 @@ function resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolve
22050
22057
  ...pluginContext,
22051
22058
  resolve: (source, importer, { attributes, custom, isEntry, skipSelf } = parseAst_js.BLANK) => {
22052
22059
  skipSelf ??= true;
22060
+ if (skipSelf &&
22061
+ skip.findIndex(skippedCall => {
22062
+ return (skippedCall.plugin === plugin &&
22063
+ skippedCall.source === source &&
22064
+ skippedCall.importer === importer);
22065
+ }) !== -1) {
22066
+ // This means that the plugin recursively called itself
22067
+ // Thus returning Promise.resolve(null) in purpose of fallback to default behavior of `resolveId` plugin hook.
22068
+ return Promise.resolve(null);
22069
+ }
22053
22070
  return moduleLoaderResolveId(source, importer, custom, isEntry, attributes || parseAst_js.EMPTY_OBJECT, skipSelf ? [...skip, { importer, plugin, source }] : skip);
22054
22071
  }
22055
22072
  });
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.41.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0
4
- Sun, 18 May 2025 05:33:01 GMT - commit 0928185cd544907dab472754634ddf988452aae6
3
+ Rollup.js v4.41.2
4
+ Fri, 06 Jun 2025 11:40:00 GMT - commit 13b4669dbc21cb738551cd725d2a18c77b3cea11
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.0",
3
+ "version": "4.41.2",
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.0",
113
- "@rollup/rollup-android-arm64": "4.41.0",
114
- "@rollup/rollup-win32-arm64-msvc": "4.41.0",
115
- "@rollup/rollup-freebsd-arm64": "4.41.0",
116
- "@rollup/rollup-linux-arm64-gnu": "4.41.0",
117
- "@rollup/rollup-linux-arm64-musl": "4.41.0",
118
- "@rollup/rollup-android-arm-eabi": "4.41.0",
119
- "@rollup/rollup-linux-arm-gnueabihf": "4.41.0",
120
- "@rollup/rollup-linux-arm-musleabihf": "4.41.0",
121
- "@rollup/rollup-win32-ia32-msvc": "4.41.0",
122
- "@rollup/rollup-linux-loongarch64-gnu": "4.41.0",
123
- "@rollup/rollup-linux-riscv64-gnu": "4.41.0",
124
- "@rollup/rollup-linux-riscv64-musl": "4.41.0",
125
- "@rollup/rollup-linux-powerpc64le-gnu": "4.41.0",
126
- "@rollup/rollup-linux-s390x-gnu": "4.41.0",
127
- "@rollup/rollup-darwin-x64": "4.41.0",
128
- "@rollup/rollup-win32-x64-msvc": "4.41.0",
129
- "@rollup/rollup-freebsd-x64": "4.41.0",
130
- "@rollup/rollup-linux-x64-gnu": "4.41.0",
131
- "@rollup/rollup-linux-x64-musl": "4.41.0"
112
+ "@rollup/rollup-darwin-arm64": "4.41.2",
113
+ "@rollup/rollup-android-arm64": "4.41.2",
114
+ "@rollup/rollup-win32-arm64-msvc": "4.41.2",
115
+ "@rollup/rollup-freebsd-arm64": "4.41.2",
116
+ "@rollup/rollup-linux-arm64-gnu": "4.41.2",
117
+ "@rollup/rollup-linux-arm64-musl": "4.41.2",
118
+ "@rollup/rollup-android-arm-eabi": "4.41.2",
119
+ "@rollup/rollup-linux-arm-gnueabihf": "4.41.2",
120
+ "@rollup/rollup-linux-arm-musleabihf": "4.41.2",
121
+ "@rollup/rollup-win32-ia32-msvc": "4.41.2",
122
+ "@rollup/rollup-linux-loongarch64-gnu": "4.41.2",
123
+ "@rollup/rollup-linux-riscv64-gnu": "4.41.2",
124
+ "@rollup/rollup-linux-riscv64-musl": "4.41.2",
125
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.41.2",
126
+ "@rollup/rollup-linux-s390x-gnu": "4.41.2",
127
+ "@rollup/rollup-darwin-x64": "4.41.2",
128
+ "@rollup/rollup-win32-x64-msvc": "4.41.2",
129
+ "@rollup/rollup-freebsd-x64": "4.41.2",
130
+ "@rollup/rollup-linux-x64-gnu": "4.41.2",
131
+ "@rollup/rollup-linux-x64-musl": "4.41.2"
132
132
  },
133
133
  "dependencies": {
134
134
  "@types/estree": "1.0.7"
@@ -138,13 +138,13 @@
138
138
  },
139
139
  "devDependencies": {
140
140
  "@codemirror/commands": "^6.8.1",
141
- "@codemirror/lang-javascript": "^6.2.3",
142
- "@codemirror/language": "^6.11.0",
143
- "@codemirror/search": "^6.5.10",
141
+ "@codemirror/lang-javascript": "^6.2.4",
142
+ "@codemirror/language": "^6.11.1",
143
+ "@codemirror/search": "^6.5.11",
144
144
  "@codemirror/state": "^6.5.2",
145
- "@codemirror/view": "^6.36.8",
146
- "@eslint/js": "^9.26.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",
@@ -157,9 +157,9 @@
157
157
  "@rollup/plugin-terser": "^0.4.4",
158
158
  "@rollup/plugin-typescript": "^12.1.2",
159
159
  "@rollup/pluginutils": "^5.1.4",
160
- "@shikijs/vitepress-twoslash": "^3.4.0",
160
+ "@shikijs/vitepress-twoslash": "^3.4.2",
161
161
  "@types/mocha": "^10.0.10",
162
- "@types/node": "^18.19.100",
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.26.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.2.2",
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.40.2",
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.0",
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.13",
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"