webpack 5.90.3 → 5.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of webpack might be problematic. Click here for more details.

Files changed (257) hide show
  1. package/README.md +5 -5
  2. package/bin/webpack.js +6 -3
  3. package/lib/APIPlugin.js +14 -6
  4. package/lib/AutomaticPrefetchPlugin.js +1 -1
  5. package/lib/BannerPlugin.js +3 -1
  6. package/lib/Cache.js +8 -2
  7. package/lib/CacheFacade.js +3 -3
  8. package/lib/Chunk.js +7 -4
  9. package/lib/ChunkGraph.js +52 -25
  10. package/lib/ChunkGroup.js +23 -17
  11. package/lib/CleanPlugin.js +8 -6
  12. package/lib/Compilation.js +295 -120
  13. package/lib/Compiler.js +223 -87
  14. package/lib/ConcatenationScope.js +3 -3
  15. package/lib/ConditionalInitFragment.js +4 -5
  16. package/lib/ContextModule.js +95 -41
  17. package/lib/ContextModuleFactory.js +4 -2
  18. package/lib/ContextReplacementPlugin.js +3 -2
  19. package/lib/DefinePlugin.js +18 -6
  20. package/lib/Dependency.js +12 -10
  21. package/lib/DependencyTemplate.js +17 -7
  22. package/lib/DllModule.js +1 -0
  23. package/lib/DllReferencePlugin.js +7 -3
  24. package/lib/EntryOptionPlugin.js +4 -1
  25. package/lib/EntryPlugin.js +6 -1
  26. package/lib/Entrypoint.js +1 -1
  27. package/lib/EvalDevToolModulePlugin.js +11 -0
  28. package/lib/ExportsInfo.js +23 -8
  29. package/lib/ExternalModule.js +160 -35
  30. package/lib/ExternalModuleFactoryPlugin.js +37 -2
  31. package/lib/FileSystemInfo.js +69 -42
  32. package/lib/FlagDependencyExportsPlugin.js +21 -7
  33. package/lib/Generator.js +4 -4
  34. package/lib/HookWebpackError.js +2 -2
  35. package/lib/HotModuleReplacementPlugin.js +108 -45
  36. package/lib/IgnorePlugin.js +4 -1
  37. package/lib/InitFragment.js +5 -3
  38. package/lib/LibManifestPlugin.js +17 -9
  39. package/lib/Module.js +41 -14
  40. package/lib/ModuleFactory.js +3 -3
  41. package/lib/ModuleFilenameHelpers.js +30 -17
  42. package/lib/ModuleGraph.js +60 -31
  43. package/lib/ModuleGraphConnection.js +2 -1
  44. package/lib/MultiCompiler.js +62 -9
  45. package/lib/NodeStuffPlugin.js +14 -3
  46. package/lib/NormalModule.js +13 -13
  47. package/lib/NormalModuleFactory.js +18 -9
  48. package/lib/NormalModuleReplacementPlugin.js +5 -1
  49. package/lib/Parser.js +1 -1
  50. package/lib/PlatformPlugin.js +39 -0
  51. package/lib/ProgressPlugin.js +1 -1
  52. package/lib/ProvidePlugin.js +3 -1
  53. package/lib/RawModule.js +2 -1
  54. package/lib/RecordIdsPlugin.js +4 -4
  55. package/lib/ResolverFactory.js +6 -4
  56. package/lib/RuntimeModule.js +4 -4
  57. package/lib/RuntimePlugin.js +1 -0
  58. package/lib/RuntimeTemplate.js +124 -52
  59. package/lib/SourceMapDevToolPlugin.js +4 -1
  60. package/lib/Stats.js +11 -4
  61. package/lib/Template.js +5 -5
  62. package/lib/TemplatedPathPlugin.js +48 -7
  63. package/lib/Watching.js +67 -60
  64. package/lib/WebpackError.js +6 -6
  65. package/lib/WebpackOptionsApply.js +18 -5
  66. package/lib/asset/AssetGenerator.js +15 -0
  67. package/lib/asset/RawDataUrlModule.js +3 -1
  68. package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
  69. package/lib/buildChunkGraph.js +120 -67
  70. package/lib/cache/IdleFileCachePlugin.js +8 -3
  71. package/lib/cache/MemoryCachePlugin.js +1 -1
  72. package/lib/cache/MemoryWithGcCachePlugin.js +6 -2
  73. package/lib/cache/PackFileCacheStrategy.js +51 -18
  74. package/lib/cache/ResolverCachePlugin.js +22 -14
  75. package/lib/cache/getLazyHashedEtag.js +2 -2
  76. package/lib/cli.js +5 -5
  77. package/lib/config/browserslistTargetHandler.js +7 -1
  78. package/lib/config/defaults.js +108 -34
  79. package/lib/config/normalization.js +3 -1
  80. package/lib/config/target.js +18 -11
  81. package/lib/container/ContainerEntryDependency.js +2 -1
  82. package/lib/container/ContainerEntryModule.js +4 -2
  83. package/lib/container/ContainerPlugin.js +14 -10
  84. package/lib/container/FallbackModule.js +1 -1
  85. package/lib/container/RemoteRuntimeModule.js +12 -3
  86. package/lib/css/CssExportsGenerator.js +68 -25
  87. package/lib/css/CssGenerator.js +34 -6
  88. package/lib/css/CssLoadingRuntimeModule.js +217 -98
  89. package/lib/css/CssModulesPlugin.js +238 -107
  90. package/lib/css/CssParser.js +24 -15
  91. package/lib/css/walkCssTokens.js +1 -1
  92. package/lib/debug/ProfilingPlugin.js +28 -3
  93. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +9 -5
  94. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +4 -1
  95. package/lib/dependencies/CommonJsDependencyHelpers.js +2 -1
  96. package/lib/dependencies/CommonJsExportRequireDependency.js +33 -18
  97. package/lib/dependencies/CommonJsExportsDependency.js +13 -5
  98. package/lib/dependencies/CommonJsExportsParserPlugin.js +20 -15
  99. package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -2
  100. package/lib/dependencies/ContextDependencyHelpers.js +49 -29
  101. package/lib/dependencies/ContextElementDependency.js +8 -1
  102. package/lib/dependencies/CssExportDependency.js +2 -2
  103. package/lib/dependencies/CssLocalIdentifierDependency.js +71 -9
  104. package/lib/dependencies/CssUrlDependency.js +10 -7
  105. package/lib/dependencies/ExportsInfoDependency.js +5 -4
  106. package/lib/dependencies/ExternalModuleDependency.js +4 -2
  107. package/lib/dependencies/ExternalModuleInitFragment.js +5 -3
  108. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +4 -4
  109. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +43 -23
  110. package/lib/dependencies/HarmonyExportHeaderDependency.js +1 -1
  111. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +73 -32
  112. package/lib/dependencies/HarmonyExportInitFragment.js +10 -2
  113. package/lib/dependencies/HarmonyImportDependency.js +28 -12
  114. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +70 -19
  115. package/lib/dependencies/HarmonyImportSideEffectDependency.js +7 -6
  116. package/lib/dependencies/HarmonyImportSpecifierDependency.js +47 -35
  117. package/lib/dependencies/ImportDependency.js +9 -2
  118. package/lib/dependencies/ImportEagerDependency.js +4 -2
  119. package/lib/dependencies/ImportMetaContextDependency.js +7 -0
  120. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +25 -14
  121. package/lib/dependencies/ImportMetaPlugin.js +1 -1
  122. package/lib/dependencies/ImportParserPlugin.js +15 -5
  123. package/lib/dependencies/ImportWeakDependency.js +4 -2
  124. package/lib/dependencies/LoaderDependency.js +2 -1
  125. package/lib/dependencies/LoaderImportDependency.js +2 -1
  126. package/lib/dependencies/LoaderPlugin.js +2 -2
  127. package/lib/dependencies/ModuleDependency.js +4 -5
  128. package/lib/dependencies/PureExpressionDependency.js +64 -47
  129. package/lib/dependencies/RequireContextPlugin.js +1 -1
  130. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +26 -14
  131. package/lib/dependencies/RequireEnsureDependency.js +1 -1
  132. package/lib/dependencies/URLDependency.js +7 -4
  133. package/lib/dependencies/WorkerDependency.js +1 -1
  134. package/lib/dependencies/WorkerPlugin.js +2 -1
  135. package/lib/dependencies/getFunctionExpression.js +3 -1
  136. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +92 -3
  137. package/lib/hmr/LazyCompilationPlugin.js +2 -2
  138. package/lib/ids/ChunkModuleIdRangePlugin.js +1 -1
  139. package/lib/ids/DeterministicChunkIdsPlugin.js +1 -1
  140. package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
  141. package/lib/ids/IdHelpers.js +6 -6
  142. package/lib/ids/NamedChunkIdsPlugin.js +1 -1
  143. package/lib/ids/NamedModuleIdsPlugin.js +1 -1
  144. package/lib/ids/SyncModuleIdsPlugin.js +2 -2
  145. package/lib/index.js +11 -0
  146. package/lib/javascript/BasicEvaluatedExpression.js +2 -2
  147. package/lib/javascript/ChunkHelpers.js +2 -2
  148. package/lib/javascript/CommonJsChunkFormatPlugin.js +1 -1
  149. package/lib/javascript/JavascriptGenerator.js +0 -1
  150. package/lib/javascript/JavascriptModulesPlugin.js +174 -17
  151. package/lib/javascript/JavascriptParser.js +204 -71
  152. package/lib/javascript/JavascriptParserHelpers.js +1 -1
  153. package/lib/javascript/StartupHelpers.js +22 -5
  154. package/lib/library/AbstractLibraryPlugin.js +2 -2
  155. package/lib/library/AmdLibraryPlugin.js +2 -2
  156. package/lib/library/AssignLibraryPlugin.js +3 -3
  157. package/lib/library/ExportPropertyLibraryPlugin.js +2 -2
  158. package/lib/library/JsonpLibraryPlugin.js +2 -2
  159. package/lib/library/ModuleLibraryPlugin.js +2 -2
  160. package/lib/library/SystemLibraryPlugin.js +2 -2
  161. package/lib/library/UmdLibraryPlugin.js +33 -12
  162. package/lib/logging/Logger.js +27 -2
  163. package/lib/logging/createConsoleLogger.js +13 -9
  164. package/lib/node/CommonJsChunkLoadingPlugin.js +2 -1
  165. package/lib/node/NodeEnvironmentPlugin.js +14 -8
  166. package/lib/node/NodeTemplatePlugin.js +1 -1
  167. package/lib/node/NodeWatchFileSystem.js +37 -26
  168. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +2 -1
  169. package/lib/node/ReadFileCompileWasmPlugin.js +1 -1
  170. package/lib/node/RequireChunkLoadingRuntimeModule.js +2 -1
  171. package/lib/node/nodeConsole.js +24 -1
  172. package/lib/optimize/AggressiveMergingPlugin.js +1 -1
  173. package/lib/optimize/AggressiveSplittingPlugin.js +1 -0
  174. package/lib/optimize/ConcatenatedModule.js +140 -121
  175. package/lib/optimize/EnsureChunkConditionsPlugin.js +1 -1
  176. package/lib/optimize/InnerGraph.js +8 -3
  177. package/lib/optimize/InnerGraphPlugin.js +36 -13
  178. package/lib/optimize/LimitChunkCountPlugin.js +1 -2
  179. package/lib/optimize/ModuleConcatenationPlugin.js +13 -3
  180. package/lib/optimize/RealContentHashPlugin.js +3 -3
  181. package/lib/optimize/RemoveParentModulesPlugin.js +1 -0
  182. package/lib/optimize/RuntimeChunkPlugin.js +6 -1
  183. package/lib/optimize/SideEffectsFlagPlugin.js +48 -17
  184. package/lib/optimize/SplitChunksPlugin.js +10 -10
  185. package/lib/performance/SizeLimitsPlugin.js +13 -2
  186. package/lib/rules/ObjectMatcherRulePlugin.js +15 -1
  187. package/lib/rules/RuleSetCompiler.js +9 -7
  188. package/lib/runtime/EnsureChunkRuntimeModule.js +2 -1
  189. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +2 -1
  190. package/lib/runtime/LoadScriptRuntimeModule.js +1 -1
  191. package/lib/runtime/StartupChunkDependenciesPlugin.js +1 -1
  192. package/lib/schemes/HttpUriPlugin.js +1 -1
  193. package/lib/serialization/BinaryMiddleware.js +4 -4
  194. package/lib/serialization/FileMiddleware.js +4 -3
  195. package/lib/serialization/NullPrototypeObjectSerializer.js +2 -2
  196. package/lib/serialization/ObjectMiddleware.js +8 -5
  197. package/lib/serialization/PlainObjectSerializer.js +2 -2
  198. package/lib/serialization/Serializer.js +19 -0
  199. package/lib/serialization/SerializerMiddleware.js +2 -2
  200. package/lib/serialization/SingleItemMiddleware.js +2 -2
  201. package/lib/serialization/types.js +1 -1
  202. package/lib/sharing/ConsumeSharedModule.js +2 -2
  203. package/lib/sharing/ConsumeSharedPlugin.js +17 -3
  204. package/lib/sharing/ConsumeSharedRuntimeModule.js +9 -2
  205. package/lib/sharing/ProvideSharedPlugin.js +13 -6
  206. package/lib/sharing/resolveMatchedConfigs.js +3 -3
  207. package/lib/sharing/utils.js +13 -6
  208. package/lib/stats/DefaultStatsFactoryPlugin.js +20 -20
  209. package/lib/stats/DefaultStatsPrinterPlugin.js +1 -1
  210. package/lib/stats/StatsFactory.js +2 -2
  211. package/lib/stats/StatsPrinter.js +6 -6
  212. package/lib/util/ArrayQueue.js +14 -21
  213. package/lib/util/AsyncQueue.js +1 -1
  214. package/lib/util/Queue.js +8 -2
  215. package/lib/util/SortableSet.js +16 -4
  216. package/lib/util/StackedCacheMap.js +26 -0
  217. package/lib/util/TupleQueue.js +8 -2
  218. package/lib/util/WeakTupleMap.js +57 -13
  219. package/lib/util/binarySearchBounds.js +1 -1
  220. package/lib/util/cleverMerge.js +26 -13
  221. package/lib/util/comparators.js +37 -15
  222. package/lib/util/conventions.js +129 -0
  223. package/lib/util/createHash.js +3 -5
  224. package/lib/util/deprecation.js +3 -3
  225. package/lib/util/deterministicGrouping.js +2 -2
  226. package/lib/util/findGraphRoots.js +1 -1
  227. package/lib/util/fs.js +383 -69
  228. package/lib/util/hash/BatchedHash.js +3 -0
  229. package/lib/util/hash/xxhash64.js +2 -2
  230. package/lib/util/identifier.js +5 -5
  231. package/lib/util/mergeScope.js +79 -0
  232. package/lib/util/runtime.js +2 -17
  233. package/lib/util/semver.js +3 -0
  234. package/lib/util/smartGrouping.js +3 -3
  235. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +4 -2
  236. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +1 -1
  237. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +4 -2
  238. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +3 -3
  239. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +16 -7
  240. package/lib/wasm-sync/WebAssemblyGenerator.js +40 -19
  241. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +1 -1
  242. package/lib/wasm-sync/WebAssemblyParser.js +7 -4
  243. package/lib/wasm-sync/WebAssemblyUtils.js +2 -1
  244. package/lib/web/FetchCompileWasmPlugin.js +1 -1
  245. package/lib/web/JsonpChunkLoadingRuntimeModule.js +3 -2
  246. package/lib/webpack.js +19 -6
  247. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +2 -1
  248. package/package.json +40 -39
  249. package/schemas/WebpackOptions.check.js +1 -1
  250. package/schemas/WebpackOptions.json +97 -8
  251. package/schemas/plugins/BannerPlugin.check.js +1 -1
  252. package/schemas/plugins/BannerPlugin.json +5 -1
  253. package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +1 -1
  254. package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
  255. package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +1 -1
  256. package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +1 -1
  257. package/types.d.ts +1826 -639
