webpack 5.106.1 → 5.106.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (553) hide show
  1. package/lib/APIPlugin.js +3 -1
  2. package/lib/AbstractMethodError.js +10 -1
  3. package/lib/AsyncDependenciesBlock.js +3 -0
  4. package/lib/AsyncDependencyToInitialChunkError.js +6 -1
  5. package/lib/AutomaticPrefetchPlugin.js +6 -1
  6. package/lib/BannerPlugin.js +10 -1
  7. package/lib/Cache.js +26 -1
  8. package/lib/CacheFacade.js +26 -0
  9. package/lib/CaseSensitiveModulesWarning.js +9 -1
  10. package/lib/Chunk.js +46 -0
  11. package/lib/ChunkGraph.js +111 -0
  12. package/lib/ChunkGroup.js +57 -13
  13. package/lib/ChunkTemplate.js +9 -0
  14. package/lib/CleanPlugin.js +14 -1
  15. package/lib/CodeGenerationResults.js +19 -0
  16. package/lib/CommentCompilationWarning.js +6 -0
  17. package/lib/CompatibilityPlugin.js +15 -1
  18. package/lib/Compilation.js +127 -1
  19. package/lib/Compiler.js +37 -4
  20. package/lib/ConcatenationScope.js +24 -1
  21. package/lib/ConditionalInitFragment.js +6 -0
  22. package/lib/ConstPlugin.js +4 -1
  23. package/lib/ContextExclusionPlugin.js +2 -1
  24. package/lib/ContextModule.js +12 -0
  25. package/lib/ContextModuleFactory.js +10 -0
  26. package/lib/ContextReplacementPlugin.js +4 -1
  27. package/lib/CssModule.js +6 -0
  28. package/lib/DefinePlugin.js +20 -7
  29. package/lib/DelegatedModule.js +13 -0
  30. package/lib/DelegatedModuleFactoryPlugin.js +3 -0
  31. package/lib/DelegatedPlugin.js +2 -1
  32. package/lib/DependenciesBlock.js +6 -1
  33. package/lib/Dependency.js +26 -3
  34. package/lib/DependencyTemplate.js +5 -0
  35. package/lib/DependencyTemplates.js +4 -0
  36. package/lib/DllEntryPlugin.js +2 -1
  37. package/lib/DllModule.js +11 -0
  38. package/lib/DllModuleFactory.js +1 -0
  39. package/lib/DllPlugin.js +2 -1
  40. package/lib/DllReferencePlugin.js +11 -6
  41. package/lib/DotenvPlugin.js +3 -0
  42. package/lib/DynamicEntryPlugin.js +3 -1
  43. package/lib/EntryOptionPlugin.js +3 -0
  44. package/lib/EntryPlugin.js +2 -1
  45. package/lib/Entrypoint.js +4 -0
  46. package/lib/EnvironmentPlugin.js +2 -1
  47. package/lib/ErrorHelpers.js +7 -0
  48. package/lib/EvalDevToolModulePlugin.js +3 -1
  49. package/lib/EvalSourceMapDevToolPlugin.js +3 -1
  50. package/lib/ExportsInfo.js +56 -2
  51. package/lib/ExportsInfoApiPlugin.js +2 -1
  52. package/lib/ExternalModule.js +38 -0
  53. package/lib/ExternalModuleFactoryPlugin.js +10 -0
  54. package/lib/ExternalsPlugin.js +2 -1
  55. package/lib/FileSystemInfo.js +105 -0
  56. package/lib/FlagAllModulesAsUsedPlugin.js +2 -1
  57. package/lib/FlagDependencyExportsPlugin.js +4 -1
  58. package/lib/FlagDependencyUsagePlugin.js +5 -1
  59. package/lib/FlagEntryExportAsUsedPlugin.js +2 -1
  60. package/lib/Generator.js +13 -0
  61. package/lib/GraphHelpers.js +3 -0
  62. package/lib/HookWebpackError.js +6 -0
  63. package/lib/HotModuleReplacementPlugin.js +9 -1
  64. package/lib/IgnoreErrorModuleFactory.js +2 -0
  65. package/lib/IgnorePlugin.js +2 -1
  66. package/lib/IgnoreWarningsPlugin.js +2 -1
  67. package/lib/InitFragment.js +10 -0
  68. package/lib/InvalidDependenciesModuleWarning.js +1 -0
  69. package/lib/JavascriptMetaInfoPlugin.js +2 -1
  70. package/lib/LibManifestPlugin.js +4 -1
  71. package/lib/LibraryTemplatePlugin.js +2 -1
  72. package/lib/LoaderOptionsPlugin.js +3 -1
  73. package/lib/LoaderTargetPlugin.js +2 -1
  74. package/lib/MainTemplate.js +15 -0
  75. package/lib/ManifestPlugin.js +9 -2
  76. package/lib/Module.js +82 -1
  77. package/lib/ModuleBuildError.js +3 -0
  78. package/lib/ModuleDependencyWarning.js +1 -0
  79. package/lib/ModuleError.js +2 -0
  80. package/lib/ModuleFactory.js +5 -0
  81. package/lib/ModuleFilenameHelpers.js +3 -0
  82. package/lib/ModuleGraph.js +66 -0
  83. package/lib/ModuleGraphConnection.js +9 -0
  84. package/lib/ModuleInfoHeaderPlugin.js +5 -0
  85. package/lib/ModuleNotFoundError.js +1 -0
  86. package/lib/ModuleParseError.js +3 -0
  87. package/lib/ModuleRestoreError.js +1 -0
  88. package/lib/ModuleSourceTypeConstants.js +1 -0
  89. package/lib/ModuleStoreError.js +1 -0
  90. package/lib/ModuleTemplate.js +8 -0
  91. package/lib/ModuleWarning.js +3 -0
  92. package/lib/MultiCompiler.js +28 -0
  93. package/lib/MultiStats.js +8 -0
  94. package/lib/MultiWatching.js +3 -0
  95. package/lib/NoEmitOnErrorsPlugin.js +1 -1
  96. package/lib/NodeStuffInWebError.js +1 -0
  97. package/lib/NodeStuffPlugin.js +10 -1
  98. package/lib/NormalModule.js +30 -2
  99. package/lib/NormalModuleFactory.js +25 -0
  100. package/lib/NormalModuleReplacementPlugin.js +1 -1
  101. package/lib/NullFactory.js +1 -0
  102. package/lib/OptionsApply.js +1 -0
  103. package/lib/Parser.js +2 -0
  104. package/lib/PlatformPlugin.js +2 -1
  105. package/lib/PrefetchPlugin.js +2 -1
  106. package/lib/ProgressPlugin.js +29 -12
  107. package/lib/ProvidePlugin.js +3 -1
  108. package/lib/RawModule.js +12 -0
  109. package/lib/RecordIdsPlugin.js +8 -0
  110. package/lib/RequestShortener.js +8 -0
  111. package/lib/RequireJsStuffPlugin.js +2 -1
  112. package/lib/ResolverFactory.js +5 -0
  113. package/lib/RuntimeGlobals.js +1 -0
  114. package/lib/RuntimeModule.js +13 -0
  115. package/lib/RuntimePlugin.js +2 -0
  116. package/lib/RuntimeTemplate.js +35 -1
  117. package/lib/SelfModuleFactory.js +2 -0
  118. package/lib/SizeFormatHelpers.js +1 -0
  119. package/lib/SourceMapDevToolModuleOptionsPlugin.js +2 -0
  120. package/lib/SourceMapDevToolPlugin.js +3 -1
  121. package/lib/Stats.js +5 -0
  122. package/lib/Template.js +20 -0
  123. package/lib/TemplatedPathPlugin.js +10 -3
  124. package/lib/UnhandledSchemeError.js +6 -0
  125. package/lib/UnsupportedFeatureWarning.js +1 -0
  126. package/lib/UseStrictPlugin.js +2 -1
  127. package/lib/WarnCaseSensitiveModulesPlugin.js +1 -1
  128. package/lib/WarnDeprecatedOptionPlugin.js +1 -1
  129. package/lib/WarnNoModeSetPlugin.js +1 -1
  130. package/lib/WatchIgnorePlugin.js +4 -1
  131. package/lib/Watching.js +14 -0
  132. package/lib/WebpackError.js +3 -0
  133. package/lib/WebpackIsIncludedPlugin.js +2 -0
  134. package/lib/WebpackOptionsApply.js +1 -0
  135. package/lib/WebpackOptionsDefaulter.js +1 -0
  136. package/lib/asset/AssetBytesGenerator.js +6 -0
  137. package/lib/asset/AssetBytesParser.js +1 -0
  138. package/lib/asset/AssetGenerator.js +20 -2
  139. package/lib/asset/AssetModulesPlugin.js +4 -1
  140. package/lib/asset/AssetParser.js +2 -0
  141. package/lib/asset/AssetSourceGenerator.js +6 -0
  142. package/lib/asset/AssetSourceParser.js +1 -0
  143. package/lib/asset/RawDataUrlModule.js +11 -0
  144. package/lib/async-modules/AsyncModuleHelpers.js +1 -0
  145. package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -0
  146. package/lib/async-modules/InferAsyncModulesPlugin.js +1 -1
  147. package/lib/buildChunkGraph.js +15 -0
  148. package/lib/cache/AddBuildDependenciesPlugin.js +2 -1
  149. package/lib/cache/AddManagedPathsPlugin.js +2 -1
  150. package/lib/cache/IdleFileCachePlugin.js +2 -1
  151. package/lib/cache/MemoryCachePlugin.js +1 -1
  152. package/lib/cache/MemoryWithGcCachePlugin.js +3 -1
  153. package/lib/cache/PackFileCacheStrategy.js +29 -0
  154. package/lib/cache/ResolverCachePlugin.js +10 -1
  155. package/lib/cache/getLazyHashedEtag.js +4 -0
  156. package/lib/cache/mergeEtags.js +2 -0
  157. package/lib/cli.js +30 -0
  158. package/lib/config/browserslistTargetHandler.js +2 -0
  159. package/lib/config/defaults.js +35 -2
  160. package/lib/config/normalization.js +12 -0
  161. package/lib/config/target.js +11 -0
  162. package/lib/container/ContainerEntryDependency.js +2 -0
  163. package/lib/container/ContainerEntryModule.js +12 -0
  164. package/lib/container/ContainerEntryModuleFactory.js +1 -0
  165. package/lib/container/ContainerExposedDependency.js +4 -0
  166. package/lib/container/ContainerPlugin.js +2 -1
  167. package/lib/container/ContainerReferencePlugin.js +2 -1
  168. package/lib/container/FallbackDependency.js +4 -0
  169. package/lib/container/FallbackItemDependency.js +1 -0
  170. package/lib/container/FallbackModule.js +12 -0
  171. package/lib/container/FallbackModuleFactory.js +1 -0
  172. package/lib/container/ModuleFederationPlugin.js +3 -1
  173. package/lib/container/RemoteModule.js +13 -0
  174. package/lib/container/RemoteRuntimeModule.js +1 -0
  175. package/lib/container/RemoteToExternalDependency.js +1 -0
  176. package/lib/container/options.js +7 -0
  177. package/lib/css/CssGenerator.js +35 -14
  178. package/lib/css/CssInjectStyleRuntimeModule.js +1 -0
  179. package/lib/css/CssLoadingRuntimeModule.js +1 -0
  180. package/lib/css/CssMergeStyleSheetsRuntimeModule.js +1 -0
  181. package/lib/css/CssModulesPlugin.js +69 -3
  182. package/lib/css/CssParser.js +59 -1
  183. package/lib/css/walkCssTokens.js +31 -0
  184. package/lib/debug/ProfilingPlugin.js +19 -1
  185. package/lib/dependencies/AMDDefineDependency.js +7 -0
  186. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +12 -0
  187. package/lib/dependencies/AMDPlugin.js +4 -1
  188. package/lib/dependencies/AMDRequireArrayDependency.js +6 -0
  189. package/lib/dependencies/AMDRequireContextDependency.js +3 -0
  190. package/lib/dependencies/AMDRequireDependenciesBlock.js +1 -0
  191. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +13 -0
  192. package/lib/dependencies/AMDRequireDependency.js +4 -0
  193. package/lib/dependencies/AMDRequireItemDependency.js +1 -0
  194. package/lib/dependencies/AMDRuntimeModules.js +3 -0
  195. package/lib/dependencies/CachedConstDependency.js +6 -1
  196. package/lib/dependencies/CommonJsDependencyHelpers.js +1 -0
  197. package/lib/dependencies/CommonJsExportRequireDependency.js +8 -0
  198. package/lib/dependencies/CommonJsExportsDependency.js +4 -0
  199. package/lib/dependencies/CommonJsExportsParserPlugin.js +8 -0
  200. package/lib/dependencies/CommonJsFullRequireDependency.js +4 -0
  201. package/lib/dependencies/CommonJsImportsParserPlugin.js +20 -0
  202. package/lib/dependencies/CommonJsPlugin.js +4 -1
  203. package/lib/dependencies/CommonJsRequireContextDependency.js +3 -0
  204. package/lib/dependencies/CommonJsRequireDependency.js +3 -0
  205. package/lib/dependencies/CommonJsSelfReferenceDependency.js +5 -0
  206. package/lib/dependencies/ConstDependency.js +6 -1
  207. package/lib/dependencies/ContextDependency.js +8 -1
  208. package/lib/dependencies/ContextDependencyHelpers.js +3 -0
  209. package/lib/dependencies/ContextDependencyTemplateAsId.js +1 -0
  210. package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +1 -0
  211. package/lib/dependencies/ContextElementDependency.js +4 -0
  212. package/lib/dependencies/CreateRequireParserPlugin.js +6 -0
  213. package/lib/dependencies/CreateScriptUrlDependency.js +4 -0
  214. package/lib/dependencies/CriticalDependencyWarning.js +1 -0
  215. package/lib/dependencies/CssIcssExportDependency.js +10 -2
  216. package/lib/dependencies/CssIcssImportDependency.js +4 -1
  217. package/lib/dependencies/CssIcssSymbolDependency.js +5 -1
  218. package/lib/dependencies/CssImportDependency.js +4 -0
  219. package/lib/dependencies/CssUrlDependency.js +7 -0
  220. package/lib/dependencies/DelegatedSourceDependency.js +1 -0
  221. package/lib/dependencies/DllEntryDependency.js +3 -0
  222. package/lib/dependencies/DynamicExports.js +5 -0
  223. package/lib/dependencies/EntryDependency.js +1 -0
  224. package/lib/dependencies/ExportsInfoDependency.js +6 -0
  225. package/lib/dependencies/ExternalModuleDependency.js +5 -0
  226. package/lib/dependencies/ExternalModuleInitFragment.js +3 -0
  227. package/lib/dependencies/ExternalModuleInitFragmentDependency.js +4 -0
  228. package/lib/dependencies/HarmonyAcceptDependency.js +6 -0
  229. package/lib/dependencies/HarmonyAcceptImportDependency.js +1 -0
  230. package/lib/dependencies/HarmonyCompatibilityDependency.js +1 -0
  231. package/lib/dependencies/HarmonyDetectionParserPlugin.js +3 -0
  232. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +4 -0
  233. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +2 -0
  234. package/lib/dependencies/HarmonyExportExpressionDependency.js +5 -0
  235. package/lib/dependencies/HarmonyExportHeaderDependency.js +4 -0
  236. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +33 -2
  237. package/lib/dependencies/HarmonyExportInitFragment.js +6 -0
  238. package/lib/dependencies/HarmonyExportSpecifierDependency.js +5 -0
  239. package/lib/dependencies/HarmonyExports.js +2 -0
  240. package/lib/dependencies/HarmonyImportDependency.js +11 -0
  241. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +9 -0
  242. package/lib/dependencies/HarmonyImportSideEffectDependency.js +4 -0
  243. package/lib/dependencies/HarmonyImportSpecifierDependency.js +17 -2
  244. package/lib/dependencies/HarmonyModulesPlugin.js +4 -1
  245. package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +1 -0
  246. package/lib/dependencies/ImportContextDependency.js +4 -0
  247. package/lib/dependencies/ImportDependency.js +5 -0
  248. package/lib/dependencies/ImportEagerDependency.js +2 -0
  249. package/lib/dependencies/ImportMetaContextDependency.js +1 -0
  250. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +3 -0
  251. package/lib/dependencies/ImportMetaContextPlugin.js +2 -1
  252. package/lib/dependencies/ImportMetaHotAcceptDependency.js +1 -0
  253. package/lib/dependencies/ImportMetaHotDeclineDependency.js +1 -0
  254. package/lib/dependencies/ImportMetaPlugin.js +6 -0
  255. package/lib/dependencies/ImportParserPlugin.js +7 -0
  256. package/lib/dependencies/ImportPhase.js +6 -2
  257. package/lib/dependencies/ImportPlugin.js +2 -1
  258. package/lib/dependencies/ImportWeakDependency.js +2 -0
  259. package/lib/dependencies/JsonExportsDependency.js +6 -1
  260. package/lib/dependencies/LoaderDependency.js +2 -0
  261. package/lib/dependencies/LoaderImportDependency.js +2 -0
  262. package/lib/dependencies/LoaderPlugin.js +4 -1
  263. package/lib/dependencies/LocalModule.js +4 -0
  264. package/lib/dependencies/LocalModuleDependency.js +4 -0
  265. package/lib/dependencies/LocalModulesHelpers.js +3 -0
  266. package/lib/dependencies/ModuleDecoratorDependency.js +7 -1
  267. package/lib/dependencies/ModuleDependency.js +7 -0
  268. package/lib/dependencies/ModuleDependencyTemplateAsId.js +1 -0
  269. package/lib/dependencies/ModuleDependencyTemplateAsRequireId.js +1 -0
  270. package/lib/dependencies/ModuleHotAcceptDependency.js +1 -0
  271. package/lib/dependencies/ModuleHotDeclineDependency.js +1 -0
  272. package/lib/dependencies/ModuleInitFragmentDependency.js +4 -0
  273. package/lib/dependencies/NullDependency.js +2 -0
  274. package/lib/dependencies/PrefetchDependency.js +1 -0
  275. package/lib/dependencies/ProvidedDependency.js +6 -1
  276. package/lib/dependencies/PureExpressionDependency.js +7 -1
  277. package/lib/dependencies/RequireContextDependency.js +1 -0
  278. package/lib/dependencies/RequireContextDependencyParserPlugin.js +1 -0
  279. package/lib/dependencies/RequireContextPlugin.js +2 -1
  280. package/lib/dependencies/RequireEnsureDependenciesBlock.js +1 -0
  281. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +1 -0
  282. package/lib/dependencies/RequireEnsureDependency.js +4 -0
  283. package/lib/dependencies/RequireEnsureItemDependency.js +1 -0
  284. package/lib/dependencies/RequireEnsurePlugin.js +2 -1
  285. package/lib/dependencies/RequireHeaderDependency.js +4 -0
  286. package/lib/dependencies/RequireIncludeDependency.js +2 -0
  287. package/lib/dependencies/RequireIncludeDependencyParserPlugin.js +3 -0
  288. package/lib/dependencies/RequireIncludePlugin.js +2 -1
  289. package/lib/dependencies/RequireResolveContextDependency.js +3 -0
  290. package/lib/dependencies/RequireResolveDependency.js +1 -0
  291. package/lib/dependencies/RequireResolveHeaderDependency.js +5 -0
  292. package/lib/dependencies/RuntimeRequirementsDependency.js +5 -1
  293. package/lib/dependencies/StaticExportsDependency.js +3 -0
  294. package/lib/dependencies/SystemPlugin.js +4 -1
  295. package/lib/dependencies/SystemRuntimeModule.js +1 -0
  296. package/lib/dependencies/URLContextDependency.js +3 -0
  297. package/lib/dependencies/URLDependency.js +6 -0
  298. package/lib/dependencies/URLPlugin.js +2 -0
  299. package/lib/dependencies/UnsupportedDependency.js +4 -0
  300. package/lib/dependencies/WebAssemblyExportImportedDependency.js +4 -0
  301. package/lib/dependencies/WebAssemblyImportDependency.js +4 -1
  302. package/lib/dependencies/WebpackIsIncludedDependency.js +2 -0
  303. package/lib/dependencies/WorkerDependency.js +6 -1
  304. package/lib/dependencies/WorkerPlugin.js +9 -1
  305. package/lib/dependencies/getFunctionExpression.js +1 -0
  306. package/lib/dependencies/processExportInfo.js +1 -0
  307. package/lib/electron/ElectronTargetPlugin.js +2 -1
  308. package/lib/esm/ExportWebpackRequireRuntimeModule.js +2 -0
  309. package/lib/esm/ModuleChunkFormatPlugin.js +5 -1
  310. package/lib/esm/ModuleChunkLoadingPlugin.js +3 -1
  311. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +5 -0
  312. package/lib/formatLocation.js +2 -0
  313. package/lib/hmr/HotModuleReplacementRuntimeModule.js +1 -0
  314. package/lib/hmr/JavascriptHotModuleReplacementHelper.js +1 -0
  315. package/lib/hmr/LazyCompilationPlugin.js +20 -1
  316. package/lib/hmr/lazyCompilationBackend.js +2 -0
  317. package/lib/ids/ChunkModuleIdRangePlugin.js +3 -1
  318. package/lib/ids/DeterministicChunkIdsPlugin.js +3 -1
  319. package/lib/ids/DeterministicModuleIdsPlugin.js +3 -1
  320. package/lib/ids/HashedModuleIdsPlugin.js +2 -1
  321. package/lib/ids/IdHelpers.js +20 -0
  322. package/lib/ids/NamedChunkIdsPlugin.js +3 -1
  323. package/lib/ids/NamedModuleIdsPlugin.js +3 -1
  324. package/lib/ids/NaturalChunkIdsPlugin.js +1 -1
  325. package/lib/ids/NaturalModuleIdsPlugin.js +1 -1
  326. package/lib/ids/OccurrenceChunkIdsPlugin.js +2 -1
  327. package/lib/ids/OccurrenceModuleIdsPlugin.js +4 -1
  328. package/lib/ids/SyncModuleIdsPlugin.js +3 -1
  329. package/lib/index.js +5 -0
  330. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +1 -1
  331. package/lib/javascript/BasicEvaluatedExpression.js +4 -2
  332. package/lib/javascript/ChunkFormatHelpers.js +2 -1
  333. package/lib/javascript/ChunkHelpers.js +1 -0
  334. package/lib/javascript/CommonJsChunkFormatPlugin.js +1 -1
  335. package/lib/javascript/EnableChunkLoadingPlugin.js +5 -1
  336. package/lib/javascript/JavascriptGenerator.js +10 -0
  337. package/lib/javascript/JavascriptModulesPlugin.js +23 -1
  338. package/lib/javascript/JavascriptParser.js +163 -0
  339. package/lib/javascript/JavascriptParserHelpers.js +6 -0
  340. package/lib/javascript/StartupHelpers.js +5 -0
  341. package/lib/json/JsonData.js +5 -0
  342. package/lib/json/JsonGenerator.js +21 -0
  343. package/lib/json/JsonModulesPlugin.js +1 -1
  344. package/lib/json/JsonParser.js +8 -10
  345. package/lib/library/AbstractLibraryPlugin.js +16 -1
  346. package/lib/library/AmdLibraryPlugin.js +8 -0
  347. package/lib/library/AssignLibraryPlugin.js +16 -0
  348. package/lib/library/EnableLibraryPlugin.js +7 -1
  349. package/lib/library/ExportPropertyLibraryPlugin.js +9 -0
  350. package/lib/library/JsonpLibraryPlugin.js +8 -0
  351. package/lib/library/ModuleLibraryPlugin.js +12 -1
  352. package/lib/library/SystemLibraryPlugin.js +8 -0
  353. package/lib/library/UmdLibraryPlugin.js +16 -0
  354. package/lib/logging/Logger.js +17 -0
  355. package/lib/logging/createConsoleLogger.js +7 -0
  356. package/lib/logging/runtime.js +2 -0
  357. package/lib/logging/truncateArgs.js +2 -0
  358. package/lib/node/CommonJsChunkLoadingPlugin.js +5 -1
  359. package/lib/node/NodeEnvironmentPlugin.js +3 -1
  360. package/lib/node/NodeSourcePlugin.js +1 -1
  361. package/lib/node/NodeTargetPlugin.js +2 -1
  362. package/lib/node/NodeTemplatePlugin.js +3 -1
  363. package/lib/node/NodeWatchFileSystem.js +2 -0
  364. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +3 -0
  365. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +4 -1
  366. package/lib/node/ReadFileCompileWasmPlugin.js +4 -1
  367. package/lib/node/RequireChunkLoadingRuntimeModule.js +3 -0
  368. package/lib/node/nodeConsole.js +3 -0
  369. package/lib/optimize/AggressiveMergingPlugin.js +3 -1
  370. package/lib/optimize/AggressiveSplittingPlugin.js +6 -1
  371. package/lib/optimize/ConcatenatedModule.js +11 -0
  372. package/lib/optimize/EnsureChunkConditionsPlugin.js +2 -1
  373. package/lib/optimize/FlagIncludedChunksPlugin.js +2 -1
  374. package/lib/optimize/InnerGraph.js +15 -0
  375. package/lib/optimize/InnerGraphPlugin.js +3 -1
  376. package/lib/optimize/LimitChunkCountPlugin.js +9 -0
  377. package/lib/optimize/MangleExportsPlugin.js +5 -1
  378. package/lib/optimize/MergeDuplicateChunksPlugin.js +2 -0
  379. package/lib/optimize/MinChunkSizePlugin.js +2 -1
  380. package/lib/optimize/MinMaxSizeWarning.js +1 -0
  381. package/lib/optimize/ModuleConcatenationPlugin.js +21 -1
  382. package/lib/optimize/RealContentHashPlugin.js +16 -1
  383. package/lib/optimize/RemoveEmptyChunksPlugin.js +2 -1
  384. package/lib/optimize/RemoveParentModulesPlugin.js +3 -1
  385. package/lib/optimize/RuntimeChunkPlugin.js +2 -1
  386. package/lib/optimize/SideEffectsFlagPlugin.js +7 -1
  387. package/lib/optimize/SplitChunksPlugin.js +49 -1
  388. package/lib/performance/AssetsOverSizeLimitWarning.js +1 -0
  389. package/lib/performance/EntrypointsOverSizeLimitWarning.js +1 -0
  390. package/lib/performance/SizeLimitsPlugin.js +7 -1
  391. package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +1 -0
  392. package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +6 -0
  393. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +1 -0
  394. package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +1 -0
  395. package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +1 -0
  396. package/lib/rules/BasicEffectRulePlugin.js +3 -0
  397. package/lib/rules/BasicMatcherRulePlugin.js +3 -0
  398. package/lib/rules/ObjectMatcherRulePlugin.js +3 -0
  399. package/lib/rules/RuleSetCompiler.js +18 -0
  400. package/lib/rules/UseEffectRulePlugin.js +6 -0
  401. package/lib/runtime/AsyncModuleRuntimeModule.js +1 -0
  402. package/lib/runtime/AutoPublicPathRuntimeModule.js +1 -0
  403. package/lib/runtime/BaseUriRuntimeModule.js +1 -0
  404. package/lib/runtime/ChunkNameRuntimeModule.js +1 -0
  405. package/lib/runtime/CompatGetDefaultExportRuntimeModule.js +1 -0
  406. package/lib/runtime/CompatRuntimeModule.js +2 -0
  407. package/lib/runtime/CreateFakeNamespaceObjectRuntimeModule.js +1 -0
  408. package/lib/runtime/CreateScriptRuntimeModule.js +1 -0
  409. package/lib/runtime/CreateScriptUrlRuntimeModule.js +1 -0
  410. package/lib/runtime/DefinePropertyGettersRuntimeModule.js +1 -0
  411. package/lib/runtime/EnsureChunkRuntimeModule.js +1 -0
  412. package/lib/runtime/GetChunkFilenameRuntimeModule.js +1 -0
  413. package/lib/runtime/GetFullHashRuntimeModule.js +1 -0
  414. package/lib/runtime/GetMainFilenameRuntimeModule.js +1 -0
  415. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -0
  416. package/lib/runtime/GlobalRuntimeModule.js +1 -0
  417. package/lib/runtime/HasOwnPropertyRuntimeModule.js +1 -0
  418. package/lib/runtime/HelperRuntimeModule.js +5 -0
  419. package/lib/runtime/LoadScriptRuntimeModule.js +1 -0
  420. package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +2 -0
  421. package/lib/runtime/MakeNamespaceObjectRuntimeModule.js +1 -0
  422. package/lib/runtime/NonceRuntimeModule.js +1 -0
  423. package/lib/runtime/OnChunksLoadedRuntimeModule.js +1 -0
  424. package/lib/runtime/PublicPathRuntimeModule.js +1 -0
  425. package/lib/runtime/RelativeUrlRuntimeModule.js +1 -0
  426. package/lib/runtime/RuntimeIdRuntimeModule.js +1 -0
  427. package/lib/runtime/StartupChunkDependenciesPlugin.js +13 -1
  428. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +1 -0
  429. package/lib/runtime/StartupEntrypointRuntimeModule.js +1 -0
  430. package/lib/runtime/SystemContextRuntimeModule.js +1 -0
  431. package/lib/runtime/ToBinaryRuntimeModule.js +1 -0
  432. package/lib/schemes/DataUriPlugin.js +1 -1
  433. package/lib/schemes/FileUriPlugin.js +1 -1
  434. package/lib/schemes/HttpUriPlugin.js +43 -1
  435. package/lib/schemes/VirtualUrlPlugin.js +6 -1
  436. package/lib/serialization/AggregateErrorSerializer.js +2 -0
  437. package/lib/serialization/ArraySerializer.js +2 -0
  438. package/lib/serialization/BinaryMiddleware.js +20 -1
  439. package/lib/serialization/DateObjectSerializer.js +2 -0
  440. package/lib/serialization/ErrorObjectSerializer.js +3 -0
  441. package/lib/serialization/FileMiddleware.js +21 -0
  442. package/lib/serialization/MapObjectSerializer.js +2 -0
  443. package/lib/serialization/NullPrototypeObjectSerializer.js +2 -0
  444. package/lib/serialization/ObjectMiddleware.js +23 -0
  445. package/lib/serialization/PlainObjectSerializer.js +7 -0
  446. package/lib/serialization/RegExpObjectSerializer.js +2 -0
  447. package/lib/serialization/Serializer.js +5 -0
  448. package/lib/serialization/SerializerMiddleware.js +12 -0
  449. package/lib/serialization/SetObjectSerializer.js +2 -0
  450. package/lib/serialization/SingleItemMiddleware.js +3 -0
  451. package/lib/sharing/ConsumeSharedFallbackDependency.js +1 -0
  452. package/lib/sharing/ConsumeSharedModule.js +15 -0
  453. package/lib/sharing/ConsumeSharedPlugin.js +6 -1
  454. package/lib/sharing/ConsumeSharedRuntimeModule.js +1 -0
  455. package/lib/sharing/ProvideForSharedDependency.js +1 -0
  456. package/lib/sharing/ProvideSharedDependency.js +4 -0
  457. package/lib/sharing/ProvideSharedModule.js +11 -0
  458. package/lib/sharing/ProvideSharedModuleFactory.js +1 -0
  459. package/lib/sharing/ProvideSharedPlugin.js +4 -1
  460. package/lib/sharing/SharePlugin.js +2 -1
  461. package/lib/sharing/ShareRuntimeModule.js +1 -0
  462. package/lib/sharing/resolveMatchedConfigs.js +3 -0
  463. package/lib/sharing/utils.js +8 -0
  464. package/lib/stats/DefaultStatsFactoryPlugin.js +56 -1
  465. package/lib/stats/DefaultStatsPresetPlugin.js +11 -1
  466. package/lib/stats/DefaultStatsPrinterPlugin.js +37 -1
  467. package/lib/stats/StatsFactory.js +12 -0
  468. package/lib/stats/StatsPrinter.js +7 -0
  469. package/lib/url/URLParserPlugin.js +6 -0
  470. package/lib/util/AppendOnlyStackedSet.js +15 -0
  471. package/lib/util/ArrayHelpers.js +1 -0
  472. package/lib/util/ArrayQueue.js +10 -5
  473. package/lib/util/AsyncQueue.js +20 -0
  474. package/lib/util/IterableHelpers.js +3 -0
  475. package/lib/util/LazyBucketSortedSet.js +21 -0
  476. package/lib/util/LazySet.js +39 -0
  477. package/lib/util/ParallelismFactorCalculator.js +1 -0
  478. package/lib/util/Queue.js +6 -3
  479. package/lib/util/Semaphore.js +14 -1
  480. package/lib/util/SetHelpers.js +3 -0
  481. package/lib/util/SortableSet.js +6 -0
  482. package/lib/util/StackedCacheMap.js +20 -3
  483. package/lib/util/StackedMap.js +45 -0
  484. package/lib/util/StringXor.js +1 -1
  485. package/lib/util/TupleQueue.js +7 -3
  486. package/lib/util/TupleSet.js +13 -0
  487. package/lib/util/URLAbsoluteSpecifier.js +1 -0
  488. package/lib/util/WeakTupleMap.js +33 -0
  489. package/lib/util/binarySearchBounds.js +1 -0
  490. package/lib/util/cleverMerge.js +17 -0
  491. package/lib/util/comparators.js +31 -0
  492. package/lib/util/compileBooleanMatcher.js +9 -0
  493. package/lib/util/concatenate.js +6 -0
  494. package/lib/util/conventions.js +4 -0
  495. package/lib/util/dataURL.js +1 -0
  496. package/lib/util/deprecation.js +19 -0
  497. package/lib/util/deterministicGrouping.js +20 -0
  498. package/lib/util/extractSourceMap.js +1 -0
  499. package/lib/util/extractUrlAndGlobal.js +1 -0
  500. package/lib/util/findGraphRoots.js +5 -0
  501. package/lib/util/fs.js +63 -0
  502. package/lib/util/generateDebugId.js +1 -0
  503. package/lib/util/hash/BatchedHash.js +1 -0
  504. package/lib/util/hash/BulkUpdateHash.js +1 -0
  505. package/lib/util/hash/hash-digest.js +8 -0
  506. package/lib/util/hash/wasm-hash.js +5 -0
  507. package/lib/util/identifier.js +19 -0
  508. package/lib/util/magicComment.js +1 -0
  509. package/lib/util/makeSerializable.js +6 -0
  510. package/lib/util/memoize.js +2 -0
  511. package/lib/util/mimeTypes.js +176 -0
  512. package/lib/util/nonNumericOnlyHash.js +1 -0
  513. package/lib/util/parseJson.js +112 -0
  514. package/lib/util/processAsyncTree.js +8 -0
  515. package/lib/util/property.js +1 -0
  516. package/lib/util/registerExternalSerializer.js +20 -0
  517. package/lib/util/removeBOM.js +1 -0
  518. package/lib/util/runtime.js +32 -0
  519. package/lib/util/semver.js +15 -0
  520. package/lib/util/serialization.js +2 -0
  521. package/lib/util/smartGrouping.js +8 -0
  522. package/lib/util/source.js +2 -0
  523. package/lib/validateSchema.js +1 -0
  524. package/lib/wasm/EnableWasmLoadingPlugin.js +15 -1
  525. package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +1 -0
  526. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +1 -0
  527. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +6 -0
  528. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +5 -0
  529. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +10 -1
  530. package/lib/wasm-async/AsyncWebAssemblyParser.js +1 -0
  531. package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +12 -1
  532. package/lib/wasm-sync/UnsupportedWebAssemblyFeatureError.js +1 -0
  533. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +1 -0
  534. package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +1 -1
  535. package/lib/wasm-sync/WebAssemblyGenerator.js +26 -1
  536. package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +2 -0
  537. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +4 -0
  538. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +10 -1
  539. package/lib/wasm-sync/WebAssemblyParser.js +2 -0
  540. package/lib/wasm-sync/WebAssemblyUtils.js +2 -0
  541. package/lib/web/FetchCompileAsyncWasmPlugin.js +10 -1
  542. package/lib/web/FetchCompileWasmPlugin.js +13 -1
  543. package/lib/web/JsonpChunkLoadingPlugin.js +11 -1
  544. package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -0
  545. package/lib/web/JsonpTemplatePlugin.js +2 -1
  546. package/lib/webpack.js +10 -0
  547. package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +10 -1
  548. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +1 -0
  549. package/lib/webworker/WebWorkerTemplatePlugin.js +1 -1
  550. package/package.json +12 -14
  551. package/schemas/WebpackOptions.check.js +1 -1
  552. package/schemas/WebpackOptions.json +44 -55
  553. package/types.d.ts +4594 -331
