webpack 5.104.1 → 5.105.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.
Files changed (323) hide show
  1. package/README.md +2 -2
  2. package/bin/webpack.js +6 -3
  3. package/lib/APIPlugin.js +85 -15
  4. package/lib/AbstractMethodError.js +1 -0
  5. package/lib/AsyncDependenciesBlock.js +17 -2
  6. package/lib/AsyncDependencyToInitialChunkError.js +3 -0
  7. package/lib/AutomaticPrefetchPlugin.js +1 -1
  8. package/lib/BannerPlugin.js +5 -1
  9. package/lib/CacheFacade.js +2 -2
  10. package/lib/CaseSensitiveModulesWarning.js +1 -0
  11. package/lib/Chunk.js +9 -5
  12. package/lib/ChunkGraph.js +30 -9
  13. package/lib/ChunkGroup.js +6 -3
  14. package/lib/ChunkRenderError.js +9 -2
  15. package/lib/CleanPlugin.js +4 -1
  16. package/lib/CodeGenerationError.js +7 -1
  17. package/lib/CodeGenerationResults.js +10 -3
  18. package/lib/CommentCompilationWarning.js +2 -1
  19. package/lib/Compilation.js +284 -236
  20. package/lib/Compiler.js +4 -3
  21. package/lib/ConcatenationScope.js +2 -1
  22. package/lib/ConcurrentCompilationError.js +3 -3
  23. package/lib/ContextModule.js +248 -111
  24. package/lib/ContextModuleFactory.js +14 -2
  25. package/lib/DefinePlugin.js +15 -8
  26. package/lib/DelegatedModule.js +6 -0
  27. package/lib/DelegatedModuleFactoryPlugin.js +2 -0
  28. package/lib/Dependency.js +6 -1
  29. package/lib/DependencyTemplates.js +3 -2
  30. package/lib/DllModule.js +2 -0
  31. package/lib/DllReferencePlugin.js +1 -0
  32. package/lib/DotenvPlugin.js +11 -5
  33. package/lib/DynamicEntryPlugin.js +8 -1
  34. package/lib/EnvironmentNotSupportAsyncWarning.js +1 -0
  35. package/lib/EvalSourceMapDevToolPlugin.js +17 -13
  36. package/lib/ExportsInfo.js +8 -4
  37. package/lib/ExternalModule.js +16 -0
  38. package/lib/ExternalModuleFactoryPlugin.js +9 -2
  39. package/lib/ExternalsPlugin.js +2 -1
  40. package/lib/FalseIIFEUmdWarning.js +1 -0
  41. package/lib/FileSystemInfo.js +49 -25
  42. package/lib/FlagDependencyExportsPlugin.js +8 -1
  43. package/lib/FlagDependencyUsagePlugin.js +9 -7
  44. package/lib/HarmonyLinkingError.js +1 -0
  45. package/lib/HookWebpackError.js +2 -0
  46. package/lib/HotModuleReplacementPlugin.js +16 -2
  47. package/lib/IgnoreWarningsPlugin.js +5 -2
  48. package/lib/InitFragment.js +1 -0
  49. package/lib/InvalidDependenciesModuleWarning.js +1 -0
  50. package/lib/LibManifestPlugin.js +1 -0
  51. package/lib/ManifestPlugin.js +8 -1
  52. package/lib/Module.js +7 -4
  53. package/lib/ModuleBuildError.js +3 -1
  54. package/lib/ModuleDependencyError.js +1 -0
  55. package/lib/ModuleDependencyWarning.js +1 -0
  56. package/lib/ModuleError.js +4 -1
  57. package/lib/ModuleFilenameHelpers.js +4 -2
  58. package/lib/ModuleGraph.js +3 -0
  59. package/lib/ModuleGraphConnection.js +10 -1
  60. package/lib/ModuleHashingError.js +2 -0
  61. package/lib/ModuleInfoHeaderPlugin.js +6 -1
  62. package/lib/ModuleNotFoundError.js +1 -0
  63. package/lib/ModuleParseError.js +5 -1
  64. package/lib/ModuleProfile.js +1 -1
  65. package/lib/ModuleRestoreError.js +2 -0
  66. package/lib/ModuleSourceTypeConstants.js +1 -11
  67. package/lib/ModuleStoreError.js +2 -0
  68. package/lib/ModuleWarning.js +3 -1
  69. package/lib/MultiCompiler.js +11 -7
  70. package/lib/MultiWatching.js +2 -2
  71. package/lib/NoModeWarning.js +1 -0
  72. package/lib/NodeStuffInWebError.js +1 -0
  73. package/lib/NormalModule.js +28 -5
  74. package/lib/NormalModuleFactory.js +20 -4
  75. package/lib/OptionsApply.js +3 -1
  76. package/lib/ProgressPlugin.js +4 -0
  77. package/lib/RawModule.js +2 -0
  78. package/lib/RuntimeModule.js +10 -0
  79. package/lib/RuntimePlugin.js +7 -9
  80. package/lib/RuntimeTemplate.js +14 -7
  81. package/lib/SourceMapDevToolPlugin.js +30 -23
  82. package/lib/Template.js +10 -5
  83. package/lib/TemplatedPathPlugin.js +4 -2
  84. package/lib/UnhandledSchemeError.js +1 -0
  85. package/lib/UnsupportedFeatureWarning.js +3 -0
  86. package/lib/WarnDeprecatedOptionPlugin.js +1 -0
  87. package/lib/WatchIgnorePlugin.js +1 -1
  88. package/lib/Watching.js +5 -0
  89. package/lib/WebpackError.js +4 -0
  90. package/lib/WebpackOptionsApply.js +61 -41
  91. package/lib/asset/AssetBytesGenerator.js +1 -0
  92. package/lib/asset/AssetGenerator.js +18 -3
  93. package/lib/asset/AssetModulesPlugin.js +33 -2
  94. package/lib/asset/AssetParser.js +4 -0
  95. package/lib/asset/AssetSourceGenerator.js +1 -0
  96. package/lib/asset/RawDataUrlModule.js +4 -0
  97. package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -1
  98. package/lib/buildChunkGraph.js +31 -2
  99. package/lib/cache/MemoryWithGcCachePlugin.js +1 -0
  100. package/lib/cache/PackFileCacheStrategy.js +41 -8
  101. package/lib/cache/getLazyHashedEtag.js +13 -4
  102. package/lib/cache/mergeEtags.js +3 -1
  103. package/lib/cli.js +3 -1
  104. package/lib/config/defaults.js +65 -44
  105. package/lib/config/normalization.js +96 -0
  106. package/lib/container/ContainerEntryDependency.js +3 -0
  107. package/lib/container/ContainerEntryModule.js +7 -0
  108. package/lib/container/ContainerExposedDependency.js +1 -0
  109. package/lib/container/FallbackDependency.js +1 -0
  110. package/lib/container/FallbackItemDependency.js +1 -0
  111. package/lib/container/FallbackModule.js +4 -0
  112. package/lib/container/HoistContainerReferencesPlugin.js +6 -0
  113. package/lib/container/ModuleFederationPlugin.js +1 -1
  114. package/lib/container/RemoteModule.js +24 -0
  115. package/lib/css/CssGenerator.js +31 -4
  116. package/lib/css/CssModulesPlugin.js +26 -30
  117. package/lib/css/CssParser.js +12 -9
  118. package/lib/debug/ProfilingPlugin.js +1 -0
  119. package/lib/dependencies/AMDDefineDependency.js +3 -1
  120. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -0
  121. package/lib/dependencies/AMDPlugin.js +1 -1
  122. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +7 -1
  123. package/lib/dependencies/CachedConstDependency.js +1 -0
  124. package/lib/dependencies/CommonJsDependencyHelpers.js +2 -0
  125. package/lib/dependencies/CommonJsExportRequireDependency.js +1 -0
  126. package/lib/dependencies/CommonJsFullRequireDependency.js +2 -0
  127. package/lib/dependencies/CommonJsImportsParserPlugin.js +3 -0
  128. package/lib/dependencies/CommonJsRequireContextDependency.js +2 -2
  129. package/lib/dependencies/CommonJsSelfReferenceDependency.js +1 -0
  130. package/lib/dependencies/ConstDependency.js +1 -0
  131. package/lib/dependencies/ContextDependencyHelpers.js +11 -4
  132. package/lib/dependencies/ContextElementDependency.js +1 -0
  133. package/lib/dependencies/CriticalDependencyWarning.js +1 -0
  134. package/lib/dependencies/CssIcssExportDependency.js +7 -4
  135. package/lib/dependencies/CssIcssSymbolDependency.js +1 -0
  136. package/lib/dependencies/CssUrlDependency.js +2 -3
  137. package/lib/dependencies/ExternalModuleInitFragment.js +4 -1
  138. package/lib/dependencies/ExternalModuleInitFragmentDependency.js +0 -9
  139. package/lib/dependencies/HarmonyAcceptDependency.js +3 -0
  140. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +3 -1
  141. package/lib/dependencies/HarmonyExportExpressionDependency.js +4 -0
  142. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +8 -1
  143. package/lib/dependencies/HarmonyExportInitFragment.js +17 -3
  144. package/lib/dependencies/HarmonyExportSpecifierDependency.js +4 -0
  145. package/lib/dependencies/HarmonyImportDependency.js +1 -1
  146. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +269 -5
  147. package/lib/dependencies/HarmonyImportSpecifierDependency.js +22 -3
  148. package/lib/dependencies/ImportDependency.js +1 -0
  149. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -0
  150. package/lib/dependencies/ImportMetaPlugin.js +53 -11
  151. package/lib/dependencies/ImportParserPlugin.js +7 -12
  152. package/lib/dependencies/LoaderPlugin.js +3 -0
  153. package/lib/dependencies/ModuleDecoratorDependency.js +1 -0
  154. package/lib/dependencies/ModuleDependency.js +1 -0
  155. package/lib/dependencies/ModuleInitFragmentDependency.js +87 -0
  156. package/lib/dependencies/ProvidedDependency.js +1 -0
  157. package/lib/dependencies/RequireContextPlugin.js +1 -0
  158. package/lib/dependencies/RequireEnsureDependenciesBlock.js +1 -1
  159. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +7 -2
  160. package/lib/dependencies/RuntimeRequirementsDependency.js +1 -0
  161. package/lib/dependencies/WorkerDependency.js +9 -3
  162. package/lib/dependencies/WorkerPlugin.js +1 -0
  163. package/lib/dependencies/getFunctionExpression.js +3 -1
  164. package/lib/electron/ElectronTargetPlugin.js +3 -1
  165. package/lib/errors/BuildCycleError.js +4 -1
  166. package/lib/esm/ModuleChunkFormatPlugin.js +6 -4
  167. package/lib/esm/ModuleChunkLoadingPlugin.js +1 -0
  168. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +1 -0
  169. package/lib/hmr/LazyCompilationPlugin.js +5 -0
  170. package/lib/hmr/lazyCompilationBackend.js +3 -2
  171. package/lib/ids/ChunkModuleIdRangePlugin.js +9 -7
  172. package/lib/ids/DeterministicChunkIdsPlugin.js +1 -0
  173. package/lib/ids/DeterministicModuleIdsPlugin.js +1 -0
  174. package/lib/ids/HashedModuleIdsPlugin.js +3 -8
  175. package/lib/ids/IdHelpers.js +10 -8
  176. package/lib/ids/NamedChunkIdsPlugin.js +7 -5
  177. package/lib/ids/NamedModuleIdsPlugin.js +1 -0
  178. package/lib/ids/OccurrenceChunkIdsPlugin.js +2 -2
  179. package/lib/ids/OccurrenceModuleIdsPlugin.js +18 -10
  180. package/lib/ids/SyncModuleIdsPlugin.js +30 -20
  181. package/lib/index.js +2 -2
  182. package/lib/javascript/BasicEvaluatedExpression.js +1 -0
  183. package/lib/javascript/EnableChunkLoadingPlugin.js +5 -2
  184. package/lib/javascript/JavascriptModulesPlugin.js +29 -8
  185. package/lib/javascript/JavascriptParser.js +47 -14
  186. package/lib/json/JsonGenerator.js +1 -0
  187. package/lib/json/JsonParser.js +9 -2
  188. package/lib/library/AbstractLibraryPlugin.js +4 -1
  189. package/lib/library/AmdLibraryPlugin.js +2 -1
  190. package/lib/library/AssignLibraryPlugin.js +6 -2
  191. package/lib/library/EnableLibraryPlugin.js +1 -0
  192. package/lib/library/ExportPropertyLibraryPlugin.js +1 -1
  193. package/lib/library/JsonpLibraryPlugin.js +1 -1
  194. package/lib/library/ModuleLibraryPlugin.js +130 -13
  195. package/lib/library/SystemLibraryPlugin.js +4 -1
  196. package/lib/library/UmdLibraryPlugin.js +4 -3
  197. package/lib/logging/Logger.js +9 -5
  198. package/lib/logging/createConsoleLogger.js +4 -0
  199. package/lib/logging/truncateArgs.js +1 -1
  200. package/lib/node/CommonJsChunkLoadingPlugin.js +6 -4
  201. package/lib/node/NodeEnvironmentPlugin.js +1 -0
  202. package/lib/node/NodeTargetPlugin.js +10 -1
  203. package/lib/node/NodeTemplatePlugin.js +1 -0
  204. package/lib/node/NodeWatchFileSystem.js +6 -0
  205. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +1 -0
  206. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +1 -0
  207. package/lib/node/ReadFileCompileWasmPlugin.js +1 -0
  208. package/lib/node/RequireChunkLoadingRuntimeModule.js +1 -0
  209. package/lib/node/nodeConsole.js +18 -1
  210. package/lib/optimize/AggressiveMergingPlugin.js +2 -1
  211. package/lib/optimize/AggressiveSplittingPlugin.js +15 -6
  212. package/lib/optimize/ConcatenatedModule.js +33 -19
  213. package/lib/optimize/FlagIncludedChunksPlugin.js +11 -1
  214. package/lib/optimize/InnerGraph.js +5 -3
  215. package/lib/optimize/InnerGraphPlugin.js +25 -25
  216. package/lib/optimize/LimitChunkCountPlugin.js +3 -2
  217. package/lib/optimize/MangleExportsPlugin.js +14 -2
  218. package/lib/optimize/MergeDuplicateChunksPlugin.js +5 -1
  219. package/lib/optimize/MinChunkSizePlugin.js +5 -2
  220. package/lib/optimize/ModuleConcatenationPlugin.js +19 -4
  221. package/lib/optimize/RealContentHashPlugin.js +37 -27
  222. package/lib/optimize/RemoveParentModulesPlugin.js +12 -3
  223. package/lib/optimize/RuntimeChunkPlugin.js +3 -5
  224. package/lib/optimize/SideEffectsFlagPlugin.js +3 -0
  225. package/lib/optimize/SplitChunksPlugin.js +23 -5
  226. package/lib/performance/AssetsOverSizeLimitWarning.js +6 -2
  227. package/lib/performance/EntrypointsOverSizeLimitWarning.js +6 -2
  228. package/lib/performance/NoAsyncChunksWarning.js +1 -0
  229. package/lib/performance/SizeLimitsPlugin.js +6 -6
  230. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +2 -0
  231. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +3 -1
  232. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +1 -0
  233. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +1 -0
  234. package/lib/rules/BasicEffectRulePlugin.js +2 -0
  235. package/lib/rules/BasicMatcherRulePlugin.js +3 -0
  236. package/lib/rules/ObjectMatcherRulePlugin.js +5 -1
  237. package/lib/rules/RuleSetCompiler.js +6 -0
  238. package/lib/runtime/AsyncModuleRuntimeModule.js +1 -0
  239. package/lib/runtime/ChunkNameRuntimeModule.js +1 -0
  240. package/lib/runtime/CompatRuntimeModule.js +1 -0
  241. package/lib/runtime/EnsureChunkRuntimeModule.js +1 -0
  242. package/lib/runtime/GetChunkFilenameRuntimeModule.js +5 -0
  243. package/lib/runtime/GetFullHashRuntimeModule.js +1 -0
  244. package/lib/runtime/GetMainFilenameRuntimeModule.js +2 -0
  245. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -0
  246. package/lib/runtime/LoadScriptRuntimeModule.js +2 -0
  247. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +16 -32
  248. package/lib/runtime/PublicPathRuntimeModule.js +1 -0
  249. package/lib/runtime/StartupChunkDependenciesPlugin.js +2 -0
  250. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +1 -0
  251. package/lib/runtime/StartupEntrypointRuntimeModule.js +1 -0
  252. package/lib/schemes/HttpUriPlugin.js +39 -20
  253. package/lib/schemes/VirtualUrlPlugin.js +28 -2
  254. package/lib/serialization/BinaryMiddleware.js +4 -0
  255. package/lib/serialization/FileMiddleware.js +9 -4
  256. package/lib/serialization/ObjectMiddleware.js +34 -11
  257. package/lib/serialization/PlainObjectSerializer.js +2 -0
  258. package/lib/sharing/ConsumeSharedModule.js +60 -0
  259. package/lib/sharing/ConsumeSharedPlugin.js +5 -4
  260. package/lib/sharing/ProvideSharedModule.js +4 -0
  261. package/lib/sharing/ProvideSharedPlugin.js +24 -25
  262. package/lib/sharing/resolveMatchedConfigs.js +2 -2
  263. package/lib/sharing/utils.js +8 -6
  264. package/lib/stats/DefaultStatsFactoryPlugin.js +20 -12
  265. package/lib/stats/DefaultStatsPrinterPlugin.js +6 -5
  266. package/lib/stats/StatsFactory.js +2 -2
  267. package/lib/url/URLParserPlugin.js +5 -3
  268. package/lib/util/AppendOnlyStackedSet.js +57 -0
  269. package/lib/util/Hash.js +1 -0
  270. package/lib/util/IterableHelpers.js +1 -0
  271. package/lib/util/LazyBucketSortedSet.js +1 -0
  272. package/lib/util/LazySet.js +1 -0
  273. package/lib/util/ParallelismFactorCalculator.js +1 -0
  274. package/lib/util/SortableSet.js +1 -0
  275. package/lib/util/StringXor.js +1 -0
  276. package/lib/util/binarySearchBounds.js +15 -8
  277. package/lib/util/chainedImports.js +1 -1
  278. package/lib/util/cleverMerge.js +6 -1
  279. package/lib/util/comparators.js +21 -1
  280. package/lib/util/compileBooleanMatcher.js +3 -3
  281. package/lib/util/concatenate.js +3 -2
  282. package/lib/util/conventions.js +3 -2
  283. package/lib/util/deterministicGrouping.js +13 -1
  284. package/lib/util/extractSourceMap.js +12 -13
  285. package/lib/util/fs.js +15 -19
  286. package/lib/util/hash/BatchedHash.js +4 -0
  287. package/lib/util/hash/BulkUpdateHash.js +8 -1
  288. package/lib/util/hash/hash-digest.js +1 -0
  289. package/lib/util/hash/wasm-hash.js +18 -2
  290. package/lib/util/identifier.js +7 -2
  291. package/lib/util/magicComment.js +1 -1
  292. package/lib/util/propertyName.js +1 -1
  293. package/lib/util/registerExternalSerializer.js +1 -0
  294. package/lib/util/runtime.js +15 -1
  295. package/lib/util/semver.js +1 -0
  296. package/lib/util/serialization.js +2 -2
  297. package/lib/wasm/EnableWasmLoadingPlugin.js +2 -0
  298. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +11 -3
  299. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +1 -0
  300. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +3 -2
  301. package/lib/wasm-sync/UnsupportedWebAssemblyFeatureError.js +5 -1
  302. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +3 -0
  303. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +2 -0
  304. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +7 -3
  305. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +2 -2
  306. package/lib/wasm-sync/WebAssemblyParser.js +3 -1
  307. package/lib/web/FetchCompileWasmPlugin.js +1 -0
  308. package/lib/web/JsonpChunkLoadingPlugin.js +1 -0
  309. package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -0
  310. package/lib/webpack.js +16 -4
  311. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +1 -0
  312. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +2 -0
  313. package/package.json +33 -36
  314. package/schemas/WebpackOptions.check.js +1 -1
  315. package/schemas/WebpackOptions.json +121 -55
  316. package/schemas/plugins/BannerPlugin.json +2 -2
  317. package/schemas/plugins/IgnorePlugin.json +1 -1
  318. package/schemas/plugins/ManifestPlugin.json +3 -3
  319. package/schemas/plugins/ProgressPlugin.json +1 -1
  320. package/schemas/plugins/SourceMapDevToolPlugin.json +2 -2
  321. package/schemas/plugins/schemes/HttpUriPlugin.json +1 -1
  322. package/schemas/plugins/schemes/VirtualUrlPlugin.json +3 -3
  323. package/types.d.ts +440 -137
