rollup 4.21.3 → 4.22.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/dist/bin/rollup CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
3
  @license
4
- Rollup.js v4.21.3
5
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
4
+ Rollup.js v4.22.1
5
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
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.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,13 +1,13 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
8
8
  Released under the MIT License.
9
9
  */
10
- import { normalize, getImportPath, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, Program as Program$1, BLANK, logIllegalImportReassignment, logRedeclarationError, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, Property as Property$1, logConstVariableReassignError, ExpressionStatement as ExpressionStatement$1, ArrowFunctionExpression as ArrowFunctionExpression$1, logMissingExport, EMPTY_SET, logCannotCallNamespace, logEval, StaticBlock as StaticBlock$1, BlockStatement as BlockStatement$1, getRollupError, logParseError, logModuleParseError, error, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, EMPTY_OBJECT, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logInvalidFormatForTopLevelAwait, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logCircularReexport, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logMissingNodeBuiltins, logReservedNamespace, 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, LOGLEVEL_DEBUG, logUnknownOption, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, relativeId, 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, augmentLogMessage, 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, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, Program as Program$1, BLANK, logIllegalImportReassignment, logRedeclarationError, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, Property as Property$1, logConstVariableReassignError, ExpressionStatement as ExpressionStatement$1, ArrowFunctionExpression as ArrowFunctionExpression$1, logMissingExport, EMPTY_SET, logCannotCallNamespace, logEval, StaticBlock as StaticBlock$1, BlockStatement as BlockStatement$1, getRollupError, logParseError, logModuleParseError, error, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, EMPTY_OBJECT, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logCircularReexport, logInvalidFormatForTopLevelAwait, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logMissingNodeBuiltins, logReservedNamespace, 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, logUnknownOption, printQuotedStringList, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, relativeId, 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, augmentLogMessage, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, logInvalidExportOptionValue, warnDeprecation, URL_OUTPUT_INTEROP, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_MANUALCHUNKS, 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, { win32, posix, isAbsolute, resolve } from 'path';
13
13
  import { parseAsync, xxhashBase64Url, xxhashBase36, xxhashBase16 } from '../../native.js';
@@ -16,7 +16,7 @@ import { performance } from 'node:perf_hooks';
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.21.3";
19
+ var version = "4.22.1";
20
20
 
21
21
  const comma = ','.charCodeAt(0);
22
22
  const semicolon = ';'.charCodeAt(0);
@@ -4459,36 +4459,6 @@ const builtins = 'arguments Infinity NaN undefined null true false eval uneval i
4459
4459
  const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
4460
4460
  forbiddenIdentifiers.add('');
4461
4461
 
4462
- function createInclusionContext() {
4463
- return {
4464
- brokenFlow: false,
4465
- hasBreak: false,
4466
- hasContinue: false,
4467
- includedCallArguments: new Set(),
4468
- includedLabels: new Set()
4469
- };
4470
- }
4471
- function createHasEffectsContext() {
4472
- return {
4473
- accessed: new PathTracker(),
4474
- assigned: new PathTracker(),
4475
- brokenFlow: false,
4476
- called: new DiscriminatedPathTracker(),
4477
- hasBreak: false,
4478
- hasContinue: false,
4479
- ignore: {
4480
- breaks: false,
4481
- continues: false,
4482
- labels: new Set(),
4483
- returnYield: false,
4484
- this: false
4485
- },
4486
- includedLabels: new Set(),
4487
- instantiated: new DiscriminatedPathTracker(),
4488
- replacedVariableInits: new Map()
4489
- };
4490
- }
4491
-
4492
4462
  function assembleMemberDescriptions(memberDescriptions, inheritedDescriptions = null) {
4493
4463
  return Object.create(inheritedDescriptions, memberDescriptions);
4494
4464
  }
@@ -4770,6 +4740,36 @@ const childNodeKeys = {
4770
4740
  YieldExpression: ['argument']
4771
4741
  };
4772
4742
 
4743
+ function createInclusionContext() {
4744
+ return {
4745
+ brokenFlow: false,
4746
+ hasBreak: false,
4747
+ hasContinue: false,
4748
+ includedCallArguments: new Set(),
4749
+ includedLabels: new Set()
4750
+ };
4751
+ }
4752
+ function createHasEffectsContext() {
4753
+ return {
4754
+ accessed: new PathTracker(),
4755
+ assigned: new PathTracker(),
4756
+ brokenFlow: false,
4757
+ called: new DiscriminatedPathTracker(),
4758
+ hasBreak: false,
4759
+ hasContinue: false,
4760
+ ignore: {
4761
+ breaks: false,
4762
+ continues: false,
4763
+ labels: new Set(),
4764
+ returnYield: false,
4765
+ this: false
4766
+ },
4767
+ includedLabels: new Set(),
4768
+ instantiated: new DiscriminatedPathTracker(),
4769
+ replacedVariableInits: new Map()
4770
+ };
4771
+ }
4772
+
4773
4773
  const INCLUDE_PARAMETERS = 'variables';
4774
4774
  const IS_SKIPPED_CHAIN = Symbol('IS_SKIPPED_CHAIN');
4775
4775
  class NodeBase extends ExpressionEntity {
@@ -5887,6 +5887,7 @@ const knownGlobals = {
5887
5887
  isView: PF,
5888
5888
  prototype: O
5889
5889
  },
5890
+ AggregateError: PC_WITH_ARRAY,
5890
5891
  Atomics: O,
5891
5892
  BigInt: C,
5892
5893
  BigInt64Array: C,
@@ -5910,6 +5911,7 @@ const knownGlobals = {
5910
5911
  escape: PF,
5911
5912
  eval: O,
5912
5913
  EvalError: PC,
5914
+ FinalizationRegistry: C,
5913
5915
  Float32Array: ARRAY_TYPE,
5914
5916
  Float64Array: ARRAY_TYPE,
5915
5917
  Function: C,
@@ -6060,6 +6062,7 @@ const knownGlobals = {
6060
6062
  URIError: PC,
6061
6063
  valueOf: O,
6062
6064
  WeakMap: PC_WITH_ARRAY,
6065
+ WeakRef: C,
6063
6066
  WeakSet: PC_WITH_ARRAY,
6064
6067
  // Additional globals shared by Node and Browser that are not strictly part of the language
6065
6068
  clearInterval: C,
@@ -7047,9 +7050,10 @@ class Identifier extends NodeBase {
7047
7050
  if (!(this.variable instanceof LocalVariable &&
7048
7051
  this.variable.kind &&
7049
7052
  tdzVariableKinds.has(this.variable.kind) &&
7050
- // we ignore possible TDZs due to circular module dependencies as
7051
- // otherwise we get many false positives
7052
- this.variable.module === this.scope.context.module)) {
7053
+ // We ignore modules that did not receive a treeshaking pass yet as that
7054
+ // causes many false positives due to circular dependencies or disabled
7055
+ // moduleSideEffects.
7056
+ this.variable.module.hasTreeShakingPassStarted)) {
7053
7057
  return (this.isTDZAccess = false);
7054
7058
  }
7055
7059
  let decl_id;
@@ -7062,9 +7066,7 @@ class Identifier extends NodeBase {
7062
7066
  // in the same function or at top level of module
7063
7067
  return (this.isTDZAccess = true);
7064
7068
  }
7065
- // We ignore the case where the module is not yet executed because
7066
- // moduleSideEffects are false.
7067
- if (!this.variable.initReached && this.scope.context.module.isExecuted) {
7069
+ if (!this.variable.initReached) {
7068
7070
  // Either a const/let TDZ violation or
7069
7071
  // var use before declaration was encountered.
7070
7072
  return (this.isTDZAccess = true);
@@ -7100,6 +7102,10 @@ class Identifier extends NodeBase {
7100
7102
  applyDeoptimizations() {
7101
7103
  this.deoptimized = true;
7102
7104
  if (this.variable instanceof LocalVariable) {
7105
+ // When accessing a variable from a module without side effects, this
7106
+ // means we use an export of that module and therefore need to potentially
7107
+ // include it in the bundle.
7108
+ this.variable.module.isExecuted = true;
7103
7109
  this.variable.consolidateInitializers();
7104
7110
  this.scope.context.requestTreeshakingPass();
7105
7111
  }
@@ -13833,6 +13839,7 @@ class Module {
13833
13839
  this.dynamicImporters = [];
13834
13840
  this.dynamicImports = [];
13835
13841
  this.execIndex = Infinity;
13842
+ this.hasTreeShakingPassStarted = false;
13836
13843
  this.implicitlyLoadedAfter = new Set();
13837
13844
  this.implicitlyLoadedBefore = new Set();
13838
13845
  this.importDescriptions = new Map();
@@ -20162,6 +20169,7 @@ class Graph {
20162
20169
  this.needsTreeshakingPass = false;
20163
20170
  for (const module of this.modules) {
20164
20171
  if (module.isExecuted) {
20172
+ module.hasTreeShakingPassStarted = true;
20165
20173
  if (module.info.moduleSideEffects === 'no-treeshake') {
20166
20174
  module.includeAllInBundle();
20167
20175
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
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.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
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.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
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.21.3";
34
+ var version = "4.22.1";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -5927,36 +5927,6 @@ const builtins = 'arguments Infinity NaN undefined null true false eval uneval i
5927
5927
  const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
5928
5928
  forbiddenIdentifiers.add('');
5929
5929
 
5930
- function createInclusionContext() {
5931
- return {
5932
- brokenFlow: false,
5933
- hasBreak: false,
5934
- hasContinue: false,
5935
- includedCallArguments: new Set(),
5936
- includedLabels: new Set()
5937
- };
5938
- }
5939
- function createHasEffectsContext() {
5940
- return {
5941
- accessed: new PathTracker(),
5942
- assigned: new PathTracker(),
5943
- brokenFlow: false,
5944
- called: new DiscriminatedPathTracker(),
5945
- hasBreak: false,
5946
- hasContinue: false,
5947
- ignore: {
5948
- breaks: false,
5949
- continues: false,
5950
- labels: new Set(),
5951
- returnYield: false,
5952
- this: false
5953
- },
5954
- includedLabels: new Set(),
5955
- instantiated: new DiscriminatedPathTracker(),
5956
- replacedVariableInits: new Map()
5957
- };
5958
- }
5959
-
5960
5930
  function assembleMemberDescriptions(memberDescriptions, inheritedDescriptions = null) {
5961
5931
  return Object.create(inheritedDescriptions, memberDescriptions);
5962
5932
  }
@@ -6238,6 +6208,36 @@ const childNodeKeys = {
6238
6208
  YieldExpression: ['argument']
6239
6209
  };
6240
6210
 
6211
+ function createInclusionContext() {
6212
+ return {
6213
+ brokenFlow: false,
6214
+ hasBreak: false,
6215
+ hasContinue: false,
6216
+ includedCallArguments: new Set(),
6217
+ includedLabels: new Set()
6218
+ };
6219
+ }
6220
+ function createHasEffectsContext() {
6221
+ return {
6222
+ accessed: new PathTracker(),
6223
+ assigned: new PathTracker(),
6224
+ brokenFlow: false,
6225
+ called: new DiscriminatedPathTracker(),
6226
+ hasBreak: false,
6227
+ hasContinue: false,
6228
+ ignore: {
6229
+ breaks: false,
6230
+ continues: false,
6231
+ labels: new Set(),
6232
+ returnYield: false,
6233
+ this: false
6234
+ },
6235
+ includedLabels: new Set(),
6236
+ instantiated: new DiscriminatedPathTracker(),
6237
+ replacedVariableInits: new Map()
6238
+ };
6239
+ }
6240
+
6241
6241
  const INCLUDE_PARAMETERS = 'variables';
6242
6242
  const IS_SKIPPED_CHAIN = Symbol('IS_SKIPPED_CHAIN');
6243
6243
  class NodeBase extends ExpressionEntity {
@@ -7353,6 +7353,7 @@ const knownGlobals = {
7353
7353
  isView: PF,
7354
7354
  prototype: O
7355
7355
  },
7356
+ AggregateError: PC_WITH_ARRAY,
7356
7357
  Atomics: O,
7357
7358
  BigInt: C,
7358
7359
  BigInt64Array: C,
@@ -7376,6 +7377,7 @@ const knownGlobals = {
7376
7377
  escape: PF,
7377
7378
  eval: O,
7378
7379
  EvalError: PC,
7380
+ FinalizationRegistry: C,
7379
7381
  Float32Array: ARRAY_TYPE,
7380
7382
  Float64Array: ARRAY_TYPE,
7381
7383
  Function: C,
@@ -7526,6 +7528,7 @@ const knownGlobals = {
7526
7528
  URIError: PC,
7527
7529
  valueOf: O,
7528
7530
  WeakMap: PC_WITH_ARRAY,
7531
+ WeakRef: C,
7529
7532
  WeakSet: PC_WITH_ARRAY,
7530
7533
  // Additional globals shared by Node and Browser that are not strictly part of the language
7531
7534
  clearInterval: C,
@@ -8513,9 +8516,10 @@ class Identifier extends NodeBase {
8513
8516
  if (!(this.variable instanceof LocalVariable &&
8514
8517
  this.variable.kind &&
8515
8518
  tdzVariableKinds.has(this.variable.kind) &&
8516
- // we ignore possible TDZs due to circular module dependencies as
8517
- // otherwise we get many false positives
8518
- this.variable.module === this.scope.context.module)) {
8519
+ // We ignore modules that did not receive a treeshaking pass yet as that
8520
+ // causes many false positives due to circular dependencies or disabled
8521
+ // moduleSideEffects.
8522
+ this.variable.module.hasTreeShakingPassStarted)) {
8519
8523
  return (this.isTDZAccess = false);
8520
8524
  }
8521
8525
  let decl_id;
@@ -8528,9 +8532,7 @@ class Identifier extends NodeBase {
8528
8532
  // in the same function or at top level of module
8529
8533
  return (this.isTDZAccess = true);
8530
8534
  }
8531
- // We ignore the case where the module is not yet executed because
8532
- // moduleSideEffects are false.
8533
- if (!this.variable.initReached && this.scope.context.module.isExecuted) {
8535
+ if (!this.variable.initReached) {
8534
8536
  // Either a const/let TDZ violation or
8535
8537
  // var use before declaration was encountered.
8536
8538
  return (this.isTDZAccess = true);
@@ -8566,6 +8568,10 @@ class Identifier extends NodeBase {
8566
8568
  applyDeoptimizations() {
8567
8569
  this.deoptimized = true;
8568
8570
  if (this.variable instanceof LocalVariable) {
8571
+ // When accessing a variable from a module without side effects, this
8572
+ // means we use an export of that module and therefore need to potentially
8573
+ // include it in the bundle.
8574
+ this.variable.module.isExecuted = true;
8569
8575
  this.variable.consolidateInitializers();
8570
8576
  this.scope.context.requestTreeshakingPass();
8571
8577
  }
@@ -15280,6 +15286,7 @@ class Module {
15280
15286
  this.dynamicImporters = [];
15281
15287
  this.dynamicImports = [];
15282
15288
  this.execIndex = Infinity;
15289
+ this.hasTreeShakingPassStarted = false;
15283
15290
  this.implicitlyLoadedAfter = new Set();
15284
15291
  this.implicitlyLoadedBefore = new Set();
15285
15292
  this.importDescriptions = new Map();
@@ -20602,6 +20609,7 @@ class Graph {
20602
20609
  this.needsTreeshakingPass = false;
20603
20610
  for (const module of this.modules) {
20604
20611
  if (module.isExecuted) {
20612
+ module.hasTreeShakingPassStarted = true;
20605
20613
  if (module.info.moduleSideEffects === 'no-treeshake') {
20606
20614
  module.includeAllInBundle();
20607
20615
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.3
4
- Thu, 12 Sep 2024 07:05:19 GMT - commit 9f5a735524a5c56ba61a8dc6989374917f5aceb1
3
+ Rollup.js v4.22.1
4
+ Fri, 20 Sep 2024 08:21:23 GMT - commit 76e962daca5b7352bf199c28fa0a10ad4745c5e7
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.21.3",
3
+ "version": "4.22.1",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -107,28 +107,27 @@
107
107
  "homepage": "https://rollupjs.org/",
108
108
  "optionalDependencies": {
109
109
  "fsevents": "~2.3.2",
110
- "@rollup/rollup-darwin-arm64": "4.21.3",
111
- "@rollup/rollup-android-arm64": "4.21.3",
112
- "@rollup/rollup-win32-arm64-msvc": "4.21.3",
113
- "@rollup/rollup-linux-arm64-gnu": "4.21.3",
114
- "@rollup/rollup-linux-arm64-musl": "4.21.3",
115
- "@rollup/rollup-android-arm-eabi": "4.21.3",
116
- "@rollup/rollup-linux-arm-gnueabihf": "4.21.3",
117
- "@rollup/rollup-linux-arm-musleabihf": "4.21.3",
118
- "@rollup/rollup-win32-ia32-msvc": "4.21.3",
119
- "@rollup/rollup-linux-riscv64-gnu": "4.21.3",
120
- "@rollup/rollup-linux-powerpc64le-gnu": "4.21.3",
121
- "@rollup/rollup-linux-s390x-gnu": "4.21.3",
122
- "@rollup/rollup-darwin-x64": "4.21.3",
123
- "@rollup/rollup-win32-x64-msvc": "4.21.3",
124
- "@rollup/rollup-linux-x64-gnu": "4.21.3",
125
- "@rollup/rollup-linux-x64-musl": "4.21.3"
110
+ "@rollup/rollup-darwin-arm64": "4.22.1",
111
+ "@rollup/rollup-android-arm64": "4.22.1",
112
+ "@rollup/rollup-win32-arm64-msvc": "4.22.1",
113
+ "@rollup/rollup-linux-arm64-gnu": "4.22.1",
114
+ "@rollup/rollup-linux-arm64-musl": "4.22.1",
115
+ "@rollup/rollup-android-arm-eabi": "4.22.1",
116
+ "@rollup/rollup-linux-arm-gnueabihf": "4.22.1",
117
+ "@rollup/rollup-linux-arm-musleabihf": "4.22.1",
118
+ "@rollup/rollup-win32-ia32-msvc": "4.22.1",
119
+ "@rollup/rollup-linux-riscv64-gnu": "4.22.1",
120
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.22.1",
121
+ "@rollup/rollup-linux-s390x-gnu": "4.22.1",
122
+ "@rollup/rollup-darwin-x64": "4.22.1",
123
+ "@rollup/rollup-win32-x64-msvc": "4.22.1",
124
+ "@rollup/rollup-linux-x64-gnu": "4.22.1",
125
+ "@rollup/rollup-linux-x64-musl": "4.22.1"
126
126
  },
127
127
  "dependencies": {
128
128
  "@types/estree": "1.0.5"
129
129
  },
130
130
  "devDependenciesComments": {
131
- "@types/node": "Version 18.19.0 breaks chokidar and vite types",
132
131
  "core-js": "We only update manually as every update requires a snapshot update"
133
132
  },
134
133
  "devDependencies": {
@@ -138,9 +137,10 @@
138
137
  "@codemirror/search": "^6.5.6",
139
138
  "@codemirror/state": "^6.4.1",
140
139
  "@codemirror/view": "^6.33.0",
141
- "@eslint/js": "^9.9.1",
140
+ "@eslint/js": "^9.10.0",
141
+ "@inquirer/prompts": "^6.0.1",
142
142
  "@jridgewell/sourcemap-codec": "^1.5.0",
143
- "@mermaid-js/mermaid-cli": "^10.9.1",
143
+ "@mermaid-js/mermaid-cli": "^11.2.0",
144
144
  "@napi-rs/cli": "^2.18.4",
145
145
  "@rollup/plugin-alias": "^5.1.0",
146
146
  "@rollup/plugin-buble": "^1.0.3",
@@ -151,11 +151,10 @@
151
151
  "@rollup/plugin-terser": "^0.4.4",
152
152
  "@rollup/plugin-typescript": "^11.1.6",
153
153
  "@rollup/pluginutils": "^5.1.0",
154
- "@shikijs/vitepress-twoslash": "^1.16.1",
154
+ "@shikijs/vitepress-twoslash": "^1.17.7",
155
155
  "@types/eslint": "^9.6.1",
156
- "@types/inquirer": "^9.0.7",
157
- "@types/mocha": "^10.0.7",
158
- "@types/node": "~18.18.14",
156
+ "@types/mocha": "^10.0.8",
157
+ "@types/node": "^18.19.50",
159
158
  "@types/semver": "^7.5.8",
160
159
  "@types/yargs-parser": "^21.0.3",
161
160
  "acorn": "^8.12.1",
@@ -164,24 +163,23 @@
164
163
  "builtin-modules": "^4.0.0",
165
164
  "chokidar": "^3.6.0",
166
165
  "colorette": "^2.0.20",
167
- "concurrently": "^8.2.2",
168
- "core-js": "3.36.0",
166
+ "concurrently": "^9.0.1",
167
+ "core-js": "3.38.1",
169
168
  "cross-env": "^7.0.3",
170
169
  "date-time": "^4.0.0",
171
170
  "es5-shim": "^4.6.7",
172
171
  "es6-shim": "^0.35.8",
173
- "eslint": "^9.9.1",
172
+ "eslint": "^9.10.0",
174
173
  "eslint-config-prettier": "^9.1.0",
175
174
  "eslint-plugin-prettier": "^5.2.1",
176
175
  "eslint-plugin-unicorn": "^55.0.0",
177
- "eslint-plugin-vue": "^9.27.0",
176
+ "eslint-plugin-vue": "^9.28.0",
178
177
  "fixturify": "^3.0.0",
179
178
  "flru": "^1.0.2",
180
179
  "fs-extra": "^11.2.0",
181
180
  "github-api": "^3.4.0",
182
181
  "globals": "^15.9.0",
183
- "husky": "^9.1.5",
184
- "inquirer": "^10.2.0",
182
+ "husky": "^9.1.6",
185
183
  "is-reference": "^3.0.2",
186
184
  "lint-staged": "^15.2.10",
187
185
  "locate-character": "^3.0.0",
@@ -196,7 +194,7 @@
196
194
  "pretty-bytes": "^6.1.1",
197
195
  "pretty-ms": "^9.1.0",
198
196
  "requirejs": "^2.3.7",
199
- "rollup": "^4.21.2",
197
+ "rollup": "^4.21.3",
200
198
  "rollup-plugin-license": "^3.5.2",
201
199
  "rollup-plugin-string": "^3.0.0",
202
200
  "semver": "^7.6.3",
@@ -205,13 +203,14 @@
205
203
  "source-map": "^0.7.4",
206
204
  "source-map-support": "^0.5.21",
207
205
  "systemjs": "^6.15.1",
208
- "terser": "^5.31.6",
206
+ "terser": "^5.32.0",
209
207
  "tslib": "^2.7.0",
210
- "typescript": "^5.5.4",
211
- "typescript-eslint": "^8.4.0",
212
- "vite": "^5.4.2",
208
+ "typescript": "^5.6.2",
209
+ "typescript-eslint": "^8.6.0",
210
+ "vite": "^5.4.6",
213
211
  "vitepress": "^1.3.4",
214
- "vue": "^3.4.38",
212
+ "vue": "^3.5.6",
213
+ "vue-tsc": "^2.1.6",
215
214
  "wasm-pack": "^0.13.0",
216
215
  "yargs-parser": "^21.1.1"
217
216
  },
@@ -220,7 +219,8 @@
220
219
  "semver": "^7.6.3",
221
220
  "ws": "^8.18.0"
222
221
  },
223
- "overrides_comments": {
222
+ "comments": {
223
+ "vue-tsc": "This is necessary so that prettier-plugin-organize-imports works correctly in Vue templatges",
224
224
  "ws": "mermaid requires an older 8.13.0 version via puppeteer with vulnerabilities"
225
225
  },
226
226
  "files": [