@@ -94,6 +94,7 @@ const BasicEvaluatedExpression = require("./BasicEvaluatedExpression");
94
94
  /** @typedef {import("estree").MaybeNamedFunctionDeclaration} MaybeNamedFunctionDeclaration */
95
95
  /** @typedef {import("estree").MaybeNamedClassDeclaration} MaybeNamedClassDeclaration */
96
96
  /**
97
+ * Defines the shared type used by this module.
97
98
  * @template T
98
99
  * @typedef {import("tapable").AsArray<T>} AsArray<T>
99
100
  */
@@ -104,6 +105,7 @@ const BasicEvaluatedExpression = require("./BasicEvaluatedExpression");
104
105
  /** @typedef {import("../dependencies/HarmonyExportImportedSpecifierDependency").HarmonyStarExportsList} HarmonyStarExportsList */
105
106
 
106
107
  /**
108
+ * Defines the known javascript parser state type used by this module.
107
109
  * @typedef {object} KnownJavascriptParserState
108
110
  * @property {Set<string>=} harmonyNamedExports
109
111
  * @property {HarmonyStarExportsList=} harmonyStarExports
@@ -139,6 +141,7 @@ const LEGACY_ASSERT_ATTRIBUTES = Symbol("assert");
139
141
  const importAssertions = (Parser) =>
140
142
  class extends Parser {
141
143
  /**
144
+ * Parses with clause.
142
145
  * @this {InstanceType<AcornParser>}
143
146
  * @returns {ImportAttribute[]} import attributes
144
147
  */