@@ -26,6 +26,7 @@ const { concatComparators } = require("../util/comparators");
26
26
  const createHash = require("../util/createHash");
27
27
  const { makePathsRelative } = require("../util/identifier");
28
28
  const makeSerializable = require("../util/makeSerializable");
29
+ const { getAllReferences, getPathInAst } = require("../util/mergeScope");
29
30
  const propertyAccess = require("../util/propertyAccess");
30
31
  const { propertyName } = require("../util/propertyName");
31
32
  const {
@@ -37,7 +38,9 @@ const {
37
38
  subtractRuntimeCondition
38
39
  } = require("../util/runtime");
39
40
 
41
+ /** @typedef {import("eslint-scope").Reference} Reference */
40
42
  /** @typedef {import("eslint-scope").Scope} Scope */
43
+ /** @typedef {import("eslint-scope").Variable} Variable */
41
44
  /** @typedef {import("webpack-sources").Source} Source */
42
45
  /** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */
43
46
  /** @typedef {import("../ChunkGraph")} ChunkGraph */
@@ -48,10 +51,12 @@ const {
48
51
  /** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
49
52
  /** @typedef {import("../DependencyTemplates")} DependencyTemplates */
50
53
  /** @typedef {import("../ExportsInfo").ExportInfo} ExportInfo */
51
- /** @template T @typedef {import("../InitFragment")<T>} InitFragment */
54
+ /** @typedef {import("../Module").BuildInfo} BuildInfo */
55
+ /** @typedef {import("../Module").BuildMeta} BuildMeta */
52
56
  /** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */
53
57
  /** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */
54
58
  /** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */
59
+ /** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
55
60
  /** @typedef {import("../Module").SourceTypes} SourceTypes */
56
61
  /** @typedef {import("../ModuleGraph")} ModuleGraph */
57
62
  /** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */
@@ -61,21 +66,34 @@ const {
61
66
  /** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */
62
67
  /** @typedef {import("../WebpackError")} WebpackError */
63
68
  /** @typedef {import("../javascript/JavascriptModulesPlugin").ChunkRenderContext} ChunkRenderContext */
69
+ /** @typedef {import("../javascript/JavascriptParser").Program} Program */
70
+ /** @typedef {import("../javascript/JavascriptParser").Range} Range */
71
+ /** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
64
72
  /** @typedef {import("../util/Hash")} Hash */
65
73
  /** @typedef {typeof import("../util/Hash")} HashConstructor */
66
74
  /** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */
67
75
  /** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
68
76
 
77
+ /**
78
+ * @template T
79
+ * @typedef {import("../InitFragment")<T>} InitFragment
80
+ */
81
+
82
+ /**
83
+ * @template T
84
+ * @typedef {import("../util/comparators").Comparator<T>} Comparator
85
+ */
86
+
69
87
  // fix eslint-scope to support class properties correctly
70
88
  // cspell:word Referencer
71
- const ReferencerClass = Referencer;
89
+ const ReferencerClass = /** @type {any} */ (Referencer);
72
90
  if (!ReferencerClass.prototype.PropertyDefinition) {
73
91
  ReferencerClass.prototype.PropertyDefinition =
74
92
  ReferencerClass.prototype.Property;
75
93
  }
76
94
 
77
95
  /**
78
- * @typedef {Object} ReexportInfo
96
+ * @typedef {object} ReexportInfo
79
97
  * @property {Module} module
80
98
  * @property {string[]} export
81
99
  */
@@ -83,7 +101,7 @@ if (!ReferencerClass.prototype.PropertyDefinition) {
83
101
  /** @typedef {RawBinding | SymbolBinding} Binding */
84
102
 
85
103
  /**
86
- * @typedef {Object} RawBinding
104
+ * @typedef {object} RawBinding
87
105
  * @property {ModuleInfo} info
88
106
  * @property {string} rawName
89
107
  * @property {string=} comment
@@ -92,7 +110,7 @@ if (!ReferencerClass.prototype.PropertyDefinition) {
92
110
  */
93
111
 
94
112
  /**
95
- * @typedef {Object} SymbolBinding
113
+ * @typedef {object} SymbolBinding
96
114
  * @property {ConcatenatedModuleInfo} info
97
115
  * @property {string} name
98
116
  * @property {string=} comment
@@ -104,32 +122,32 @@ if (!ReferencerClass.prototype.PropertyDefinition) {
104
122
  /** @typedef {ConcatenatedModuleInfo | ExternalModuleInfo | ReferenceToModuleInfo } ModuleInfoOrReference */
105
123
 
106
124
  /**
107
- * @typedef {Object} ConcatenatedModuleInfo
125
+ * @typedef {object} ConcatenatedModuleInfo
108
126
  * @property {"concatenated"} type
109
127
  * @property {Module} module
110
128
  * @property {number} index
111
- * @property {Object} ast
129
+ * @property {Program | undefined} ast
112
130
  * @property {Source} internalSource
113
131
  * @property {ReplaceSource} source
114
132
  * @property {InitFragment<ChunkRenderContext>[]=} chunkInitFragments
115
- * @property {Iterable<string>} runtimeRequirements
133
+ * @property {ReadOnlyRuntimeRequirements} runtimeRequirements
116
134
  * @property {Scope} globalScope
117
135
  * @property {Scope} moduleScope
118
136
  * @property {Map<string, string>} internalNames
119
- * @property {Map<string, string>} exportMap
120
- * @property {Map<string, string>} rawExportMap
137
+ * @property {Map<string, string> | undefined} exportMap
138
+ * @property {Map<string, string> | undefined} rawExportMap
121
139
  * @property {string=} namespaceExportSymbol
122
- * @property {string} namespaceObjectName
140
+ * @property {string | undefined} namespaceObjectName
123
141
  * @property {boolean} interopNamespaceObjectUsed
124
- * @property {string} interopNamespaceObjectName
142
+ * @property {string | undefined} interopNamespaceObjectName
125
143
  * @property {boolean} interopNamespaceObject2Used
126
- * @property {string} interopNamespaceObject2Name
144
+ * @property {string | undefined} interopNamespaceObject2Name
127
145
  * @property {boolean} interopDefaultAccessUsed
128
- * @property {string} interopDefaultAccessName
146
+ * @property {string | undefined} interopDefaultAccessName
129
147
  */
130
148
 
131
149
  /**
132
- * @typedef {Object} ExternalModuleInfo
150
+ * @typedef {object} ExternalModuleInfo
133
151
  * @property {"external"} type
134
152
  * @property {Module} module
135
153
  * @property {RuntimeSpec | boolean} runtimeCondition
@@ -144,12 +162,14 @@ if (!ReferencerClass.prototype.PropertyDefinition) {
144
162
  */
145
163
 
146
164
  /**
147
- * @typedef {Object} ReferenceToModuleInfo
165
+ * @typedef {object} ReferenceToModuleInfo
148
166
  * @property {"reference"} type
149
167
  * @property {RuntimeSpec | boolean} runtimeCondition
150
168
  * @property {ConcatenatedModuleInfo | ExternalModuleInfo} target
151
169
  */
152
170
 
171
+ /** @typedef {Set<string>} UsedNames */
172
+
153
173
  const RESERVED_NAMES = new Set(
154
174
  [
155
175
  // internal names (should always be renamed)
@@ -190,6 +210,12 @@ const RESERVED_NAMES = new Set(
190
210
 
191
211
  const createComparator = (property, comparator) => (a, b) =>
192
212
  comparator(a[property], b[property]);
213
+
214
+ /**
215
+ * @param {number} a a
216
+ * @param {number} b b
217
+ * @returns {0 | 1 | -1} result
218
+ */
193
219
  const compareNumbers = (a, b) => {
194
220
  if (isNaN(a)) {
195
221
  if (!isNaN(b)) {
@@ -208,6 +234,10 @@ const compareNumbers = (a, b) => {
208
234
  const bySourceOrder = createComparator("sourceOrder", compareNumbers);
209
235
  const byRangeStart = createComparator("rangeStart", compareNumbers);
210
236
 
237
+ /**
238
+ * @param {Iterable<string>} iterable iterable object
239
+ * @returns {string} joined iterable object
240
+ */
211
241
  const joinIterableWithComma = iterable => {
212
242
  // This is more performant than Array.from().join(", ")
213
243
  // as it doesn't create an array
@@ -225,7 +255,7 @@ const joinIterableWithComma = iterable => {
225
255
  };
226
256
 
227
257
  /**
228
- * @typedef {Object} ConcatenationEntry
258
+ * @typedef {object} ConcatenationEntry
229
259
  * @property {"concatenated" | "external"} type
230
260
  * @property {Module} module
231
261
  * @property {RuntimeSpec | boolean} runtimeCondition
@@ -241,7 +271,7 @@ const joinIterableWithComma = iterable => {
241
271
  * @param {RuntimeTemplate} runtimeTemplate the runtime template
242
272
  * @param {Set<ConcatenatedModuleInfo>} neededNamespaceObjects modules for which a namespace object should be generated
243
273
  * @param {boolean} asCall asCall
244
- * @param {boolean} strictHarmonyModule strictHarmonyModule
274
+ * @param {boolean | undefined} strictHarmonyModule strictHarmonyModule
245
275
  * @param {boolean | undefined} asiSafe asiSafe
246
276
  * @param {Set<ExportInfo>} alreadyVisited alreadyVisited
247
277
  * @returns {Binding} the final variable
@@ -270,7 +300,7 @@ const getFinalBinding = (
270
300
  info.interopNamespaceObject2Used = true;
271
301
  return {
272
302
  info,
273
- rawName: info.interopNamespaceObject2Name,
303
+ rawName: /** @type {string} */ (info.interopNamespaceObject2Name),
274
304
  ids: exportName,
275
305
  exportName
276
306
  };
@@ -278,7 +308,7 @@ const getFinalBinding = (
278
308
  info.interopNamespaceObjectUsed = true;
279
309
  return {
280
310
  info,
281
- rawName: info.interopNamespaceObjectName,
311
+ rawName: /** @type {string} */ (info.interopNamespaceObjectName),
282
312
  ids: exportName,
283
313
  exportName
284
314
  };
@@ -366,7 +396,7 @@ const getFinalBinding = (
366
396
  neededNamespaceObjects.add(info);
367
397
  return {
368
398
  info,
369
- rawName: info.namespaceObjectName,
399
+ rawName: /** @type {string} */ (info.namespaceObjectName),
370
400
  ids: exportName,
371
401
  exportName
372
402
  };
@@ -393,7 +423,7 @@ const getFinalBinding = (
393
423
  neededNamespaceObjects.add(info);
394
424
  return {
395
425
  info,
396
- rawName: info.namespaceObjectName,
426
+ rawName: /** @type {string} */ (info.namespaceObjectName),
397
427
  ids: exportName,
398
428
  exportName
399
429
  };
@@ -445,7 +475,7 @@ const getFinalBinding = (
445
475
  const refInfo = moduleToInfoMap.get(reexport.module);
446
476
  return getFinalBinding(
447
477
  moduleGraph,
448
- refInfo,
478
+ /** @type {ModuleInfo} */ (refInfo),
449
479
  reexport.export
450
480
  ? [...reexport.export, ...exportName.slice(1)]
451
481
  : exportName.slice(1),
@@ -455,7 +485,8 @@ const getFinalBinding = (
455
485
  runtimeTemplate,
456
486
  neededNamespaceObjects,
457
487
  asCall,
458
- info.module.buildMeta.strictHarmonyModule,
488
+ /** @type {BuildMeta} */
489
+ (info.module.buildMeta).strictHarmonyModule,
459
490
  asiSafe,
460
491
  alreadyVisited
461
492
  );
@@ -466,7 +497,7 @@ const getFinalBinding = (
466
497
  );
467
498
  return {
468
499
  info,
469
- rawName: info.namespaceObjectName,
500
+ rawName: /** @type {string} */ (info.namespaceObjectName),
470
501
  ids: usedName,
471
502
  exportName
472
503
  };
@@ -508,8 +539,8 @@ const getFinalBinding = (
508
539
  * @param {RuntimeTemplate} runtimeTemplate the runtime template
509
540
  * @param {Set<ConcatenatedModuleInfo>} neededNamespaceObjects modules for which a namespace object should be generated
510
541
  * @param {boolean} asCall asCall
511
- * @param {boolean} callContext callContext
512
- * @param {boolean} strictHarmonyModule strictHarmonyModule
542
+ * @param {boolean | undefined} callContext callContext
543
+ * @param {boolean | undefined} strictHarmonyModule strictHarmonyModule
513
544
  * @param {boolean | undefined} asiSafe asiSafe
514
545
  * @returns {string} the final name
515
546
  */
@@ -576,6 +607,12 @@ const getFinalName = (
576
607
  }
577
608
  };
578
609
 
610
+ /**
611
+ * @param {Scope | null} s scope
612
+ * @param {UsedNames} nameSet name set
613
+ * @param {TODO} scopeSet1 scope set 1
614
+ * @param {TODO} scopeSet2 scope set 2
615
+ */
579
616
  const addScopeSymbols = (s, nameSet, scopeSet1, scopeSet2) => {
580
617
  let scope = s;
581
618
  while (scope) {
@@ -589,63 +626,6 @@ const addScopeSymbols = (s, nameSet, scopeSet1, scopeSet2) => {
589
626
  }
590
627
  };
591
628
 
592
- const getAllReferences = variable => {
593
- let set = variable.references;
594
- // Look for inner scope variables too (like in class Foo { t() { Foo } })
595
- const identifiers = new Set(variable.identifiers);
596
- for (const scope of variable.scope.childScopes) {
597
- for (const innerVar of scope.variables) {
598
- if (innerVar.identifiers.some(id => identifiers.has(id))) {
599
- set = set.concat(innerVar.references);
600
- break;
601
- }
602
- }
603
- }
604
- return set;
605
- };
606
-
607
- const getPathInAst = (ast, node) => {
608
- if (ast === node) {
609
- return [];
610
- }
611
-
612
- const nr = node.range;
613
-
614
- const enterNode = n => {
615
- if (!n) return undefined;
616
- const r = n.range;
617
- if (r) {
618
- if (r[0] <= nr[0] && r[1] >= nr[1]) {
619
- const path = getPathInAst(n, node);
620
- if (path) {
621
- path.push(n);
622
- return path;
623
- }
624
- }
625
- }
626
- return undefined;
627
- };
628
-
629
- if (Array.isArray(ast)) {
630
- for (let i = 0; i < ast.length; i++) {
631
- const enterResult = enterNode(ast[i]);
632
- if (enterResult !== undefined) return enterResult;
633
- }
634
- } else if (ast && typeof ast === "object") {
635
- const keys = Object.keys(ast);
636
- for (let i = 0; i < keys.length; i++) {
637
- const value = ast[keys[i]];
638
- if (Array.isArray(value)) {
639
- const pathResult = getPathInAst(value, node);
640
- if (pathResult !== undefined) return pathResult;
641
- } else if (value && typeof value === "object") {
642
- const enterResult = enterNode(value);
643
- if (enterResult !== undefined) return enterResult;
644
- }
645
- }
646
- }
647
- };
648
-
649
629
  const TYPES = new Set(["javascript"]);
650
630
 
651
631
  class ConcatenatedModule extends Module {
@@ -653,7 +633,7 @@ class ConcatenatedModule extends Module {
653
633
  * @param {Module} rootModule the root module of the concatenation
654
634
  * @param {Set<Module>} modules all modules in the concatenation (including the root module)
655
635
  * @param {RuntimeSpec} runtime the runtime
656
- * @param {Object=} associatedObjectForCache object for caching
636
+ * @param {object=} associatedObjectForCache object for caching
657
637
  * @param {string | HashConstructor=} hashFunction hash function to use
658
638
  * @returns {ConcatenatedModule} the module
659
639
  */
@@ -679,7 +659,7 @@ class ConcatenatedModule extends Module {
679
659
  }
680
660
 
681
661
  /**
682
- * @param {Object} options options
662
+ * @param {object} options options
683
663
  * @param {string} options.identifier the identifier of the module
684
664
  * @param {Module=} options.rootModule the root module of the concatenation
685
665
  * @param {RuntimeSpec} options.runtime the selected runtime
@@ -772,11 +752,14 @@ class ConcatenatedModule extends Module {
772
752
  */
773
753
  build(options, compilation, resolver, fs, callback) {
774
754
  const { rootModule } = this;
755
+ const { moduleArgument, exportsArgument } =
756
+ /** @type {BuildInfo} */
757
+ (rootModule.buildInfo);
775
758
  this.buildInfo = {
776
759
  strict: true,
777
760
  cacheable: true,
778
- moduleArgument: rootModule.buildInfo.moduleArgument,
779
- exportsArgument: rootModule.buildInfo.exportsArgument,
761
+ moduleArgument,
762
+ exportsArgument,
780
763
  fileDependencies: new LazySet(),
781
764
  contextDependencies: new LazySet(),
782
765
  missingDependencies: new LazySet(),
@@ -789,7 +772,7 @@ class ConcatenatedModule extends Module {
789
772
 
790
773
  for (const m of this._modules) {
791
774
  // populate cacheable
792
- if (!m.buildInfo.cacheable) {
775
+ if (!(/** @type {BuildInfo} */ (m.buildInfo).cacheable)) {
793
776
  this.buildInfo.cacheable = false;
794
777
  }
795
778
 
@@ -797,7 +780,9 @@ class ConcatenatedModule extends Module {
797
780
  for (const d of m.dependencies.filter(
798
781
  dep =>
799
782
  !(dep instanceof HarmonyImportDependency) ||
800
- !this._modules.has(compilation.moduleGraph.getModule(dep))
783
+ !this._modules.has(
784
+ /** @type {Module} */ (compilation.moduleGraph.getModule(dep))
785
+ )
801
786
  )) {
802
787
  this.dependencies.push(d);
803
788
  }
@@ -822,11 +807,14 @@ class ConcatenatedModule extends Module {
822
807
  }
823
808
  }
824
809
 
810
+ const { assets, assetsInfo, topLevelDeclarations } =
811
+ /** @type {BuildInfo} */ (m.buildInfo);
812
+
825
813
  // populate topLevelDeclarations
826
- if (m.buildInfo.topLevelDeclarations) {
814
+ if (topLevelDeclarations) {
827
815
  const topLevelDeclarations = this.buildInfo.topLevelDeclarations;
828
816
  if (topLevelDeclarations !== undefined) {
829
- for (const decl of m.buildInfo.topLevelDeclarations) {
817
+ for (const decl of topLevelDeclarations) {
830
818
  topLevelDeclarations.add(decl);
831
819
  }
832
820
  }
@@ -835,17 +823,17 @@ class ConcatenatedModule extends Module {
835
823
  }
836
824
 
837
825
  // populate assets
838
- if (m.buildInfo.assets) {
826
+ if (assets) {
839
827
  if (this.buildInfo.assets === undefined) {
840
828
  this.buildInfo.assets = Object.create(null);
841
829
  }
842
- Object.assign(this.buildInfo.assets, m.buildInfo.assets);
830
+ Object.assign(/** @type {BuildInfo} */ (this.buildInfo).assets, assets);
843
831
  }
844
- if (m.buildInfo.assetsInfo) {
832
+ if (assetsInfo) {
845
833
  if (this.buildInfo.assetsInfo === undefined) {
846
834
  this.buildInfo.assetsInfo = new Map();
847
835
  }
848
- for (const [key, value] of m.buildInfo.assetsInfo) {
836
+ for (const [key, value] of assetsInfo) {
849
837
  this.buildInfo.assetsInfo.set(key, value);
850
838
  }
851
839
  }
@@ -1045,7 +1033,7 @@ class ConcatenatedModule extends Module {
1045
1033
  /**
1046
1034
  * @param {Module} rootModule the root module of the concatenation
1047
1035
  * @param {Set<Module>} modules all modules in the concatenation (including the root module)
1048
- * @param {Object=} associatedObjectForCache object for caching
1036
+ * @param {object=} associatedObjectForCache object for caching
1049
1037
  * @param {string | HashConstructor=} hashFunction hash function to use
1050
1038
  * @returns {string} the identifier
1051
1039
  */
@@ -1056,7 +1044,7 @@ class ConcatenatedModule extends Module {
1056
1044
  hashFunction = "md4"
1057
1045
  ) {
1058
1046
  const cachedMakePathsRelative = makePathsRelative.bindContextCache(
1059
- rootModule.context,
1047
+ /** @type {string} */ (rootModule.context),
1060
1048
  associatedObjectForCache
1061
1049
  );
1062
1050
  let identifiers = [];
@@ -1139,12 +1127,12 @@ class ConcatenatedModule extends Module {
1139
1127
  const topLevelDeclarations = new Set();
1140
1128
 
1141
1129
  // List of additional names in scope for module references
1142
- /** @type {Map<string, { usedNames: Set<string>, alreadyCheckedScopes: Set<TODO> }>} */
1130
+ /** @type {Map<string, { usedNames: UsedNames, alreadyCheckedScopes: Set<TODO> }>} */
1143
1131
  const usedNamesInScopeInfo = new Map();
1144
1132
  /**
1145
1133
  * @param {string} module module identifier
1146
1134
  * @param {string} id export id
1147
- * @returns {{ usedNames: Set<string>, alreadyCheckedScopes: Set<TODO> }} info
1135
+ * @returns {{ usedNames: UsedNames, alreadyCheckedScopes: Set<TODO> }} info
1148
1136
  */
1149
1137
  const getUsedNamesInScopeInfo = (module, id) => {
1150
1138
  const key = `${module}-${id}`;
@@ -1174,6 +1162,10 @@ class ConcatenatedModule extends Module {
1174
1162
  // We get ranges of all super class expressions to make
1175
1163
  // renaming to work correctly
1176
1164
  const superClassCache = new WeakMap();
1165
+ /**
1166
+ * @param {Scope} scope scope
1167
+ * @returns {TODO} result
1168
+ */
1177
1169
  const getSuperClassExpressions = scope => {
1178
1170
  const cacheEntry = superClassCache.get(scope);
1179
1171
  if (cacheEntry !== undefined) return cacheEntry;
@@ -1216,7 +1208,8 @@ class ConcatenatedModule extends Module {
1216
1208
  runtimeTemplate,
1217
1209
  neededNamespaceObjects,
1218
1210
  false,
1219
- info.module.buildMeta.strictHarmonyModule,
1211
+ /** @type {BuildMeta} */
1212
+ (info.module.buildMeta).strictHarmonyModule,
1220
1213
  true
1221
1214
  );
1222
1215
  if (!binding.ids) continue;
@@ -1227,8 +1220,10 @@ class ConcatenatedModule extends Module {
1227
1220
  );
1228
1221
  for (const expr of getSuperClassExpressions(reference.from)) {
1229
1222
  if (
1230
- expr.range[0] <= reference.identifier.range[0] &&
1231
- expr.range[1] >= reference.identifier.range[1]
1223
+ expr.range[0] <=
1224
+ /** @type {Range} */ (reference.identifier.range)[0] &&
1225
+ expr.range[1] >=
1226
+ /** @type {Range} */ (reference.identifier.range)[1]
1232
1227
  ) {
1233
1228
  for (const variable of expr.variables) {
1234
1229
  usedNames.add(variable.name);
@@ -1287,7 +1282,7 @@ class ConcatenatedModule extends Module {
1287
1282
  references.map(r => r.identifier).concat(variable.identifiers)
1288
1283
  );
1289
1284
  for (const identifier of allIdentifiers) {
1290
- const r = identifier.range;
1285
+ const r = /** @type {Range} */ (identifier.range);
1291
1286
  const path = getPathInAst(info.ast, identifier);
1292
1287
  if (path && path.length > 1) {
1293
1288
  const maybeProperty =
@@ -1325,7 +1320,9 @@ class ConcatenatedModule extends Module {
1325
1320
  );
1326
1321
  allUsedNames.add(namespaceObjectName);
1327
1322
  }
1328
- info.namespaceObjectName = namespaceObjectName;
1323
+ info.namespaceObjectName =
1324
+ /** @type {string} */
1325
+ (namespaceObjectName);
1329
1326
  topLevelDeclarations.add(namespaceObjectName);
1330
1327
  break;
1331
1328
  }
@@ -1342,7 +1339,8 @@ class ConcatenatedModule extends Module {
1342
1339
  break;
1343
1340
  }
1344
1341
  }
1345
- if (info.module.buildMeta.exportsType !== "namespace") {
1342
+ const buildMeta = /** @type {BuildMeta} */ (info.module.buildMeta);
1343
+ if (buildMeta.exportsType !== "namespace") {
1346
1344
  const externalNameInterop = this.findNewName(
1347
1345
  "namespaceObject",
1348
1346
  allUsedNames,
@@ -1354,8 +1352,8 @@ class ConcatenatedModule extends Module {
1354
1352
  topLevelDeclarations.add(externalNameInterop);
1355
1353
  }
1356
1354
  if (
1357
- info.module.buildMeta.exportsType === "default" &&
1358
- info.module.buildMeta.defaultObject !== "redirect"
1355
+ buildMeta.exportsType === "default" &&
1356
+ buildMeta.defaultObject !== "redirect"
1359
1357
  ) {
1360
1358
  const externalNameInterop = this.findNewName(
1361
1359
  "namespaceObject2",
@@ -1367,10 +1365,7 @@ class ConcatenatedModule extends Module {
1367
1365
  info.interopNamespaceObject2Name = externalNameInterop;
1368
1366
  topLevelDeclarations.add(externalNameInterop);
1369
1367
  }
1370
- if (
1371
- info.module.buildMeta.exportsType === "dynamic" ||
1372
- !info.module.buildMeta.exportsType
1373
- ) {
1368
+ if (buildMeta.exportsType === "dynamic" || !buildMeta.exportsType) {
1374
1369
  const externalNameInterop = this.findNewName(
1375
1370
  "default",
1376
1371
  allUsedNames,
@@ -1404,10 +1399,11 @@ class ConcatenatedModule extends Module {
1404
1399
  neededNamespaceObjects,
1405
1400
  match.call,
1406
1401
  !match.directImport,
1407
- info.module.buildMeta.strictHarmonyModule,
1402
+ /** @type {BuildMeta} */
1403
+ (info.module.buildMeta).strictHarmonyModule,
1408
1404
  match.asiSafe
1409
1405
  );
1410
- const r = reference.identifier.range;
1406
+ const r = /** @type {Range} */ (reference.identifier.range);
1411
1407
  const source = info.source;
1412
1408
  // range is extended by 2 chars to cover the appended "._"
1413
1409
  source.replace(r[0], r[1] + 1, finalName);
@@ -1427,7 +1423,9 @@ class ConcatenatedModule extends Module {
1427
1423
  const rootInfo = /** @type {ConcatenatedModuleInfo} */ (
1428
1424
  moduleToInfoMap.get(this.rootModule)
1429
1425
  );
1430
- const strictHarmonyModule = rootInfo.module.buildMeta.strictHarmonyModule;
1426
+ const strictHarmonyModule =
1427
+ /** @type {BuildMeta} */
1428
+ (rootInfo.module.buildMeta).strictHarmonyModule;
1431
1429
  const exportsInfo = moduleGraph.getExportsInfo(rootInfo.module);
1432
1430
  for (const exportInfo of exportsInfo.orderedExports) {
1433
1431
  const name = exportInfo.name;
@@ -1457,7 +1455,9 @@ class ConcatenatedModule extends Module {
1457
1455
  exportInfo.isReexport() ? "reexport" : "binding"
1458
1456
  } */ ${finalName}`;
1459
1457
  } catch (e) {
1460
- e.message += `\nwhile generating the root export '${name}' (used name: '${used}')`;
1458
+ /** @type {Error} */
1459
+ (e).message +=
1460
+ `\nwhile generating the root export '${name}' (used name: '${used}')`;
1461
1461
  throw e;
1462
1462
  }
1463
1463
  });
@@ -1527,7 +1527,8 @@ class ConcatenatedModule extends Module {
1527
1527
  neededNamespaceObjects,
1528
1528
  false,
1529
1529
  undefined,
1530
- info.module.buildMeta.strictHarmonyModule,
1530
+ /** @type {BuildMeta} */
1531
+ (info.module.buildMeta).strictHarmonyModule,
1531
1532
  true
1532
1533
  );
1533
1534
  nsObj.push(
@@ -1698,7 +1699,9 @@ ${defineGetters}`
1698
1699
  codeGenerationResults,
1699
1700
  sourceTypes: TYPES
1700
1701
  });
1701
- const source = codeGenResult.sources.get("javascript");
1702
+ const source = /** @type {Source} */ (
1703
+ codeGenResult.sources.get("javascript")
1704
+ );
1702
1705
  const data = codeGenResult.data;
1703
1706
  const chunkInitFragments = data && data.get("chunkInitFragments");
1704
1707
  const code = source.source().toString();
@@ -1730,7 +1733,7 @@ ${defineGetters}`
1730
1733
  ignoreEval: true,
1731
1734
  impliedStrict: true
1732
1735
  });
1733
- const globalScope = scopeManager.acquire(ast);
1736
+ const globalScope = /** @type {Scope} */ (scopeManager.acquire(ast));
1734
1737
  const moduleScope = globalScope.childScopes[0];
1735
1738
  const resultSource = new ReplaceSource(source);
1736
1739
  info.runtimeRequirements = codeGenResult.runtimeRequirements;
@@ -1741,7 +1744,9 @@ ${defineGetters}`
1741
1744
  info.globalScope = globalScope;
1742
1745
  info.moduleScope = moduleScope;
1743
1746
  } catch (err) {
1744
- err.message += `\nwhile analyzing module ${m.identifier()} for concatenation`;
1747
+ /** @type {Error} */
1748
+ (err).message +=
1749
+ `\nwhile analyzing module ${m.identifier()} for concatenation`;
1745
1750
  throw err;
1746
1751
  }
1747
1752
  }
@@ -1809,7 +1814,10 @@ ${defineGetters}`
1809
1814
  `Unsupported concatenation entry type ${info.type}`
1810
1815
  );
1811
1816
  }
1812
- map.set(item.module, item);
1817
+ map.set(
1818
+ /** @type {ModuleInfo} */ (item).module,
1819
+ /** @type {ModuleInfo} */ (item)
1820
+ );
1813
1821
  return item;
1814
1822
  } else {
1815
1823
  /** @type {ReferenceToModuleInfo} */
@@ -1824,6 +1832,13 @@ ${defineGetters}`
1824
1832
  return [list, map];
1825
1833
  }
1826
1834
 
1835
+ /**
1836
+ * @param {string} oldName old name
1837
+ * @param {UsedNames} usedNamed1 used named 1
1838
+ * @param {UsedNames} usedNamed2 used named 2
1839
+ * @param {string} extraInfo extra info
1840
+ * @returns {string} found new name
1841
+ */
1827
1842
  findNewName(oldName, usedNamed1, usedNamed2, extraInfo) {
1828
1843
  let name = oldName;
1829
1844
 
@@ -1889,6 +1904,10 @@ ${defineGetters}`
1889
1904
  super.updateHash(hash, context);
1890
1905
  }
1891
1906
 
1907
+ /**
1908
+ * @param {ObjectDeserializerContext} context context
1909
+ * @returns {ConcatenatedModule} ConcatenatedModule
1910
+ */
1892
1911
  static deserialize(context) {
1893
1912
  const obj = new ConcatenatedModule({
1894
1913
  identifier: undefined,
@@ -56,7 +56,7 @@ class EnsureChunkConditionsPlugin {
56
56
  // We reached the entrypoint: fail
57
57
  if (chunkGroup.isInitial()) {
58
58
  throw new Error(
59
- "Cannot fullfil chunk condition of " + module.identifier()
59
+ "Cannot fulfil chunk condition of " + module.identifier()
60
60
  );
61
61
  }
62
62
  // Try placing in all parents