@rollup/wasm-node 4.21.0 → 4.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.0
4
- Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
3
+ Rollup.js v4.21.2
4
+ Fri, 30 Aug 2024 07:03:57 GMT - commit f83b3151e93253a45f5b8ccb9ccb2e04214bc490
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.0
4
- Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
3
+ Rollup.js v4.21.2
4
+ Fri, 30 Aug 2024 07:03:57 GMT - commit f83b3151e93253a45f5b8ccb9ccb2e04214bc490
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.0
4
- Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
3
+ Rollup.js v4.21.2
4
+ Fri, 30 Aug 2024 07:03:57 GMT - commit f83b3151e93253a45f5b8ccb9ccb2e04214bc490
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -418,7 +418,7 @@ function getCamelizedPluginBaseName(pluginText) {
418
418
  }
419
419
  async function requireOrImport(pluginPath) {
420
420
  try {
421
- // eslint-disable-next-line unicorn/prefer-module, @typescript-eslint/no-require-imports
421
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
422
422
  return require(pluginPath);
423
423
  }
424
424
  catch {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.0
4
- Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
3
+ Rollup.js v4.21.2
4
+ Fri, 30 Aug 2024 07:03:57 GMT - commit f83b3151e93253a45f5b8ccb9ccb2e04214bc490
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -325,7 +325,7 @@ function augmentLogMessage(log) {
325
325
  }
326
326
  // Error codes should be sorted alphabetically while errors should be sorted by
327
327
  // error code below
328
- const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_IMPORT_OPTIONS = 'DUPLICATE_IMPORT_OPTIONS', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FAIL_AFTER_WARNINGS = 'FAIL_AFTER_WARNINGS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_CONFIG_MODULE_FORMAT = 'INVALID_CONFIG_MODULE_FORMAT', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_CONFIG = 'MISSING_CONFIG', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_EXTERNAL_CONFIG = 'MISSING_EXTERNAL_CONFIG', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', ONLY_INLINE_SOURCEMAPS = 'ONLY_INLINE_SOURCEMAPS', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR';
328
+ const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_IMPORT_OPTIONS = 'DUPLICATE_IMPORT_OPTIONS', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FAIL_AFTER_WARNINGS = 'FAIL_AFTER_WARNINGS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_CONFIG_MODULE_FORMAT = 'INVALID_CONFIG_MODULE_FORMAT', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_CONFIG = 'MISSING_CONFIG', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_EXTERNAL_CONFIG = 'MISSING_EXTERNAL_CONFIG', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', ONLY_INLINE_SOURCEMAPS = 'ONLY_INLINE_SOURCEMAPS', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', RESERVED_NAMESPACE = 'RESERVED_NAMESPACE', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR';
329
329
  function logAddonNotGenerated(message, hook, plugin) {
330
330
  return {
331
331
  code: ADDON_ERROR,
@@ -750,7 +750,6 @@ function logMissingNodeBuiltins(externalBuiltins) {
750
750
  message: `Creating a browser bundle that depends on Node.js built-in modules (${printQuotedStringList(externalBuiltins)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`
751
751
  };
752
752
  }
753
- // eslint-disable-next-line unicorn/prevent-abbreviations
754
753
  function logMissingFileOrDirOption() {
755
754
  return {
756
755
  code: MISSING_OPTION,
@@ -812,6 +811,12 @@ function logRedeclarationError(name) {
812
811
  message: `Identifier "${name}" has already been declared`
813
812
  };
814
813
  }
814
+ function logReservedNamespace(namespace) {
815
+ return {
816
+ code: RESERVED_NAMESPACE,
817
+ message: `You have overided reserved namespace "${namespace}"`
818
+ };
819
+ }
815
820
  function logModuleParseError(error, moduleId) {
816
821
  let message = error.message.replace(/ \(\d+:\d+\)$/, '');
817
822
  if (moduleId.endsWith('.json')) {
@@ -2112,6 +2117,7 @@ exports.logOptimizeChunkStatus = logOptimizeChunkStatus;
2112
2117
  exports.logParseError = logParseError;
2113
2118
  exports.logPluginError = logPluginError;
2114
2119
  exports.logRedeclarationError = logRedeclarationError;
2120
+ exports.logReservedNamespace = logReservedNamespace;
2115
2121
  exports.logShimmedExport = logShimmedExport;
2116
2122
  exports.logSourcemapBroken = logSourcemapBroken;
2117
2123
  exports.logSyntheticNamedExportsNeedNamespaceExport = logSyntheticNamedExportsNeedNamespaceExport;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.0
4
- Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
3
+ Rollup.js v4.21.2
4
+ Fri, 30 Aug 2024 07:03:57 GMT - commit f83b3151e93253a45f5b8ccb9ccb2e04214bc490
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.0";
34
+ var version = "4.21.2";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -541,89 +541,6 @@ class FileEmitter {
541
541
  }
542
542
  }
543
543
 
544
- const ANONYMOUS_PLUGIN_PREFIX = 'at position ';
545
- const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = 'at output position ';
546
-
547
- function createPluginCache(cache) {
548
- return {
549
- delete(id) {
550
- return delete cache[id];
551
- },
552
- get(id) {
553
- const item = cache[id];
554
- if (!item)
555
- return;
556
- item[0] = 0;
557
- return item[1];
558
- },
559
- has(id) {
560
- const item = cache[id];
561
- if (!item)
562
- return false;
563
- item[0] = 0;
564
- return true;
565
- },
566
- set(id, value) {
567
- cache[id] = [0, value];
568
- }
569
- };
570
- }
571
- function getTrackedPluginCache(pluginCache, onUse) {
572
- return {
573
- delete(id) {
574
- onUse();
575
- return pluginCache.delete(id);
576
- },
577
- get(id) {
578
- onUse();
579
- return pluginCache.get(id);
580
- },
581
- has(id) {
582
- onUse();
583
- return pluginCache.has(id);
584
- },
585
- set(id, value) {
586
- onUse();
587
- return pluginCache.set(id, value);
588
- }
589
- };
590
- }
591
- const NO_CACHE = {
592
- delete() {
593
- return false;
594
- },
595
- get() {
596
- return undefined;
597
- },
598
- has() {
599
- return false;
600
- },
601
- set() { }
602
- };
603
- function uncacheablePluginError(pluginName) {
604
- if (pluginName.startsWith(ANONYMOUS_PLUGIN_PREFIX) ||
605
- pluginName.startsWith(ANONYMOUS_OUTPUT_PLUGIN_PREFIX)) {
606
- return parseAst_js.error(parseAst_js.logAnonymousPluginCache());
607
- }
608
- return parseAst_js.error(parseAst_js.logDuplicatePluginName(pluginName));
609
- }
610
- function getCacheForUncacheablePlugin(pluginName) {
611
- return {
612
- delete() {
613
- return uncacheablePluginError(pluginName);
614
- },
615
- get() {
616
- return uncacheablePluginError(pluginName);
617
- },
618
- has() {
619
- return uncacheablePluginError(pluginName);
620
- },
621
- set() {
622
- return uncacheablePluginError(pluginName);
623
- }
624
- };
625
- }
626
-
627
544
  const doNothing = () => { };
628
545
 
629
546
  async function asyncFlatten(array) {
@@ -780,6 +697,89 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
780
697
  };
781
698
  }
782
699
 
700
+ const ANONYMOUS_PLUGIN_PREFIX = 'at position ';
701
+ const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = 'at output position ';
702
+
703
+ function createPluginCache(cache) {
704
+ return {
705
+ delete(id) {
706
+ return delete cache[id];
707
+ },
708
+ get(id) {
709
+ const item = cache[id];
710
+ if (!item)
711
+ return;
712
+ item[0] = 0;
713
+ return item[1];
714
+ },
715
+ has(id) {
716
+ const item = cache[id];
717
+ if (!item)
718
+ return false;
719
+ item[0] = 0;
720
+ return true;
721
+ },
722
+ set(id, value) {
723
+ cache[id] = [0, value];
724
+ }
725
+ };
726
+ }
727
+ function getTrackedPluginCache(pluginCache, onUse) {
728
+ return {
729
+ delete(id) {
730
+ onUse();
731
+ return pluginCache.delete(id);
732
+ },
733
+ get(id) {
734
+ onUse();
735
+ return pluginCache.get(id);
736
+ },
737
+ has(id) {
738
+ onUse();
739
+ return pluginCache.has(id);
740
+ },
741
+ set(id, value) {
742
+ onUse();
743
+ return pluginCache.set(id, value);
744
+ }
745
+ };
746
+ }
747
+ const NO_CACHE = {
748
+ delete() {
749
+ return false;
750
+ },
751
+ get() {
752
+ return undefined;
753
+ },
754
+ has() {
755
+ return false;
756
+ },
757
+ set() { }
758
+ };
759
+ function uncacheablePluginError(pluginName) {
760
+ if (pluginName.startsWith(ANONYMOUS_PLUGIN_PREFIX) ||
761
+ pluginName.startsWith(ANONYMOUS_OUTPUT_PLUGIN_PREFIX)) {
762
+ return parseAst_js.error(parseAst_js.logAnonymousPluginCache());
763
+ }
764
+ return parseAst_js.error(parseAst_js.logDuplicatePluginName(pluginName));
765
+ }
766
+ function getCacheForUncacheablePlugin(pluginName) {
767
+ return {
768
+ delete() {
769
+ return uncacheablePluginError(pluginName);
770
+ },
771
+ get() {
772
+ return uncacheablePluginError(pluginName);
773
+ },
774
+ has() {
775
+ return uncacheablePluginError(pluginName);
776
+ },
777
+ set() {
778
+ return uncacheablePluginError(pluginName);
779
+ }
780
+ };
781
+ }
782
+
783
783
  function getPluginContext(plugin, pluginCache, graph, options, fileEmitter, existingPluginNames) {
784
784
  const { logLevel, onLog } = options;
785
785
  let cacheable = true;
@@ -11959,7 +11959,7 @@ const getHelpersBlock = (additionalHelpers, accessedGlobals, indent, snippets, l
11959
11959
  };
11960
11960
  const HELPER_GENERATORS = {
11961
11961
  [DOCUMENT_CURRENT_SCRIPT](_t, { _, n }) {
11962
- return `var${_}${DOCUMENT_CURRENT_SCRIPT}${_}=${_}typeof${_}document${_}!==${_}'undefined'${_}?${_}document.currentScript${_}:${_}null;${n}`;
11962
+ return `var ${DOCUMENT_CURRENT_SCRIPT}${_}=${_}typeof document${_}!==${_}'undefined'${_}?${_}document.currentScript${_}:${_}null;${n}`;
11963
11963
  },
11964
11964
  [INTEROP_DEFAULT_COMPAT_VARIABLE](_t, snippets, liveBindings) {
11965
11965
  const { _, getDirectReturnFunction, n } = snippets;
@@ -15355,21 +15355,17 @@ class Module {
15355
15355
  },
15356
15356
  id,
15357
15357
  get implicitlyLoadedAfterOneOf() {
15358
- // eslint-disable-next-line unicorn/prefer-spread
15359
15358
  return Array.from(implicitlyLoadedAfter, getId).sort();
15360
15359
  },
15361
15360
  get implicitlyLoadedBefore() {
15362
- // eslint-disable-next-line unicorn/prefer-spread
15363
15361
  return Array.from(implicitlyLoadedBefore, getId).sort();
15364
15362
  },
15365
15363
  get importedIdResolutions() {
15366
- // eslint-disable-next-line unicorn/prefer-spread
15367
15364
  return Array.from(sourcesWithAttributes.keys(), source => module.resolvedIds[source]).filter(Boolean);
15368
15365
  },
15369
15366
  get importedIds() {
15370
15367
  // We cannot use this.dependencies because this is needed before
15371
15368
  // dependencies are populated
15372
- // eslint-disable-next-line unicorn/prefer-spread
15373
15369
  return Array.from(sourcesWithAttributes.keys(), source => module.resolvedIds[source]?.id).filter(Boolean);
15374
15370
  },
15375
15371
  get importers() {
@@ -15836,7 +15832,6 @@ class Module {
15836
15832
  attributes: this.info.attributes,
15837
15833
  code: this.info.code,
15838
15834
  customTransformCache: this.customTransformCache,
15839
- // eslint-disable-next-line unicorn/prefer-spread
15840
15835
  dependencies: Array.from(this.dependencies, getId),
15841
15836
  id: this.id,
15842
15837
  meta: this.info.meta,
@@ -16203,7 +16198,6 @@ function setAlternativeExporterIfCyclic(variable, importer, reexporter) {
16203
16198
  }
16204
16199
  }
16205
16200
  const copyNameToModulesMap = (searchedNamesAndModules) => searchedNamesAndModules &&
16206
- // eslint-disable-next-line unicorn/prefer-spread
16207
16201
  new Map(Array.from(searchedNamesAndModules, ([name, modules]) => [name, new Set(modules)]));
16208
16202
 
16209
16203
  function removeJsExtension(name) {
@@ -16698,9 +16692,16 @@ function getExportBlock(exports, { _, cnst }) {
16698
16692
 
16699
16693
  const keypath = (keypath, getPropertyAccess) => keypath.split('.').map(getPropertyAccess).join('');
16700
16694
 
16701
- function setupNamespace(name, root, globals, { _, getPropertyAccess, s }, compact) {
16695
+ function setupNamespace(name, root, globals, { _, getPropertyAccess, s }, compact, log) {
16702
16696
  const parts = name.split('.');
16703
- parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
16697
+ // Check if the key is exist in the prototype of the object
16698
+ const isReserved = parts[0] in {};
16699
+ if (log && isReserved) {
16700
+ log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logReservedNamespace(parts[0]));
16701
+ }
16702
+ parts[0] =
16703
+ (typeof globals === 'function' ? globals(parts[0]) : isReserved ? null : globals[parts[0]]) ||
16704
+ parts[0];
16704
16705
  parts.pop();
16705
16706
  let propertyPath = root;
16706
16707
  return (parts
@@ -16710,9 +16711,16 @@ function setupNamespace(name, root, globals, { _, getPropertyAccess, s }, compac
16710
16711
  })
16711
16712
  .join(compact ? ',' : '\n') + (compact && parts.length > 0 ? ';' : '\n'));
16712
16713
  }
16713
- function assignToDeepVariable(deepName, root, globals, assignment, { _, getPropertyAccess }) {
16714
+ function assignToDeepVariable(deepName, root, globals, assignment, { _, getPropertyAccess }, log) {
16714
16715
  const parts = deepName.split('.');
16715
- parts[0] = (typeof globals === 'function' ? globals(parts[0]) : globals[parts[0]]) || parts[0];
16716
+ // Check if the key is exist in the prototype of the object
16717
+ const isReserved = parts[0] in {};
16718
+ if (log && isReserved) {
16719
+ log(parseAst_js.LOGLEVEL_WARN, parseAst_js.logReservedNamespace(parts[0]));
16720
+ }
16721
+ parts[0] =
16722
+ (typeof globals === 'function' ? globals(parts[0]) : isReserved ? null : globals[parts[0]]) ||
16723
+ parts[0];
16716
16724
  const last = parts.pop();
16717
16725
  let propertyPath = root;
16718
16726
  let deepAssignment = [
@@ -16777,7 +16785,7 @@ function iife(magicString, { accessedGlobals, dependencies, exports, hasDefaultE
16777
16785
  `${_}=${_}${wrapperIntro}`;
16778
16786
  }
16779
16787
  if (isNamespaced) {
16780
- wrapperIntro = setupNamespace(name, 'this', globals, snippets, compact) + wrapperIntro;
16788
+ wrapperIntro = setupNamespace(name, 'this', globals, snippets, compact, log) + wrapperIntro;
16781
16789
  }
16782
16790
  }
16783
16791
  let wrapperOutro = `${n}${n}})(${deps.join(`,${_}`)});`;
@@ -16973,7 +16981,7 @@ function umd(magicString, { accessedGlobals, dependencies, exports, hasDefaultEx
16973
16981
  if (namedExportsMode && (hasExports || noConflict)) {
16974
16982
  amdDeps.unshift(`'exports'`);
16975
16983
  cjsDeps.unshift(`exports`);
16976
- globalDeps.unshift(assignToDeepVariable(name, globalVariable, globals, `${extend ? `${globalProperty(name, globalVariable, getPropertyAccess)}${_}||${_}` : ''}{}`, snippets));
16984
+ globalDeps.unshift(assignToDeepVariable(name, globalVariable, globals, `${extend ? `${globalProperty(name, globalVariable, getPropertyAccess)}${_}||${_}` : ''}{}`, snippets, log));
16977
16985
  factoryParameters.unshift('exports');
16978
16986
  }
16979
16987
  const completeAmdId = getCompleteAmdId(amd, id);
@@ -16987,7 +16995,7 @@ function umd(magicString, { accessedGlobals, dependencies, exports, hasDefaultEx
16987
16995
  const noConflictExportsVariable = compact ? 'e' : 'exports';
16988
16996
  let factory;
16989
16997
  if (!namedExportsMode && hasExports) {
16990
- factory = `${cnst} ${noConflictExportsVariable}${_}=${_}${assignToDeepVariable(name, globalVariable, globals, `${factoryVariable}(${globalDeps.join(`,${_}`)})`, snippets)};`;
16998
+ factory = `${cnst} ${noConflictExportsVariable}${_}=${_}${assignToDeepVariable(name, globalVariable, globals, `${factoryVariable}(${globalDeps.join(`,${_}`)})`, snippets, log)};`;
16991
16999
  }
16992
17000
  else {
16993
17001
  const module = globalDeps.shift();
@@ -17009,7 +17017,7 @@ function umd(magicString, { accessedGlobals, dependencies, exports, hasDefaultEx
17009
17017
  else {
17010
17018
  iifeExport = `${factoryVariable}(${globalDeps.join(`,${_}`)})`;
17011
17019
  if (!namedExportsMode && hasExports) {
17012
- iifeExport = assignToDeepVariable(name, globalVariable, globals, iifeExport, snippets);
17020
+ iifeExport = assignToDeepVariable(name, globalVariable, globals, iifeExport, snippets, log);
17013
17021
  }
17014
17022
  }
17015
17023
  const iifeNeedsGlobal = hasExports || (noConflict && namedExportsMode) || globalDeps.length > 0;
@@ -17519,7 +17527,6 @@ class Chunk {
17519
17527
  }
17520
17528
  }
17521
17529
  for (const module of entryModules) {
17522
- // eslint-disable-next-line unicorn/prefer-spread
17523
17530
  const requiredFacades = Array.from(new Set(module.chunkNames.filter(({ isUserDefined }) => isUserDefined).map(({ name }) => name)),
17524
17531
  // mapping must run after Set 'name' dedupe
17525
17532
  name => ({
@@ -17528,7 +17535,6 @@ class Chunk {
17528
17535
  if (requiredFacades.length === 0 && module.isUserDefinedEntryPoint) {
17529
17536
  requiredFacades.push({});
17530
17537
  }
17531
- // eslint-disable-next-line unicorn/prefer-spread
17532
17538
  requiredFacades.push(...Array.from(module.chunkFileNames, fileName => ({ fileName })));
17533
17539
  if (requiredFacades.length === 0) {
17534
17540
  requiredFacades.push({});
@@ -17653,10 +17659,8 @@ class Chunk {
17653
17659
  ...this.getPreRenderedChunkInfo(),
17654
17660
  dynamicImports: this.getDynamicDependencies().map(resolveFileName),
17655
17661
  fileName: this.getFileName(),
17656
- // eslint-disable-next-line unicorn/prefer-spread
17657
17662
  implicitlyLoadedBefore: Array.from(this.implicitlyLoadedBefore, resolveFileName),
17658
17663
  importedBindings: getImportedBindingsPerDependency(this.getRenderedDependencies(), resolveFileName),
17659
- // eslint-disable-next-line unicorn/prefer-spread
17660
17664
  imports: Array.from(this.dependencies, resolveFileName),
17661
17665
  modules: this.renderedModules,
17662
17666
  referencedFiles: this.getReferencedFiles()
@@ -17701,9 +17705,7 @@ class Chunk {
17701
17705
  hasDefaultExport = true;
17702
17706
  }
17703
17707
  if (format === 'es') {
17704
- renderedDependency.reexports = reexports.filter(
17705
- // eslint-disable-next-line unicorn/prefer-array-some
17706
- ({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
17708
+ renderedDependency.reexports = reexports.filter(({ reexported }) => !renderedExports.find(({ exported }) => exported === reexported));
17707
17709
  }
17708
17710
  }
17709
17711
  }
@@ -18055,9 +18057,16 @@ class Chunk {
18055
18057
  ? sanitizedId.slice(0, -extensionName.length)
18056
18058
  : sanitizedId;
18057
18059
  if (parseAst_js.isAbsolute(idWithoutExtension)) {
18058
- return preserveModulesRoot && path$2.resolve(idWithoutExtension).startsWith(preserveModulesRoot)
18059
- ? idWithoutExtension.slice(preserveModulesRoot.length).replace(/^[/\\]/, '')
18060
- : parseAst_js.relative(this.inputBase, idWithoutExtension);
18060
+ if (preserveModulesRoot && path$2.resolve(idWithoutExtension).startsWith(preserveModulesRoot)) {
18061
+ return idWithoutExtension.slice(preserveModulesRoot.length).replace(/^[/\\]/, '');
18062
+ }
18063
+ else {
18064
+ // handle edge case in Windows
18065
+ if (this.inputBase === '/' && !idWithoutExtension.startsWith('/')) {
18066
+ return parseAst_js.relative(this.inputBase, idWithoutExtension.replace(/^[a-zA-Z]:[/\\]/, '/'));
18067
+ }
18068
+ return parseAst_js.relative(this.inputBase, idWithoutExtension);
18069
+ }
18061
18070
  }
18062
18071
  else {
18063
18072
  return (this.outputOptions.virtualDirname.replace(/\/$/, '') + '/' + path$2.basename(idWithoutExtension));
@@ -18197,7 +18206,6 @@ class Chunk {
18197
18206
  const rendered = module.render(renderOptions);
18198
18207
  if (!renderOptions.accessedDocumentCurrentScript &&
18199
18208
  formatsMaybeAccessDocumentCurrentScript.includes(format)) {
18200
- // eslint-disable-next-line unicorn/consistent-destructuring
18201
18209
  this.accessedGlobalsByScope.get(module.scope)?.delete(DOCUMENT_CURRENT_SCRIPT);
18202
18210
  }
18203
18211
  renderOptions.accessedDocumentCurrentScript = false;
@@ -18239,7 +18247,6 @@ class Chunk {
18239
18247
  }
18240
18248
  if (hoistedSource)
18241
18249
  magicString.prepend(hoistedSource + n + n);
18242
- // eslint-disable-next-line unicorn/consistent-destructuring
18243
18250
  if (this.needsExportsShim) {
18244
18251
  magicString.prepend(`${n}${cnst} ${MISSING_EXPORT_SHIM_VARIABLE}${_}=${_}void 0;${n}${n}`);
18245
18252
  }
@@ -19624,7 +19631,6 @@ class Bundle {
19624
19631
  return manualChunkAliasByEntry;
19625
19632
  }
19626
19633
  assignManualChunks(getManualChunk) {
19627
- // eslint-disable-next-line unicorn/prefer-module
19628
19634
  const manualChunkAliasesWithEntry = [];
19629
19635
  const manualChunksApi = {
19630
19636
  getModuleIds: () => this.graph.modulesById.keys(),
@@ -19780,6 +19786,22 @@ function flru (max) {
19780
19786
  };
19781
19787
  }
19782
19788
 
19789
+ class GlobalScope extends Scope {
19790
+ constructor() {
19791
+ super();
19792
+ this.parent = null;
19793
+ this.variables.set('undefined', new UndefinedVariable());
19794
+ }
19795
+ findVariable(name) {
19796
+ let variable = this.variables.get(name);
19797
+ if (!variable) {
19798
+ variable = new GlobalVariable(name);
19799
+ this.variables.set(name, variable);
19800
+ }
19801
+ return variable;
19802
+ }
19803
+ }
19804
+
19783
19805
  function resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolveId, skip, customOptions, isEntry, attributes) {
19784
19806
  let skipped = null;
19785
19807
  let replaceContext = null;
@@ -20285,7 +20307,6 @@ class ModuleLoader {
20285
20307
  });
20286
20308
  }
20287
20309
  getResolveStaticDependencyPromises(module) {
20288
- // eslint-disable-next-line unicorn/prefer-spread
20289
20310
  return Array.from(module.sourcesWithAttributes, async ([source, attributes]) => [
20290
20311
  source,
20291
20312
  (module.resolvedIds[source] =
@@ -20424,22 +20445,6 @@ async function waitForDependencyResolution(loadPromise) {
20424
20445
  return Promise.all([...resolveStaticDependencyPromises, ...resolveDynamicImportPromises]);
20425
20446
  }
20426
20447
 
20427
- class GlobalScope extends Scope {
20428
- constructor() {
20429
- super();
20430
- this.parent = null;
20431
- this.variables.set('undefined', new UndefinedVariable());
20432
- }
20433
- findVariable(name) {
20434
- let variable = this.variables.get(name);
20435
- if (!variable) {
20436
- variable = new GlobalVariable(name);
20437
- this.variables.set(name, variable);
20438
- }
20439
- return variable;
20440
- }
20441
- }
20442
-
20443
20448
  class Queue {
20444
20449
  constructor(maxParallel) {
20445
20450
  this.maxParallel = maxParallel;
@@ -21017,7 +21022,6 @@ const getAddon = (config, name) => {
21017
21022
  }
21018
21023
  return () => configAddon || '';
21019
21024
  };
21020
- // eslint-disable-next-line unicorn/prevent-abbreviations
21021
21025
  const getDir = (config, file) => {
21022
21026
  const { dir } = config;
21023
21027
  if (typeof dir === 'string' && typeof file === 'string') {
@@ -21087,9 +21091,7 @@ const getInterop = (config) => {
21087
21091
  };
21088
21092
  const validateInterop = (interop) => {
21089
21093
  if (!ALLOWED_INTEROP_TYPES.has(interop)) {
21090
- return parseAst_js.error(parseAst_js.logInvalidOption('output.interop', parseAst_js.URL_OUTPUT_INTEROP,
21091
- // eslint-disable-next-line unicorn/prefer-spread
21092
- `use one of ${Array.from(ALLOWED_INTEROP_TYPES, value => JSON.stringify(value)).join(', ')}`, interop));
21094
+ return parseAst_js.error(parseAst_js.logInvalidOption('output.interop', parseAst_js.URL_OUTPUT_INTEROP, `use one of ${Array.from(ALLOWED_INTEROP_TYPES, value => JSON.stringify(value)).join(', ')}`, interop));
21093
21095
  }
21094
21096
  return interop;
21095
21097
  };
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.0
4
- Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
3
+ Rollup.js v4.21.2
4
+ Fri, 30 Aug 2024 07:03:57 GMT - commit f83b3151e93253a45f5b8ccb9ccb2e04214bc490
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -11,9 +11,9 @@
11
11
 
12
12
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13
13
 
14
+ const index = require('./index.js');
14
15
  const promises = require('node:fs/promises');
15
16
  const process$2 = require('node:process');
16
- const index = require('./index.js');
17
17
  const cli = require('../bin/rollup');
18
18
  const rollup = require('./rollup.js');
19
19
  const parseAst_js = require('./parseAst.js');
@@ -539,16 +539,17 @@ async function watch(command) {
539
539
  }
540
540
  });
541
541
  }
542
- async function close(code) {
542
+ function close(code) {
543
543
  process$2.removeListener('uncaughtException', closeWithError);
544
544
  // removing a non-existent listener is a no-op
545
545
  process$2.stdin.removeListener('end', close);
546
- if (watcher)
547
- await watcher.close();
548
546
  if (configWatcher)
549
547
  configWatcher.close();
550
- if (code)
551
- process$2.exit(code);
548
+ Promise.resolve(watcher?.close()).finally(() => {
549
+ process$2.exit(typeof code === 'number' ? code : 0);
550
+ });
551
+ // Tell signal-exit that we are handling this gracefully
552
+ return true;
552
553
  }
553
554
  // return a promise that never resolves to keep the process running
554
555
  return new Promise(() => { });
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.21.0
4
- Sun, 18 Aug 2024 05:55:06 GMT - commit c4bb050938778bcbe7b3b3ea3419f7fa70d60f5b
3
+ Rollup.js v4.21.2
4
+ Fri, 30 Aug 2024 07:03:57 GMT - commit f83b3151e93253a45f5b8ccb9ccb2e04214bc490
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -11,11 +11,11 @@
11
11
 
12
12
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13
13
 
14
+ const rollup = require('./rollup.js');
14
15
  const path = require('node:path');
15
16
  const process = require('node:process');
16
- const rollup = require('./rollup.js');
17
- const node_os = require('node:os');
18
17
  const index = require('./index.js');
18
+ const node_os = require('node:os');
19
19
  require('./parseAst.js');
20
20
  require('../native.js');
21
21
  require('tty');