@@ -204,6 +207,7 @@ let parser = AcornParser.extend(importAssertions);
204
207
  /** @typedef {Record<string, string> & { _isLegacyAssert?: boolean }} ImportAttributes */
205
208
 
206
209
  /**
210
+ * Gets import attributes.
207
211
  * @param {ImportDeclaration | ExportNamedDeclaration | ExportAllDeclaration | ImportExpression} node node with assertions
208
212
  * @returns {ImportAttributes | undefined} import attributes
209
213
  */
@@ -287,6 +291,7 @@ const VariableInfoFlags = Object.freeze({
287
291
 
288
292
  class VariableInfo {
289
293
  /**
294
+ * Creates an instance of VariableInfo.
290
295
  * @param {ScopeInfo} declaredScope scope in which the variable is declared
291
296
  * @param {string | undefined} name which name the variable use, defined name or free name or tagged name
292
297
  * @param {VariableInfoFlagsType} flags how the variable is created
@@ -300,6 +305,7 @@ class VariableInfo {
300
305
  }
301
306
 
302
307
  /**
308
+ * Checks whether this variable info is free.
303
309
  * @returns {boolean} the variable is free or not
304
310
  */
305
311
  isFree() {
@@ -307,6 +313,7 @@ class VariableInfo {
307
313
  }
308
314
 
309
315
  /**
316
+ * Checks whether this variable info is tagged.
310
317
  * @returns {boolean} the variable is tagged by tagVariable or not
311
318
  */
312
319
  isTagged() {
@@ -318,10 +325,12 @@ class VariableInfo {
318
325
  /** @typedef {Literal | string | null | undefined} ImportSource */
319
326
 
320
327
  /**
328
+ * Defines the internal parse options type used by this module.
321
329
  * @typedef {Omit<ParseOptions, "sourceType" | "ecmaVersion"> & { sourceType: "module" | "script" | "auto" }} InternalParseOptions
322
330
  */
323
331
 
324
332
  /**
333
+ * Defines the parse options type used by this module.
325
334
  * @typedef {object} ParseOptions
326
335
  * @property {"module" | "script"} sourceType
327
336
  * @property {EcmaVersion} ecmaVersion
@@ -334,6 +343,7 @@ class VariableInfo {
334
343
  */
335
344
 
336
345
  /**
346
+ * Defines the parse result type used by this module.
337
347
  * @typedef {object} ParseResult
338
348
  * @property {Program} ast
339
349
  * @property {Comment[]} comments
@@ -341,6 +351,7 @@ class VariableInfo {
341
351
  */
342
352
 
343
353
  /**
354
+ * Defines the parse function type used by this module.
344
355
  * @typedef {(code: string, options: ParseOptions) => ParseResult} ParseFunction
345
356
  */
346
357
 
@@ -357,6 +368,7 @@ class VariableInfo {
357
368
  /** @typedef {KnownTagData | Record<string, EXPECTED_ANY>} TagData */
358
369
 
359
370
  /**
371
+ * Defines the tag info type used by this module.
360
372
  * @typedef {object} TagInfo
361
373
  * @property {Tag} tag
362
374
  * @property {TagData=} data
@@ -372,6 +384,7 @@ const SCOPE_INFO_TERMINATED_RETURN = 1;
372
384
  const SCOPE_INFO_TERMINATED_THROW = 2;
373
385
 
374
386
  /**
387
+ * Defines the scope info type used by this module.
375
388
  * @typedef {object} ScopeInfo
376
389
  * @property {StackedMap<string, VariableInfo | ScopeInfo>} definitions
377
390
  * @property {boolean | "arrow"} topLevelScope
@@ -386,6 +399,7 @@ const SCOPE_INFO_TERMINATED_THROW = 2;
386
399
  /** @typedef {[number, number]} Range */
387
400
 
388
401
  /**
402
+ * Defines the destructuring assignment property type used by this module.
389
403
  * @typedef {object} DestructuringAssignmentProperty
390
404
  * @property {string} id
391
405
  * @property {Range} range
@@ -479,6 +493,7 @@ const CLASS_NAME = "JavascriptParser";
479
493
 
480
494
  class JavascriptParser extends Parser {
481
495
  /**
496
+ * Creates an instance of JavascriptParser.
482
497
  * @param {"module" | "script" | "auto"=} sourceType default source type
483
498
  * @param {{ parse?: ParseFunction }=} options parser options
484
499
  */
@@ -956,6 +971,7 @@ class JavascriptParser extends Parser {
956
971
  (a === true && b === false) || (a === false && b === true);
957
972
 
958
973
  /**
974
+ * Handle template string compare.
959
975
  * @param {BasicEvaluatedExpression} left left
960
976
  * @param {BasicEvaluatedExpression} right right
961
977
  * @param {BasicEvaluatedExpression} res res
@@ -964,6 +980,7 @@ class JavascriptParser extends Parser {
964
980
  */
965
981
  const handleTemplateStringCompare = (left, right, res, eql) => {
966
982
  /**
983
+ * Returns value.
967
984
  * @param {BasicEvaluatedExpression[]} parts parts
968
985
  * @returns {string} value
969
986
  */
@@ -977,6 +994,7 @@ class JavascriptParser extends Parser {
977
994
  return value;
978
995
  };
979
996
  /**
997
+ * Returns value.
980
998
  * @param {BasicEvaluatedExpression[]} parts parts
981
999
  * @returns {string} value
982
1000
  */
@@ -1460,6 +1478,7 @@ class JavascriptParser extends Parser {
1460
1478
  }
1461
1479
  });
1462
1480
  /**
1481
+ * Tap evaluate with variable info.
1463
1482
  * @param {"Identifier" | "ThisExpression" | "MemberExpression"} exprType expression type name
1464
1483
  * @param {(node: Expression | SpreadElement) => GetInfoResult | undefined} getInfo get info
1465
1484
  * @returns {void}
@@ -1687,6 +1706,7 @@ class JavascriptParser extends Parser {
1687
1706
  }
1688
1707
 
1689
1708
  /**
1709
+ * Gets simplified template result.
1690
1710
  * @param {"cooked" | "raw"} kind kind of values to get
1691
1711
  * @param {TemplateLiteral} templateLiteralExpr TemplateLiteral expr
1692
1712
  * @returns {{ quasis: BasicEvaluatedExpression[], parts: BasicEvaluatedExpression[] }} Simplified template
@@ -1962,6 +1982,7 @@ class JavascriptParser extends Parser {
1962
1982
  }
1963
1983
 
1964
1984
  /**
1985
+ * Destructuring assignment properties for.
1965
1986
  * @param {Expression} node node
1966
1987
  * @returns {DestructuringAssignmentProperties | undefined} destructured identifiers
1967
1988
  */
@@ -1971,6 +1992,7 @@ class JavascriptParser extends Parser {
1971
1992
  }
1972
1993
 
1973
1994
  /**
1995
+ * Gets rename identifier.
1974
1996
  * @param {Expression | SpreadElement} expr expression
1975
1997
  * @returns {string | VariableInfo | undefined} identifier
1976
1998
  */
@@ -1982,6 +2004,7 @@ class JavascriptParser extends Parser {
1982
2004
  }
1983
2005
 
1984
2006
  /**
2007
+ * Processes the provided classy.
1985
2008
  * @param {ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration} classy a class node
1986
2009
  * @returns {void}
1987
2010
  */
@@ -2166,6 +2189,7 @@ class JavascriptParser extends Parser {
2166
2189
  }
2167
2190
 
2168
2191
  /**
2192
+ * Block pre walk statement.
2169
2193
  * @param {Statement | ModuleDeclaration | MaybeNamedClassDeclaration | MaybeNamedFunctionDeclaration} statement statement
2170
2194
  */
2171
2195
  blockPreWalkStatement(statement) {
@@ -2199,6 +2223,7 @@ class JavascriptParser extends Parser {
2199
2223
  }
2200
2224
 
2201
2225
  /**
2226
+ * Processes the provided statement.
2202
2227
  * @param {Statement | ModuleDeclaration | MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration} statement statement
2203
2228
  */
2204
2229
  walkStatement(statement) {
@@ -2287,6 +2312,7 @@ class JavascriptParser extends Parser {
2287
2312
 
2288
2313
  // Real Statements
2289
2314
  /**
2315
+ * Pre walk block statement.
2290
2316
  * @param {BlockStatement} statement block statement
2291
2317
  */
2292
2318
  preWalkBlockStatement(statement) {
@@ -2294,6 +2320,7 @@ class JavascriptParser extends Parser {
2294
2320
  }
2295
2321
 
2296
2322
  /**
2323
+ * Walk block statement.
2297
2324
  * @param {BlockStatement | StaticBlock} statement block statement
2298
2325
  */
2299
2326
  walkBlockStatement(statement) {
@@ -2307,6 +2334,7 @@ class JavascriptParser extends Parser {
2307
2334
  }
2308
2335
 
2309
2336
  /**
2337
+ * Walk expression statement.
2310
2338
  * @param {ExpressionStatement} statement expression statement
2311
2339
  */
2312
2340
  walkExpressionStatement(statement) {
@@ -2314,6 +2342,7 @@ class JavascriptParser extends Parser {
2314
2342
  }
2315
2343
 
2316
2344
  /**
2345
+ * Pre walk if statement.
2317
2346
  * @param {IfStatement} statement if statement
2318
2347
  */
2319
2348
  preWalkIfStatement(statement) {
@@ -2324,6 +2353,7 @@ class JavascriptParser extends Parser {
2324
2353
  }
2325
2354
 
2326
2355
  /**
2356
+ * Processes the provided statement.
2327
2357
  * @param {IfStatement} statement if statement
2328
2358
  */
2329
2359
  walkIfStatement(statement) {
@@ -2361,6 +2391,7 @@ class JavascriptParser extends Parser {
2361
2391
  }
2362
2392
 
2363
2393
  /**
2394
+ * Pre walk labeled statement.
2364
2395
  * @param {LabeledStatement} statement with statement
2365
2396
  */
2366
2397
  preWalkLabeledStatement(statement) {
@@ -2368,6 +2399,7 @@ class JavascriptParser extends Parser {
2368
2399
  }
2369
2400
 
2370
2401
  /**
2402
+ * Walk labeled statement.
2371
2403
  * @param {LabeledStatement} statement with statement
2372
2404
  */
2373
2405
  walkLabeledStatement(statement) {
@@ -2382,6 +2414,7 @@ class JavascriptParser extends Parser {
2382
2414
  }
2383
2415
 
2384
2416
  /**
2417
+ * Pre walk with statement.
2385
2418
  * @param {WithStatement} statement with statement
2386
2419
  */
2387
2420
  preWalkWithStatement(statement) {
@@ -2389,6 +2422,7 @@ class JavascriptParser extends Parser {
2389
2422
  }
2390
2423
 
2391
2424
  /**
2425
+ * Walk with statement.
2392
2426
  * @param {WithStatement} statement with statement
2393
2427
  */
2394
2428
  walkWithStatement(statement) {
@@ -2399,6 +2433,7 @@ class JavascriptParser extends Parser {
2399
2433
  }
2400
2434
 
2401
2435
  /**
2436
+ * Pre walk switch statement.
2402
2437
  * @param {SwitchStatement} statement switch statement
2403
2438
  */
2404
2439
  preWalkSwitchStatement(statement) {
@@ -2406,6 +2441,7 @@ class JavascriptParser extends Parser {
2406
2441
  }
2407
2442
 
2408
2443
  /**
2444
+ * Walk switch statement.
2409
2445
  * @param {SwitchStatement} statement switch statement
2410
2446
  */
2411
2447
  walkSwitchStatement(statement) {
@@ -2414,6 +2450,7 @@ class JavascriptParser extends Parser {
2414
2450
  }
2415
2451
 
2416
2452
  /**
2453
+ * Walk terminating statement.
2417
2454
  * @param {ReturnStatement | ThrowStatement} statement return or throw statement
2418
2455
  */
2419
2456
  walkTerminatingStatement(statement) {
@@ -2429,6 +2466,7 @@ class JavascriptParser extends Parser {
2429
2466
  }
2430
2467
 
2431
2468
  /**
2469
+ * Walk return statement.
2432
2470
  * @param {ReturnStatement} statement return statement
2433
2471
  */
2434
2472
  walkReturnStatement(statement) {
@@ -2436,6 +2474,7 @@ class JavascriptParser extends Parser {
2436
2474
  }
2437
2475
 
2438
2476
  /**
2477
+ * Walk throw statement.
2439
2478
  * @param {ThrowStatement} statement return statement
2440
2479
  */
2441
2480
  walkThrowStatement(statement) {
@@ -2443,6 +2482,7 @@ class JavascriptParser extends Parser {
2443
2482
  }
2444
2483
 
2445
2484
  /**
2485
+ * Pre walk try statement.
2446
2486
  * @param {TryStatement} statement try statement
2447
2487
  */
2448
2488
  preWalkTryStatement(statement) {
@@ -2452,6 +2492,7 @@ class JavascriptParser extends Parser {
2452
2492
  }
2453
2493
 
2454
2494
  /**
2495
+ * Walk try statement.
2455
2496
  * @param {TryStatement} statement try statement
2456
2497
  */
2457
2498
  walkTryStatement(statement) {
@@ -2489,6 +2530,7 @@ class JavascriptParser extends Parser {
2489
2530
  }
2490
2531
 
2491
2532
  /**
2533
+ * Pre walk while statement.
2492
2534
  * @param {WhileStatement} statement while statement
2493
2535
  */
2494
2536
  preWalkWhileStatement(statement) {
@@ -2496,6 +2538,7 @@ class JavascriptParser extends Parser {
2496
2538
  }
2497
2539
 
2498
2540
  /**
2541
+ * Walk while statement.
2499
2542
  * @param {WhileStatement} statement while statement
2500
2543
  */
2501
2544
  walkWhileStatement(statement) {
@@ -2506,6 +2549,7 @@ class JavascriptParser extends Parser {
2506
2549
  }
2507
2550
 
2508
2551
  /**
2552
+ * Pre walk do while statement.
2509
2553
  * @param {DoWhileStatement} statement do while statement
2510
2554
  */
2511
2555
  preWalkDoWhileStatement(statement) {
@@ -2513,6 +2557,7 @@ class JavascriptParser extends Parser {
2513
2557
  }
2514
2558
 
2515
2559
  /**
2560
+ * Walk do while statement.
2516
2561
  * @param {DoWhileStatement} statement do while statement
2517
2562
  */
2518
2563
  walkDoWhileStatement(statement) {
@@ -2523,6 +2568,7 @@ class JavascriptParser extends Parser {
2523
2568
  }
2524
2569
 
2525
2570
  /**
2571
+ * Pre walk for statement.
2526
2572
  * @param {ForStatement} statement for statement
2527
2573
  */
2528
2574
  preWalkForStatement(statement) {
@@ -2533,6 +2579,7 @@ class JavascriptParser extends Parser {
2533
2579
  }
2534
2580
 
2535
2581
  /**
2582
+ * Walk for statement.
2536
2583
  * @param {ForStatement} statement for statement
2537
2584
  */
2538
2585
  walkForStatement(statement) {
@@ -2568,6 +2615,7 @@ class JavascriptParser extends Parser {
2568
2615
  }
2569
2616
 
2570
2617
  /**
2618
+ * Pre walk for in statement.
2571
2619
  * @param {ForInStatement} statement for statement
2572
2620
  */
2573
2621
  preWalkForInStatement(statement) {
@@ -2578,6 +2626,7 @@ class JavascriptParser extends Parser {
2578
2626
  }
2579
2627
 
2580
2628
  /**
2629
+ * Walk for in statement.
2581
2630
  * @param {ForInStatement} statement for statement
2582
2631
  */
2583
2632
  walkForInStatement(statement) {
@@ -2606,6 +2655,7 @@ class JavascriptParser extends Parser {
2606
2655
  }
2607
2656
 
2608
2657
  /**
2658
+ * Pre walk for of statement.
2609
2659
  * @param {ForOfStatement} statement statement
2610
2660
  */
2611
2661
  preWalkForOfStatement(statement) {
@@ -2619,6 +2669,7 @@ class JavascriptParser extends Parser {
2619
2669
  }
2620
2670
 
2621
2671
  /**
2672
+ * Walk for of statement.
2622
2673
  * @param {ForOfStatement} statement for statement
2623
2674
  */
2624
2675
  walkForOfStatement(statement) {
@@ -2647,6 +2698,7 @@ class JavascriptParser extends Parser {
2647
2698
  }
2648
2699
 
2649
2700
  /**
2701
+ * Pre walk function declaration.
2650
2702
  * @param {FunctionDeclaration | MaybeNamedFunctionDeclaration} statement function declaration
2651
2703
  */
2652
2704
  preWalkFunctionDeclaration(statement) {
@@ -2656,6 +2708,7 @@ class JavascriptParser extends Parser {
2656
2708
  }
2657
2709
 
2658
2710
  /**
2711
+ * Walk function declaration.
2659
2712
  * @param {FunctionDeclaration | MaybeNamedFunctionDeclaration} statement function declaration
2660
2713
  */
2661
2714
  walkFunctionDeclaration(statement) {
@@ -2678,6 +2731,7 @@ class JavascriptParser extends Parser {
2678
2731
  }
2679
2732
 
2680
2733
  /**
2734
+ * Block pre walk expression statement.
2681
2735
  * @param {ExpressionStatement} statement expression statement
2682
2736
  */
2683
2737
  blockPreWalkExpressionStatement(statement) {
@@ -2689,6 +2743,7 @@ class JavascriptParser extends Parser {
2689
2743
  }
2690
2744
 
2691
2745
  /**
2746
+ * Pre walk assignment expression.
2692
2747
  * @param {AssignmentExpression} expression assignment expression
2693
2748
  */
2694
2749
  preWalkAssignmentExpression(expression) {
@@ -2696,6 +2751,7 @@ class JavascriptParser extends Parser {
2696
2751
  }
2697
2752
 
2698
2753
  /**
2754
+ * Enter destructuring assignment.
2699
2755
  * @param {Pattern} pattern pattern
2700
2756
  * @param {Expression} expression assignment expression
2701
2757
  * @returns {Expression | undefined} destructuring expression
@@ -2737,6 +2793,7 @@ class JavascriptParser extends Parser {
2737
2793
  }
2738
2794
 
2739
2795
  /**
2796
+ * Module pre walk import declaration.
2740
2797
  * @param {ImportDeclaration} statement statement
2741
2798
  */
2742
2799
  modulePreWalkImportDeclaration(statement) {
@@ -2782,6 +2839,7 @@ class JavascriptParser extends Parser {
2782
2839
  }
2783
2840
 
2784
2841
  /**
2842
+ * Processes the provided declaration.
2785
2843
  * @param {Declaration} declaration declaration
2786
2844
  * @param {OnIdent} onIdent on ident callback
2787
2845
  */
@@ -2807,6 +2865,7 @@ class JavascriptParser extends Parser {
2807
2865
  }
2808
2866
 
2809
2867
  /**
2868
+ * Module pre walk export named declaration.
2810
2869
  * @param {ExportNamedDeclaration} statement statement
2811
2870
  */
2812
2871
  modulePreWalkExportNamedDeclaration(statement) {
@@ -2847,6 +2906,7 @@ class JavascriptParser extends Parser {
2847
2906
  }
2848
2907
 
2849
2908
  /**
2909
+ * Block pre walk export named declaration.
2850
2910
  * @param {ExportNamedDeclaration} statement statement
2851
2911
  */
2852
2912
  blockPreWalkExportNamedDeclaration(statement) {
@@ -2898,6 +2958,7 @@ class JavascriptParser extends Parser {
2898
2958
  }
2899
2959
 
2900
2960
  /**
2961
+ * Walk export named declaration.
2901
2962
  * @param {ExportNamedDeclaration} statement the statement
2902
2963
  */
2903
2964
  walkExportNamedDeclaration(statement) {
@@ -2907,6 +2968,7 @@ class JavascriptParser extends Parser {
2907
2968
  }
2908
2969
 
2909
2970
  /**
2971
+ * Block pre walk export default declaration.
2910
2972
  * @param {ExportDefaultDeclaration} statement statement
2911
2973
  */
2912
2974
  blockPreWalkExportDefaultDeclaration(statement) {
@@ -2942,6 +3004,7 @@ class JavascriptParser extends Parser {
2942
3004
  }
2943
3005
 
2944
3006
  /**
3007
+ * Walk export default declaration.
2945
3008
  * @param {ExportDefaultDeclaration} statement statement
2946
3009
  */
2947
3010
  walkExportDefaultDeclaration(statement) {
@@ -2976,6 +3039,7 @@ class JavascriptParser extends Parser {
2976
3039
  }
2977
3040
 
2978
3041
  /**
3042
+ * Module pre walk export all declaration.
2979
3043
  * @param {ExportAllDeclaration} statement statement
2980
3044
  */
2981
3045
  modulePreWalkExportAllDeclaration(statement) {
@@ -2991,6 +3055,7 @@ class JavascriptParser extends Parser {
2991
3055
  }
2992
3056
 
2993
3057
  /**
3058
+ * Pre walk variable declaration.
2994
3059
  * @param {VariableDeclaration} statement variable declaration
2995
3060
  */
2996
3061
  preWalkVariableDeclaration(statement) {
@@ -2999,6 +3064,7 @@ class JavascriptParser extends Parser {
2999
3064
  }
3000
3065
 
3001
3066
  /**
3067
+ * Block pre walk variable declaration.
3002
3068
  * @param {VariableDeclaration} statement variable declaration
3003
3069
  */
3004
3070
  blockPreWalkVariableDeclaration(statement) {
@@ -3014,6 +3080,7 @@ class JavascriptParser extends Parser {
3014
3080
  }
3015
3081
 
3016
3082
  /**
3083
+ * Pre walk variable declaration.
3017
3084
  * @param {VariableDeclaration} statement variable declaration
3018
3085
  * @param {HookMap<SyncBailHook<[Identifier], boolean | void>>} hookMap map of hooks
3019
3086
  */
@@ -3040,6 +3107,7 @@ class JavascriptParser extends Parser {
3040
3107
  }
3041
3108
 
3042
3109
  /**
3110
+ * Pre walk object pattern.
3043
3111
  * @param {ObjectPattern} objectPattern object pattern
3044
3112
  * @returns {DestructuringAssignmentProperties | undefined} set of names or undefined if not all keys are identifiers
3045
3113
  */
@@ -3104,6 +3172,7 @@ class JavascriptParser extends Parser {
3104
3172
  }
3105
3173
 
3106
3174
  /**
3175
+ * Pre walk array pattern.
3107
3176
  * @param {ArrayPattern} arrayPattern array pattern
3108
3177
  * @returns {Set<DestructuringAssignmentProperty> | undefined} set of names or undefined if not all keys are identifiers
3109
3178
  */
@@ -3134,6 +3203,7 @@ class JavascriptParser extends Parser {
3134
3203
  }
3135
3204
 
3136
3205
  /**
3206
+ * Pre walk variable declarator.
3137
3207
  * @param {VariableDeclarator} declarator variable declarator
3138
3208
  */
3139
3209
  preWalkVariableDeclarator(declarator) {
@@ -3143,6 +3213,7 @@ class JavascriptParser extends Parser {
3143
3213
  }
3144
3214
 
3145
3215
  /**
3216
+ * Walk variable declaration.
3146
3217
  * @param {VariableDeclaration} statement variable declaration
3147
3218
  */
3148
3219
  walkVariableDeclaration(statement) {
@@ -3179,6 +3250,7 @@ class JavascriptParser extends Parser {
3179
3250
  }
3180
3251
 
3181
3252
  /**
3253
+ * Block pre walk class declaration.
3182
3254
  * @param {ClassDeclaration | MaybeNamedClassDeclaration} statement class declaration
3183
3255
  */
3184
3256
  blockPreWalkClassDeclaration(statement) {
@@ -3188,6 +3260,7 @@ class JavascriptParser extends Parser {
3188
3260
  }
3189
3261
 
3190
3262
  /**
3263
+ * Walk class declaration.
3191
3264
  * @param {ClassDeclaration | MaybeNamedClassDeclaration} statement class declaration
3192
3265
  */
3193
3266
  walkClassDeclaration(statement) {
@@ -3195,6 +3268,7 @@ class JavascriptParser extends Parser {
3195
3268
  }
3196
3269
 
3197
3270
  /**
3271
+ * Pre walk switch cases.
3198
3272
  * @param {SwitchCase[]} switchCases switch statement
3199
3273
  */
3200
3274
  preWalkSwitchCases(switchCases) {
@@ -3205,6 +3279,7 @@ class JavascriptParser extends Parser {
3205
3279
  }
3206
3280
 
3207
3281
  /**
3282
+ * Processes the provided switch case.
3208
3283
  * @param {SwitchCase[]} switchCases switch statement
3209
3284
  */
3210
3285
  walkSwitchCases(switchCases) {
@@ -3245,6 +3320,7 @@ class JavascriptParser extends Parser {
3245
3320
  }
3246
3321
 
3247
3322
  /**
3323
+ * Pre walk catch clause.
3248
3324
  * @param {CatchClause} catchClause catch clause
3249
3325
  */
3250
3326
  preWalkCatchClause(catchClause) {
@@ -3252,6 +3328,7 @@ class JavascriptParser extends Parser {
3252
3328
  }
3253
3329
 
3254
3330
  /**
3331
+ * Processes the provided catch clause.
3255
3332
  * @param {CatchClause} catchClause catch clause
3256
3333
  */
3257
3334
  walkCatchClause(catchClause) {
@@ -3271,6 +3348,7 @@ class JavascriptParser extends Parser {
3271
3348
  }
3272
3349
 
3273
3350
  /**
3351
+ * Processes the provided pattern.
3274
3352
  * @param {Pattern} pattern pattern
3275
3353
  */
3276
3354
  walkPattern(pattern) {
@@ -3294,6 +3372,7 @@ class JavascriptParser extends Parser {
3294
3372
  }
3295
3373
 
3296
3374
  /**
3375
+ * Walk assignment pattern.
3297
3376
  * @param {AssignmentPattern} pattern assignment pattern
3298
3377
  */
3299
3378
  walkAssignmentPattern(pattern) {
@@ -3302,6 +3381,7 @@ class JavascriptParser extends Parser {
3302
3381
  }
3303
3382
 
3304
3383
  /**
3384
+ * Walk object pattern.
3305
3385
  * @param {ObjectPattern} pattern pattern
3306
3386
  */
3307
3387
  walkObjectPattern(pattern) {
@@ -3318,6 +3398,7 @@ class JavascriptParser extends Parser {
3318
3398
  }
3319
3399
 
3320
3400
  /**
3401
+ * Walk array pattern.
3321
3402
  * @param {ArrayPattern} pattern array pattern
3322
3403
  */
3323
3404
  walkArrayPattern(pattern) {
@@ -3328,6 +3409,7 @@ class JavascriptParser extends Parser {
3328
3409
  }
3329
3410
 
3330
3411
  /**
3412
+ * Processes the provided pattern.
3331
3413
  * @param {RestElement} pattern rest element
3332
3414
  */
3333
3415
  walkRestElement(pattern) {
@@ -3335,6 +3417,7 @@ class JavascriptParser extends Parser {
3335
3417
  }
3336
3418
 
3337
3419
  /**
3420
+ * Processes the provided expression.
3338
3421
  * @param {(Expression | SpreadElement | null)[]} expressions expressions
3339
3422
  */
3340
3423
  walkExpressions(expressions) {
@@ -3346,6 +3429,7 @@ class JavascriptParser extends Parser {
3346
3429
  }
3347
3430
 
3348
3431
  /**
3432
+ * Processes the provided expression.
3349
3433
  * @param {Expression | SpreadElement | PrivateIdentifier | Super} expression expression
3350
3434
  */
3351
3435
  walkExpression(expression) {
@@ -3429,6 +3513,7 @@ class JavascriptParser extends Parser {
3429
3513
  }
3430
3514
 
3431
3515
  /**
3516
+ * Walk await expression.
3432
3517
  * @param {AwaitExpression} expression await expression
3433
3518
  */
3434
3519
  walkAwaitExpression(expression) {
@@ -3439,6 +3524,7 @@ class JavascriptParser extends Parser {
3439
3524
  }
3440
3525
 
3441
3526
  /**
3527
+ * Walk array expression.
3442
3528
  * @param {ArrayExpression} expression array expression
3443
3529
  */
3444
3530
  walkArrayExpression(expression) {
@@ -3448,6 +3534,7 @@ class JavascriptParser extends Parser {
3448
3534
  }
3449
3535
 
3450
3536
  /**
3537
+ * Walk spread element.
3451
3538
  * @param {SpreadElement} expression spread element
3452
3539
  */
3453
3540
  walkSpreadElement(expression) {
@@ -3457,6 +3544,7 @@ class JavascriptParser extends Parser {
3457
3544
  }
3458
3545
 
3459
3546
  /**
3547
+ * Walk object expression.
3460
3548
  * @param {ObjectExpression} expression object expression
3461
3549
  */
3462
3550
  walkObjectExpression(expression) {
@@ -3471,6 +3559,7 @@ class JavascriptParser extends Parser {
3471
3559
  }
3472
3560
 
3473
3561
  /**
3562
+ * Processes the provided prop.
3474
3563
  * @param {Property | SpreadElement} prop property or spread element
3475
3564
  */
3476
3565
  walkProperty(prop) {
@@ -3494,6 +3583,7 @@ class JavascriptParser extends Parser {
3494
3583
  }
3495
3584
 
3496
3585
  /**
3586
+ * Walk function expression.
3497
3587
  * @param {FunctionExpression} expression arrow function expression
3498
3588
  */
3499
3589
  walkFunctionExpression(expression) {
@@ -3523,6 +3613,7 @@ class JavascriptParser extends Parser {
3523
3613
  }
3524
3614
 
3525
3615
  /**
3616
+ * Walk arrow function expression.
3526
3617
  * @param {ArrowFunctionExpression} expression arrow function expression
3527
3618
  */
3528
3619
  walkArrowFunctionExpression(expression) {
@@ -3546,6 +3637,7 @@ class JavascriptParser extends Parser {
3546
3637
  }
3547
3638
 
3548
3639
  /**
3640
+ * Walk sequence expression.
3549
3641
  * @param {SequenceExpression} expression the sequence
3550
3642
  */
3551
3643
  walkSequenceExpression(expression) {
@@ -3584,6 +3676,7 @@ class JavascriptParser extends Parser {
3584
3676
  }
3585
3677
 
3586
3678
  /**
3679
+ * Walk update expression.
3587
3680
  * @param {UpdateExpression} expression the update expression
3588
3681
  */
3589
3682
  walkUpdateExpression(expression) {
@@ -3591,6 +3684,7 @@ class JavascriptParser extends Parser {
3591
3684
  }
3592
3685
 
3593
3686
  /**
3687
+ * Walk unary expression.
3594
3688
  * @param {UnaryExpression} expression the unary expression
3595
3689
  */
3596
3690
  walkUnaryExpression(expression) {
@@ -3614,6 +3708,7 @@ class JavascriptParser extends Parser {
3614
3708
  }
3615
3709
 
3616
3710
  /**
3711
+ * Walk left right expression.
3617
3712
  * @param {LogicalExpression | BinaryExpression} expression the expression
3618
3713
  */
3619
3714
  walkLeftRightExpression(expression) {
@@ -3622,6 +3717,7 @@ class JavascriptParser extends Parser {
3622
3717
  }
3623
3718
 
3624
3719
  /**
3720
+ * Walk binary expression.
3625
3721
  * @param {BinaryExpression} expression the binary expression
3626
3722
  */
3627
3723
  walkBinaryExpression(expression) {
@@ -3631,6 +3727,7 @@ class JavascriptParser extends Parser {
3631
3727
  }
3632
3728
 
3633
3729
  /**
3730
+ * Walk logical expression.
3634
3731
  * @param {LogicalExpression} expression the logical expression
3635
3732
  */
3636
3733
  walkLogicalExpression(expression) {
@@ -3643,6 +3740,7 @@ class JavascriptParser extends Parser {
3643
3740
  }
3644
3741
 
3645
3742
  /**
3743
+ * Walk assignment expression.
3646
3744
  * @param {AssignmentExpression} expression assignment expression
3647
3745
  */
3648
3746
  walkAssignmentExpression(expression) {
@@ -3718,6 +3816,7 @@ class JavascriptParser extends Parser {
3718
3816
  }
3719
3817
 
3720
3818
  /**
3819
+ * Walk conditional expression.
3721
3820
  * @param {ConditionalExpression} expression conditional expression
3722
3821
  */
3723
3822
  walkConditionalExpression(expression) {
@@ -3745,6 +3844,7 @@ class JavascriptParser extends Parser {
3745
3844
  }
3746
3845
 
3747
3846
  /**
3847
+ * Walk new expression.
3748
3848
  * @param {NewExpression} expression new expression
3749
3849
  */
3750
3850
  walkNewExpression(expression) {
@@ -3761,6 +3861,7 @@ class JavascriptParser extends Parser {
3761
3861
  }
3762
3862
 
3763
3863
  /**
3864
+ * Walk yield expression.
3764
3865
  * @param {YieldExpression} expression yield expression
3765
3866
  */
3766
3867
  walkYieldExpression(expression) {
@@ -3770,6 +3871,7 @@ class JavascriptParser extends Parser {
3770
3871
  }
3771
3872
 
3772
3873
  /**
3874
+ * Walk template literal.
3773
3875
  * @param {TemplateLiteral} expression template literal
3774
3876
  */
3775
3877
  walkTemplateLiteral(expression) {
@@ -3779,6 +3881,7 @@ class JavascriptParser extends Parser {
3779
3881
  }
3780
3882
 
3781
3883
  /**
3884
+ * Walk tagged template expression.
3782
3885
  * @param {TaggedTemplateExpression} expression tagged template expression
3783
3886
  */
3784
3887
  walkTaggedTemplateExpression(expression) {
@@ -3793,6 +3896,7 @@ class JavascriptParser extends Parser {
3793
3896
  }
3794
3897
 
3795
3898
  /**
3899
+ * Walk class expression.
3796
3900
  * @param {ClassExpression} expression the class expression
3797
3901
  */
3798
3902
  walkClassExpression(expression) {
@@ -3800,6 +3904,7 @@ class JavascriptParser extends Parser {
3800
3904
  }
3801
3905
 
3802
3906
  /**
3907
+ * Walk chain expression.
3803
3908
  * @param {ChainExpression} expression expression
3804
3909
  */
3805
3910
  walkChainExpression(expression) {
@@ -3815,6 +3920,7 @@ class JavascriptParser extends Parser {
3815
3920
  }
3816
3921
 
3817
3922
  /**
3923
+ * Processes the provided function expression.
3818
3924
  * @private
3819
3925
  * @param {FunctionExpression | ArrowFunctionExpression} functionExpression function expression
3820
3926
  * @param {(Expression | SpreadElement)[]} options options
@@ -3822,6 +3928,7 @@ class JavascriptParser extends Parser {
3822
3928
  */
3823
3929
  _walkIIFE(functionExpression, options, currentThis) {
3824
3930
  /**
3931
+ * Returns var info.
3825
3932
  * @param {Expression | SpreadElement} argOrThis arg or this
3826
3933
  * @returns {string | VariableInfo | undefined} var info
3827
3934
  */
@@ -3890,6 +3997,7 @@ class JavascriptParser extends Parser {
3890
3997
  }
3891
3998
 
3892
3999
  /**
4000
+ * Walk import expression.
3893
4001
  * @param {ImportExpression} expression import expression
3894
4002
  */
3895
4003
  walkImportExpression(expression) {
@@ -3900,10 +4008,12 @@ class JavascriptParser extends Parser {
3900
4008
  }
3901
4009
 
3902
4010
  /**
4011
+ * Walk call expression.
3903
4012
  * @param {CallExpression} expression expression
3904
4013
  */
3905
4014
  walkCallExpression(expression) {
3906
4015
  /**
4016
+ * Checks whether this javascript parser is simple function.
3907
4017
  * @param {FunctionExpression | ArrowFunctionExpression} fn function
3908
4018
  * @returns {boolean} true when simple function
3909
4019
  */
@@ -4019,6 +4129,7 @@ class JavascriptParser extends Parser {
4019
4129
  }
4020
4130
 
4021
4131
  /**
4132
+ * Walk member expression.
4022
4133
  * @param {MemberExpression} expression member expression
4023
4134
  */
4024
4135
  walkMemberExpression(expression) {
@@ -4085,6 +4196,7 @@ class JavascriptParser extends Parser {
4085
4196
  }
4086
4197
 
4087
4198
  /**
4199
+ * Walk member expression with expression name.
4088
4200
  * @template R
4089
4201
  * @param {MemberExpression} expression member expression
4090
4202
  * @param {string} name name
@@ -4128,6 +4240,7 @@ class JavascriptParser extends Parser {
4128
4240
  }
4129
4241
 
4130
4242
  /**
4243
+ * Walk this expression.
4131
4244
  * @param {ThisExpression} expression this expression
4132
4245
  */
4133
4246
  walkThisExpression(expression) {
@@ -4135,6 +4248,7 @@ class JavascriptParser extends Parser {
4135
4248
  }
4136
4249
 
4137
4250
  /**
4251
+ * Processes the provided expression.
4138
4252
  * @param {Identifier} expression identifier
4139
4253
  */
4140
4254
  walkIdentifier(expression) {
@@ -4142,6 +4256,7 @@ class JavascriptParser extends Parser {
4142
4256
  }
4143
4257
 
4144
4258
  /**
4259
+ * Walk meta property.
4145
4260
  * @param {MetaProperty} metaProperty meta property
4146
4261
  */
4147
4262
  walkMetaProperty(metaProperty) {
@@ -4149,6 +4264,7 @@ class JavascriptParser extends Parser {
4149
4264
  }
4150
4265
 
4151
4266
  /**
4267
+ * Call hooks for expression.
4152
4268
  * @template T
4153
4269
  * @template R
4154
4270
  * @param {HookMap<SyncBailHook<T, R>>} hookMap hooks the should be called
@@ -4167,6 +4283,7 @@ class JavascriptParser extends Parser {
4167
4283
  }
4168
4284
 
4169
4285
  /**
4286
+ * Call hooks for expression with fallback.
4170
4287
  * @template T
4171
4288
  * @template R
4172
4289
  * @param {HookMap<SyncBailHook<T, R>>} hookMap hooks the should be called
@@ -4201,6 +4318,7 @@ class JavascriptParser extends Parser {
4201
4318
  }
4202
4319
 
4203
4320
  /**
4321
+ * Call hooks for name.
4204
4322
  * @template T
4205
4323
  * @template R
4206
4324
  * @param {HookMap<SyncBailHook<T, R>>} hookMap hooks the should be called
@@ -4219,6 +4337,7 @@ class JavascriptParser extends Parser {
4219
4337
  }
4220
4338
 
4221
4339
  /**
4340
+ * Call hooks for info.
4222
4341
  * @template T
4223
4342
  * @template R
4224
4343
  * @param {HookMap<SyncBailHook<T, R>>} hookMap hooks that should be called
@@ -4237,6 +4356,7 @@ class JavascriptParser extends Parser {
4237
4356
  }
4238
4357
 
4239
4358
  /**
4359
+ * Call hooks for info with fallback.
4240
4360
  * @template T
4241
4361
  * @template R
4242
4362
  * @param {HookMap<SyncBailHook<T, R>>} hookMap hooks the should be called
@@ -4288,6 +4408,7 @@ class JavascriptParser extends Parser {
4288
4408
  }
4289
4409
 
4290
4410
  /**
4411
+ * Call hooks for name with fallback.
4291
4412
  * @template T
4292
4413
  * @template R
4293
4414
  * @param {HookMap<SyncBailHook<T, R>>} hookMap hooks the should be called
@@ -4308,6 +4429,7 @@ class JavascriptParser extends Parser {
4308
4429
  }
4309
4430
 
4310
4431
  /**
4432
+ * Processes the provided param.
4311
4433
  * @deprecated
4312
4434
  * @param {(string | Pattern | Property)[]} params scope params
4313
4435
  * @param {() => void} fn inner function
@@ -4338,6 +4460,7 @@ class JavascriptParser extends Parser {
4338
4460
  }
4339
4461
 
4340
4462
  /**
4463
+ * Processes the provided has thi.
4341
4464
  * @param {boolean} hasThis true, when this is defined
4342
4465
  * @param {Identifier[]} params scope params
4343
4466
  * @param {() => void} fn inner function
@@ -4370,6 +4493,7 @@ class JavascriptParser extends Parser {
4370
4493
  }
4371
4494
 
4372
4495
  /**
4496
+ * Processes the provided has thi.
4373
4497
  * @param {boolean} hasThis true, when this is defined
4374
4498
  * @param {(Pattern | string)[]} params scope params
4375
4499
  * @param {() => void} fn inner function
@@ -4402,6 +4526,7 @@ class JavascriptParser extends Parser {
4402
4526
  }
4403
4527
 
4404
4528
  /**
4529
+ * Processes the provided fn.
4405
4530
  * @param {() => void} fn inner function
4406
4531
  * @param {boolean} inExecutedPath executed state
4407
4532
  * @returns {void}
@@ -4431,6 +4556,7 @@ class JavascriptParser extends Parser {
4431
4556
  }
4432
4557
 
4433
4558
  /**
4559
+ * Processes the provided statement.
4434
4560
  * @param {(Directive | Statement | ModuleDeclaration)[]} statements statements
4435
4561
  */
4436
4562
  detectMode(statements) {
@@ -4457,6 +4583,7 @@ class JavascriptParser extends Parser {
4457
4583
  }
4458
4584
 
4459
4585
  /**
4586
+ * Processes the provided pattern.
4460
4587
  * @param {(string | Pattern | Property)[]} patterns patterns
4461
4588
  * @param {OnIdentString} onIdent on ident callback
4462
4589
  */
@@ -4471,6 +4598,7 @@ class JavascriptParser extends Parser {
4471
4598
  }
4472
4599
 
4473
4600
  /**
4601
+ * Processes the provided pattern.
4474
4602
  * @param {Pattern | Property} pattern pattern
4475
4603
  * @param {OnIdent} onIdent on ident callback
4476
4604
  */
@@ -4505,6 +4633,7 @@ class JavascriptParser extends Parser {
4505
4633
  }
4506
4634
 
4507
4635
  /**
4636
+ * Processes the provided pattern.
4508
4637
  * @param {Identifier} pattern identifier pattern
4509
4638
  * @param {OnIdent} onIdent callback
4510
4639
  */
@@ -4515,6 +4644,7 @@ class JavascriptParser extends Parser {
4515
4644
  }
4516
4645
 
4517
4646
  /**
4647
+ * Enter object pattern.
4518
4648
  * @param {ObjectPattern} pattern object pattern
4519
4649
  * @param {OnIdent} onIdent callback
4520
4650
  */
@@ -4530,6 +4660,7 @@ class JavascriptParser extends Parser {
4530
4660
  }
4531
4661
 
4532
4662
  /**
4663
+ * Enter array pattern.
4533
4664
  * @param {ArrayPattern} pattern object pattern
4534
4665
  * @param {OnIdent} onIdent callback
4535
4666
  */
@@ -4548,6 +4679,7 @@ class JavascriptParser extends Parser {
4548
4679
  }
4549
4680
 
4550
4681
  /**
4682
+ * Enter rest element.
4551
4683
  * @param {RestElement} pattern object pattern
4552
4684
  * @param {OnIdent} onIdent callback
4553
4685
  */
@@ -4556,6 +4688,7 @@ class JavascriptParser extends Parser {
4556
4688
  }
4557
4689
 
4558
4690
  /**
4691
+ * Enter assignment pattern.
4559
4692
  * @param {AssignmentPattern} pattern object pattern
4560
4693
  * @param {OnIdent} onIdent callback
4561
4694
  */
@@ -4564,6 +4697,7 @@ class JavascriptParser extends Parser {
4564
4697
  }
4565
4698
 
4566
4699
  /**
4700
+ * Evaluate expression.
4567
4701
  * @param {Expression | SpreadElement | PrivateIdentifier | Super} expression expression node
4568
4702
  * @returns {BasicEvaluatedExpression} evaluation result
4569
4703
  */
@@ -4588,6 +4722,7 @@ class JavascriptParser extends Parser {
4588
4722
  }
4589
4723
 
4590
4724
  /**
4725
+ * Returns parsed string.
4591
4726
  * @param {Expression} expression expression
4592
4727
  * @returns {string} parsed string
4593
4728
  */
@@ -4612,6 +4747,7 @@ class JavascriptParser extends Parser {
4612
4747
  /** @typedef {{ range?: Range, value: string, code: boolean, conditional: false | CalculatedStringResult[] }} CalculatedStringResult */
4613
4748
 
4614
4749
  /**
4750
+ * Parses calculated string.
4615
4751
  * @param {Expression} expression expression
4616
4752
  * @returns {CalculatedStringResult} result
4617
4753
  */
@@ -4701,6 +4837,7 @@ class JavascriptParser extends Parser {
4701
4837
  }
4702
4838
 
4703
4839
  /**
4840
+ * Parses the provided source and updates the parser state.
4704
4841
  * @param {string | Buffer | PreparsedAst} source the source to parse
4705
4842
  * @param {ParserState} state the parser state
4706
4843
  * @returns {ParserState} the parser state
@@ -4789,6 +4926,7 @@ class JavascriptParser extends Parser {
4789
4926
  }
4790
4927
 
4791
4928
  /**
4929
+ * Returns evaluation result.
4792
4930
  * @param {string} source source code
4793
4931
  * @returns {BasicEvaluatedExpression} evaluation result
4794
4932
  */
@@ -4805,6 +4943,7 @@ class JavascriptParser extends Parser {
4805
4943
  }
4806
4944
 
4807
4945
  /**
4946
+ * Checks whether this javascript parser is pure.
4808
4947
  * @param {Expression | Declaration | PrivateIdentifier | MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | null | undefined} expr an expression
4809
4948
  * @param {number} commentsStartPos source position from which annotation comments are checked
4810
4949
  * @returns {boolean} true, when the expression is pure
@@ -4938,12 +5077,14 @@ class JavascriptParser extends Parser {
4938
5077
  }
4939
5078
 
4940
5079
  /**
5080
+ * Returns comments in the range.
4941
5081
  * @param {Range} range range
4942
5082
  * @returns {Comment[]} comments in the range
4943
5083
  */
4944
5084
  getComments(range) {
4945
5085
  const [rangeStart, rangeEnd] = range;
4946
5086
  /**
5087
+ * Returns compared.
4947
5088
  * @param {Comment} comment comment
4948
5089
  * @param {number} needle needle
4949
5090
  * @returns {number} compared
@@ -4966,6 +5107,7 @@ class JavascriptParser extends Parser {
4966
5107
  }
4967
5108
 
4968
5109
  /**
5110
+ * Checks whether this javascript parser is asi position.
4969
5111
  * @param {number} pos source code position
4970
5112
  * @returns {boolean} true when a semicolon has been inserted before this position, false if not
4971
5113
  */
@@ -4996,6 +5138,7 @@ class JavascriptParser extends Parser {
4996
5138
  }
4997
5139
 
4998
5140
  /**
5141
+ * Updates asi position using the provided po.
4999
5142
  * @param {number} pos source code position
5000
5143
  * @returns {void}
5001
5144
  */
@@ -5004,6 +5147,7 @@ class JavascriptParser extends Parser {
5004
5147
  }
5005
5148
 
5006
5149
  /**
5150
+ * Unset asi position.
5007
5151
  * @param {number} pos source code position
5008
5152
  * @returns {void}
5009
5153
  */
@@ -5012,6 +5156,7 @@ class JavascriptParser extends Parser {
5012
5156
  }
5013
5157
 
5014
5158
  /**
5159
+ * Checks whether this javascript parser is statement level expression.
5015
5160
  * @param {Expression} expr expression
5016
5161
  * @returns {boolean} true, when the expression is a statement level expression
5017
5162
  */
@@ -5030,6 +5175,7 @@ class JavascriptParser extends Parser {
5030
5175
  }
5031
5176
 
5032
5177
  /**
5178
+ * Returns tag data.
5033
5179
  * @param {string} name name
5034
5180
  * @param {Tag} tag tag info
5035
5181
  * @returns {TagData | undefined} tag data
@@ -5046,6 +5192,7 @@ class JavascriptParser extends Parser {
5046
5192
  }
5047
5193
 
5048
5194
  /**
5195
+ * Processes the provided name.
5049
5196
  * @param {string} name name
5050
5197
  * @param {Tag} tag tag info
5051
5198
  * @param {TagData=} data data
@@ -5083,6 +5230,7 @@ class JavascriptParser extends Parser {
5083
5230
  }
5084
5231
 
5085
5232
  /**
5233
+ * Processes the provided name.
5086
5234
  * @param {string} name variable name
5087
5235
  */
5088
5236
  defineVariable(name) {
@@ -5098,6 +5246,7 @@ class JavascriptParser extends Parser {
5098
5246
  }
5099
5247
 
5100
5248
  /**
5249
+ * Processes the provided name.
5101
5250
  * @param {string} name variable name
5102
5251
  */
5103
5252
  undefineVariable(name) {
@@ -5105,6 +5254,7 @@ class JavascriptParser extends Parser {
5105
5254
  }
5106
5255
 
5107
5256
  /**
5257
+ * Checks whether this javascript parser is variable defined.
5108
5258
  * @param {string} name variable name
5109
5259
  * @returns {boolean} true, when variable is defined
5110
5260
  */
@@ -5118,6 +5268,7 @@ class JavascriptParser extends Parser {
5118
5268
  }
5119
5269
 
5120
5270
  /**
5271
+ * Gets variable info.
5121
5272
  * @param {string} name variable name
5122
5273
  * @returns {ExportedVariableInfo} info for this variable
5123
5274
  */
@@ -5130,6 +5281,7 @@ class JavascriptParser extends Parser {
5130
5281
  }
5131
5282
 
5132
5283
  /**
5284
+ * Updates variable using the provided name.
5133
5285
  * @param {string} name variable name
5134
5286
  * @param {ExportedVariableInfo} variableInfo new info for this variable
5135
5287
  * @returns {void}
@@ -5155,6 +5307,7 @@ class JavascriptParser extends Parser {
5155
5307
  }
5156
5308
 
5157
5309
  /**
5310
+ * Evaluated variable.
5158
5311
  * @param {TagInfo} tagInfo tag info
5159
5312
  * @returns {VariableInfo} variable info
5160
5313
  */
@@ -5168,6 +5321,7 @@ class JavascriptParser extends Parser {
5168
5321
  }
5169
5322
 
5170
5323
  /**
5324
+ * Parses comment options.
5171
5325
  * @param {Range} range range of the comment
5172
5326
  * @returns {{ options: Record<string, EXPECTED_ANY> | null, errors: (Error & { comment: Comment })[] | null }} result
5173
5327
  */
@@ -5211,6 +5365,7 @@ class JavascriptParser extends Parser {
5211
5365
  }
5212
5366
 
5213
5367
  /**
5368
+ * Extract member expression chain.
5214
5369
  * @param {Expression | Super} expression a member expression
5215
5370
  * @returns {{ members: Members, object: Expression | Super, membersOptionals: MembersOptionals, memberRanges: MemberRanges }} member names (reverse order) and remaining object
5216
5371
  */
@@ -5246,6 +5401,7 @@ class JavascriptParser extends Parser {
5246
5401
  }
5247
5402
 
5248
5403
  /**
5404
+ * Gets free info from variable.
5249
5405
  * @param {string} varName variable name
5250
5406
  * @returns {{ name: string, info: VariableInfo | string } | undefined} name of the free variable and variable info for that
5251
5407
  */
@@ -5265,6 +5421,7 @@ class JavascriptParser extends Parser {
5265
5421
  }
5266
5422
 
5267
5423
  /**
5424
+ * Gets name info from variable.
5268
5425
  * @param {string} varName variable name
5269
5426
  * @returns {{ name: string, info: VariableInfo | string } | undefined} name of the free variable and variable info for that
5270
5427
  */
@@ -5287,6 +5444,7 @@ class JavascriptParser extends Parser {
5287
5444
  /** @typedef {{ type: "expression", rootInfo: string | VariableInfo, name: string, getMembers: () => Members, getMembersOptionals: () => MembersOptionals, getMemberRanges: () => MemberRanges }} ExpressionExpressionInfo */
5288
5445
 
5289
5446
  /**
5447
+ * Gets member expression info.
5290
5448
  * @param {Expression | Super} expression a member expression
5291
5449
  * @param {number} allowedTypes which types should be returned, presented in bit mask
5292
5450
  * @returns {CallExpressionInfo | ExpressionExpressionInfo | undefined} expression info
@@ -5344,6 +5502,7 @@ class JavascriptParser extends Parser {
5344
5502
  }
5345
5503
 
5346
5504
  /**
5505
+ * Gets name for expression.
5347
5506
  * @param {Expression} expression an expression
5348
5507
  * @returns {{ name: string, rootInfo: ExportedVariableInfo, getMembers: () => Members } | undefined} name info
5349
5508
  */
@@ -5355,6 +5514,7 @@ class JavascriptParser extends Parser {
5355
5514
  }
5356
5515
 
5357
5516
  /**
5517
+ * Get module parse function.
5358
5518
  * @param {Compilation} compilation compilation
5359
5519
  * @param {Module} module module
5360
5520
  * @returns {ParseFunction | undefined} parser
@@ -5375,6 +5535,7 @@ class JavascriptParser extends Parser {
5375
5535
  }
5376
5536
 
5377
5537
  /**
5538
+ * Returns parse result.
5378
5539
  * @param {string} code source code
5379
5540
  * @param {InternalParseOptions} options parsing options
5380
5541
  * @param {ParseFunction=} customParse custom function to parse
@@ -5390,6 +5551,7 @@ class JavascriptParser extends Parser {
5390
5551
  sourceType: type === "auto" ? "module" : type
5391
5552
  };
5392
5553
  /**
5554
+ * Returns parse result.
5393
5555
  * @param {string} code source code
5394
5556
  * @param {ParseOptions} options parsing options
5395
5557
  * @returns {ParseResult} parse result
@@ -5458,6 +5620,7 @@ class JavascriptParser extends Parser {
5458
5620
  }
5459
5621
 
5460
5622
  /**
5623
+ * Returns parser.
5461
5624
  * @param {((BaseParser: typeof AcornParser) => typeof AcornParser)[]} plugins parser plugin
5462
5625
  * @returns {typeof JavascriptParser} parser
5463
5626
  */