webpack 5.100.2 → 5.101.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 (309) hide show
  1. package/README.md +12 -10
  2. package/bin/webpack.js +7 -7
  3. package/lib/APIPlugin.js +12 -14
  4. package/lib/AutomaticPrefetchPlugin.js +2 -2
  5. package/lib/BannerPlugin.js +4 -4
  6. package/lib/Cache.js +1 -1
  7. package/lib/CacheFacade.js +7 -7
  8. package/lib/CaseSensitiveModulesWarning.js +2 -2
  9. package/lib/Chunk.js +3 -3
  10. package/lib/ChunkGraph.js +63 -18
  11. package/lib/ChunkGroup.js +4 -4
  12. package/lib/CleanPlugin.js +19 -53
  13. package/lib/CodeGenerationResults.js +3 -3
  14. package/lib/CompatibilityPlugin.js +6 -6
  15. package/lib/Compilation.js +168 -116
  16. package/lib/Compiler.js +37 -37
  17. package/lib/ConcatenationScope.js +39 -1
  18. package/lib/ConstPlugin.js +11 -11
  19. package/lib/ContextExclusionPlugin.js +3 -3
  20. package/lib/ContextModule.js +12 -11
  21. package/lib/ContextModuleFactory.js +11 -11
  22. package/lib/ContextReplacementPlugin.js +5 -5
  23. package/lib/DefinePlugin.js +24 -22
  24. package/lib/DelegatedModuleFactoryPlugin.js +1 -1
  25. package/lib/Dependency.js +2 -1
  26. package/lib/DllEntryPlugin.js +1 -1
  27. package/lib/DllReferencePlugin.js +1 -1
  28. package/lib/DynamicEntryPlugin.js +3 -3
  29. package/lib/EntryPlugin.js +1 -1
  30. package/lib/EnvironmentPlugin.js +1 -1
  31. package/lib/ErrorHelpers.js +2 -2
  32. package/lib/EvalDevToolModulePlugin.js +2 -2
  33. package/lib/EvalSourceMapDevToolPlugin.js +5 -5
  34. package/lib/ExportsInfo.js +9 -9
  35. package/lib/ExportsInfoApiPlugin.js +2 -2
  36. package/lib/ExternalModule.js +163 -48
  37. package/lib/ExternalModuleFactoryPlugin.js +2 -2
  38. package/lib/ExternalsPlugin.js +45 -0
  39. package/lib/FileSystemInfo.js +64 -61
  40. package/lib/FlagAllModulesAsUsedPlugin.js +2 -2
  41. package/lib/FlagDependencyExportsPlugin.js +7 -7
  42. package/lib/FlagDependencyUsagePlugin.js +4 -4
  43. package/lib/FlagEntryExportAsUsedPlugin.js +1 -1
  44. package/lib/HotModuleReplacementPlugin.js +27 -27
  45. package/lib/IgnorePlugin.js +3 -3
  46. package/lib/IgnoreWarningsPlugin.js +4 -4
  47. package/lib/InitFragment.js +6 -0
  48. package/lib/InvalidDependenciesModuleWarning.js +1 -1
  49. package/lib/JavascriptMetaInfoPlugin.js +1 -1
  50. package/lib/LibManifestPlugin.js +2 -2
  51. package/lib/LoaderOptionsPlugin.js +1 -1
  52. package/lib/LoaderTargetPlugin.js +2 -2
  53. package/lib/MainTemplate.js +1 -1
  54. package/lib/Module.js +3 -2
  55. package/lib/ModuleFilenameHelpers.js +3 -3
  56. package/lib/ModuleGraph.js +23 -38
  57. package/lib/ModuleInfoHeaderPlugin.js +3 -3
  58. package/lib/ModuleParseError.js +5 -3
  59. package/lib/ModuleTemplate.js +3 -2
  60. package/lib/MultiCompiler.js +29 -24
  61. package/lib/MultiStats.js +18 -13
  62. package/lib/MultiWatching.js +1 -1
  63. package/lib/NoEmitOnErrorsPlugin.js +2 -2
  64. package/lib/NodeStuffPlugin.js +27 -15
  65. package/lib/NormalModule.js +23 -23
  66. package/lib/NormalModuleFactory.js +23 -21
  67. package/lib/NormalModuleReplacementPlugin.js +3 -3
  68. package/lib/PrefetchPlugin.js +1 -1
  69. package/lib/ProgressPlugin.js +11 -11
  70. package/lib/ProvidePlugin.js +2 -2
  71. package/lib/RecordIdsPlugin.js +3 -3
  72. package/lib/ResolverFactory.js +3 -3
  73. package/lib/RuntimeGlobals.js +20 -0
  74. package/lib/RuntimePlugin.js +16 -16
  75. package/lib/RuntimeTemplate.js +35 -26
  76. package/lib/SizeFormatHelpers.js +1 -1
  77. package/lib/SourceMapDevToolModuleOptionsPlugin.js +4 -4
  78. package/lib/SourceMapDevToolPlugin.js +9 -9
  79. package/lib/Stats.js +2 -2
  80. package/lib/Template.js +1 -1
  81. package/lib/TemplatedPathPlugin.js +2 -2
  82. package/lib/UseStrictPlugin.js +1 -1
  83. package/lib/WarnCaseSensitiveModulesPlugin.js +1 -1
  84. package/lib/WarnDeprecatedOptionPlugin.js +1 -1
  85. package/lib/WarnNoModeSetPlugin.js +1 -1
  86. package/lib/WatchIgnorePlugin.js +2 -2
  87. package/lib/Watching.js +12 -14
  88. package/lib/WebpackIsIncludedPlugin.js +2 -2
  89. package/lib/WebpackOptionsApply.js +3 -3
  90. package/lib/asset/AssetGenerator.js +1 -1
  91. package/lib/asset/AssetModulesPlugin.js +6 -6
  92. package/lib/async-modules/AsyncModuleHelpers.js +1 -1
  93. package/lib/async-modules/AwaitDependenciesInitFragment.js +36 -24
  94. package/lib/async-modules/InferAsyncModulesPlugin.js +3 -3
  95. package/lib/buildChunkGraph.js +5 -5
  96. package/lib/cache/AddBuildDependenciesPlugin.js +1 -1
  97. package/lib/cache/IdleFileCachePlugin.js +5 -5
  98. package/lib/cache/PackFileCacheStrategy.js +20 -20
  99. package/lib/cache/ResolverCachePlugin.js +4 -4
  100. package/lib/cli.js +196 -14
  101. package/lib/config/browserslistTargetHandler.js +6 -6
  102. package/lib/config/defaults.js +23 -14
  103. package/lib/config/normalization.js +41 -38
  104. package/lib/config/target.js +4 -4
  105. package/lib/container/ContainerEntryModule.js +3 -3
  106. package/lib/container/ContainerPlugin.js +3 -3
  107. package/lib/container/ContainerReferencePlugin.js +3 -3
  108. package/lib/container/FallbackModule.js +1 -1
  109. package/lib/container/HoistContainerReferencesPlugin.js +7 -7
  110. package/lib/container/options.js +4 -4
  111. package/lib/css/CssGenerator.js +5 -3
  112. package/lib/css/CssLoadingRuntimeModule.js +1 -1
  113. package/lib/css/CssModulesPlugin.js +25 -22
  114. package/lib/css/CssParser.js +5 -5
  115. package/lib/css/walkCssTokens.js +9 -9
  116. package/lib/debug/ProfilingPlugin.js +5 -5
  117. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +4 -4
  118. package/lib/dependencies/AMDPlugin.js +3 -3
  119. package/lib/dependencies/AMDRequireArrayDependency.js +1 -1
  120. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +3 -3
  121. package/lib/dependencies/CommonJsExportRequireDependency.js +2 -2
  122. package/lib/dependencies/CommonJsExportsParserPlugin.js +12 -10
  123. package/lib/dependencies/CommonJsImportsParserPlugin.js +21 -19
  124. package/lib/dependencies/CommonJsPlugin.js +2 -2
  125. package/lib/dependencies/ContextDependency.js +1 -1
  126. package/lib/dependencies/ContextDependencyHelpers.js +3 -3
  127. package/lib/dependencies/CssIcssExportDependency.js +2 -2
  128. package/lib/dependencies/CssLocalIdentifierDependency.js +2 -2
  129. package/lib/dependencies/CssUrlDependency.js +4 -4
  130. package/lib/dependencies/DynamicExports.js +5 -5
  131. package/lib/dependencies/HarmonyAcceptDependency.js +91 -5
  132. package/lib/dependencies/HarmonyDetectionParserPlugin.js +2 -2
  133. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +17 -13
  134. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +7 -8
  135. package/lib/dependencies/HarmonyExportInitFragment.js +1 -1
  136. package/lib/dependencies/HarmonyExports.js +1 -1
  137. package/lib/dependencies/HarmonyImportDependency.js +28 -9
  138. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +56 -48
  139. package/lib/dependencies/HarmonyImportSideEffectDependency.js +4 -5
  140. package/lib/dependencies/HarmonyImportSpecifierDependency.js +3 -4
  141. package/lib/dependencies/HarmonyModulesPlugin.js +2 -8
  142. package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +1 -1
  143. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +4 -4
  144. package/lib/dependencies/ImportMetaPlugin.js +7 -7
  145. package/lib/dependencies/ImportParserPlugin.js +4 -4
  146. package/lib/dependencies/JsonExportsDependency.js +7 -2
  147. package/lib/dependencies/LoaderPlugin.js +4 -4
  148. package/lib/dependencies/ModuleDependency.js +2 -1
  149. package/lib/dependencies/ProvidedDependency.js +2 -2
  150. package/lib/dependencies/PureExpressionDependency.js +1 -1
  151. package/lib/dependencies/RequireContextDependencyParserPlugin.js +1 -1
  152. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +1 -1
  153. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +3 -3
  154. package/lib/dependencies/SystemPlugin.js +3 -3
  155. package/lib/dependencies/WorkerPlugin.js +5 -5
  156. package/lib/dependencies/getFunctionExpression.js +1 -1
  157. package/lib/esm/ExportWebpackRequireRuntimeModule.js +8 -1
  158. package/lib/esm/ModuleChunkFormatPlugin.js +35 -69
  159. package/lib/esm/ModuleChunkLoadingPlugin.js +3 -6
  160. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +15 -11
  161. package/lib/formatLocation.js +2 -2
  162. package/lib/hmr/HotModuleReplacement.runtime.js +39 -27
  163. package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +43 -32
  164. package/lib/hmr/JavascriptHotModuleReplacementHelper.js +1 -1
  165. package/lib/hmr/LazyCompilationPlugin.js +6 -6
  166. package/lib/hmr/lazyCompilationBackend.js +6 -6
  167. package/lib/ids/ChunkModuleIdRangePlugin.js +4 -4
  168. package/lib/ids/DeterministicChunkIdsPlugin.js +5 -4
  169. package/lib/ids/DeterministicModuleIdsPlugin.js +2 -2
  170. package/lib/ids/HashedModuleIdsPlugin.js +1 -1
  171. package/lib/ids/IdHelpers.js +9 -9
  172. package/lib/ids/NamedChunkIdsPlugin.js +5 -5
  173. package/lib/ids/NamedModuleIdsPlugin.js +2 -2
  174. package/lib/ids/NaturalChunkIdsPlugin.js +2 -2
  175. package/lib/ids/NaturalModuleIdsPlugin.js +1 -1
  176. package/lib/ids/OccurrenceChunkIdsPlugin.js +2 -2
  177. package/lib/ids/OccurrenceModuleIdsPlugin.js +4 -4
  178. package/lib/ids/SyncModuleIdsPlugin.js +4 -4
  179. package/lib/index.js +18 -6
  180. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +1 -1
  181. package/lib/javascript/BasicEvaluatedExpression.js +3 -3
  182. package/lib/javascript/ChunkFormatHelpers.js +70 -0
  183. package/lib/javascript/CommonJsChunkFormatPlugin.js +10 -21
  184. package/lib/javascript/EnableChunkLoadingPlugin.js +1 -1
  185. package/lib/javascript/JavascriptGenerator.js +1 -1
  186. package/lib/javascript/JavascriptModulesPlugin.js +108 -54
  187. package/lib/javascript/JavascriptParser.js +80 -78
  188. package/lib/javascript/JavascriptParserHelpers.js +3 -3
  189. package/lib/javascript/StartupHelpers.js +2 -2
  190. package/lib/json/JsonGenerator.js +2 -2
  191. package/lib/json/JsonModulesPlugin.js +2 -2
  192. package/lib/library/AbstractLibraryPlugin.js +30 -3
  193. package/lib/library/AmdLibraryPlugin.js +3 -3
  194. package/lib/library/AssignLibraryPlugin.js +2 -2
  195. package/lib/library/EnableLibraryPlugin.js +2 -2
  196. package/lib/library/ModuleLibraryPlugin.js +49 -31
  197. package/lib/library/SystemLibraryPlugin.js +6 -4
  198. package/lib/library/UmdLibraryPlugin.js +14 -14
  199. package/lib/logging/createConsoleLogger.js +4 -4
  200. package/lib/logging/runtime.js +3 -3
  201. package/lib/logging/truncateArgs.js +4 -4
  202. package/lib/node/CommonJsChunkLoadingPlugin.js +2 -2
  203. package/lib/node/NodeEnvironmentPlugin.js +1 -1
  204. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +16 -14
  205. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +7 -7
  206. package/lib/node/ReadFileCompileWasmPlugin.js +7 -7
  207. package/lib/node/RequireChunkLoadingRuntimeModule.js +13 -6
  208. package/lib/node/nodeConsole.js +2 -2
  209. package/lib/optimize/AggressiveMergingPlugin.js +2 -2
  210. package/lib/optimize/AggressiveSplittingPlugin.js +10 -10
  211. package/lib/optimize/ConcatenatedModule.js +186 -77
  212. package/lib/optimize/EnsureChunkConditionsPlugin.js +2 -2
  213. package/lib/optimize/FlagIncludedChunksPlugin.js +2 -2
  214. package/lib/optimize/InnerGraph.js +5 -5
  215. package/lib/optimize/InnerGraphPlugin.js +14 -12
  216. package/lib/optimize/LimitChunkCountPlugin.js +5 -5
  217. package/lib/optimize/MangleExportsPlugin.js +5 -5
  218. package/lib/optimize/MergeDuplicateChunksPlugin.js +2 -2
  219. package/lib/optimize/MinChunkSizePlugin.js +3 -3
  220. package/lib/optimize/ModuleConcatenationPlugin.js +45 -38
  221. package/lib/optimize/RealContentHashPlugin.js +23 -23
  222. package/lib/optimize/RemoveEmptyChunksPlugin.js +2 -2
  223. package/lib/optimize/RemoveParentModulesPlugin.js +3 -3
  224. package/lib/optimize/RuntimeChunkPlugin.js +2 -2
  225. package/lib/optimize/SideEffectsFlagPlugin.js +5 -5
  226. package/lib/optimize/SplitChunksPlugin.js +20 -20
  227. package/lib/performance/AssetsOverSizeLimitWarning.js +1 -1
  228. package/lib/performance/EntrypointsOverSizeLimitWarning.js +2 -2
  229. package/lib/performance/SizeLimitsPlugin.js +4 -4
  230. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +1 -1
  231. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +3 -3
  232. package/lib/rules/BasicMatcherRulePlugin.js +1 -1
  233. package/lib/rules/RuleSetCompiler.js +10 -10
  234. package/lib/rules/UseEffectRulePlugin.js +2 -2
  235. package/lib/runtime/GetChunkFilenameRuntimeModule.js +19 -15
  236. package/lib/runtime/GetMainFilenameRuntimeModule.js +1 -1
  237. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -1
  238. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +1 -1
  239. package/lib/runtime/StartupChunkDependenciesPlugin.js +2 -2
  240. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +3 -3
  241. package/lib/schemes/DataUriPlugin.js +3 -3
  242. package/lib/schemes/FileUriPlugin.js +1 -1
  243. package/lib/schemes/HttpUriPlugin.js +40 -36
  244. package/lib/schemes/VirtualUrlPlugin.js +1 -1
  245. package/lib/serialization/BinaryMiddleware.js +11 -11
  246. package/lib/serialization/FileMiddleware.js +18 -17
  247. package/lib/serialization/ObjectMiddleware.js +8 -8
  248. package/lib/serialization/Serializer.js +2 -2
  249. package/lib/serialization/SerializerMiddleware.js +2 -2
  250. package/lib/sharing/ConsumeSharedPlugin.js +4 -4
  251. package/lib/sharing/ProvideSharedPlugin.js +4 -4
  252. package/lib/sharing/SharePlugin.js +1 -1
  253. package/lib/sharing/resolveMatchedConfigs.js +1 -1
  254. package/lib/stats/DefaultStatsFactoryPlugin.js +85 -80
  255. package/lib/stats/DefaultStatsPresetPlugin.js +15 -15
  256. package/lib/stats/DefaultStatsPrinterPlugin.js +87 -87
  257. package/lib/stats/StatsFactory.js +7 -7
  258. package/lib/stats/StatsPrinter.js +9 -9
  259. package/lib/url/URLParserPlugin.js +5 -5
  260. package/lib/util/AsyncQueue.js +4 -4
  261. package/lib/util/IterableHelpers.js +2 -2
  262. package/lib/util/LazyBucketSortedSet.js +3 -3
  263. package/lib/util/SetHelpers.js +2 -2
  264. package/lib/util/StackedCacheMap.js +1 -1
  265. package/lib/util/StackedMap.js +1 -1
  266. package/lib/util/TupleSet.js +1 -1
  267. package/lib/util/WeakTupleMap.js +1 -1
  268. package/lib/util/cleverMerge.js +8 -8
  269. package/lib/util/comparators.js +10 -10
  270. package/lib/util/compileBooleanMatcher.js +20 -20
  271. package/lib/util/concatenate.js +3 -3
  272. package/lib/util/conventions.js +4 -4
  273. package/lib/util/create-schema-validation.js +1 -1
  274. package/lib/util/createHash.js +1 -1
  275. package/lib/util/deprecation.js +4 -4
  276. package/lib/util/deterministicGrouping.js +7 -7
  277. package/lib/util/findGraphRoots.js +1 -1
  278. package/lib/util/fs.js +4 -4
  279. package/lib/util/identifier.js +14 -14
  280. package/lib/util/magicComment.js +5 -1
  281. package/lib/util/memoize.js +1 -1
  282. package/lib/util/processAsyncTree.js +2 -2
  283. package/lib/util/propertyName.js +1 -1
  284. package/lib/util/removeBOM.js +1 -1
  285. package/lib/util/runtime.js +6 -6
  286. package/lib/util/semver.js +16 -16
  287. package/lib/util/serialization.js +5 -5
  288. package/lib/util/smartGrouping.js +1 -1
  289. package/lib/validateSchema.js +2 -2
  290. package/lib/wasm/EnableWasmLoadingPlugin.js +1 -1
  291. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +1 -1
  292. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +1 -1
  293. package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +4 -4
  294. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +13 -9
  295. package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +2 -2
  296. package/lib/wasm-sync/WebAssemblyGenerator.js +16 -17
  297. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +4 -2
  298. package/lib/wasm-sync/WebAssemblyParser.js +2 -2
  299. package/lib/web/FetchCompileAsyncWasmPlugin.js +4 -4
  300. package/lib/web/FetchCompileWasmPlugin.js +4 -4
  301. package/lib/web/JsonpChunkLoadingPlugin.js +2 -2
  302. package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -1
  303. package/lib/webpack.js +17 -12
  304. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +2 -2
  305. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +1 -1
  306. package/package.json +16 -16
  307. package/schemas/WebpackOptions.check.js +1 -1
  308. package/schemas/WebpackOptions.json +4 -0
  309. package/types.d.ts +275 -64
