rollup 4.38.0 → 4.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/rollup CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
3
  @license
4
- Rollup.js v4.38.0
5
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
4
+ Rollup.js v4.40.0
5
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
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.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -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.38.0";
18
+ var version = "4.40.0";
19
19
 
20
20
  const comma = ','.charCodeAt(0);
21
21
  const semicolon = ';'.charCodeAt(0);
@@ -2192,7 +2192,8 @@ function createInclusionContext() {
2192
2192
  hasBreak: false,
2193
2193
  hasContinue: false,
2194
2194
  includedCallArguments: new Set(),
2195
- includedLabels: new Set()
2195
+ includedLabels: new Set(),
2196
+ withinTopLevelAwait: false
2196
2197
  };
2197
2198
  }
2198
2199
  function createHasEffectsContext() {
@@ -11671,7 +11672,7 @@ class AwaitExpression extends NodeBase {
11671
11672
  include(context, includeChildrenRecursively) {
11672
11673
  if (!this.included)
11673
11674
  this.includeNode(context);
11674
- this.argument.include(context, includeChildrenRecursively);
11675
+ this.argument.include({ ...context, withinTopLevelAwait: this.isTopLevelAwait }, includeChildrenRecursively);
11675
11676
  }
11676
11677
  includeNode(context) {
11677
11678
  this.included = true;
@@ -11687,14 +11688,14 @@ class AwaitExpression extends NodeBase {
11687
11688
  this.isTopLevelAwait = true;
11688
11689
  }
11689
11690
  // Thenables need to be included
11690
- this.argument.includePath(THEN_PATH, context);
11691
+ this.argument.includePath(THEN_PATH, { ...context, withinTopLevelAwait: this.isTopLevelAwait });
11691
11692
  }
11692
11693
  includePath(path, context) {
11693
11694
  if (!this.deoptimized)
11694
11695
  this.applyDeoptimizations();
11695
11696
  if (!this.included)
11696
11697
  this.includeNode(context);
11697
- this.argument.includePath(path, context);
11698
+ this.argument.includePath(path, { ...context, withinTopLevelAwait: this.isTopLevelAwait });
11698
11699
  }
11699
11700
  }
11700
11701
  const THEN_PATH = ['then'];
@@ -11918,6 +11919,12 @@ class CallExpressionBase extends NodeBase {
11918
11919
  }
11919
11920
 
11920
11921
  class CallExpression extends CallExpressionBase {
11922
+ get hasCheckedForWarnings() {
11923
+ return isFlagSet(this.flags, 536870912 /* Flag.checkedForWarnings */);
11924
+ }
11925
+ set hasCheckedForWarnings(value) {
11926
+ this.flags = setFlag(this.flags, 536870912 /* Flag.checkedForWarnings */, value);
11927
+ }
11921
11928
  get optional() {
11922
11929
  return isFlagSet(this.flags, 128 /* Flag.optional */);
11923
11930
  }
@@ -11926,15 +11933,6 @@ class CallExpression extends CallExpressionBase {
11926
11933
  }
11927
11934
  bind() {
11928
11935
  super.bind();
11929
- if (this.callee instanceof Identifier) {
11930
- const variable = this.scope.findVariable(this.callee.name);
11931
- if (variable.isNamespace) {
11932
- this.scope.context.log(LOGLEVEL_WARN, logCannotCallNamespace(this.callee.name), this.start);
11933
- }
11934
- if (this.callee.name === 'eval') {
11935
- this.scope.context.log(LOGLEVEL_WARN, logEval(this.scope.context.module.id), this.start);
11936
- }
11937
- }
11938
11936
  this.interaction = {
11939
11937
  args: [
11940
11938
  this.callee instanceof MemberExpression && !this.callee.variable
@@ -12018,6 +12016,16 @@ class CallExpression extends CallExpressionBase {
12018
12016
  renderedSurroundingElement
12019
12017
  });
12020
12018
  renderCallArguments(code, options, this);
12019
+ if (this.callee instanceof Identifier && !this.hasCheckedForWarnings) {
12020
+ this.hasCheckedForWarnings = true;
12021
+ const variable = this.scope.findVariable(this.callee.name);
12022
+ if (variable.isNamespace) {
12023
+ this.scope.context.log(LOGLEVEL_WARN, logCannotCallNamespace(this.callee.name), this.start);
12024
+ }
12025
+ if (this.callee.name === 'eval') {
12026
+ this.scope.context.log(LOGLEVEL_WARN, logEval(this.scope.context.module.id), this.start);
12027
+ }
12028
+ }
12021
12029
  }
12022
12030
  applyDeoptimizations() {
12023
12031
  this.deoptimized = true;
@@ -12920,19 +12928,23 @@ class ImportExpression extends NodeBase {
12920
12928
  this.resolution = null;
12921
12929
  this.resolutionString = null;
12922
12930
  }
12931
+ get withinTopLevelAwait() {
12932
+ return isFlagSet(this.flags, 268435456 /* Flag.withinTopLevelAwait */);
12933
+ }
12934
+ set withinTopLevelAwait(value) {
12935
+ this.flags = setFlag(this.flags, 268435456 /* Flag.withinTopLevelAwait */, value);
12936
+ }
12923
12937
  // Do not bind attributes
12924
12938
  bind() {
12925
12939
  this.source.bind();
12926
12940
  }
12927
- get isFollowingTopLevelAwait() {
12928
- return this.parent instanceof AwaitExpression && this.parent.isTopLevelAwait;
12929
- }
12930
12941
  /**
12931
12942
  * Get imported variables for deterministic usage, valid cases are:
12932
12943
  *
12933
- * - `const { foo } = await import('bar')`.
12934
- * - `(await import('bar')).foo`
12935
- * - `import('bar').then(({ foo }) => {})`
12944
+ * 1. `const { foo } = await import('bar')`.
12945
+ * 2. `(await import('bar')).foo`
12946
+ * 3. `import('bar').then((m) => m.foo)`
12947
+ * 4. `import('bar').then(({ foo }) => {})`
12936
12948
  *
12937
12949
  * Returns empty array if it's side-effect only import.
12938
12950
  * Returns undefined if it's not fully deterministic.
@@ -12968,7 +12980,6 @@ class ImportExpression extends NodeBase {
12968
12980
  }
12969
12981
  return;
12970
12982
  }
12971
- // Case 3: import('bar').then(({ foo }) => {})
12972
12983
  if (parent1 instanceof MemberExpression) {
12973
12984
  const callExpression = parent1.parent;
12974
12985
  const property = parent1.property;
@@ -12987,18 +12998,38 @@ class ImportExpression extends NodeBase {
12987
12998
  if (callExpression.arguments.length === 0) {
12988
12999
  return EMPTY_ARRAY;
12989
13000
  }
12990
- const argument = callExpression.arguments[0];
13001
+ const thenCallback = callExpression.arguments[0];
12991
13002
  if (callExpression.arguments.length !== 1 ||
12992
- !(argument instanceof ArrowFunctionExpression || argument instanceof FunctionExpression)) {
13003
+ !(thenCallback instanceof ArrowFunctionExpression ||
13004
+ thenCallback instanceof FunctionExpression)) {
12993
13005
  return;
12994
13006
  }
12995
13007
  // Side-effect only: import('bar').then(() => {})
12996
- if (argument.params.length === 0) {
13008
+ if (thenCallback.params.length === 0) {
12997
13009
  return EMPTY_ARRAY;
12998
13010
  }
12999
- const declaration = argument.params[0];
13000
- if (argument.params.length === 1 && declaration instanceof ObjectPattern) {
13001
- return getDeterministicObjectDestructure(declaration);
13011
+ if (thenCallback.params.length === 1) {
13012
+ // Promises .then() can only have one argument so only look at first one
13013
+ const declaration = thenCallback.params[0];
13014
+ // Case 3: import('bar').then(m => m.foo)
13015
+ if (declaration instanceof Identifier) {
13016
+ const starName = declaration.name;
13017
+ const memberExpression = thenCallback.body;
13018
+ if (!(memberExpression instanceof MemberExpression) ||
13019
+ memberExpression.computed ||
13020
+ !(memberExpression.property instanceof Identifier)) {
13021
+ return;
13022
+ }
13023
+ const returnVariable = memberExpression.object;
13024
+ if (!(returnVariable instanceof Identifier) || returnVariable.name !== starName) {
13025
+ return;
13026
+ }
13027
+ return [memberExpression.property.name];
13028
+ }
13029
+ // Case 4: import('bar').then(({ foo }) => {})
13030
+ if (declaration instanceof ObjectPattern) {
13031
+ return getDeterministicObjectDestructure(declaration);
13032
+ }
13002
13033
  }
13003
13034
  return;
13004
13035
  }
@@ -13008,17 +13039,18 @@ class ImportExpression extends NodeBase {
13008
13039
  }
13009
13040
  include(context, includeChildrenRecursively) {
13010
13041
  if (!this.included)
13011
- this.includeNode();
13042
+ this.includeNode(context);
13012
13043
  this.source.include(context, includeChildrenRecursively);
13013
13044
  }
13014
- includeNode() {
13045
+ includeNode(context) {
13015
13046
  this.included = true;
13047
+ this.withinTopLevelAwait = context.withinTopLevelAwait;
13016
13048
  this.scope.context.includeDynamicImport(this);
13017
13049
  this.scope.addAccessedDynamicImport(this);
13018
13050
  }
13019
- includePath(path) {
13051
+ includePath(path, context) {
13020
13052
  if (!this.included)
13021
- this.includeNode();
13053
+ this.includeNode(context);
13022
13054
  // Technically, this is not correct as dynamic imports return a Promise.
13023
13055
  if (this.hasUnknownAccessedKey)
13024
13056
  return;
@@ -14663,15 +14695,14 @@ SwitchStatement.prototype.includeNode = onlyIncludeSelfNoDeoptimize;
14663
14695
  SwitchStatement.prototype.applyDeoptimizations = doNotDeoptimize;
14664
14696
 
14665
14697
  class TaggedTemplateExpression extends CallExpressionBase {
14698
+ get hasCheckedForWarnings() {
14699
+ return isFlagSet(this.flags, 536870912 /* Flag.checkedForWarnings */);
14700
+ }
14701
+ set hasCheckedForWarnings(value) {
14702
+ this.flags = setFlag(this.flags, 536870912 /* Flag.checkedForWarnings */, value);
14703
+ }
14666
14704
  bind() {
14667
14705
  super.bind();
14668
- if (this.tag.type === Identifier$1) {
14669
- const name = this.tag.name;
14670
- const variable = this.scope.findVariable(name);
14671
- if (variable.isNamespace) {
14672
- this.scope.context.log(LOGLEVEL_WARN, logCannotCallNamespace(name), this.start);
14673
- }
14674
- }
14675
14706
  }
14676
14707
  hasEffects(context) {
14677
14708
  if (!this.deoptimized)
@@ -14710,6 +14741,14 @@ class TaggedTemplateExpression extends CallExpressionBase {
14710
14741
  render(code, options) {
14711
14742
  this.tag.render(code, options, { isCalleeOfRenderedParent: true });
14712
14743
  this.quasi.render(code, options);
14744
+ if (!this.hasCheckedForWarnings && this.tag.type === Identifier$1) {
14745
+ this.hasCheckedForWarnings = true;
14746
+ const name = this.tag.name;
14747
+ const variable = this.scope.findVariable(name);
14748
+ if (variable.isNamespace) {
14749
+ this.scope.context.log(LOGLEVEL_WARN, logCannotCallNamespace(name), this.start);
14750
+ }
14751
+ }
14713
14752
  }
14714
14753
  applyDeoptimizations() {
14715
14754
  this.deoptimized = true;
@@ -16931,6 +16970,9 @@ class Module {
16931
16970
  this.ast.include(context, false);
16932
16971
  }
16933
16972
  includeAllExports(includeNamespaceMembers) {
16973
+ if (includeNamespaceMembers) {
16974
+ this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces());
16975
+ }
16934
16976
  if (this.allExportsIncluded)
16935
16977
  return;
16936
16978
  this.allExportsIncluded = true;
@@ -16959,9 +17001,6 @@ class Module {
16959
17001
  }
16960
17002
  }
16961
17003
  }
16962
- if (includeNamespaceMembers) {
16963
- this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces());
16964
- }
16965
17004
  }
16966
17005
  includeAllInBundle() {
16967
17006
  this.ast.include(createInclusionContext(), true);
@@ -17438,7 +17477,7 @@ class Module {
17438
17477
  if (resolution instanceof Module) {
17439
17478
  if (!resolution.includedDynamicImporters.includes(this)) {
17440
17479
  resolution.includedDynamicImporters.push(this);
17441
- if (node.isFollowingTopLevelAwait) {
17480
+ if (node.withinTopLevelAwait) {
17442
17481
  resolution.includedDirectTopLevelAwaitingDynamicImporters.add(this);
17443
17482
  }
17444
17483
  }
@@ -17964,6 +18003,8 @@ class Chunk {
17964
18003
  this.renderedModules = Object.create(null);
17965
18004
  this.sortedExportNames = null;
17966
18005
  this.strictFacade = false;
18006
+ /** Modules with 'allow-extension' that should have preserved exports within the chunk */
18007
+ this.allowExtensionModules = new Set();
17967
18008
  this.execIndex = orderedModules.length > 0 ? orderedModules[0].execIndex : Infinity;
17968
18009
  const chunkModules = new Set(orderedModules);
17969
18010
  for (const module of orderedModules) {
@@ -18069,6 +18110,16 @@ class Chunk {
18069
18110
  remainingExports.delete(variable);
18070
18111
  }
18071
18112
  }
18113
+ for (const module of this.allowExtensionModules) {
18114
+ const exportNamesByVariable = module.getExportNamesByVariable();
18115
+ for (const [variable, exportNames] of exportNamesByVariable) {
18116
+ this.exportNamesByVariable.set(variable, [...exportNames]);
18117
+ for (const exportName of exportNames) {
18118
+ this.exportsByName.set(exportName, variable);
18119
+ }
18120
+ remainingExports.delete(variable);
18121
+ }
18122
+ }
18072
18123
  if (this.outputOptions.minifyInternalExports) {
18073
18124
  assignExportsToMangledNames(remainingExports, this.exportsByName, this.exportNamesByVariable);
18074
18125
  }
@@ -18083,16 +18134,19 @@ class Chunk {
18083
18134
  const entryModules = new Set([...this.entryModules, ...this.implicitEntryModules]);
18084
18135
  const exposedVariables = new Set(this.dynamicEntryModules.map(({ namespace }) => namespace));
18085
18136
  for (const module of entryModules) {
18086
- if (module.preserveSignature) {
18087
- for (const exportedVariable of module.getExportNamesByVariable().keys()) {
18088
- // We need to expose all entry exports from this chunk
18089
- if (this.chunkByModule.get(exportedVariable.module) === this) {
18090
- exposedVariables.add(exportedVariable);
18137
+ if (module.preserveSignature === 'allow-extension') {
18138
+ const canPreserveExports = this.canPreserveModuleExports(module);
18139
+ if (canPreserveExports) {
18140
+ this.allowExtensionModules.add(module);
18141
+ if (!this.facadeModule) {
18142
+ this.facadeModule = module;
18143
+ this.strictFacade = false;
18144
+ this.assignFacadeName({}, module, this.outputOptions.preserveModules);
18091
18145
  }
18146
+ this.facadeChunkByModule.set(module, this);
18147
+ continue;
18092
18148
  }
18093
18149
  }
18094
- }
18095
- for (const module of entryModules) {
18096
18150
  const requiredFacades = Array.from(new Set(module.chunkNames.filter(({ isUserDefined }) => isUserDefined).map(({ name }) => name)),
18097
18151
  // mapping must run after Set 'name' dedupe
18098
18152
  name => ({
@@ -18147,6 +18201,26 @@ class Chunk {
18147
18201
  }
18148
18202
  return facades;
18149
18203
  }
18204
+ canPreserveModuleExports(module) {
18205
+ const exportNamesByVariable = module.getExportNamesByVariable();
18206
+ // Check for conflicts - an export name is a conflict if it points to a different module or definition
18207
+ for (const [variable, exportNames] of exportNamesByVariable) {
18208
+ for (const exportName of exportNames) {
18209
+ const existingVariable = this.exportsByName.get(exportName);
18210
+ // It's ok if the same export name in two modules references the exact same variable
18211
+ if (existingVariable && existingVariable !== variable) {
18212
+ return false;
18213
+ }
18214
+ }
18215
+ }
18216
+ // No actual conflicts found, add export names for future conflict checks
18217
+ for (const [variable, exportNames] of exportNamesByVariable) {
18218
+ for (const exportName of exportNames) {
18219
+ this.exportsByName.set(exportName, variable);
18220
+ }
18221
+ }
18222
+ return true;
18223
+ }
18150
18224
  getChunkName() {
18151
18225
  return (this.name ??= this.outputOptions.sanitizeFileName(this.getFallbackChunkName()));
18152
18226
  }
@@ -21824,8 +21898,6 @@ function ensureArray(items) {
21824
21898
  return [];
21825
21899
  }
21826
21900
 
21827
- const FALLBACK_TRUE = 1;
21828
- const FALLBACK_FALSE = 0;
21829
21901
  function getMatcherString(glob, cwd) {
21830
21902
  if (glob.startsWith('**') || isAbsolute$1(glob)) {
21831
21903
  return normalize(glob);
@@ -21871,7 +21943,7 @@ function createFilter(exclude, include) {
21871
21943
  if (include?.some(filter => filter(input))) {
21872
21944
  return true;
21873
21945
  }
21874
- return !!include && include.length > 0 ? FALLBACK_FALSE : FALLBACK_TRUE;
21946
+ return !(include && include.length > 0);
21875
21947
  };
21876
21948
  }
21877
21949
  function normalizeFilter(filter) {
@@ -21882,7 +21954,7 @@ function normalizeFilter(filter) {
21882
21954
  }
21883
21955
  if (Array.isArray(filter)) {
21884
21956
  return {
21885
- include: ensureArray(filter)
21957
+ include: filter
21886
21958
  };
21887
21959
  }
21888
21960
  return {
@@ -21918,18 +21990,13 @@ function createFilterForTransform(idFilter, codeFilter) {
21918
21990
  return (id, code) => {
21919
21991
  let fallback = true;
21920
21992
  if (idFilterFunction) {
21921
- const idResult = idFilterFunction(id);
21922
- if (typeof idResult === 'boolean') {
21923
- return idResult;
21924
- }
21925
- fallback &&= !!idResult;
21993
+ fallback &&= idFilterFunction(id);
21994
+ }
21995
+ if (!fallback) {
21996
+ return false;
21926
21997
  }
21927
21998
  if (codeFilterFunction) {
21928
- const codeResult = codeFilterFunction(code);
21929
- if (typeof codeResult === 'boolean') {
21930
- return codeResult;
21931
- }
21932
- fallback &&= !!codeResult;
21999
+ fallback &&= codeFilterFunction(code);
21933
22000
  }
21934
22001
  return fallback;
21935
22002
  };
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
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.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.d.ts CHANGED
@@ -545,7 +545,7 @@ export type HookFilterExtension<K extends keyof FunctionPluginHooks> = K extends
545
545
  : K extends 'load'
546
546
  ? { filter?: Pick<HookFilter, 'id'> }
547
547
  : K extends 'resolveId'
548
- ? { filter?: { id: StringFilter<RegExp> } }
548
+ ? { filter?: { id?: StringFilter<RegExp> } }
549
549
  : // eslint-disable-next-line @typescript-eslint/no-empty-object-type
550
550
  {};
551
551
 
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
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.38.0";
20
+ var version = "4.40.0";
21
21
 
22
22
  function ensureArray$1(items) {
23
23
  if (Array.isArray(items)) {
@@ -3071,8 +3071,6 @@ function requirePicomatch () {
3071
3071
  var picomatchExports = /*@__PURE__*/ requirePicomatch();
3072
3072
  const pm = /*@__PURE__*/getDefaultExportFromCjs(picomatchExports);
3073
3073
 
3074
- const FALLBACK_TRUE = 1;
3075
- const FALLBACK_FALSE = 0;
3076
3074
  function getMatcherString$1(glob, cwd) {
3077
3075
  if (glob.startsWith('**') || parseAst_js.isAbsolute(glob)) {
3078
3076
  return parseAst_js.normalize(glob);
@@ -3118,7 +3116,7 @@ function createFilter$1(exclude, include) {
3118
3116
  if (include?.some(filter => filter(input))) {
3119
3117
  return true;
3120
3118
  }
3121
- return !!include && include.length > 0 ? FALLBACK_FALSE : FALLBACK_TRUE;
3119
+ return !(include && include.length > 0);
3122
3120
  };
3123
3121
  }
3124
3122
  function normalizeFilter(filter) {
@@ -3129,7 +3127,7 @@ function normalizeFilter(filter) {
3129
3127
  }
3130
3128
  if (Array.isArray(filter)) {
3131
3129
  return {
3132
- include: ensureArray$1(filter)
3130
+ include: filter
3133
3131
  };
3134
3132
  }
3135
3133
  return {
@@ -3165,18 +3163,13 @@ function createFilterForTransform(idFilter, codeFilter) {
3165
3163
  return (id, code) => {
3166
3164
  let fallback = true;
3167
3165
  if (idFilterFunction) {
3168
- const idResult = idFilterFunction(id);
3169
- if (typeof idResult === 'boolean') {
3170
- return idResult;
3171
- }
3172
- fallback &&= !!idResult;
3166
+ fallback &&= idFilterFunction(id);
3167
+ }
3168
+ if (!fallback) {
3169
+ return false;
3173
3170
  }
3174
3171
  if (codeFilterFunction) {
3175
- const codeResult = codeFilterFunction(code);
3176
- if (typeof codeResult === 'boolean') {
3177
- return codeResult;
3178
- }
3179
- fallback &&= !!codeResult;
3172
+ fallback &&= codeFilterFunction(code);
3180
3173
  }
3181
3174
  return fallback;
3182
3175
  };
@@ -5969,7 +5962,8 @@ function createInclusionContext() {
5969
5962
  hasBreak: false,
5970
5963
  hasContinue: false,
5971
5964
  includedCallArguments: new Set(),
5972
- includedLabels: new Set()
5965
+ includedLabels: new Set(),
5966
+ withinTopLevelAwait: false
5973
5967
  };
5974
5968
  }
5975
5969
  function createHasEffectsContext() {
@@ -13272,7 +13266,7 @@ class AwaitExpression extends NodeBase {
13272
13266
  include(context, includeChildrenRecursively) {
13273
13267
  if (!this.included)
13274
13268
  this.includeNode(context);
13275
- this.argument.include(context, includeChildrenRecursively);
13269
+ this.argument.include({ ...context, withinTopLevelAwait: this.isTopLevelAwait }, includeChildrenRecursively);
13276
13270
  }
13277
13271
  includeNode(context) {
13278
13272
  this.included = true;
@@ -13288,14 +13282,14 @@ class AwaitExpression extends NodeBase {
13288
13282
  this.isTopLevelAwait = true;
13289
13283
  }
13290
13284
  // Thenables need to be included
13291
- this.argument.includePath(THEN_PATH, context);
13285
+ this.argument.includePath(THEN_PATH, { ...context, withinTopLevelAwait: this.isTopLevelAwait });
13292
13286
  }
13293
13287
  includePath(path, context) {
13294
13288
  if (!this.deoptimized)
13295
13289
  this.applyDeoptimizations();
13296
13290
  if (!this.included)
13297
13291
  this.includeNode(context);
13298
- this.argument.includePath(path, context);
13292
+ this.argument.includePath(path, { ...context, withinTopLevelAwait: this.isTopLevelAwait });
13299
13293
  }
13300
13294
  }
13301
13295
  const THEN_PATH = ['then'];
@@ -13519,6 +13513,12 @@ class CallExpressionBase extends NodeBase {
13519
13513
  }
13520
13514
 
13521
13515
  class CallExpression extends CallExpressionBase {
13516
+ get hasCheckedForWarnings() {
13517
+ return isFlagSet(this.flags, 536870912 /* Flag.checkedForWarnings */);
13518
+ }
13519
+ set hasCheckedForWarnings(value) {
13520
+ this.flags = setFlag(this.flags, 536870912 /* Flag.checkedForWarnings */, value);
13521
+ }
13522
13522
  get optional() {
13523
13523
  return isFlagSet(this.flags, 128 /* Flag.optional */);
13524
13524
  }
@@ -13527,15 +13527,6 @@ class CallExpression extends CallExpressionBase {
13527
13527
  }
13528
13528
  bind() {
13529
13529
  super.bind();
13530
- if (this.callee instanceof Identifier) {
13531
- const variable = this.scope.findVariable(this.callee.name);
13532
- if (variable.isNamespace) {
13533
- this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logCannotCallNamespace(this.callee.name), this.start);
13534
- }
13535
- if (this.callee.name === 'eval') {
13536
- this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logEval(this.scope.context.module.id), this.start);
13537
- }
13538
- }
13539
13530
  this.interaction = {
13540
13531
  args: [
13541
13532
  this.callee instanceof MemberExpression && !this.callee.variable
@@ -13619,6 +13610,16 @@ class CallExpression extends CallExpressionBase {
13619
13610
  renderedSurroundingElement
13620
13611
  });
13621
13612
  renderCallArguments(code, options, this);
13613
+ if (this.callee instanceof Identifier && !this.hasCheckedForWarnings) {
13614
+ this.hasCheckedForWarnings = true;
13615
+ const variable = this.scope.findVariable(this.callee.name);
13616
+ if (variable.isNamespace) {
13617
+ this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logCannotCallNamespace(this.callee.name), this.start);
13618
+ }
13619
+ if (this.callee.name === 'eval') {
13620
+ this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logEval(this.scope.context.module.id), this.start);
13621
+ }
13622
+ }
13622
13623
  }
13623
13624
  applyDeoptimizations() {
13624
13625
  this.deoptimized = true;
@@ -14521,19 +14522,23 @@ class ImportExpression extends NodeBase {
14521
14522
  this.resolution = null;
14522
14523
  this.resolutionString = null;
14523
14524
  }
14525
+ get withinTopLevelAwait() {
14526
+ return isFlagSet(this.flags, 268435456 /* Flag.withinTopLevelAwait */);
14527
+ }
14528
+ set withinTopLevelAwait(value) {
14529
+ this.flags = setFlag(this.flags, 268435456 /* Flag.withinTopLevelAwait */, value);
14530
+ }
14524
14531
  // Do not bind attributes
14525
14532
  bind() {
14526
14533
  this.source.bind();
14527
14534
  }
14528
- get isFollowingTopLevelAwait() {
14529
- return this.parent instanceof AwaitExpression && this.parent.isTopLevelAwait;
14530
- }
14531
14535
  /**
14532
14536
  * Get imported variables for deterministic usage, valid cases are:
14533
14537
  *
14534
- * - `const { foo } = await import('bar')`.
14535
- * - `(await import('bar')).foo`
14536
- * - `import('bar').then(({ foo }) => {})`
14538
+ * 1. `const { foo } = await import('bar')`.
14539
+ * 2. `(await import('bar')).foo`
14540
+ * 3. `import('bar').then((m) => m.foo)`
14541
+ * 4. `import('bar').then(({ foo }) => {})`
14537
14542
  *
14538
14543
  * Returns empty array if it's side-effect only import.
14539
14544
  * Returns undefined if it's not fully deterministic.
@@ -14569,7 +14574,6 @@ class ImportExpression extends NodeBase {
14569
14574
  }
14570
14575
  return;
14571
14576
  }
14572
- // Case 3: import('bar').then(({ foo }) => {})
14573
14577
  if (parent1 instanceof MemberExpression) {
14574
14578
  const callExpression = parent1.parent;
14575
14579
  const property = parent1.property;
@@ -14588,18 +14592,38 @@ class ImportExpression extends NodeBase {
14588
14592
  if (callExpression.arguments.length === 0) {
14589
14593
  return parseAst_js.EMPTY_ARRAY;
14590
14594
  }
14591
- const argument = callExpression.arguments[0];
14595
+ const thenCallback = callExpression.arguments[0];
14592
14596
  if (callExpression.arguments.length !== 1 ||
14593
- !(argument instanceof ArrowFunctionExpression || argument instanceof FunctionExpression)) {
14597
+ !(thenCallback instanceof ArrowFunctionExpression ||
14598
+ thenCallback instanceof FunctionExpression)) {
14594
14599
  return;
14595
14600
  }
14596
14601
  // Side-effect only: import('bar').then(() => {})
14597
- if (argument.params.length === 0) {
14602
+ if (thenCallback.params.length === 0) {
14598
14603
  return parseAst_js.EMPTY_ARRAY;
14599
14604
  }
14600
- const declaration = argument.params[0];
14601
- if (argument.params.length === 1 && declaration instanceof ObjectPattern) {
14602
- return getDeterministicObjectDestructure(declaration);
14605
+ if (thenCallback.params.length === 1) {
14606
+ // Promises .then() can only have one argument so only look at first one
14607
+ const declaration = thenCallback.params[0];
14608
+ // Case 3: import('bar').then(m => m.foo)
14609
+ if (declaration instanceof Identifier) {
14610
+ const starName = declaration.name;
14611
+ const memberExpression = thenCallback.body;
14612
+ if (!(memberExpression instanceof MemberExpression) ||
14613
+ memberExpression.computed ||
14614
+ !(memberExpression.property instanceof Identifier)) {
14615
+ return;
14616
+ }
14617
+ const returnVariable = memberExpression.object;
14618
+ if (!(returnVariable instanceof Identifier) || returnVariable.name !== starName) {
14619
+ return;
14620
+ }
14621
+ return [memberExpression.property.name];
14622
+ }
14623
+ // Case 4: import('bar').then(({ foo }) => {})
14624
+ if (declaration instanceof ObjectPattern) {
14625
+ return getDeterministicObjectDestructure(declaration);
14626
+ }
14603
14627
  }
14604
14628
  return;
14605
14629
  }
@@ -14609,17 +14633,18 @@ class ImportExpression extends NodeBase {
14609
14633
  }
14610
14634
  include(context, includeChildrenRecursively) {
14611
14635
  if (!this.included)
14612
- this.includeNode();
14636
+ this.includeNode(context);
14613
14637
  this.source.include(context, includeChildrenRecursively);
14614
14638
  }
14615
- includeNode() {
14639
+ includeNode(context) {
14616
14640
  this.included = true;
14641
+ this.withinTopLevelAwait = context.withinTopLevelAwait;
14617
14642
  this.scope.context.includeDynamicImport(this);
14618
14643
  this.scope.addAccessedDynamicImport(this);
14619
14644
  }
14620
- includePath(path) {
14645
+ includePath(path, context) {
14621
14646
  if (!this.included)
14622
- this.includeNode();
14647
+ this.includeNode(context);
14623
14648
  // Technically, this is not correct as dynamic imports return a Promise.
14624
14649
  if (this.hasUnknownAccessedKey)
14625
14650
  return;
@@ -16264,15 +16289,14 @@ SwitchStatement.prototype.includeNode = onlyIncludeSelfNoDeoptimize;
16264
16289
  SwitchStatement.prototype.applyDeoptimizations = doNotDeoptimize;
16265
16290
 
16266
16291
  class TaggedTemplateExpression extends CallExpressionBase {
16292
+ get hasCheckedForWarnings() {
16293
+ return isFlagSet(this.flags, 536870912 /* Flag.checkedForWarnings */);
16294
+ }
16295
+ set hasCheckedForWarnings(value) {
16296
+ this.flags = setFlag(this.flags, 536870912 /* Flag.checkedForWarnings */, value);
16297
+ }
16267
16298
  bind() {
16268
16299
  super.bind();
16269
- if (this.tag.type === parseAst_js.Identifier) {
16270
- const name = this.tag.name;
16271
- const variable = this.scope.findVariable(name);
16272
- if (variable.isNamespace) {
16273
- this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logCannotCallNamespace(name), this.start);
16274
- }
16275
- }
16276
16300
  }
16277
16301
  hasEffects(context) {
16278
16302
  if (!this.deoptimized)
@@ -16311,6 +16335,14 @@ class TaggedTemplateExpression extends CallExpressionBase {
16311
16335
  render(code, options) {
16312
16336
  this.tag.render(code, options, { isCalleeOfRenderedParent: true });
16313
16337
  this.quasi.render(code, options);
16338
+ if (!this.hasCheckedForWarnings && this.tag.type === parseAst_js.Identifier) {
16339
+ this.hasCheckedForWarnings = true;
16340
+ const name = this.tag.name;
16341
+ const variable = this.scope.findVariable(name);
16342
+ if (variable.isNamespace) {
16343
+ this.scope.context.log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logCannotCallNamespace(name), this.start);
16344
+ }
16345
+ }
16314
16346
  }
16315
16347
  applyDeoptimizations() {
16316
16348
  this.deoptimized = true;
@@ -18525,6 +18557,9 @@ class Module {
18525
18557
  this.ast.include(context, false);
18526
18558
  }
18527
18559
  includeAllExports(includeNamespaceMembers) {
18560
+ if (includeNamespaceMembers) {
18561
+ this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces());
18562
+ }
18528
18563
  if (this.allExportsIncluded)
18529
18564
  return;
18530
18565
  this.allExportsIncluded = true;
@@ -18553,9 +18588,6 @@ class Module {
18553
18588
  }
18554
18589
  }
18555
18590
  }
18556
- if (includeNamespaceMembers) {
18557
- this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces());
18558
- }
18559
18591
  }
18560
18592
  includeAllInBundle() {
18561
18593
  this.ast.include(createInclusionContext(), true);
@@ -19032,7 +19064,7 @@ class Module {
19032
19064
  if (resolution instanceof Module) {
19033
19065
  if (!resolution.includedDynamicImporters.includes(this)) {
19034
19066
  resolution.includedDynamicImporters.push(this);
19035
- if (node.isFollowingTopLevelAwait) {
19067
+ if (node.withinTopLevelAwait) {
19036
19068
  resolution.includedDirectTopLevelAwaitingDynamicImporters.add(this);
19037
19069
  }
19038
19070
  }
@@ -19449,6 +19481,8 @@ class Chunk {
19449
19481
  this.renderedModules = Object.create(null);
19450
19482
  this.sortedExportNames = null;
19451
19483
  this.strictFacade = false;
19484
+ /** Modules with 'allow-extension' that should have preserved exports within the chunk */
19485
+ this.allowExtensionModules = new Set();
19452
19486
  this.execIndex = orderedModules.length > 0 ? orderedModules[0].execIndex : Infinity;
19453
19487
  const chunkModules = new Set(orderedModules);
19454
19488
  for (const module of orderedModules) {
@@ -19554,6 +19588,16 @@ class Chunk {
19554
19588
  remainingExports.delete(variable);
19555
19589
  }
19556
19590
  }
19591
+ for (const module of this.allowExtensionModules) {
19592
+ const exportNamesByVariable = module.getExportNamesByVariable();
19593
+ for (const [variable, exportNames] of exportNamesByVariable) {
19594
+ this.exportNamesByVariable.set(variable, [...exportNames]);
19595
+ for (const exportName of exportNames) {
19596
+ this.exportsByName.set(exportName, variable);
19597
+ }
19598
+ remainingExports.delete(variable);
19599
+ }
19600
+ }
19557
19601
  if (this.outputOptions.minifyInternalExports) {
19558
19602
  assignExportsToMangledNames(remainingExports, this.exportsByName, this.exportNamesByVariable);
19559
19603
  }
@@ -19568,16 +19612,19 @@ class Chunk {
19568
19612
  const entryModules = new Set([...this.entryModules, ...this.implicitEntryModules]);
19569
19613
  const exposedVariables = new Set(this.dynamicEntryModules.map(({ namespace }) => namespace));
19570
19614
  for (const module of entryModules) {
19571
- if (module.preserveSignature) {
19572
- for (const exportedVariable of module.getExportNamesByVariable().keys()) {
19573
- // We need to expose all entry exports from this chunk
19574
- if (this.chunkByModule.get(exportedVariable.module) === this) {
19575
- exposedVariables.add(exportedVariable);
19615
+ if (module.preserveSignature === 'allow-extension') {
19616
+ const canPreserveExports = this.canPreserveModuleExports(module);
19617
+ if (canPreserveExports) {
19618
+ this.allowExtensionModules.add(module);
19619
+ if (!this.facadeModule) {
19620
+ this.facadeModule = module;
19621
+ this.strictFacade = false;
19622
+ this.assignFacadeName({}, module, this.outputOptions.preserveModules);
19576
19623
  }
19624
+ this.facadeChunkByModule.set(module, this);
19625
+ continue;
19577
19626
  }
19578
19627
  }
19579
- }
19580
- for (const module of entryModules) {
19581
19628
  const requiredFacades = Array.from(new Set(module.chunkNames.filter(({ isUserDefined }) => isUserDefined).map(({ name }) => name)),
19582
19629
  // mapping must run after Set 'name' dedupe
19583
19630
  name => ({
@@ -19632,6 +19679,26 @@ class Chunk {
19632
19679
  }
19633
19680
  return facades;
19634
19681
  }
19682
+ canPreserveModuleExports(module) {
19683
+ const exportNamesByVariable = module.getExportNamesByVariable();
19684
+ // Check for conflicts - an export name is a conflict if it points to a different module or definition
19685
+ for (const [variable, exportNames] of exportNamesByVariable) {
19686
+ for (const exportName of exportNames) {
19687
+ const existingVariable = this.exportsByName.get(exportName);
19688
+ // It's ok if the same export name in two modules references the exact same variable
19689
+ if (existingVariable && existingVariable !== variable) {
19690
+ return false;
19691
+ }
19692
+ }
19693
+ }
19694
+ // No actual conflicts found, add export names for future conflict checks
19695
+ for (const [variable, exportNames] of exportNamesByVariable) {
19696
+ for (const exportName of exportNames) {
19697
+ this.exportsByName.set(exportName, variable);
19698
+ }
19699
+ }
19700
+ return true;
19701
+ }
19635
19702
  getChunkName() {
19636
19703
  return (this.name ??= this.outputOptions.sanitizeFileName(this.getFallbackChunkName()));
19637
19704
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.38.0
4
- Sat, 29 Mar 2025 06:28:32 GMT - commit 22b64bcc511dfc40ce463e3f662a928915908713
3
+ Rollup.js v4.40.0
4
+ Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
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.38.0",
3
+ "version": "4.40.0",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -78,8 +78,6 @@
78
78
  "prepublish:napi": "napi prepublish --skip-gh-release",
79
79
  "release": "node scripts/prepare-release.js",
80
80
  "release:docs": "git fetch --update-head-ok origin master:master && git branch --force documentation-published master && git push origin documentation-published",
81
- "check-audit": "check-audit",
82
- "resolve-audit": "resolve-audit",
83
81
  "test": "npm run build && npm run test:all",
84
82
  "test:update-snapshots": "node scripts/update-snapshots.js",
85
83
  "test:cjs": "npm run build:cjs && npm run test:only",
@@ -111,26 +109,26 @@
111
109
  "homepage": "https://rollupjs.org/",
112
110
  "optionalDependencies": {
113
111
  "fsevents": "~2.3.2",
114
- "@rollup/rollup-darwin-arm64": "4.38.0",
115
- "@rollup/rollup-android-arm64": "4.38.0",
116
- "@rollup/rollup-win32-arm64-msvc": "4.38.0",
117
- "@rollup/rollup-freebsd-arm64": "4.38.0",
118
- "@rollup/rollup-linux-arm64-gnu": "4.38.0",
119
- "@rollup/rollup-linux-arm64-musl": "4.38.0",
120
- "@rollup/rollup-android-arm-eabi": "4.38.0",
121
- "@rollup/rollup-linux-arm-gnueabihf": "4.38.0",
122
- "@rollup/rollup-linux-arm-musleabihf": "4.38.0",
123
- "@rollup/rollup-win32-ia32-msvc": "4.38.0",
124
- "@rollup/rollup-linux-loongarch64-gnu": "4.38.0",
125
- "@rollup/rollup-linux-riscv64-gnu": "4.38.0",
126
- "@rollup/rollup-linux-riscv64-musl": "4.38.0",
127
- "@rollup/rollup-linux-powerpc64le-gnu": "4.38.0",
128
- "@rollup/rollup-linux-s390x-gnu": "4.38.0",
129
- "@rollup/rollup-darwin-x64": "4.38.0",
130
- "@rollup/rollup-win32-x64-msvc": "4.38.0",
131
- "@rollup/rollup-freebsd-x64": "4.38.0",
132
- "@rollup/rollup-linux-x64-gnu": "4.38.0",
133
- "@rollup/rollup-linux-x64-musl": "4.38.0"
112
+ "@rollup/rollup-darwin-arm64": "4.40.0",
113
+ "@rollup/rollup-android-arm64": "4.40.0",
114
+ "@rollup/rollup-win32-arm64-msvc": "4.40.0",
115
+ "@rollup/rollup-freebsd-arm64": "4.40.0",
116
+ "@rollup/rollup-linux-arm64-gnu": "4.40.0",
117
+ "@rollup/rollup-linux-arm64-musl": "4.40.0",
118
+ "@rollup/rollup-android-arm-eabi": "4.40.0",
119
+ "@rollup/rollup-linux-arm-gnueabihf": "4.40.0",
120
+ "@rollup/rollup-linux-arm-musleabihf": "4.40.0",
121
+ "@rollup/rollup-win32-ia32-msvc": "4.40.0",
122
+ "@rollup/rollup-linux-loongarch64-gnu": "4.40.0",
123
+ "@rollup/rollup-linux-riscv64-gnu": "4.40.0",
124
+ "@rollup/rollup-linux-riscv64-musl": "4.40.0",
125
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.40.0",
126
+ "@rollup/rollup-linux-s390x-gnu": "4.40.0",
127
+ "@rollup/rollup-darwin-x64": "4.40.0",
128
+ "@rollup/rollup-win32-x64-msvc": "4.40.0",
129
+ "@rollup/rollup-freebsd-x64": "4.40.0",
130
+ "@rollup/rollup-linux-x64-gnu": "4.40.0",
131
+ "@rollup/rollup-linux-x64-musl": "4.40.0"
134
132
  },
135
133
  "dependencies": {
136
134
  "@types/estree": "1.0.7"
@@ -139,14 +137,14 @@
139
137
  "core-js": "We only update manually as every update requires a snapshot update"
140
138
  },
141
139
  "devDependencies": {
142
- "@codemirror/commands": "^6.8.0",
140
+ "@codemirror/commands": "^6.8.1",
143
141
  "@codemirror/lang-javascript": "^6.2.3",
144
142
  "@codemirror/language": "^6.11.0",
145
143
  "@codemirror/search": "^6.5.10",
146
144
  "@codemirror/state": "^6.5.2",
147
- "@codemirror/view": "^6.36.4",
148
- "@eslint/js": "^9.23.0",
149
- "@inquirer/prompts": "^7.4.0",
145
+ "@codemirror/view": "^6.36.5",
146
+ "@eslint/js": "^9.24.0",
147
+ "@inquirer/prompts": "^7.4.1",
150
148
  "@jridgewell/sourcemap-codec": "^1.5.0",
151
149
  "@mermaid-js/mermaid-cli": "^11.4.2",
152
150
  "@napi-rs/cli": "^2.18.4",
@@ -161,9 +159,9 @@
161
159
  "@rollup/pluginutils": "^5.1.4",
162
160
  "@shikijs/vitepress-twoslash": "^3.2.1",
163
161
  "@types/mocha": "^10.0.10",
164
- "@types/node": "^18.19.83",
165
- "@types/picomatch": "^3.0.2",
166
- "@types/semver": "^7.5.8",
162
+ "@types/node": "^18.19.86",
163
+ "@types/picomatch": "^4.0.0",
164
+ "@types/semver": "^7.7.0",
167
165
  "@types/yargs-parser": "^21.0.3",
168
166
  "@vue/language-server": "^2.2.8",
169
167
  "acorn": "^8.14.1",
@@ -178,9 +176,9 @@
178
176
  "date-time": "^4.0.0",
179
177
  "es5-shim": "^4.6.7",
180
178
  "es6-shim": "^0.35.8",
181
- "eslint": "^9.23.0",
179
+ "eslint": "^9.24.0",
182
180
  "eslint-config-prettier": "^10.1.1",
183
- "eslint-plugin-prettier": "^5.2.4",
181
+ "eslint-plugin-prettier": "^5.2.6",
184
182
  "eslint-plugin-unicorn": "^58.0.0",
185
183
  "eslint-plugin-vue": "^10.0.0",
186
184
  "fixturify": "^3.0.0",
@@ -195,7 +193,6 @@
195
193
  "magic-string": "^0.30.17",
196
194
  "mocha": "^11.1.0",
197
195
  "nodemon": "^3.1.9",
198
- "npm-audit-resolver": "^3.0.0-RC.0",
199
196
  "nyc": "^17.1.0",
200
197
  "picocolors": "^1.1.1",
201
198
  "picomatch": "^4.0.2",
@@ -205,7 +202,7 @@
205
202
  "pretty-bytes": "^6.1.1",
206
203
  "pretty-ms": "^9.2.0",
207
204
  "requirejs": "^2.3.7",
208
- "rollup": "^4.37.0",
205
+ "rollup": "^4.39.0",
209
206
  "rollup-plugin-license": "^3.6.0",
210
207
  "rollup-plugin-string": "^3.0.0",
211
208
  "semver": "^7.7.1",
@@ -216,9 +213,9 @@
216
213
  "systemjs": "^6.15.1",
217
214
  "terser": "^5.39.0",
218
215
  "tslib": "^2.8.1",
219
- "typescript": "^5.8.2",
220
- "typescript-eslint": "^8.28.0",
221
- "vite": "^6.2.3",
216
+ "typescript": "^5.8.3",
217
+ "typescript-eslint": "^8.29.1",
218
+ "vite": "^6.2.6",
222
219
  "vitepress": "^1.6.3",
223
220
  "vue": "^3.5.13",
224
221
  "vue-tsc": "^2.2.8",