rollup 4.5.2 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -120,6 +120,12 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
120
120
 
121
121
  <a href="https://opencollective.com/rollup/sponsor/0/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/1/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/2/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/3/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/4/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/5/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/6/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/7/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/8/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/9/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/10/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/10/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/11/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/11/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/12/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/12/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/13/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/13/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/14/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/14/avatar.svg"></a>
122
122
 
123
+ ## Special Sponsor
124
+
125
+ <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>
126
+
127
+ TNG has been supporting the work of [Lukas Taegert-Atkinson](https://github.com/lukastaegert) on Rollup since 2017.
128
+
123
129
  ## License
124
130
 
125
131
  [MIT](https://github.com/rollup/rollup/blob/master/LICENSE.md)
package/dist/bin/rollup CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
3
  @license
4
- Rollup.js v4.5.2
5
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
4
+ Rollup.js v4.6.1
5
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
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.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,13 +1,13 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
8
8
  Released under the MIT License.
9
9
  */
10
- import { normalize, getImportPath, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, logInvalidAnnotation, logRedeclarationError, logDuplicateArgumentNameError, logIllegalImportReassignment, logModuleLevelDirective, logMissingExport, logCannotCallNamespace, logEval, LOGLEVEL_INFO, logFirstSideEffect, locate, logThisIsUndefined, logImportAttributeIsInvalid, logImportOptionsAreInvalid, error, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logInvalidFormatForTopLevelAwait, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logModuleParseError, parseAstAsync, logCircularReexport, logMissingNodeBuiltins, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, 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, LOGLEVEL_ERROR, logLevelPriority, relativeId, LOGLEVEL_DEBUG, logUnknownOption, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, logFileNameConflict, logAssetNotFinalisedForFileName, logChunkNotGeneratedForFileName, logInvalidLogPosition, logInvalidRollupPhaseForAddWatchFile, logInputHookInOutputPlugin, logInvalidFunctionPluginHook, logInvalidAddonPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, URL_TREESHAKE_MODULESIDEEFFECTS, URL_TREESHAKE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_AMD_BASEPATH, logInvalidExportOptionValue, warnDeprecation, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, logAlreadyClosed, logMissingFileOrDirOption, logCannotEmitFromOptionsHook, URL_WATCH } from './parseAst.js';
10
+ import { normalize, getImportPath, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, logInvalidAnnotation, logRedeclarationError, logDuplicateArgumentNameError, logIllegalImportReassignment, logModuleLevelDirective, logMissingExport, logCannotCallNamespace, logEval, LOGLEVEL_INFO, logFirstSideEffect, locate, logThisIsUndefined, logImportAttributeIsInvalid, logImportOptionsAreInvalid, error, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logInvalidFormatForTopLevelAwait, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logModuleParseError, parseAstAsync, logCircularReexport, logMissingNodeBuiltins, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, 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, LOGLEVEL_ERROR, logLevelPriority, relativeId, LOGLEVEL_DEBUG, logUnknownOption, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, logFileNameConflict, logAssetNotFinalisedForFileName, logChunkNotGeneratedForFileName, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidFunctionPluginHook, logInvalidAddonPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, URL_TREESHAKE_MODULESIDEEFFECTS, URL_TREESHAKE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_AMD_BASEPATH, logInvalidExportOptionValue, warnDeprecation, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_GENERATEDCODE, 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 require$$0$1, { win32, posix, isAbsolute, resolve } from 'path';
13
13
  import process$1, { env as env$1 } from 'node:process';
@@ -16,7 +16,7 @@ import { xxhashBase64Url } from '../../native.js';
16
16
  import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
17
17
  import * as tty from 'tty';
18
18
 
19
- var version = "4.5.2";
19
+ var version = "4.6.1";
20
20
 
21
21
  const comma = ','.charCodeAt(0);
22
22
  const semicolon = ';'.charCodeAt(0);
@@ -7513,7 +7513,8 @@ class BlockScope extends ChildScope {
7513
7513
  const name = identifier.name;
7514
7514
  const existingVariable = this.hoistedVariables?.get(name) || this.variables.get(name);
7515
7515
  if (existingVariable) {
7516
- if (existingVariable.kind === "var" /* VariableKind.var */) {
7516
+ if (existingVariable.kind === "var" /* VariableKind.var */ ||
7517
+ (kind === "var" /* VariableKind.var */ && existingVariable.kind === "parameter" /* VariableKind.parameter */)) {
7517
7518
  existingVariable.addDeclaration(identifier, init);
7518
7519
  return existingVariable;
7519
7520
  }
@@ -18411,9 +18412,6 @@ function getPluginContext(plugin, pluginCache, graph, options, fileEmitter, exis
18411
18412
  }
18412
18413
  return {
18413
18414
  addWatchFile(id) {
18414
- if (graph.phase >= BuildPhase.GENERATE) {
18415
- return this.error(logInvalidRollupPhaseForAddWatchFile());
18416
- }
18417
18415
  graph.watchFiles[id] = true;
18418
18416
  },
18419
18417
  cache: cacheInstance,
@@ -19465,7 +19463,9 @@ async function rollupInternal(rawInputOptions, watcher) {
19465
19463
  return error(logAlreadyClosed());
19466
19464
  return handleGenerateWrite(false, inputOptions, unsetInputOptions, rawOutputOptions, graph);
19467
19465
  },
19468
- watchFiles: Object.keys(graph.watchFiles),
19466
+ get watchFiles() {
19467
+ return Object.keys(graph.watchFiles);
19468
+ },
19469
19469
  async write(rawOutputOptions) {
19470
19470
  if (result.closed)
19471
19471
  return error(logAlreadyClosed());
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -634,12 +634,6 @@ function logInvalidFunctionPluginHook(hook, plugin) {
634
634
  plugin
635
635
  };
636
636
  }
637
- function logInvalidRollupPhaseForAddWatchFile() {
638
- return {
639
- code: INVALID_ROLLUP_PHASE,
640
- message: `Cannot call "addWatchFile" after the build has finished.`
641
- };
642
- }
643
637
  function logInvalidRollupPhaseForChunkEmission() {
644
638
  return {
645
639
  code: INVALID_ROLLUP_PHASE,
@@ -2157,4 +2151,4 @@ const parseAstAsync = async (input, { allowReturnOutsideFunction = false, signal
2157
2151
  return result;
2158
2152
  };
2159
2153
 
2160
- export { ANNOTATION_KEY, INVALID_ANNOTATION_KEY, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, 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, addTrailingSlashIfMissed, augmentCodeLocation, error, getAliasName, getImportPath, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, 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, logInvalidRollupPhaseForAddWatchFile, logInvalidRollupPhaseForChunkEmission, logInvalidSetAssetSourceCall, logInvalidSourcemapForError, logLevelPriority, logMissingEntryExport, logMissingExport, logMissingFileOrDirOption, logMissingGlobalName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logOptimizeChunkStatus, logPluginError, logRedeclarationError, logShimmedExport, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };
2154
+ export { ANNOTATION_KEY, INVALID_ANNOTATION_KEY, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, 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, addTrailingSlashIfMissed, augmentCodeLocation, error, getAliasName, getImportPath, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, 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, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logOptimizeChunkStatus, logPluginError, logRedeclarationError, 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.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -4796,7 +4796,13 @@ class Task {
4796
4796
  return;
4797
4797
  }
4798
4798
  this.updateWatchedFiles(result);
4799
- this.skipWrite || (await Promise.all(this.outputs.map(output => result.write(output))));
4799
+ if (!this.skipWrite) {
4800
+ await Promise.all(this.outputs.map(output => result.write(output)));
4801
+ if (this.closed) {
4802
+ return;
4803
+ }
4804
+ this.updateWatchedFiles(result);
4805
+ }
4800
4806
  await this.watcher.emitter.emit('event', {
4801
4807
  code: 'BUNDLE_END',
4802
4808
  duration: Date.now() - start,
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/native.js CHANGED
@@ -57,7 +57,20 @@ function getPackageBase() {
57
57
  }
58
58
 
59
59
  const localName = `./rollup.${packageBase}.node`;
60
- const { parse, parseAsync, xxhashBase64Url } = require(
60
+ const requireWithFriendlyError = id => {
61
+ try {
62
+ return require(id);
63
+ } catch (error) {
64
+ throw new Error(
65
+ `Cannot find module ${id}. ` +
66
+ `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
67
+ 'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
68
+ { cause: error }
69
+ );
70
+ }
71
+ };
72
+
73
+ const { parse, parseAsync, xxhashBase64Url } = requireWithFriendlyError(
61
74
  existsSync(join(__dirname, localName)) ? localName : `@rollup/rollup-${packageBase}`
62
75
  );
63
76
 
package/dist/parseAst.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
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.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -615,12 +615,6 @@ function logInvalidFunctionPluginHook(hook, plugin) {
615
615
  plugin
616
616
  };
617
617
  }
618
- function logInvalidRollupPhaseForAddWatchFile() {
619
- return {
620
- code: INVALID_ROLLUP_PHASE,
621
- message: `Cannot call "addWatchFile" after the build has finished.`
622
- };
623
- }
624
618
  function logInvalidRollupPhaseForChunkEmission() {
625
619
  return {
626
620
  code: INVALID_ROLLUP_PHASE,
@@ -2311,7 +2305,6 @@ exports.logInvalidFormatForTopLevelAwait = logInvalidFormatForTopLevelAwait;
2311
2305
  exports.logInvalidFunctionPluginHook = logInvalidFunctionPluginHook;
2312
2306
  exports.logInvalidLogPosition = logInvalidLogPosition;
2313
2307
  exports.logInvalidOption = logInvalidOption;
2314
- exports.logInvalidRollupPhaseForAddWatchFile = logInvalidRollupPhaseForAddWatchFile;
2315
2308
  exports.logInvalidRollupPhaseForChunkEmission = logInvalidRollupPhaseForChunkEmission;
2316
2309
  exports.logInvalidSetAssetSourceCall = logInvalidSetAssetSourceCall;
2317
2310
  exports.logInvalidSourcemapForError = logInvalidSourcemapForError;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
31
31
 
32
32
  const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
33
33
 
34
- var version = "4.5.2";
34
+ var version = "4.6.1";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -811,9 +811,6 @@ function getPluginContext(plugin, pluginCache, graph, options, fileEmitter, exis
811
811
  }
812
812
  return {
813
813
  addWatchFile(id) {
814
- if (graph.phase >= BuildPhase.GENERATE) {
815
- return this.error(parseAst_js.logInvalidRollupPhaseForAddWatchFile());
816
- }
817
814
  graph.watchFiles[id] = true;
818
815
  },
819
816
  cache: cacheInstance,
@@ -8948,7 +8945,8 @@ class BlockScope extends ChildScope {
8948
8945
  const name = identifier.name;
8949
8946
  const existingVariable = this.hoistedVariables?.get(name) || this.variables.get(name);
8950
8947
  if (existingVariable) {
8951
- if (existingVariable.kind === "var" /* VariableKind.var */) {
8948
+ if (existingVariable.kind === "var" /* VariableKind.var */ ||
8949
+ (kind === "var" /* VariableKind.var */ && existingVariable.kind === "parameter" /* VariableKind.parameter */)) {
8952
8950
  existingVariable.addDeclaration(identifier, init);
8953
8951
  return existingVariable;
8954
8952
  }
@@ -19843,7 +19841,9 @@ async function rollupInternal(rawInputOptions, watcher) {
19843
19841
  return parseAst_js.error(parseAst_js.logAlreadyClosed());
19844
19842
  return handleGenerateWrite(false, inputOptions, unsetInputOptions, rawOutputOptions, graph);
19845
19843
  },
19846
- watchFiles: Object.keys(graph.watchFiles),
19844
+ get watchFiles() {
19845
+ return Object.keys(graph.watchFiles);
19846
+ },
19847
19847
  async write(rawOutputOptions) {
19848
19848
  if (result.closed)
19849
19849
  return parseAst_js.error(parseAst_js.logAlreadyClosed());
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.5.2
4
- Fri, 24 Nov 2023 06:29:16 GMT - commit 2e94641971195c1a4eb9e1a3fe6d73b9d04ffae0
3
+ Rollup.js v4.6.1
4
+ Thu, 30 Nov 2023 05:22:35 GMT - commit ded37aa8f95d5ba9786fa8903ef3424fd0549c73
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -253,7 +253,13 @@ class Task {
253
253
  return;
254
254
  }
255
255
  this.updateWatchedFiles(result);
256
- this.skipWrite || (await Promise.all(this.outputs.map(output => result.write(output))));
256
+ if (!this.skipWrite) {
257
+ await Promise.all(this.outputs.map(output => result.write(output)));
258
+ if (this.closed) {
259
+ return;
260
+ }
261
+ this.updateWatchedFiles(result);
262
+ }
257
263
  await this.watcher.emitter.emit('event', {
258
264
  code: 'BUNDLE_END',
259
265
  duration: Date.now() - start,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup",
3
- "version": "4.5.2",
3
+ "version": "4.6.1",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -100,18 +100,18 @@
100
100
  "homepage": "https://rollupjs.org/",
101
101
  "optionalDependencies": {
102
102
  "fsevents": "~2.3.2",
103
- "@rollup/rollup-darwin-arm64": "4.5.2",
104
- "@rollup/rollup-android-arm64": "4.5.2",
105
- "@rollup/rollup-win32-arm64-msvc": "4.5.2",
106
- "@rollup/rollup-linux-arm64-gnu": "4.5.2",
107
- "@rollup/rollup-linux-arm64-musl": "4.5.2",
108
- "@rollup/rollup-android-arm-eabi": "4.5.2",
109
- "@rollup/rollup-linux-arm-gnueabihf": "4.5.2",
110
- "@rollup/rollup-win32-ia32-msvc": "4.5.2",
111
- "@rollup/rollup-darwin-x64": "4.5.2",
112
- "@rollup/rollup-win32-x64-msvc": "4.5.2",
113
- "@rollup/rollup-linux-x64-gnu": "4.5.2",
114
- "@rollup/rollup-linux-x64-musl": "4.5.2"
103
+ "@rollup/rollup-darwin-arm64": "4.6.1",
104
+ "@rollup/rollup-android-arm64": "4.6.1",
105
+ "@rollup/rollup-win32-arm64-msvc": "4.6.1",
106
+ "@rollup/rollup-linux-arm64-gnu": "4.6.1",
107
+ "@rollup/rollup-linux-arm64-musl": "4.6.1",
108
+ "@rollup/rollup-android-arm-eabi": "4.6.1",
109
+ "@rollup/rollup-linux-arm-gnueabihf": "4.6.1",
110
+ "@rollup/rollup-win32-ia32-msvc": "4.6.1",
111
+ "@rollup/rollup-darwin-x64": "4.6.1",
112
+ "@rollup/rollup-win32-x64-msvc": "4.6.1",
113
+ "@rollup/rollup-linux-x64-gnu": "4.6.1",
114
+ "@rollup/rollup-linux-x64-musl": "4.6.1"
115
115
  },
116
116
  "devDependenciesComments": {
117
117
  "@rollup/plugin-typescript": "It appears that 11.1.3 breaks sourcemaps"