rollup 4.34.2 → 4.34.4

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.34.2
5
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
4
+ Rollup.js v4.34.4
5
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
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.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,13 +1,13 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
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, 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, logConstVariableReassignError, ArrowFunctionExpression as ArrowFunctionExpression$1, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, 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, logCannotAssignModuleToChunk, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, 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_TREESHAKE, URL_JSX, 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, 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, ArrowFunctionExpression as ArrowFunctionExpression$1, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, 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, logCannotAssignModuleToChunk, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, 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_TREESHAKE, URL_JSX, 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 } 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.34.2";
18
+ var version = "4.34.4";
19
19
 
20
20
  const comma = ','.charCodeAt(0);
21
21
  const semicolon = ';'.charCodeAt(0);
@@ -6375,8 +6375,9 @@ class ReturnValueScope extends ParameterScope {
6375
6375
  }
6376
6376
 
6377
6377
  class FunctionScope extends ReturnValueScope {
6378
- constructor(parent) {
6378
+ constructor(parent, functionNode) {
6379
6379
  super(parent, false);
6380
+ this.functionNode = functionNode;
6380
6381
  const { context } = parent;
6381
6382
  this.variables.set('arguments', (this.argumentsVariable = new ArgumentsVariable(context)));
6382
6383
  this.variables.set('this', (this.thisVariable = new ThisVariable(context)));
@@ -6708,7 +6709,7 @@ class FunctionNode extends FunctionBase {
6708
6709
  this.objectEntity = null;
6709
6710
  }
6710
6711
  createScope(parentScope) {
6711
- this.scope = new FunctionScope(parentScope);
6712
+ this.scope = new FunctionScope(parentScope, this);
6712
6713
  this.constructedEntity = new ObjectEntity(Object.create(null), OBJECT_PROTOTYPE);
6713
6714
  // This makes sure that all deoptimizations of "this" are applied to the
6714
6715
  // constructed entity.
@@ -11392,8 +11393,16 @@ class ObjectPattern extends NodeBase {
11392
11393
  return false;
11393
11394
  }
11394
11395
  includeDestructuredIfNecessary(context, destructuredInitPath, init) {
11395
- let included = false;
11396
- for (const property of this.properties) {
11396
+ if (!this.properties.length)
11397
+ return false;
11398
+ const lastProperty = this.properties.at(-1);
11399
+ const lastPropertyIncluded = lastProperty.includeDestructuredIfNecessary(context, destructuredInitPath, init);
11400
+ const lastPropertyIsRestElement = lastProperty.type === RestElement$1;
11401
+ let included = lastPropertyIsRestElement ? lastPropertyIncluded : false;
11402
+ for (const property of this.properties.slice(0, -1)) {
11403
+ if (lastPropertyIsRestElement && lastPropertyIncluded) {
11404
+ property.includeNode(context);
11405
+ }
11397
11406
  included =
11398
11407
  property.includeDestructuredIfNecessary(context, destructuredInitPath, init) || included;
11399
11408
  }
@@ -14748,6 +14757,12 @@ class ThisExpression extends NodeBase {
14748
14757
  else if (path.length > 0) {
14749
14758
  this.variable.includePath(path, context);
14750
14759
  }
14760
+ const functionScope = findFunctionScope(this.scope, this.variable);
14761
+ if (functionScope &&
14762
+ functionScope.functionNode.parent instanceof Property &&
14763
+ functionScope.functionNode.parent.parent instanceof ObjectExpression) {
14764
+ functionScope.functionNode.parent.parent.includePath(path, context);
14765
+ }
14751
14766
  }
14752
14767
  initialise() {
14753
14768
  super.initialise();
@@ -14768,6 +14783,15 @@ class ThisExpression extends NodeBase {
14768
14783
  }
14769
14784
  }
14770
14785
  }
14786
+ function findFunctionScope(scope, thisVariable) {
14787
+ while (!(scope instanceof FunctionScope && scope.thisVariable === thisVariable)) {
14788
+ if (!(scope instanceof ChildScope)) {
14789
+ return null;
14790
+ }
14791
+ scope = scope.parent;
14792
+ }
14793
+ return scope;
14794
+ }
14771
14795
 
14772
14796
  class ThrowStatement extends NodeBase {
14773
14797
  hasEffects() {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -25,6 +25,7 @@ const PanicError = 'PanicError';
25
25
  const ParseError = 'ParseError';
26
26
  const Program = 'Program';
27
27
  const Property = 'Property';
28
+ const RestElement = 'RestElement';
28
29
  const ReturnStatement = 'ReturnStatement';
29
30
  const StaticBlock = 'StaticBlock';
30
31
  const TemplateLiteral = 'TemplateLiteral';
@@ -2069,4 +2070,4 @@ function getAstBuffer(astBuffer) {
2069
2070
  const parseAst = (input, { allowReturnOutsideFunction = false, jsx = false } = {}) => convertProgram(getAstBuffer(parse(input, allowReturnOutsideFunction, jsx)));
2070
2071
  const parseAstAsync = async (input, { allowReturnOutsideFunction = false, jsx = false, signal } = {}) => convertProgram(getAstBuffer(await parseAsync(input, allowReturnOutsideFunction, jsx, signal)));
2071
2072
 
2072
- export { ANNOTATION_KEY, ArrowFunctionExpression, BLANK, BlockStatement, CallExpression, CatchClause, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, ObjectExpression, Program, Property, 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 };
2073
+ export { ANNOTATION_KEY, ArrowFunctionExpression, BLANK, BlockStatement, CallExpression, CatchClause, EMPTY_ARRAY, EMPTY_OBJECT, EMPTY_SET, ExportDefaultDeclaration, ExpressionStatement, FIXED_STRINGS, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, 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.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
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.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
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.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1043,6 +1043,7 @@ const PanicError = 'PanicError';
1043
1043
  const ParseError = 'ParseError';
1044
1044
  const Program = 'Program';
1045
1045
  const Property = 'Property';
1046
+ const RestElement = 'RestElement';
1046
1047
  const ReturnStatement = 'ReturnStatement';
1047
1048
  const StaticBlock = 'StaticBlock';
1048
1049
  const TemplateLiteral = 'TemplateLiteral';
@@ -2154,6 +2155,7 @@ exports.Literal = Literal;
2154
2155
  exports.ObjectExpression = ObjectExpression;
2155
2156
  exports.Program = Program;
2156
2157
  exports.Property = Property;
2158
+ exports.RestElement = RestElement;
2157
2159
  exports.ReturnStatement = ReturnStatement;
2158
2160
  exports.StaticBlock = StaticBlock;
2159
2161
  exports.TemplateLiteral = TemplateLiteral;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
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.34.2";
20
+ var version = "4.34.4";
21
21
 
22
22
  function ensureArray$1(items) {
23
23
  if (Array.isArray(items)) {
@@ -7872,8 +7872,9 @@ class ReturnValueScope extends ParameterScope {
7872
7872
  }
7873
7873
 
7874
7874
  class FunctionScope extends ReturnValueScope {
7875
- constructor(parent) {
7875
+ constructor(parent, functionNode) {
7876
7876
  super(parent, false);
7877
+ this.functionNode = functionNode;
7877
7878
  const { context } = parent;
7878
7879
  this.variables.set('arguments', (this.argumentsVariable = new ArgumentsVariable(context)));
7879
7880
  this.variables.set('this', (this.thisVariable = new ThisVariable(context)));
@@ -8205,7 +8206,7 @@ class FunctionNode extends FunctionBase {
8205
8206
  this.objectEntity = null;
8206
8207
  }
8207
8208
  createScope(parentScope) {
8208
- this.scope = new FunctionScope(parentScope);
8209
+ this.scope = new FunctionScope(parentScope, this);
8209
8210
  this.constructedEntity = new ObjectEntity(Object.create(null), OBJECT_PROTOTYPE);
8210
8211
  // This makes sure that all deoptimizations of "this" are applied to the
8211
8212
  // constructed entity.
@@ -12860,8 +12861,16 @@ class ObjectPattern extends NodeBase {
12860
12861
  return false;
12861
12862
  }
12862
12863
  includeDestructuredIfNecessary(context, destructuredInitPath, init) {
12863
- let included = false;
12864
- for (const property of this.properties) {
12864
+ if (!this.properties.length)
12865
+ return false;
12866
+ const lastProperty = this.properties.at(-1);
12867
+ const lastPropertyIncluded = lastProperty.includeDestructuredIfNecessary(context, destructuredInitPath, init);
12868
+ const lastPropertyIsRestElement = lastProperty.type === parseAst_js.RestElement;
12869
+ let included = lastPropertyIsRestElement ? lastPropertyIncluded : false;
12870
+ for (const property of this.properties.slice(0, -1)) {
12871
+ if (lastPropertyIsRestElement && lastPropertyIncluded) {
12872
+ property.includeNode(context);
12873
+ }
12865
12874
  included =
12866
12875
  property.includeDestructuredIfNecessary(context, destructuredInitPath, init) || included;
12867
12876
  }
@@ -16216,6 +16225,12 @@ class ThisExpression extends NodeBase {
16216
16225
  else if (path.length > 0) {
16217
16226
  this.variable.includePath(path, context);
16218
16227
  }
16228
+ const functionScope = findFunctionScope(this.scope, this.variable);
16229
+ if (functionScope &&
16230
+ functionScope.functionNode.parent instanceof Property &&
16231
+ functionScope.functionNode.parent.parent instanceof ObjectExpression) {
16232
+ functionScope.functionNode.parent.parent.includePath(path, context);
16233
+ }
16219
16234
  }
16220
16235
  initialise() {
16221
16236
  super.initialise();
@@ -16236,6 +16251,15 @@ class ThisExpression extends NodeBase {
16236
16251
  }
16237
16252
  }
16238
16253
  }
16254
+ function findFunctionScope(scope, thisVariable) {
16255
+ while (!(scope instanceof FunctionScope && scope.thisVariable === thisVariable)) {
16256
+ if (!(scope instanceof ChildScope)) {
16257
+ return null;
16258
+ }
16259
+ scope = scope.parent;
16260
+ }
16261
+ return scope;
16262
+ }
16239
16263
 
16240
16264
  class ThrowStatement extends NodeBase {
16241
16265
  hasEffects() {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.34.2
4
- Tue, 04 Feb 2025 08:09:29 GMT - commit 615efa045779fae70c4fd5fe64fdb08a039c0442
3
+ Rollup.js v4.34.4
4
+ Wed, 05 Feb 2025 21:30:40 GMT - commit 19312a762c3cda56a0f6dc80a0887a4499db2257
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.34.2",
3
+ "version": "4.34.4",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -110,25 +110,25 @@
110
110
  "homepage": "https://rollupjs.org/",
111
111
  "optionalDependencies": {
112
112
  "fsevents": "~2.3.2",
113
- "@rollup/rollup-darwin-arm64": "4.34.2",
114
- "@rollup/rollup-android-arm64": "4.34.2",
115
- "@rollup/rollup-win32-arm64-msvc": "4.34.2",
116
- "@rollup/rollup-freebsd-arm64": "4.34.2",
117
- "@rollup/rollup-linux-arm64-gnu": "4.34.2",
118
- "@rollup/rollup-linux-arm64-musl": "4.34.2",
119
- "@rollup/rollup-android-arm-eabi": "4.34.2",
120
- "@rollup/rollup-linux-arm-gnueabihf": "4.34.2",
121
- "@rollup/rollup-linux-arm-musleabihf": "4.34.2",
122
- "@rollup/rollup-win32-ia32-msvc": "4.34.2",
123
- "@rollup/rollup-linux-loongarch64-gnu": "4.34.2",
124
- "@rollup/rollup-linux-riscv64-gnu": "4.34.2",
125
- "@rollup/rollup-linux-powerpc64le-gnu": "4.34.2",
126
- "@rollup/rollup-linux-s390x-gnu": "4.34.2",
127
- "@rollup/rollup-darwin-x64": "4.34.2",
128
- "@rollup/rollup-win32-x64-msvc": "4.34.2",
129
- "@rollup/rollup-freebsd-x64": "4.34.2",
130
- "@rollup/rollup-linux-x64-gnu": "4.34.2",
131
- "@rollup/rollup-linux-x64-musl": "4.34.2"
113
+ "@rollup/rollup-darwin-arm64": "4.34.4",
114
+ "@rollup/rollup-android-arm64": "4.34.4",
115
+ "@rollup/rollup-win32-arm64-msvc": "4.34.4",
116
+ "@rollup/rollup-freebsd-arm64": "4.34.4",
117
+ "@rollup/rollup-linux-arm64-gnu": "4.34.4",
118
+ "@rollup/rollup-linux-arm64-musl": "4.34.4",
119
+ "@rollup/rollup-android-arm-eabi": "4.34.4",
120
+ "@rollup/rollup-linux-arm-gnueabihf": "4.34.4",
121
+ "@rollup/rollup-linux-arm-musleabihf": "4.34.4",
122
+ "@rollup/rollup-win32-ia32-msvc": "4.34.4",
123
+ "@rollup/rollup-linux-loongarch64-gnu": "4.34.4",
124
+ "@rollup/rollup-linux-riscv64-gnu": "4.34.4",
125
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.34.4",
126
+ "@rollup/rollup-linux-s390x-gnu": "4.34.4",
127
+ "@rollup/rollup-darwin-x64": "4.34.4",
128
+ "@rollup/rollup-win32-x64-msvc": "4.34.4",
129
+ "@rollup/rollup-freebsd-x64": "4.34.4",
130
+ "@rollup/rollup-linux-x64-gnu": "4.34.4",
131
+ "@rollup/rollup-linux-x64-musl": "4.34.4"
132
132
  },
133
133
  "dependencies": {
134
134
  "@types/estree": "1.0.6"