@@ -5,7 +5,7 @@
5
5
 
6
6
  "use strict";
7
7
 
8
- const SAFE_IDENTIFIER = /^[_a-zA-Z$][_a-zA-Z$0-9]*$/;
8
+ const SAFE_IDENTIFIER = /^[_a-z$][_a-z$0-9]*$/i;
9
9
  const RESERVED_IDENTIFIER = new Set([
10
10
  "break",
11
11
  "case",
@@ -168,6 +168,7 @@ register(
168
168
  deserialize({ read }) {
169
169
  const source = new ReplaceSource(read(), read());
170
170
  const len = read();
171
+ /** @type {number[]} */
171
172
  const startEndBuffer = [];
172
173
  for (let i = 0; i < len; i++) {
173
174
  startEndBuffer.push(read(), read());
@@ -10,7 +10,8 @@ const SortableSet = require("./SortableSet");
10
10
  /** @typedef {import("../Compilation")} Compilation */
11
11
  /** @typedef {import("../Entrypoint").EntryOptions} EntryOptions */
12
12
 
13
- /** @typedef {string | SortableSet<string> | undefined} RuntimeSpec */
13
+ /** @typedef {SortableSet<string>} RuntimeSpecSortableSet */
14
+ /** @typedef {string | RuntimeSpecSortableSet | undefined} RuntimeSpec */
14
15
  /** @typedef {RuntimeSpec | boolean} RuntimeCondition */
15
16
 
16
17
  /**
@@ -20,7 +21,9 @@ const SortableSet = require("./SortableSet");
20
21
  * @returns {RuntimeSpec} runtime
21
22
  */
22
23
  const getEntryRuntime = (compilation, name, options) => {
24
+ /** @type {EntryOptions["dependOn"]} */
23
25
  let dependOn;
26
+ /** @type {EntryOptions["runtime"]} */
24
27
  let runtime;
25
28
  if (options) {
26
29
  ({ dependOn, runtime } = options);
@@ -194,6 +197,7 @@ const mergeRuntime = (a, b) => {
194
197
  return a;
195
198
  } else if (typeof a === "string") {
196
199
  if (typeof b === "string") {
200
+ /** @type {RuntimeSpecSortableSet} */
197
201
  const set = new SortableSet();
198
202
  set.add(a);
199
203
  set.add(b);
@@ -201,16 +205,19 @@ const mergeRuntime = (a, b) => {
201
205
  } else if (b.has(a)) {
202
206
  return b;
203
207
  }
208
+ /** @type {RuntimeSpecSortableSet} */
204
209
  const set = new SortableSet(b);
205
210
  set.add(a);
206
211
  return set;
207
212
  }
208
213
  if (typeof b === "string") {
209
214
  if (a.has(b)) return a;
215
+ /** @type {RuntimeSpecSortableSet} */
210
216
  const set = new SortableSet(a);
211
217
  set.add(b);
212
218
  return set;
213
219
  }
220
+ /** @type {RuntimeSpecSortableSet} */
214
221
  const set = new SortableSet(a);
215
222
  for (const item of b) set.add(item);
216
223
  if (set.size === a.size) return a;
@@ -271,14 +278,17 @@ const mergeRuntimeOwned = (a, b) => {
271
278
  if (typeof b === "string") {
272
279
  return b;
273
280
  }
281
+ /** @type {RuntimeSpecSortableSet} */
274
282
  return new SortableSet(b);
275
283
  } else if (typeof a === "string") {
276
284
  if (typeof b === "string") {
285
+ /** @type {RuntimeSpecSortableSet} */
277
286
  const set = new SortableSet();
278
287
  set.add(a);
279
288
  set.add(b);
280
289
  return set;
281
290
  }
291
+ /** @type {RuntimeSpecSortableSet} */
282
292
  const set = new SortableSet(b);
283
293
  set.add(a);
284
294
  return set;
@@ -315,6 +325,7 @@ const intersectRuntime = (a, b) => {
315
325
  if (a.has(b)) return b;
316
326
  return;
317
327
  }
328
+ /** @type {RuntimeSpecSortableSet} */
318
329
  const set = new SortableSet();
319
330
  for (const item of b) {
320
331
  if (a.has(item)) set.add(item);
@@ -354,10 +365,12 @@ const subtractRuntime = (a, b) => {
354
365
  if (item !== b) return item;
355
366
  }
356
367
  }
368
+ /** @type {RuntimeSpecSortableSet} */
357
369
  const set = new SortableSet(a);
358
370
  set.delete(b);
359
371
  return set;
360
372
  }
373
+ /** @type {RuntimeSpecSortableSet} */
361
374
  const set = new SortableSet();
362
375
  for (const item of a) {
363
376
  if (!b.has(item)) set.add(item);
@@ -394,6 +407,7 @@ const filterRuntime = (runtime, filter) => {
394
407
  if (typeof runtime === "string") return filter(runtime);
395
408
  let some = false;
396
409
  let every = true;
410
+ /** @type {RuntimeSpec} */
397
411
  let result;
398
412
  for (const r of runtime) {
399
413
  const v = filter(r);
@@ -266,6 +266,7 @@ module.exports.parseRange = (str) => {
266
266
  const items = [];
267
267
  const r = /[-0-9A-Za-z]\s+/g;
268
268
  var start = 0;
269
+ /** @type {RegExpExecArray | null} */
269
270
  var match;
270
271
  while ((match = r.exec(str))) {
271
272
  const end = match.index + 1;
@@ -9,7 +9,7 @@ const memoize = require("./memoize");
9
9
 
10
10
  /** @typedef {import("../serialization/BinaryMiddleware").MEASURE_END_OPERATION_TYPE} MEASURE_END_OPERATION */
11
11
  /** @typedef {import("../serialization/BinaryMiddleware").MEASURE_START_OPERATION_TYPE} MEASURE_START_OPERATION */
12
- /** @typedef {typeof import("../util/Hash")} Hash */
12
+ /** @typedef {import("../util/Hash").HashFunction} HashFunction */
13
13
  /** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */
14
14
 
15
15
  /**
@@ -111,7 +111,7 @@ module.exports = {
111
111
  /**
112
112
  * @template D, S, C
113
113
  * @param {IntermediateFileSystem} fs filesystem
114
- * @param {string | Hash} hashFunction hash function to use
114
+ * @param {HashFunction} hashFunction hash function to use
115
115
  * @returns {Serializer<D, S, C>} file serializer
116
116
  */
117
117
  createFileSerializer: (fs, hashFunction) => {
@@ -20,6 +20,7 @@ const enabledTypes = new WeakMap();
20
20
  const getEnabledTypes = (compiler) => {
21
21
  let set = enabledTypes.get(compiler);
22
22
  if (set === undefined) {
23
+ /** @type {WasmLoadingTypes} */
23
24
  set = new Set();
24
25
  enabledTypes.set(compiler, set);
25
26
  }
@@ -31,6 +32,7 @@ class EnableWasmLoadingPlugin {
31
32
  * @param {WasmLoadingType} type library type that should be available
32
33
  */
33
34
  constructor(type) {
35
+ /** @type {WasmLoadingType} */
34
36
  this.type = type;
35
37
  }
36
38
 
@@ -12,11 +12,15 @@ const Template = require("../Template");
12
12
  /** @typedef {import("../Chunk")} Chunk */
13
13
  /** @typedef {import("../Compilation")} Compilation */
14
14
 
15
+ /** @typedef {(wasmModuleSrcPath: string) => string} GenerateBeforeLoadBinaryCode */
16
+ /** @typedef {(wasmModuleSrcPath: string) => string} GenerateLoadBinaryCode */
17
+ /** @typedef {() => string} GenerateBeforeInstantiateStreaming */
18
+
15
19
  /**
16
20
  * @typedef {object} AsyncWasmLoadingRuntimeModuleOptions
17
- * @property {((wasmModuleSrcPath: string) => string)=} generateBeforeLoadBinaryCode
18
- * @property {(wasmModuleSrcPath: string) => string} generateLoadBinaryCode
19
- * @property {(() => string)=} generateBeforeInstantiateStreaming
21
+ * @property {GenerateLoadBinaryCode} generateLoadBinaryCode
22
+ * @property {GenerateBeforeLoadBinaryCode=} generateBeforeLoadBinaryCode
23
+ * @property {GenerateBeforeInstantiateStreaming=} generateBeforeInstantiateStreaming
20
24
  * @property {boolean} supportsStreaming
21
25
  */
22
26
 
@@ -31,10 +35,14 @@ class AsyncWasmLoadingRuntimeModule extends RuntimeModule {
31
35
  supportsStreaming
32
36
  }) {
33
37
  super("wasm loading", RuntimeModule.STAGE_NORMAL);
38
+ /** @type {GenerateLoadBinaryCode} */
34
39
  this.generateLoadBinaryCode = generateLoadBinaryCode;
40
+ /** @type {generateBeforeLoadBinaryCode | undefined} */
35
41
  this.generateBeforeLoadBinaryCode = generateBeforeLoadBinaryCode;
42
+ /** @type {generateBeforeInstantiateStreaming | undefined} */
36
43
  this.generateBeforeInstantiateStreaming =
37
44
  generateBeforeInstantiateStreaming;
45
+ /** @type {boolean} */
38
46
  this.supportsStreaming = supportsStreaming;
39
47
  }
40
48
 
@@ -26,6 +26,7 @@ class AsyncWebAssemblyGenerator extends Generator {
26
26
  */
27
27
  constructor(options) {
28
28
  super();
29
+ /** @type {AsyncWebAssemblyGeneratorOptions} */
29
30
  this.options = options;
30
31
  }
31
32
 
@@ -11,7 +11,7 @@ const Generator = require("../Generator");
11
11
  const { tryRunOrWebpackError } = require("../HookWebpackError");
12
12
  const { WEBASSEMBLY_MODULE_TYPE_ASYNC } = require("../ModuleTypeConstants");
13
13
  const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDependency");
14
- const { compareModulesByIdOrIdentifier } = require("../util/comparators");
14
+ const { compareModulesByFullName } = require("../util/comparators");
15
15
  const memoize = require("../util/memoize");
16
16
 
17
17
  /** @typedef {import("webpack-sources").Source} Source */
@@ -89,6 +89,7 @@ class AsyncWebAssemblyModulesPlugin {
89
89
  * @param {AsyncWebAssemblyModulesPluginOptions} options options
90
90
  */
91
91
  constructor(options) {
92
+ /** @type {AsyncWebAssemblyModulesPluginOptions} */
92
93
  this.options = options;
93
94
  }
94
95
 
@@ -139,7 +140,7 @@ class AsyncWebAssemblyModulesPlugin {
139
140
 
140
141
  for (const module of chunkGraph.getOrderedChunkModulesIterable(
141
142
  chunk,
142
- compareModulesByIdOrIdentifier(chunkGraph)
143
+ compareModulesByFullName(compiler)
143
144
  )) {
144
145
  if (module.type === WEBASSEMBLY_MODULE_TYPE_ASYNC) {
145
146
  const filenameTemplate = outputOptions.webassemblyModuleFilename;
@@ -7,9 +7,13 @@
7
7
  const WebpackError = require("../WebpackError");
8
8
 
9
9
  module.exports = class UnsupportedWebAssemblyFeatureError extends WebpackError {
10
- /** @param {string} message Error message */
10
+ /**
11
+ * @param {string} message Error message
12
+ */
11
13
  constructor(message) {
12
14
  super(message);
15
+
16
+ /** @type {string} */
13
17
  this.name = "UnsupportedWebAssemblyFeatureError";
14
18
  this.hideStack = true;
15
19
  }
@@ -31,6 +31,7 @@ const WebAssemblyUtils = require("./WebAssemblyUtils");
31
31
  */
32
32
  const getAllWasmModules = (moduleGraph, chunkGraph, chunk) => {
33
33
  const wasmModules = chunk.getAllAsyncChunks();
34
+ /** @type {Module[]} */
34
35
  const array = [];
35
36
  for (const chunk of wasmModules) {
36
37
  for (const m of chunkGraph.getOrderedChunkModulesIterable(
@@ -67,6 +68,7 @@ const generateImportObject = (
67
68
  const moduleGraph = chunkGraph.moduleGraph;
68
69
  /** @type {Map<string, ModuleId>} */
69
70
  const waitForInstances = new Map();
71
+ /** @type {{ module: string, name: string, value: string }[]} */
70
72
  const properties = [];
71
73
  const usedWasmDependencies = WebAssemblyUtils.getUsedDependencies(
72
74
  moduleGraph,
@@ -136,6 +138,7 @@ const generateImportObject = (
136
138
  }
137
139
  }
138
140
 
141
+ /** @type {string[]} */
139
142
  let importObject;
140
143
  if (mangle) {
141
144
  importObject = [
@@ -102,6 +102,8 @@ Add an async split point (i. e. import()) somewhere between your entrypoint and
102
102
  ${moduleChains.map((s) => `* ${s}`).join("\n")}`;
103
103
 
104
104
  super(message);
105
+
106
+ /** @type {string} */
105
107
  this.name = "WebAssemblyInInitialChunkError";
106
108
  this.hideStack = true;
107
109
  this.module = module;
@@ -60,17 +60,21 @@ class WebAssemblyJavascriptGenerator extends Generator {
60
60
  const exportsInfo = moduleGraph.getExportsInfo(module);
61
61
 
62
62
  let needExportsCopy = false;
63
+ /** @typedef {{ dependency: ModuleDependency | undefined, importVar: string, index: number, request: string | undefined, names: Set<string>, reexports: string[] }} ImportData */
64
+ /** @type {Map<Module, ImportData>} */
63
65
  const importedModules = new Map();
66
+ /** @type {string[]} */
64
67
  const initParams = [];
65
68
  let index = 0;
66
69
  for (const dep of module.dependencies) {
67
70
  const moduleDep =
68
71
  dep && dep instanceof ModuleDependency ? dep : undefined;
69
- if (moduleGraph.getModule(dep)) {
70
- let importData = importedModules.get(moduleGraph.getModule(dep));
72
+ const mod = moduleGraph.getModule(dep);
73
+ if (mod) {
74
+ let importData = importedModules.get(mod);
71
75
  if (importData === undefined) {
72
76
  importedModules.set(
73
- moduleGraph.getModule(dep),
77
+ mod,
74
78
  (importData = {
75
79
  dependency: moduleDep,
76
80
  importVar: `m${index}`,
@@ -13,7 +13,7 @@ const {
13
13
  const { WEBASSEMBLY_MODULE_TYPE_SYNC } = require("../ModuleTypeConstants");
14
14
  const WebAssemblyExportImportedDependency = require("../dependencies/WebAssemblyExportImportedDependency");
15
15
  const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDependency");
16
- const { compareModulesByIdOrIdentifier } = require("../util/comparators");
16
+ const { compareModulesByFullName } = require("../util/comparators");
17
17
  const memoize = require("../util/memoize");
18
18
  const WebAssemblyInInitialChunkError = require("./WebAssemblyInInitialChunkError");
19
19
 
@@ -89,7 +89,7 @@ class WebAssemblyModulesPlugin {
89
89
 
90
90
  for (const module of chunkGraph.getOrderedChunkModulesIterable(
91
91
  chunk,
92
- compareModulesByIdOrIdentifier(chunkGraph)
92
+ compareModulesByFullName(compiler)
93
93
  )) {
94
94
  if (module.type === WEBASSEMBLY_MODULE_TYPE_SYNC) {
95
95
  const filenameTemplate = outputOptions.webassemblyModuleFilename;
@@ -92,7 +92,8 @@ class WebAssemblyParser extends Parser {
92
92
  /** @type {Record<string, string> | undefined} */
93
93
  let jsIncompatibleExports = (buildMeta.jsIncompatibleExports = undefined);
94
94
 
95
- /** @type {(ModuleImport | null)[]} */
95
+ /** @typedef {ModuleImport | null} ImportNode */
96
+ /** @type {ImportNode[]} */
96
97
  const importedGlobals = [];
97
98
 
98
99
  t.traverse(module, {
@@ -139,6 +140,7 @@ class WebAssemblyParser extends Parser {
139
140
  Global({ node }) {
140
141
  const init = node.init[0];
141
142
 
143
+ /** @type {ImportNode} */
142
144
  let importNode = null;
143
145
 
144
146
  if (init.id === "get_global") {
@@ -24,6 +24,7 @@ class FetchCompileWasmPlugin {
24
24
  * @param {FetchCompileWasmPluginOptions=} options options
25
25
  */
26
26
  constructor(options = {}) {
27
+ /** @type {FetchCompileWasmPluginOptions} */
27
28
  this.options = options;
28
29
  }
29
30
 
@@ -35,6 +35,7 @@ class JsonpChunkLoadingPlugin {
35
35
  : globalChunkLoading;
36
36
  return chunkLoading === "jsonp";
37
37
  };
38
+ /** @type {WeakSet<Chunk>} */
38
39
  const onceForChunkSet = new WeakSet();
39
40
  /**
40
41
  * @param {Chunk} chunk chunk
@@ -56,6 +56,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
56
56
  */
57
57
  constructor(runtimeRequirements) {
58
58
  super("jsonp chunk loading", RuntimeModule.STAGE_ATTACH);
59
+ /** @type {ReadOnlyRuntimeRequirements} */
59
60
  this._runtimeRequirements = runtimeRequirements;
60
61
  }
61
62
 
package/lib/webpack.js CHANGED
@@ -15,19 +15,25 @@ const {
15
15
  applyWebpackOptionsBaseDefaults,
16
16
  applyWebpackOptionsDefaults
17
17
  } = require("./config/defaults");
18
- const { getNormalizedWebpackOptions } = require("./config/normalization");
18
+ const {
19
+ applyWebpackOptionsInterception,
20
+ getNormalizedWebpackOptions
21
+ } = require("./config/normalization");
19
22
  const NodeEnvironmentPlugin = require("./node/NodeEnvironmentPlugin");
20
23
  const memoize = require("./util/memoize");
21
24
 
22
25
  /** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */
23
- /** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */
24
26
  /** @typedef {import("./config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptionsNormalizedWithDefaults */
27
+ /** @typedef {import("./config/normalization").WebpackOptionsInterception} WebpackOptionsInterception */
25
28
  /** @typedef {import("./Compiler").WatchOptions} WatchOptions */
26
29
  /** @typedef {import("./MultiCompiler").MultiCompilerOptions} MultiCompilerOptions */
27
30
  /** @typedef {import("./MultiCompiler").MultiWebpackOptions} MultiWebpackOptions */
28
31
  /** @typedef {import("./MultiStats")} MultiStats */
29
32
  /** @typedef {import("./Stats")} Stats */
30
33
 
34
+ /** @typedef {(this: Compiler, compiler: Compiler) => void} WebpackPluginFunction */
35
+ /** @typedef {(compiler: Compiler) => void} WebpackPluginInstance */
36
+
31
37
  const getValidateSchema = memoize(() => require("./validateSchema"));
32
38
 
33
39
  /**
@@ -68,8 +74,13 @@ const createMultiCompiler = (childOptions, options) => {
68
74
  * @returns {Compiler} a compiler
69
75
  */
70
76
  const createCompiler = (rawOptions, compilerIndex) => {
71
- const options = getNormalizedWebpackOptions(rawOptions);
77
+ let options = getNormalizedWebpackOptions(rawOptions);
72
78
  applyWebpackOptionsBaseDefaults(options);
79
+
80
+ /** @type {WebpackOptionsInterception=} */
81
+ let interception;
82
+ ({ options, interception } = applyWebpackOptionsInterception(options));
83
+
73
84
  const compiler = new Compiler(
74
85
  /** @type {string} */ (options.context),
75
86
  options
@@ -99,7 +110,8 @@ const createCompiler = (rawOptions, compilerIndex) => {
99
110
  new WebpackOptionsApply().process(
100
111
  /** @type {WebpackOptionsNormalizedWithDefaults} */
101
112
  (options),
102
- compiler
113
+ compiler,
114
+ interception
103
115
  );
104
116
  compiler.hooks.initialize.call();
105
117
  return compiler;
@@ -40,6 +40,7 @@ class ImportScriptsChunkLoadingPlugin {
40
40
  : globalChunkLoading;
41
41
  return chunkLoading === "import-scripts";
42
42
  };
43
+ /** @type {WeakSet<Chunk>} */
43
44
  const onceForChunkSet = new WeakSet();
44
45
  /**
45
46
  * @param {Chunk} chunk chunk
@@ -30,7 +30,9 @@ class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
30
30
  */
31
31
  constructor(runtimeRequirements, withCreateScriptUrl) {
32
32
  super("importScripts chunk loading", RuntimeModule.STAGE_ATTACH);
33
+ /** @type {ReadOnlyRuntimeRequirements} */
33
34
  this.runtimeRequirements = runtimeRequirements;
35
+ /** @type {boolean} */
34
36
  this._withCreateScriptUrl = withCreateScriptUrl;
35
37
  }
36
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.104.1",
3
+ "version": "5.105.1",
4
4
  "description": "Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
5
5
  "homepage": "https://github.com/webpack/webpack",
6
6
  "bugs": "https://github.com/webpack/webpack/issues",
@@ -32,7 +32,7 @@
32
32
  "prepare": "husky",
33
33
  "setup": "node ./setup/setup.js",
34
34
  "prelint": "yarn setup",
35
- "lint": "yarn lint:code && yarn lint:special && yarn lint:types && yarn lint:types-test && yarn lint:types-benchmark && yarn lint:types-module-test && yarn lint:types-hot && yarn lint:yarn && yarn fmt:check && yarn lint:spellcheck",
35
+ "lint": "yarn lint:code && yarn lint:special && yarn lint:types && yarn lint:types-test && yarn lint:types-benchmark && yarn lint:types-module-test && yarn lint:types-hot && yarn fmt:check && yarn lint:spellcheck",
36
36
  "lint:code": "node node_modules/eslint/bin/eslint.js --cache .",
37
37
  "lint:special": "node node_modules/tooling/lockfile-lint && node node_modules/tooling/schemas-lint && node node_modules/tooling/inherit-types && node node_modules/tooling/format-schemas && node tooling/generate-runtime-code.js && node tooling/generate-wasm-code.js && node node_modules/tooling/compile-to-definitions && node node_modules/tooling/precompile-schemas && node node_modules/tooling/generate-types --no-template-literals",
38
38
  "lint:types": "tsc",
@@ -40,40 +40,38 @@
40
40
  "lint:types-benchmark": "tsc -p tsconfig.types.benchmark.json",
41
41
  "lint:types-hot": "tsc -p tsconfig.hot.json",
42
42
  "lint:types-module-test": "tsc -p tsconfig.module.test.json",
43
- "lint:yarn": "yarn-deduplicate --fail --list -s highest yarn.lock",
44
43
  "lint:spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
45
- "report:types": "rimraf coverage && yarn cover:types && yarn cover:report && open-cli coverage/lcov-report/index.html",
46
44
  "validate:types": "tsc -p tsconfig.validation.json",
47
45
  "fmt": "yarn fmt:base --log-level warn --write",
48
46
  "fmt:check": "yarn fmt:base --check",
49
47
  "fmt:base": "node node_modules/prettier/bin/prettier.cjs --cache --ignore-unknown .",
50
- "fix": "yarn fix:code && yarn fix:yarn && yarn fix:special && yarn fmt",
48
+ "fix": "yarn fix:code && yarn fix:special && yarn fmt",
51
49
  "fix:code": "yarn lint:code --fix",
52
- "fix:yarn": "yarn-deduplicate -s highest yarn.lock",
53
50
  "fix:special": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/format-schemas --write && node tooling/generate-runtime-code.js --write && node tooling/generate-wasm-code.js --write && node node_modules/tooling/compile-to-definitions --write && node node_modules/tooling/precompile-schemas --write && node node_modules/tooling/generate-types --no-template-literals --write",
54
51
  "build:examples": "cd examples && node buildAll.js",
55
52
  "benchmark": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation --hash-seed=1 --random-seed=1 --no-opt --predictable --predictable-gc-schedule --interpreted-frames-native-stack --allow-natives-syntax --expose-gc --no-concurrent-sweeping ./test/BenchmarkTestCases.benchmark.mjs",
56
53
  "pretest": "yarn lint",
57
54
  "test": "yarn test:base",
58
- "test:update-snapshots": "yarn test:base -u",
55
+ "test:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage",
59
56
  "test:basic": "yarn test:base --testMatch \"<rootDir>/test/*.basictest.js\"",
60
57
  "test:basic:deno": "yarn test:base:deno --testMatch \"<rootDir>/test/*.basictest.js\"",
61
58
  "test:unit": "yarn test:base --testMatch \"<rootDir>/test/*.unittest.js\"",
62
59
  "test:integration": "yarn test:base --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\"",
63
60
  "test:base:deno": "deno --allow-read --allow-env --allow-sys --allow-ffi --allow-write --allow-run --v8-flags='--max-old-space-size=4096' ./node_modules/jest-cli/bin/jest.js --logHeapUsage",
64
- "test:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage",
65
- "cover": "yarn cover:all && yarn cover:report",
66
- "cover:clean": "rimraf .nyc_output coverage",
61
+ "test:update-snapshots": "yarn test:base -u",
62
+ "report:cover": "nyc report --reporter=lcov --reporter=text -t coverage",
63
+ "report:cover:clean": "rimraf .nyc_output coverage",
64
+ "report:cover:merge": "yarn mkdirp .nyc_output && nyc merge .nyc_output coverage/coverage-nyc.json && rimraf .nyc_output",
65
+ "types:cover": "node node_modules/tooling/type-coverage",
66
+ "types:cover:report": "rimraf coverage && yarn types:cover && yarn report:cover && open-cli coverage/lcov-report/index.html",
67
+ "cover": "yarn cover:all && yarn report:cover",
68
+ "cover:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage",
67
69
  "cover:all": "yarn cover:base --coverage",
68
70
  "cover:unit": "yarn cover:base --testMatch \"<rootDir>/test/*.unittest.js\" --coverage",
69
71
  "cover:basic": "yarn cover:base --testMatch \"<rootDir>/test/*.basictest.js\" --coverage",
70
72
  "cover:integration": "yarn cover:base --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\" --coverage",
71
73
  "cover:integration:a": "yarn cover:base --testMatch \"<rootDir>/test/*.{basictest,test}.js\" --coverage",
72
- "cover:integration:b": "yarn cover:base --testMatch \"<rootDir>/test/*.longtest.js\" --coverage",
73
- "cover:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage",
74
- "cover:types": "node node_modules/tooling/type-coverage",
75
- "cover:merge": "yarn mkdirp .nyc_output && nyc merge .nyc_output coverage/coverage-nyc.json && rimraf .nyc_output",
76
- "cover:report": "nyc report --reporter=lcov --reporter=text -t coverage"
74
+ "cover:integration:b": "yarn cover:base --testMatch \"<rootDir>/test/*.longtest.js\" --coverage"
77
75
  },
78
76
  "lint-staged": {
79
77
  "*.{js,cjs,mjs}": [
@@ -95,7 +93,7 @@
95
93
  "acorn-import-phases": "^1.0.3",
96
94
  "browserslist": "^4.28.1",
97
95
  "chrome-trace-event": "^1.0.2",
98
- "enhanced-resolve": "^5.17.4",
96
+ "enhanced-resolve": "^5.19.0",
99
97
  "es-module-lexer": "^2.0.0",
100
98
  "eslint-scope": "5.1.1",
101
99
  "events": "^3.2.0",
@@ -108,22 +106,21 @@
108
106
  "schema-utils": "^4.3.3",
109
107
  "tapable": "^2.3.0",
110
108
  "terser-webpack-plugin": "^5.3.16",
111
- "watchpack": "^2.4.4",
109
+ "watchpack": "^2.5.1",
112
110
  "webpack-sources": "^3.3.3"
113
111
  },
114
112
  "devDependencies": {
115
113
  "@babel/core": "^7.27.1",
116
114
  "@babel/preset-react": "^7.27.1",
117
115
  "@changesets/cli": "^2.29.8",
118
- "@codspeed/core": "^5.0.1",
119
- "@eslint/js": "^9.39.0",
120
- "@eslint/markdown": "^7.4.0",
121
- "@stylistic/eslint-plugin": "^5.6.0",
116
+ "@changesets/get-github-info": "^0.7.0",
117
+ "@codspeed/core": "^5.1.0",
122
118
  "@types/glob-to-regexp": "^0.4.4",
123
119
  "@types/graceful-fs": "^4.1.9",
124
120
  "@types/jest": "^30.0.0",
125
121
  "@types/mime-types": "^2.1.4",
126
- "@types/node": "^24.10.1",
122
+ "@types/neo-async": "^2.6.7",
123
+ "@types/node": "^25.1.0",
127
124
  "@types/xxhashjs": "^0.2.4",
128
125
  "assemblyscript": "^0.28.9",
129
126
  "babel-loader": "^10.0.0",
@@ -137,18 +134,12 @@
137
134
  "es5-ext": "^0.10.53",
138
135
  "es6-promise-polyfill": "^1.2.0",
139
136
  "eslint": "^9.39.2",
140
- "eslint-config-prettier": "^10.1.1",
141
- "eslint-config-webpack": "^4.7.3",
142
- "eslint-plugin-import": "^2.32.0",
143
- "eslint-plugin-jest": "^29.5.0",
144
- "eslint-plugin-jsdoc": "^61.5.0",
145
- "eslint-plugin-n": "^17.23.1",
146
- "eslint-plugin-prettier": "^5.5.0",
147
- "eslint-plugin-unicorn": "^62.0.0",
137
+ "eslint-config-webpack": "^4.9.1",
148
138
  "file-loader": "^6.0.0",
149
139
  "fork-ts-checker-webpack-plugin": "^9.0.2",
150
- "globals": "^16.0.0",
140
+ "globals": "^17.0.0",
151
141
  "hash-wasm": "^4.9.0",
142
+ "html-loader": "^5.1.0",
152
143
  "husky": "^9.0.11",
153
144
  "istanbul": "^0.4.5",
154
145
  "jest": "^30.2.0",
@@ -171,7 +162,7 @@
171
162
  "node-gyp": "^12.1.0",
172
163
  "nyc": "^17.1.0",
173
164
  "open-cli": "^8.0.0",
174
- "pkg-pr-new": "^0.0.62",
165
+ "pkg-pr-new": "^0.0.63",
175
166
  "prettier": "^3.7.4",
176
167
  "prettier-2": "npm:prettier@^2",
177
168
  "pretty-format": "^30.0.5",
@@ -180,6 +171,12 @@
180
171
  "raw-loader": "^4.0.1",
181
172
  "react": "^19.2.3",
182
173
  "react-dom": "^19.2.3",
174
+ "rehype-sanitize": "^6.0.0",
175
+ "rehype-stringify": "^10.0.1",
176
+ "remark-frontmatter": "^5.0.0",
177
+ "remark-gfm": "^4.0.1",
178
+ "remark-parse": "^11.0.0",
179
+ "remark-rehype": "^11.1.2",
183
180
  "rimraf": "^3.0.2",
184
181
  "script-loader": "^0.7.2",
185
182
  "simple-git": "^3.28.0",
@@ -187,18 +184,18 @@
187
184
  "style-loader": "^4.0.0",
188
185
  "terser": "^5.43.1",
189
186
  "three": "^0.182.0",
190
- "tinybench": "^5.0.0",
187
+ "tinybench": "^6.0.0",
191
188
  "toml": "^3.0.0",
192
- "tooling": "webpack/tooling#v1.24.3",
189
+ "tooling": "webpack/tooling#v1.24.5",
193
190
  "ts-loader": "^9.5.4",
194
191
  "typescript": "^5.9.3",
192
+ "unified": "^11.0.5",
195
193
  "url-loader": "^4.1.0",
196
194
  "wast-loader": "^1.12.1",
197
195
  "webassembly-feature": "1.3.0",
198
196
  "webpack-cli": "^6.0.1",
199
197
  "xxhashjs": "^0.2.2",
200
- "yamljs": "^0.3.0",
201
- "yarn-deduplicate": "^6.0.1"
198
+ "yamljs": "^0.3.0"
202
199
  },
203
200
  "peerDependenciesMeta": {
204
201
  "webpack-cli": {