package/README.md CHANGED
@@ -133,16 +133,6 @@ loaders](https://webpack.js.org/api/loaders/) using Node.js.
133
133
  Loaders are activated by using `loadername!` prefixes in `require()` statements,
134
134
  or are automatically applied via regex from your webpack configuration.
135
135
 
136
- #### Files
137
-
138
- | Name | Status | Install Size | Description |
139
- | :---------------: | :--------: | :----------: | :------------------------------------------------------- |
140
- | [val-loader][val] | ![val-npm] | ![val-size] | Executes code as module and considers exports as JS code |
141
-
142
- [val]: https://github.com/webpack-contrib/val-loader
143
- [val-npm]: https://img.shields.io/npm/v/val-loader.svg
144
- [val-size]: https://packagephobia.com/badge?p=val-loader
145
-
146
136
  #### JSON
147
137
 
148
138
  | Name | Status | Install Size | Description |
@@ -262,6 +252,18 @@ you full control of what is loaded initially and what is loaded at runtime
262
252
  through code splitting. It can also make your code chunks **cache
263
253
  friendly** by using hashes.
264
254
 
255
+ ### Developer Tools
256
+
257
+ If you're working on webpack itself, or building advanced plugins or integrations, the tools below can help you explore internal mechanics, debug plugin life-cycles, and build custom tooling.
258
+
259
+ #### Instrumentation
260
+
261
+ | Name | Status | Description |
262
+ | --------------------------------------------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
263
+ | [tapable-tracer](https://github.com/ertgl/tapable-tracer) | ![tapable-tracer-npm] | Traces tapable hook execution in real-time and collects structured stack frames. Can export to UML for generating visualizations. |
264
+
265
+ [tapable-tracer-npm]: https://img.shields.io/npm/v/tapable-tracer.svg
266
+
265
267
  <h2>Contributing</h2>
266
268
 
267
269
  **We want contributing to webpack to be fun, enjoyable, and educational for anyone, and everyone.** We have a [vibrant ecosystem](https://medium.com/webpack/contributors-guide/home) that spans beyond this single repo. We welcome you to check out any of the repositories in [our organization](https://github.com/webpack) or [webpack-contrib organization](https://github.com/webpack-contrib) which houses all of our loaders and plugins.
package/bin/webpack.js CHANGED
@@ -16,11 +16,11 @@ const runCommand = (command, args) => {
16
16
  shell: true
17
17
  });
18
18
 
19
- executedCommand.on("error", error => {
19
+ executedCommand.on("error", (error) => {
20
20
  reject(error);
21
21
  });
22
22
 
23
- executedCommand.on("exit", code => {
23
+ executedCommand.on("exit", (code) => {
24
24
  if (code === 0) {
25
25
  resolve();
26
26
  } else {
@@ -34,7 +34,7 @@ const runCommand = (command, args) => {
34
34
  * @param {string} packageName name of the package
35
35
  * @returns {boolean} is the package installed?
36
36
  */
37
- const isInstalled = packageName => {
37
+ const isInstalled = (packageName) => {
38
38
  if (process.versions.pnp) {
39
39
  return true;
40
40
  }
@@ -76,7 +76,7 @@ const isInstalled = packageName => {
76
76
  * @param {CliOption} cli options
77
77
  * @returns {void}
78
78
  */
79
- const runCli = cli => {
79
+ const runCli = (cli) => {
80
80
  const path = require("path");
81
81
 
82
82
  const pkgPath = require.resolve(`${cli.package}/package.json`);
@@ -85,7 +85,7 @@ const runCli = cli => {
85
85
 
86
86
  if (pkg.type === "module" || /\.mjs/i.test(pkg.bin[cli.binName])) {
87
87
  import(path.resolve(path.dirname(pkgPath), pkg.bin[cli.binName])).catch(
88
- err => {
88
+ (err) => {
89
89
  console.error(err);
90
90
  process.exitCode = 1;
91
91
  }
@@ -152,7 +152,7 @@ if (!cli.installed) {
152
152
  // executed. Setting the exit code here to ensure the script exits correctly in those cases. The callback
153
153
  // function is responsible for clearing the exit code if the user wishes to install webpack-cli.
154
154
  process.exitCode = 1;
155
- questionInterface.question(question, answer => {
155
+ questionInterface.question(question, (answer) => {
156
156
  questionInterface.close();
157
157
 
158
158
  const normalizedAnswer = answer.toLowerCase().startsWith("y");
@@ -183,7 +183,7 @@ if (!cli.installed) {
183
183
  .then(() => {
184
184
  runCli(cli);
185
185
  })
186
- .catch(err => {
186
+ .catch((err) => {
187
187
  console.error(err);
188
188
  process.exitCode = 1;
189
189
  });
package/lib/APIPlugin.js CHANGED
@@ -169,7 +169,7 @@ class APIPlugin {
169
169
 
170
170
  compilation.hooks.runtimeRequirementInTree
171
171
  .for(RuntimeGlobals.chunkName)
172
- .tap(PLUGIN_NAME, chunk => {
172
+ .tap(PLUGIN_NAME, (chunk) => {
173
173
  compilation.addRuntimeModule(
174
174
  chunk,
175
175
  new ChunkNameRuntimeModule(/** @type {string} */ (chunk.name))
@@ -190,13 +190,11 @@ class APIPlugin {
190
190
  PLUGIN_NAME,
191
191
  (source, module, renderContext) => {
192
192
  if (/** @type {BuildInfo} */ (module.buildInfo).needCreateRequire) {
193
- const needPrefix =
194
- renderContext.runtimeTemplate.supportNodePrefixForCoreModules();
195
193
  const chunkInitFragments = [
196
194
  new InitFragment(
197
- `import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "${
198
- needPrefix ? "node:" : ""
199
- }module";\n`,
195
+ `import { createRequire as __WEBPACK_EXTERNAL_createRequire } from ${renderContext.runtimeTemplate.renderNodePrefixForCoreModule(
196
+ "module"
197
+ )};\n`,
200
198
  InitFragment.STAGE_HARMONY_IMPORTS,
201
199
  0,
202
200
  "external module node-commonjs"
@@ -213,10 +211,10 @@ class APIPlugin {
213
211
  /**
214
212
  * @param {JavascriptParser} parser the parser
215
213
  */
216
- const handler = parser => {
214
+ const handler = (parser) => {
217
215
  for (const key of Object.keys(REPLACEMENTS)) {
218
216
  const info = REPLACEMENTS[key];
219
- parser.hooks.expression.for(key).tap(PLUGIN_NAME, expression => {
217
+ parser.hooks.expression.for(key).tap(PLUGIN_NAME, (expression) => {
220
218
  const dep = toConstantDependency(parser, info.expr, info.req);
221
219
 
222
220
  if (key === "__non_webpack_require__" && this.options.module) {
@@ -227,7 +225,7 @@ class APIPlugin {
227
225
  return dep(expression);
228
226
  });
229
227
  if (info.assign === false) {
230
- parser.hooks.assign.for(key).tap(PLUGIN_NAME, expr => {
228
+ parser.hooks.assign.for(key).tap(PLUGIN_NAME, (expr) => {
231
229
  const err = new WebpackError(`${key} must not be assigned`);
232
230
  err.loc = /** @type {DependencyLocation} */ (expr.loc);
233
231
  throw err;
@@ -242,7 +240,7 @@ class APIPlugin {
242
240
 
243
241
  parser.hooks.expression
244
242
  .for("__webpack_layer__")
245
- .tap(PLUGIN_NAME, expr => {
243
+ .tap(PLUGIN_NAME, (expr) => {
246
244
  const dep = new ConstDependency(
247
245
  JSON.stringify(parser.state.module.layer),
248
246
  /** @type {Range} */ (expr.range)
@@ -253,7 +251,7 @@ class APIPlugin {
253
251
  });
254
252
  parser.hooks.evaluateIdentifier
255
253
  .for("__webpack_layer__")
256
- .tap(PLUGIN_NAME, expr =>
254
+ .tap(PLUGIN_NAME, (expr) =>
257
255
  (parser.state.module.layer === null
258
256
  ? new BasicEvaluatedExpression().setNull()
259
257
  : new BasicEvaluatedExpression().setString(
@@ -263,7 +261,7 @@ class APIPlugin {
263
261
  );
264
262
  parser.hooks.evaluateTypeof
265
263
  .for("__webpack_layer__")
266
- .tap(PLUGIN_NAME, expr =>
264
+ .tap(PLUGIN_NAME, (expr) =>
267
265
  new BasicEvaluatedExpression()
268
266
  .setString(
269
267
  parser.state.module.layer === null ? "object" : "string"
@@ -273,7 +271,7 @@ class APIPlugin {
273
271
 
274
272
  parser.hooks.expression
275
273
  .for("__webpack_module__.id")
276
- .tap(PLUGIN_NAME, expr => {
274
+ .tap(PLUGIN_NAME, (expr) => {
277
275
  /** @type {BuildInfo} */
278
276
  (parser.state.module.buildInfo).moduleConcatenationBailout =
279
277
  "__webpack_module__.id";
@@ -289,7 +287,7 @@ class APIPlugin {
289
287
 
290
288
  parser.hooks.expression
291
289
  .for("__webpack_module__")
292
- .tap(PLUGIN_NAME, expr => {
290
+ .tap(PLUGIN_NAME, (expr) => {
293
291
  /** @type {BuildInfo} */
294
292
  (parser.state.module.buildInfo).moduleConcatenationBailout =
295
293
  "__webpack_module__";
@@ -31,7 +31,7 @@ class AutomaticPrefetchPlugin {
31
31
  );
32
32
  /** @type {{context: string | null, request: string}[] | null} */
33
33
  let lastModules = null;
34
- compiler.hooks.afterCompile.tap(PLUGIN_NAME, compilation => {
34
+ compiler.hooks.afterCompile.tap(PLUGIN_NAME, (compilation) => {
35
35
  lastModules = [];
36
36
 
37
37
  for (const m of compilation.modules) {
@@ -54,7 +54,7 @@ class AutomaticPrefetchPlugin {
54
54
  callback
55
55
  );
56
56
  },
57
- err => {
57
+ (err) => {
58
58
  lastModules = null;
59
59
  callback(err);
60
60
  }
@@ -32,7 +32,7 @@ const validate = createSchemaValidation(
32
32
  * @param {string} str string to wrap
33
33
  * @returns {string} wrapped string
34
34
  */
35
- const wrapComment = str => {
35
+ const wrapComment = (str) => {
36
36
  if (!str.includes("\n")) {
37
37
  return Template.toComment(str);
38
38
  }
@@ -67,7 +67,7 @@ class BannerPlugin {
67
67
  /** @type {BannerFunction} */
68
68
  this.banner = this.options.raw
69
69
  ? getBanner
70
- : /** @type {BannerFunction} */ data => wrapComment(getBanner(data));
70
+ : /** @type {BannerFunction} */ (data) => wrapComment(getBanner(data));
71
71
  } else {
72
72
  const banner = this.options.raw
73
73
  ? bannerOption
@@ -93,7 +93,7 @@ class BannerPlugin {
93
93
  const stage =
94
94
  this.options.stage || Compilation.PROCESS_ASSETS_STAGE_ADDITIONS;
95
95
 
96
- compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
96
+ compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
97
97
  compilation.hooks.processAssets.tap({ name: PLUGIN_NAME, stage }, () => {
98
98
  for (const chunk of compilation.chunks) {
99
99
  if (options.entryOnly && !chunk.canBeInitial()) {
@@ -114,7 +114,7 @@ class BannerPlugin {
114
114
  data
115
115
  );
116
116
 
117
- compilation.updateAsset(file, old => {
117
+ compilation.updateAsset(file, (old) => {
118
118
  const cached = cache.get(old);
119
119
  if (!cached || cached.comment !== comment) {
120
120
  const source = options.footer
package/lib/Cache.js CHANGED
@@ -40,7 +40,7 @@ const {
40
40
  * @param {(err?: Error) => void} callback callback
41
41
  * @returns {(err?: Error) => void} callback
42
42
  */
43
- const needCalls = (times, callback) => err => {
43
+ const needCalls = (times, callback) => (err) => {
44
44
  if (--times === 0) {
45
45
  return callback(err);
46
46
  }
@@ -61,8 +61,8 @@ class MultiItemCache {
61
61
  * @param {number} i index
62
62
  * @returns {Promise<T>} promise with the data
63
63
  */
64
- const next = i =>
65
- this._items[i].getPromise().then(result => {
64
+ const next = (i) =>
65
+ this._items[i].getPromise().then((result) => {
66
66
  if (result !== undefined) return result;
67
67
  if (++i < this._items.length) return next(i);
68
68
  });
@@ -89,7 +89,7 @@ class MultiItemCache {
89
89
  * @returns {Promise<void>} promise signals when the value is stored
90
90
  */
91
91
  storePromise(data) {
92
- return Promise.all(this._items.map(item => item.storePromise(data))).then(
92
+ return Promise.all(this._items.map((item) => item.storePromise(data))).then(
93
93
  () => {}
94
94
  );
95
95
  }
@@ -149,7 +149,7 @@ class ItemCacheFacade {
149
149
  */
150
150
  storePromise(data) {
151
151
  return new Promise((resolve, reject) => {
152
- this._cache.store(this._name, this._etag, data, err => {
152
+ this._cache.store(this._name, this._etag, data, (err) => {
153
153
  if (err) {
154
154
  reject(err);
155
155
  } else {
@@ -171,7 +171,7 @@ class ItemCacheFacade {
171
171
  if (cacheEntry !== undefined) return cacheEntry;
172
172
  computer((err, result) => {
173
173
  if (err) return callback(err);
174
- this.store(result, err => {
174
+ this.store(result, (err) => {
175
175
  if (err) return callback(err);
176
176
  callback(null, result);
177
177
  });
@@ -297,7 +297,7 @@ class CacheFacade {
297
297
  */
298
298
  storePromise(identifier, etag, data) {
299
299
  return new Promise((resolve, reject) => {
300
- this._cache.store(`${this._name}|${identifier}`, etag, data, err => {
300
+ this._cache.store(`${this._name}|${identifier}`, etag, data, (err) => {
301
301
  if (err) {
302
302
  reject(err);
303
303
  } else {
@@ -321,7 +321,7 @@ class CacheFacade {
321
321
  if (cacheEntry !== undefined) return cacheEntry;
322
322
  computer((err, result) => {
323
323
  if (err) return callback(err);
324
- this.store(identifier, etag, result, err => {
324
+ this.store(identifier, etag, result, (err) => {
325
325
  if (err) return callback(err);
326
326
  callback(null, result);
327
327
  });
@@ -14,7 +14,7 @@ const WebpackError = require("./WebpackError");
14
14
  * @param {Module[]} modules the modules to be sorted
15
15
  * @returns {Module[]} sorted version of original modules
16
16
  */
17
- const sortModules = modules =>
17
+ const sortModules = (modules) =>
18
18
  modules.sort((a, b) => {
19
19
  const aIdent = a.identifier();
20
20
  const bIdent = b.identifier();
@@ -33,7 +33,7 @@ const sortModules = modules =>
33
33
  */
34
34
  const createModulesListMessage = (modules, moduleGraph) =>
35
35
  modules
36
- .map(m => {
36
+ .map((m) => {
37
37
  let message = `* ${m.identifier()}`;
38
38
  const validReasons = [
39
39
  ...moduleGraph.getIncomingConnectionsByOriginModule(m).keys()
package/lib/Chunk.js CHANGED
@@ -583,7 +583,7 @@ class Chunk {
583
583
  const chunks = new Set();
584
584
 
585
585
  const initialChunks = intersect(
586
- Array.from(this.groupsIterable, g => new Set(g.chunks))
586
+ Array.from(this.groupsIterable, (g) => new Set(g.chunks))
587
587
  );
588
588
 
589
589
  const initialQueue = new Set(this.groupsIterable);
@@ -672,7 +672,7 @@ class Chunk {
672
672
  const queue = new Set();
673
673
 
674
674
  const initialChunks = intersect(
675
- Array.from(this.groupsIterable, g => new Set(g.chunks))
675
+ Array.from(this.groupsIterable, (g) => new Set(g.chunks))
676
676
  );
677
677
 
678
678
  for (const chunkGroup of this.groupsIterable) {
@@ -812,7 +812,7 @@ class Chunk {
812
812
  * @param {Chunk} chunk a chunk
813
813
  * @returns {void}
814
814
  */
815
- const addChildIdsByOrdersToMap = chunk => {
815
+ const addChildIdsByOrdersToMap = (chunk) => {
816
816
  const data = chunk.getChildIdsByOrders(chunkGraph, filterFn);
817
817
  for (const key of Object.keys(data)) {
818
818
  let chunkMap = chunkMaps[key];
package/lib/ChunkGraph.js CHANGED
@@ -76,13 +76,13 @@ class ModuleHashInfo {
76
76
  * @param {SortableSet<T>} set the set
77
77
  * @returns {T[]} set as array
78
78
  */
79
- const getArray = set => [...set];
79
+ const getArray = (set) => [...set];
80
80
 
81
81
  /**
82
82
  * @param {SortableSet<Chunk>} chunks the chunks
83
83
  * @returns {RuntimeSpecSet} runtimes
84
84
  */
85
- const getModuleRuntimes = chunks => {
85
+ const getModuleRuntimes = (chunks) => {
86
86
  const runtimes = new RuntimeSpecSet();
87
87
  for (const chunk of chunks) {
88
88
  runtimes.add(chunk.runtime);
@@ -94,7 +94,7 @@ const getModuleRuntimes = chunks => {
94
94
  * @param {WeakMap<Module, Set<string>> | undefined} sourceTypesByModule sourceTypesByModule
95
95
  * @returns {(set: SortableSet<Module>) => Map<string, SortableSet<Module>>} modules by source type
96
96
  */
97
- const modulesBySourceType = sourceTypesByModule => set => {
97
+ const modulesBySourceType = (sourceTypesByModule) => (set) => {
98
98
  /** @type {Map<string, SortableSet<Module>>} */
99
99
  const map = new Map();
100
100
  for (const module of set) {
@@ -136,10 +136,10 @@ const createOrderedArrayFunctionMap = new WeakMap();
136
136
  * @param {ModuleComparator} comparator comparator function
137
137
  * @returns {ModuleSetToArrayFunction} set as ordered array
138
138
  */
139
- const createOrderedArrayFunction = comparator => {
139
+ const createOrderedArrayFunction = (comparator) => {
140
140
  let fn = createOrderedArrayFunctionMap.get(comparator);
141
141
  if (fn !== undefined) return fn;
142
- fn = set => {
142
+ fn = (set) => {
143
143
  set.sortWith(comparator);
144
144
  return [...set];
145
145
  };
@@ -151,7 +151,7 @@ const createOrderedArrayFunction = comparator => {
151
151
  * @param {Iterable<Module>} modules the modules to get the count/size of
152
152
  * @returns {number} the size of the modules
153
153
  */
154
- const getModulesSize = modules => {
154
+ const getModulesSize = (modules) => {
155
155
  let size = 0;
156
156
  for (const module of modules) {
157
157
  for (const type of module.getSourceTypes()) {
@@ -165,7 +165,7 @@ const getModulesSize = modules => {
165
165
  * @param {Iterable<Module>} modules the sortable Set to get the size of
166
166
  * @returns {Record<string, number>} the sizes of the modules
167
167
  */
168
- const getModulesSizes = modules => {
168
+ const getModulesSizes = (modules) => {
169
169
  const sizes = Object.create(null);
170
170
  for (const module of modules) {
171
171
  for (const type of module.getSourceTypes()) {
@@ -311,13 +311,13 @@ class ChunkGraph {
311
311
  _getGraphRoots(set) {
312
312
  const { moduleGraph } = this;
313
313
  return [
314
- ...findGraphRoots(set, module => {
314
+ ...findGraphRoots(set, (module) => {
315
315
  /** @type {Set<Module>} */
316
316
  const set = new Set();
317
317
  /**
318
318
  * @param {Module} module module
319
319
  */
320
- const addDependencies = module => {
320
+ const addDependencies = (module) => {
321
321
  for (const connection of moduleGraph.getOutgoingConnections(module)) {
322
322
  if (!connection.module) continue;
323
323
  const activeState = connection.getActiveState(undefined);
@@ -1238,6 +1238,48 @@ class ChunkGraph {
1238
1238
  return set;
1239
1239
  }
1240
1240
 
1241
+ /**
1242
+ * @param {Chunk} chunk the chunk
1243
+ * @returns {Iterable<Chunk>} iterable of chunks and include chunks from children entrypoints
1244
+ */
1245
+ getChunkEntryDependOnChunksIterable(chunk) {
1246
+ /** @type {Set<Chunk>} */
1247
+ const set = new Set();
1248
+
1249
+ /** @type {Set<Entrypoint>} */
1250
+ const entrypoints = new Set();
1251
+
1252
+ for (const chunkGroup of chunk.groupsIterable) {
1253
+ if (chunkGroup instanceof Entrypoint) {
1254
+ const queue = [chunkGroup];
1255
+ while (queue.length > 0) {
1256
+ const current = queue.shift();
1257
+ if (current) {
1258
+ entrypoints.add(current);
1259
+
1260
+ let hasChildrenEntrypoint = false;
1261
+ for (const child of current.childrenIterable) {
1262
+ if (child.isInitial()) {
1263
+ hasChildrenEntrypoint = true;
1264
+ queue.push(/** @type {Entrypoint} */ (child));
1265
+ }
1266
+ }
1267
+ // entryChunkB: hasChildrenEntrypoint = true
1268
+ // entryChunkA: dependOn = entryChunkB
1269
+ if (hasChildrenEntrypoint) {
1270
+ const entrypointChunk = current.getEntrypointChunk();
1271
+ if (entrypointChunk !== chunk && !entrypointChunk.hasRuntime()) {
1272
+ // add entryChunkB to set
1273
+ set.add(entrypointChunk);
1274
+ }
1275
+ }
1276
+ }
1277
+ }
1278
+ }
1279
+ }
1280
+ return set;
1281
+ }
1282
+
1241
1283
  /**
1242
1284
  * @param {Chunk} chunk the chunk
1243
1285
  * @returns {boolean} true, when it has dependent chunks
@@ -1272,7 +1314,10 @@ class ChunkGraph {
1272
1314
  const array = [...cgc.runtimeModules];
1273
1315
  array.sort(
1274
1316
  concatComparators(
1275
- compareSelect(r => /** @type {RuntimeModule} */ (r).stage, compareIds),
1317
+ compareSelect(
1318
+ (r) => /** @type {RuntimeModule} */ (r).stage,
1319
+ compareIds
1320
+ ),
1276
1321
  compareModulesByIdentifier
1277
1322
  )
1278
1323
  );
@@ -1401,7 +1446,7 @@ class ChunkGraph {
1401
1446
  throw new Error(
1402
1447
  `No unique hash info entry for unspecified runtime for ${module.identifier()} (existing runtimes: ${Array.from(
1403
1448
  hashes.keys(),
1404
- r => runtimeToString(r)
1449
+ (r) => runtimeToString(r)
1405
1450
  ).join(", ")}).
1406
1451
  Caller might not support runtime-dependent code generation (opt-out via optimization.usedExports: "global").`
1407
1452
  );
@@ -1493,7 +1538,7 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
1493
1538
  cgm.runtimeRequirements = map;
1494
1539
  return;
1495
1540
  }
1496
- runtimeRequirementsMap.update(runtime, runtimeRequirements => {
1541
+ runtimeRequirementsMap.update(runtime, (runtimeRequirements) => {
1497
1542
  if (runtimeRequirements === undefined) {
1498
1543
  return transferOwnership ? items : new Set(items);
1499
1544
  } else if (!transferOwnership || runtimeRequirements.size >= items.size) {
@@ -1623,7 +1668,7 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
1623
1668
  * @param {ConnectionState} state state
1624
1669
  * @returns {"F" | "T" | "O"} result
1625
1670
  */
1626
- const activeStateToString = state => {
1671
+ const activeStateToString = (state) => {
1627
1672
  if (state === false) return "F";
1628
1673
  if (state === true) return "T";
1629
1674
  if (state === ModuleGraphConnection.TRANSITIVE_ONLY) return "O";
@@ -1675,7 +1720,7 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
1675
1720
  let stateInfo = "";
1676
1721
  forEachRuntime(
1677
1722
  runtime,
1678
- runtime => {
1723
+ (runtime) => {
1679
1724
  const state = connection.getActiveState(runtime);
1680
1725
  states.add(state);
1681
1726
  stateInfo += activeStateToString(state) + runtime;
@@ -1702,7 +1747,7 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
1702
1747
  /**
1703
1748
  * @param {Module} module module
1704
1749
  */
1705
- const addModuleToHash = module => {
1750
+ const addModuleToHash = (module) => {
1706
1751
  hash.update(
1707
1752
  this._getModuleGraphHashBigInt(
1708
1753
  this._getChunkGraphModule(module),
@@ -1714,7 +1759,7 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
1714
1759
  /**
1715
1760
  * @param {Set<Module>} modules modules
1716
1761
  */
1717
- const addModulesToHash = modules => {
1762
+ const addModulesToHash = (modules) => {
1718
1763
  let xor = ZERO_BIG_INT;
1719
1764
  for (const m of modules) {
1720
1765
  xor ^= this._getModuleGraphHashBigInt(
@@ -1769,7 +1814,7 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
1769
1814
  * @param {Module} module the module
1770
1815
  * @returns {ChunkGraph} the chunk graph
1771
1816
  */
1772
- module => {
1817
+ (module) => {
1773
1818
  const chunkGraph = chunkGraphForModuleMap.get(module);
1774
1819
  if (!chunkGraph) {
1775
1820
  throw new Error(
@@ -1821,7 +1866,7 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
1821
1866
  * @param {Chunk} chunk the chunk
1822
1867
  * @returns {ChunkGraph} the chunk graph
1823
1868
  */
1824
- chunk => {
1869
+ (chunk) => {
1825
1870
  const chunkGraph = chunkGraphForChunkMap.get(chunk);
1826
1871
  if (!chunkGraph) {
1827
1872
  throw new Error(
package/lib/ChunkGroup.js CHANGED
@@ -40,7 +40,7 @@ let debugId = 5000;
40
40
  * @param {SortableSet<T>} set set to convert to array.
41
41
  * @returns {T[]} the array format of existing set
42
42
  */
43
- const getArray = set => [...set];
43
+ const getArray = (set) => [...set];
44
44
 
45
45
  /**
46
46
  * A convenience method used to sort chunks based on their id's
@@ -165,7 +165,7 @@ class ChunkGroup {
165
165
  * @returns {string} a unique concatenation of chunk debugId's
166
166
  */
167
167
  get debugId() {
168
- return Array.from(this.chunks, x => x.debugId).join("+");
168
+ return Array.from(this.chunks, (x) => x.debugId).join("+");
169
169
  }
170
170
 
171
171
  /**
@@ -173,7 +173,7 @@ class ChunkGroup {
173
173
  * @returns {string} a unique concatenation of chunk ids
174
174
  */
175
175
  get id() {
176
- return Array.from(this.chunks, x => x.id).join("+");
176
+ return Array.from(this.chunks, (x) => x.id).join("+");
177
177
  }
178
178
 
179
179
  /**
@@ -533,7 +533,7 @@ class ChunkGroup {
533
533
  if (cmp !== 0) return cmp;
534
534
  return a.group.compareTo(chunkGraph, b.group);
535
535
  });
536
- result[name] = list.map(i => i.group);
536
+ result[name] = list.map((i) => i.group);
537
537
  }
538
538
  return result;
539
539
  }