@depup/webpack 5.110.3-depup.0 → 5.111.1-depup.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.
- package/README.md +7 -8
- package/changes.json +7 -11
- package/lib/APIPlugin.js +26 -11
- package/lib/AutomaticPrefetchPlugin.js +1 -1
- package/lib/Cache.js +8 -3
- package/lib/CacheFacade.js +1 -1
- package/lib/CircularModulesPlugin.js +157 -55
- package/lib/CleanPlugin.js +2 -2
- package/lib/CompatibilityPlugin.js +3 -4
- package/lib/Compilation.js +336 -337
- package/lib/Compiler.js +213 -51
- package/lib/ConstPlugin.js +16 -132
- package/lib/CopyPlugin.js +1054 -0
- package/lib/DefinePlugin.js +24 -8
- package/lib/DependencyTemplate.js +2 -1
- package/lib/DotenvPlugin.js +24 -28
- package/lib/ErrorHelpers.js +113 -0
- package/lib/ExportsInfo.js +20 -16
- package/lib/ExternalModule.js +47 -22
- package/lib/FileSystemInfo.js +17 -14
- package/lib/FlagDependencyExportsPlugin.js +53 -34
- package/lib/FlagDependencyUsagePlugin.js +9 -13
- package/lib/Generator.js +24 -2
- package/lib/HotModuleReplacementPlugin.js +55 -7
- package/lib/IgnorePlugin.js +1 -1
- package/lib/JavascriptMetaInfoPlugin.js +5 -3
- package/lib/LoaderOptionsPlugin.js +1 -1
- package/lib/MainTemplate.js +5 -1
- package/lib/Module.js +19 -10
- package/lib/ModuleGraph.js +6 -9
- package/lib/MultiCompiler.js +7 -17
- package/lib/MultiWatching.js +1 -1
- package/lib/NormalModule.js +135 -50
- package/lib/NormalModuleFactory.js +1 -1
- package/lib/RuntimeGlobals.js +21 -7
- package/lib/RuntimeModule.js +28 -12
- package/lib/RuntimePlugin.js +30 -3
- package/lib/RuntimeTemplate.js +813 -518
- package/lib/SourceMapDevToolPlugin.js +54 -104
- package/lib/TemplatedPathPlugin.js +16 -59
- package/lib/Watching.js +9 -0
- package/lib/WebpackOptionsApply.js +84 -91
- package/lib/asset/AssetBytesGenerator.js +7 -1
- package/lib/asset/AssetGenerator.js +50 -24
- package/lib/asset/AssetModule.js +3 -0
- package/lib/asset/AssetSourceGenerator.js +7 -1
- package/lib/asset/WebManifestParser.js +7 -5
- package/lib/buildChunkGraph.js +11 -15
- package/lib/cache/AddBuildDependenciesPlugin.js +33 -4
- package/lib/cache/IdleFileCachePlugin.js +2 -2
- package/lib/cache/MemoryCachePlugin.js +4 -4
- package/lib/cache/MemoryWithGcCachePlugin.js +7 -8
- package/lib/cache/PackFileCacheStrategy.js +17 -19
- package/lib/cache/getLazyHashedEtag.js +3 -5
- package/lib/config/browserslistTargetHandler.js +17 -4
- package/lib/config/defaults.js +138 -128
- package/lib/config/getClaimedAssetTypes.js +10 -11
- package/lib/config/normalization.js +82 -12
- package/lib/config/target.js +13 -4
- package/lib/container/ContainerReferencePlugin.js +6 -0
- package/lib/container/RemoteRuntimeModule.js +9 -0
- package/lib/container/declaredRemotes.js +39 -0
- package/lib/{ContextExclusionPlugin.js → context/ContextExclusionPlugin.js} +1 -1
- package/lib/{ContextModule.js → context/ContextModule.js} +54 -115
- package/lib/{ContextModuleFactory.js → context/ContextModuleFactory.js} +19 -21
- package/lib/{ContextReplacementPlugin.js → context/ContextReplacementPlugin.js} +4 -4
- package/lib/css/CssGenerator.js +27 -11
- package/lib/css/CssInjectStyleRuntimeModule.js +9 -0
- package/lib/css/CssLoadingRuntimeModule.js +94 -36
- package/lib/css/CssModule.js +1 -1
- package/lib/css/CssModulesPlugin.js +7 -6
- package/lib/css/CssParser.js +162 -31
- package/lib/css/CssServerStylesRuntimeModule.js +9 -0
- package/lib/css/cssMinify.js +43 -32
- package/lib/css/data.js +3514 -869
- package/lib/css/syntax.js +6370 -1220
- package/lib/debug/ProfilingPlugin.js +7 -4
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -3
- package/lib/dependencies/AMDRuntimeModules.js +18 -0
- package/lib/dependencies/CommonJsExportRequireDependency.js +13 -12
- package/lib/dependencies/CommonJsExportsParserPlugin.js +12 -13
- package/lib/dependencies/CommonJsImportsParserPlugin.js +5 -5
- package/lib/dependencies/CommonJsPlugin.js +19 -3
- package/lib/dependencies/CommonJsRequireDependency.js +14 -5
- package/lib/dependencies/CommonJsSelfReferenceDependency.js +2 -4
- package/lib/dependencies/ContextDependency.js +1 -1
- package/lib/dependencies/ContextDependencyHelpers.js +3 -9
- package/lib/dependencies/ContextElementDependency.js +1 -1
- package/lib/dependencies/CssIcssExportDependency.js +13 -9
- package/lib/dependencies/CssIcssImportDependency.js +3 -6
- package/lib/dependencies/CssUrlDependency.js +3 -5
- package/lib/dependencies/HarmonyCompatibilityDependency.js +67 -22
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +3 -4
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +10 -7
- package/lib/dependencies/HarmonyExportExpressionDependency.js +47 -33
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +74 -17
- package/lib/dependencies/HarmonyExportInitFragment.js +110 -23
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +25 -58
- package/lib/dependencies/HarmonyImportBareSideEffectDependency.js +59 -0
- package/lib/dependencies/HarmonyImportDependency.js +6 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +111 -17
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +3 -4
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +40 -3
- package/lib/dependencies/HarmonyModulesPlugin.js +20 -0
- package/lib/dependencies/HtmlEntryDependency.js +124 -102
- package/lib/dependencies/HtmlInlineScriptDependency.js +3 -4
- package/lib/dependencies/HtmlInlineStyleDependency.js +3 -4
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -1
- package/lib/dependencies/ImportMetaGlobHelpers.js +1 -1
- package/lib/dependencies/ImportMetaMainDependency.js +104 -0
- package/lib/dependencies/ImportMetaPlugin.js +67 -25
- package/lib/dependencies/ImportParserPlugin.js +1 -1
- package/lib/dependencies/LoaderPlugin.js +26 -1
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +1 -1
- package/lib/dependencies/SystemRuntimeModule.js +9 -0
- package/lib/dependencies/URLContextDependency.js +1 -1
- package/lib/dependencies/URLDependency.js +6 -5
- package/lib/dependencies/WorkerAndWorkletPlugin.js +15 -21
- package/lib/dependencies/WorkerDependency.js +7 -7
- package/lib/dependencies/WorkletDependency.js +7 -11
- package/lib/dll/DelegatedModule.js +18 -1
- package/lib/dll/DllReferencePlugin.js +11 -8
- package/lib/dll/LibManifestPlugin.js +1 -1
- package/lib/errors/AnalyzableBailoutsWarning.js +41 -0
- package/lib/errors/DuplicateModulesWarning.js +12 -7
- package/lib/errors/EmptyCopyPatternWarning.js +26 -0
- package/lib/errors/ExternalStarReexportError.js +44 -0
- package/lib/errors/HookWebpackError.js +3 -2
- package/lib/errors/MissingSourceMapsWarning.js +36 -0
- package/lib/errors/ModuleParseError.js +2 -1
- package/lib/errors/UnusedAssetsWarning.js +36 -0
- package/lib/errors/UnusedFederationWarning.js +35 -0
- package/lib/errors/UnusedModulesWarning.js +38 -0
- package/lib/esm/ExportWebpackRequireRuntimeModule.js +9 -0
- package/lib/esm/ModuleChunkFormatPlugin.js +28 -3
- package/lib/esm/ModuleChunkLoadingPlugin.js +30 -11
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +92 -60
- package/lib/hmr/HotModuleReplacement.runtime.js +8 -2
- package/lib/hmr/HotModuleReplacementRuntimeModule.js +9 -0
- package/lib/hmr/LazyCompilationPlugin.js +3 -5
- package/lib/html/HtmlGenerator.js +72 -87
- package/lib/html/HtmlModulesPlugin.js +418 -200
- package/lib/html/HtmlParser.js +110 -147
- package/lib/html/builtinEmbeddedRenderer.js +107 -0
- package/lib/html/data.js +142 -7
- package/lib/html/htmlMinify.js +92 -122
- package/lib/html/syntax.js +1618 -1391
- package/lib/ids/HashedModuleIdsPlugin.js +2 -1
- package/lib/index.js +49 -3
- package/lib/javascript/ChunkFormatHelpers.js +4 -3
- package/lib/javascript/JavascriptGenerator.js +8 -1
- package/lib/javascript/JavascriptModule.js +1 -0
- package/lib/javascript/JavascriptModulesPlugin.js +73 -72
- package/lib/javascript/JavascriptParser.js +1970 -900
- package/lib/javascript/StartupHelpers.js +27 -3
- package/lib/javascript/data.js +172 -0
- package/lib/javascript/grammar.js +5546 -0
- package/lib/javascript/parser.js +1500 -0
- package/lib/javascript/regexp.js +1762 -0
- package/lib/javascript/regexpData.js +51 -0
- package/lib/javascript/syntax.js +9061 -5262
- package/lib/json/JsonGenerator.js +7 -1
- package/lib/library/ModuleLibraryPlugin.js +171 -132
- package/lib/loaders/LoaderRunner.js +137 -9
- package/lib/node/NodeWatchFileSystem.js +3 -9
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +22 -0
- package/lib/node/RequireChunkLoadingRuntimeModule.js +22 -0
- package/lib/optimize/AggressiveMergingPlugin.js +3 -5
- package/lib/optimize/ConcatenatedModule.js +178 -120
- package/lib/optimize/ConstExportsPlugin.js +50 -39
- package/lib/optimize/FlagIncludedChunksPlugin.js +3 -11
- package/lib/optimize/InlineExports.js +20 -123
- package/lib/optimize/InnerGraphPlugin.js +7 -13
- package/lib/optimize/LimitChunkCountPlugin.js +5 -8
- package/lib/optimize/MangleExportsPlugin.js +13 -4
- package/lib/optimize/ModuleConcatenationPlugin.js +27 -5
- package/lib/optimize/RealContentHashPlugin.js +68 -9
- package/lib/optimize/SideEffectsFlagPlugin.js +24 -28
- package/lib/optimize/SplitChunksPlugin.js +2 -4
- package/lib/performance/AnalyzableBailoutsPlugin.js +115 -0
- package/lib/performance/BroadContextsPlugin.js +1 -1
- package/lib/performance/CacheEffectivenessPlugin.js +7 -7
- package/lib/performance/DuplicateModulesPlugin.js +57 -13
- package/lib/performance/EvalUsagePlugin.js +5 -2
- package/lib/performance/MissingSourceMapsPlugin.js +115 -0
- package/lib/performance/PureAnnotationsPlugin.js +6 -3
- package/lib/performance/SizeLimitsPlugin.js +2 -4
- package/lib/performance/TopLevelThisPlugin.js +5 -4
- package/lib/performance/UnusedAssetsPlugin.js +109 -0
- package/lib/performance/UnusedFederationPlugin.js +147 -0
- package/lib/performance/UnusedModulesPlugin.js +141 -0
- package/lib/performance/UnusedReexportsPlugin.js +1 -55
- package/lib/performance/isOnlyReexported.js +65 -0
- package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +25 -5
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +8 -8
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +9 -0
- package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +9 -0
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +9 -0
- package/lib/prefetch/ResourceHintPlugin.js +18 -23
- package/lib/prefetch/ResourceHintRuntimeModule.js +9 -0
- package/lib/prefetch/StartupAssetHintRuntimeModule.js +16 -10
- package/lib/rules/RuleSetCompiler.js +211 -4
- package/lib/runtime/AsyncModuleRuntimeModule.js +98 -66
- package/lib/runtime/AutoPublicPathRuntimeModule.js +9 -0
- package/lib/runtime/BaseUriRuntimeModule.js +9 -0
- package/lib/runtime/ChunkNameRuntimeModule.js +9 -0
- package/lib/runtime/EnsureChunkRuntimeModule.js +35 -16
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +12 -4
- package/lib/runtime/GetFullHashRuntimeModule.js +9 -0
- package/lib/runtime/GetMainFilenameRuntimeModule.js +9 -0
- package/lib/runtime/GetWorkletBootstrapRuntimeModule.js +9 -0
- package/lib/runtime/GlobalRuntimeModule.js +11 -4
- package/lib/runtime/HasOwnPropertyRuntimeModule.js +9 -0
- package/lib/runtime/HelperRuntimeModule.js +10 -0
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +305 -224
- package/lib/runtime/NonceRuntimeModule.js +9 -0
- package/lib/runtime/OnChunksLoadedRuntimeModule.js +67 -20
- package/lib/runtime/PublicPathRuntimeModule.js +9 -0
- package/lib/runtime/RuntimeIdRuntimeModule.js +9 -0
- package/lib/runtime/SpecNamespaceObjectRuntimeModule.js +90 -0
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +9 -0
- package/lib/runtime/StartupEntrypointRuntimeModule.js +9 -0
- package/lib/runtime/SystemContextRuntimeModule.js +9 -0
- package/lib/runtime/ToBinaryRuntimeModule.js +9 -0
- package/lib/schemes/DataUriPlugin.js +3 -6
- package/lib/schemes/VirtualUrlPlugin.js +1 -1
- package/lib/serialization/BinaryMiddleware.js +9 -9
- package/lib/serialization/FileMiddleware.js +16 -16
- package/lib/serialization/ObjectMiddleware.js +168 -139
- package/lib/sharing/ConsumeSharedPlugin.js +12 -0
- package/lib/sharing/ConsumeSharedRuntimeModule.js +11 -0
- package/lib/sharing/ShareRuntimeModule.js +9 -0
- package/lib/sharing/declaredShared.js +47 -0
- package/lib/stats/DefaultStatsFactoryPlugin.js +6 -5
- package/lib/stats/DefaultStatsPrinterPlugin.js +3 -0
- package/lib/typescript/TypeScriptPlugin.js +2 -3
- package/lib/url/URLParserPlugin.js +6 -8
- package/lib/util/LocConverter.js +4 -7
- package/lib/util/SourceProcessor.js +91 -91
- package/lib/util/async.js +292 -0
- package/lib/util/buildDiagnostics.js +69 -0
- package/lib/util/chainedImports.js +3 -4
- package/lib/util/concatenate.js +4 -4
- package/lib/util/createHooksRegistry.js +1 -2
- package/lib/util/dataURL.js +2 -3
- package/lib/util/deterministicGrouping.js +8 -13
- package/lib/util/findGraphRoots.js +6 -13
- package/lib/util/fs.js +27 -1
- package/lib/util/globUtils.js +1 -1
- package/lib/util/handlerKeys.js +40 -0
- package/lib/util/hash/wasm-hash.js +3 -4
- package/lib/util/identifier.js +20 -0
- package/lib/util/internalSerializables.js +5 -1
- package/lib/util/registerExternalSerializer.js +6 -45
- package/lib/util/semver.js +5 -3
- package/lib/wasm-async/AsyncWasmCompileRuntimeModule.js +9 -0
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +9 -0
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +6 -1
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +5 -1
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +12 -4
- package/lib/wasm-sync/WebAssemblyGenerator.js +6 -1
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +5 -1
- package/lib/wasm-sync/WebAssemblyUtils.js +2 -4
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +36 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +19 -0
- package/package.json +55 -46
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +379 -66
- package/schemas/plugins/LoaderOptionsPlugin.check.js +1 -1
- package/schemas/plugins/ManifestPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
- package/schemas/plugins/asset/AssetGeneratorOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/debug/ProfilingPlugin.check.js +1 -1
- package/schemas/plugins/dll/DllReferencePlugin.check.js +1 -1
- package/schemas/plugins/ids/HashedModuleIdsPlugin.check.js +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
- package/types.d.ts +1723 -604
- package/lib/dependencies/ExportBindingInitFragment.js +0 -191
- package/lib/errors/EntrypointOverlapWarning.js +0 -45
- package/lib/performance/EntrypointOverlapPlugin.js +0 -122
package/README.md
CHANGED
|
@@ -13,23 +13,22 @@ npm install @depup/webpack
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [webpack](https://www.npmjs.com/package/webpack) @ 5.
|
|
17
|
-
| Processed | 2026-09-
|
|
16
|
+
| Original | [webpack](https://www.npmjs.com/package/webpack) @ 5.111.1 |
|
|
17
|
+
| Processed | 2026-09-20 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
|
-
| Deps updated |
|
|
19
|
+
| Deps updated | 8 |
|
|
20
20
|
|
|
21
21
|
## Dependency Changes
|
|
22
22
|
|
|
23
23
|
| Dependency | From | To |
|
|
24
24
|
|------------|------|-----|
|
|
25
25
|
| @types/estree | ^1.0.8 | ^1.0.9 |
|
|
26
|
-
|
|
|
27
|
-
| browserslist | ^4.28.1 | ^4.28.9 |
|
|
26
|
+
| browserslist | ^4.28.1 | ^4.29.0 |
|
|
28
27
|
| chrome-trace-event | ^1.0.2 | ^1.0.4 |
|
|
29
|
-
| enhanced-resolve | ^5.
|
|
30
|
-
| es-module-lexer | ^2.1.0 | ^
|
|
28
|
+
| enhanced-resolve | ^5.25.0 | ^5.25.1 |
|
|
29
|
+
| es-module-lexer | ^2.1.0 | ^3.0.2 |
|
|
31
30
|
| events | ^3.2.0 | ^3.3.0 |
|
|
32
|
-
| minimizer-webpack-plugin | ^5.7.0 | ^5.
|
|
31
|
+
| minimizer-webpack-plugin | ^5.7.0 | ^5.11.0 |
|
|
33
32
|
| tapable | ^2.3.0 | ^2.3.3 |
|
|
34
33
|
|
|
35
34
|
---
|
package/changes.json
CHANGED
|
@@ -4,25 +4,21 @@
|
|
|
4
4
|
"from": "^1.0.8",
|
|
5
5
|
"to": "^1.0.9"
|
|
6
6
|
},
|
|
7
|
-
"acorn": {
|
|
8
|
-
"from": "^8.16.0",
|
|
9
|
-
"to": "^8.18.0"
|
|
10
|
-
},
|
|
11
7
|
"browserslist": {
|
|
12
8
|
"from": "^4.28.1",
|
|
13
|
-
"to": "^4.
|
|
9
|
+
"to": "^4.29.0"
|
|
14
10
|
},
|
|
15
11
|
"chrome-trace-event": {
|
|
16
12
|
"from": "^1.0.2",
|
|
17
13
|
"to": "^1.0.4"
|
|
18
14
|
},
|
|
19
15
|
"enhanced-resolve": {
|
|
20
|
-
"from": "^5.
|
|
21
|
-
"to": "^5.
|
|
16
|
+
"from": "^5.25.0",
|
|
17
|
+
"to": "^5.25.1"
|
|
22
18
|
},
|
|
23
19
|
"es-module-lexer": {
|
|
24
20
|
"from": "^2.1.0",
|
|
25
|
-
"to": "^
|
|
21
|
+
"to": "^3.0.2"
|
|
26
22
|
},
|
|
27
23
|
"events": {
|
|
28
24
|
"from": "^3.2.0",
|
|
@@ -30,13 +26,13 @@
|
|
|
30
26
|
},
|
|
31
27
|
"minimizer-webpack-plugin": {
|
|
32
28
|
"from": "^5.7.0",
|
|
33
|
-
"to": "^5.
|
|
29
|
+
"to": "^5.11.0"
|
|
34
30
|
},
|
|
35
31
|
"tapable": {
|
|
36
32
|
"from": "^2.3.0",
|
|
37
33
|
"to": "^2.3.3"
|
|
38
34
|
}
|
|
39
35
|
},
|
|
40
|
-
"timestamp": "2026-09-
|
|
41
|
-
"totalUpdated":
|
|
36
|
+
"timestamp": "2026-09-20T01:00:33.211Z",
|
|
37
|
+
"totalUpdated": 8
|
|
42
38
|
}
|
package/lib/APIPlugin.js
CHANGED
|
@@ -42,12 +42,12 @@ const getConcatenatedModule = memoize(() =>
|
|
|
42
42
|
*/
|
|
43
43
|
/** @import Compilation from "./Compilation" */
|
|
44
44
|
/** @import ChunkGraph from "./ChunkGraph" */
|
|
45
|
+
/** @import { RuntimeSpec } from "./util/runtime" */
|
|
45
46
|
/** @import JavascriptParser, { Range } from "./javascript/JavascriptParser" */
|
|
46
47
|
|
|
47
|
-
// Modules
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
// re-parsed and would otherwise lose the flag.
|
|
48
|
+
// Modules reassigning `__webpack_public_path__` at runtime, per compilation, since
|
|
49
|
+
// a baked specifier cannot reflect that. Also kept in `buildInfo`: a module
|
|
50
|
+
// restored from the persistent cache is never re-parsed.
|
|
51
51
|
/** @type {WeakMap<Compilation, Set<Module>>} */
|
|
52
52
|
const runtimePublicPathOverride = new WeakMap();
|
|
53
53
|
|
|
@@ -79,17 +79,30 @@ const usesRuntimePublicPathOverride = (compilation) =>
|
|
|
79
79
|
const overriddenRuntimes = new WeakMap();
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* Whether the public path is reassigned in any runtime
|
|
83
|
-
*
|
|
82
|
+
* Whether the public path is reassigned in any runtime the reference belongs to,
|
|
83
|
+
* named either by the module emitting it or by `runtime` directly — a caller holding
|
|
84
|
+
* a chunk rather than a module has only the latter. Falls back to the whole
|
|
85
|
+
* compilation when neither can place it.
|
|
84
86
|
* @param {Compilation} compilation compilation
|
|
85
87
|
* @param {ChunkGraph=} chunkGraph the chunk graph
|
|
86
88
|
* @param {Module=} module the module a reference is emitted into
|
|
87
|
-
* @
|
|
89
|
+
* @param {RuntimeSpec=} runtime the runtime it is emitted for, where no module names it
|
|
90
|
+
* @returns {boolean} true when a reassignment can reach those runtimes
|
|
88
91
|
*/
|
|
89
|
-
const runtimeUsesPublicPathOverride = (
|
|
92
|
+
const runtimeUsesPublicPathOverride = (
|
|
93
|
+
compilation,
|
|
94
|
+
chunkGraph,
|
|
95
|
+
module,
|
|
96
|
+
runtime
|
|
97
|
+
) => {
|
|
90
98
|
const modules = runtimePublicPathOverride.get(compilation);
|
|
91
99
|
if (modules === undefined) return false;
|
|
92
|
-
if (
|
|
100
|
+
if (
|
|
101
|
+
chunkGraph === undefined ||
|
|
102
|
+
(module === undefined && runtime === undefined)
|
|
103
|
+
) {
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
93
106
|
// Keyed by the chunk graph, not the compilation: `executeModule` asks with a
|
|
94
107
|
// throw-away one whose answer must not outlive it.
|
|
95
108
|
let runtimes = overriddenRuntimes.get(chunkGraph);
|
|
@@ -115,8 +128,10 @@ const runtimeUsesPublicPathOverride = (compilation, chunkGraph, module) => {
|
|
|
115
128
|
if (overridden.size === 0) return false;
|
|
116
129
|
/** @type {Set<string>} */
|
|
117
130
|
const own = new Set();
|
|
118
|
-
|
|
119
|
-
|
|
131
|
+
const reached =
|
|
132
|
+
module === undefined ? [runtime] : chunkGraph.getModuleRuntimes(module);
|
|
133
|
+
for (const each of reached) {
|
|
134
|
+
forEachRuntime(each, (key) => {
|
|
120
135
|
own.add(/** @type {string} */ (key));
|
|
121
136
|
});
|
|
122
137
|
}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
|
-
const asyncLib = require("neo-async");
|
|
9
8
|
const NormalModule = require("./NormalModule");
|
|
10
9
|
const PrefetchDependency = require("./dependencies/PrefetchDependency");
|
|
10
|
+
const asyncLib = require("./util/async");
|
|
11
11
|
|
|
12
12
|
/** @import Compiler from "./Compiler" */
|
|
13
13
|
|
package/lib/Cache.js
CHANGED
|
@@ -70,8 +70,11 @@ class Cache {
|
|
|
70
70
|
get: new AsyncSeriesBailHook(["identifier", "etag", "gotHandlers"]),
|
|
71
71
|
/** @type {AsyncParallelHook<[string, Etag | null, Data]>} */
|
|
72
72
|
store: new AsyncParallelHook(["identifier", "etag", "data"]),
|
|
73
|
-
/** @type {AsyncParallelHook<[Iterable<string>]>} */
|
|
74
|
-
storeBuildDependencies: new AsyncParallelHook([
|
|
73
|
+
/** @type {AsyncParallelHook<[Iterable<string>, Iterable<string>]>} */
|
|
74
|
+
storeBuildDependencies: new AsyncParallelHook([
|
|
75
|
+
"dependencies",
|
|
76
|
+
"optionalDependencies"
|
|
77
|
+
]),
|
|
75
78
|
/** @type {SyncHook<[]>} */
|
|
76
79
|
beginIdle: new SyncHook([]),
|
|
77
80
|
/** @type {AsyncParallelHook<[]>} */
|
|
@@ -139,12 +142,14 @@ class Cache {
|
|
|
139
142
|
* Persists the set of build dependencies required to determine whether the
|
|
140
143
|
* cache can be restored in a future compilation.
|
|
141
144
|
* @param {Iterable<string>} dependencies list of all build dependencies
|
|
145
|
+
* @param {Iterable<string>} optionalDependencies list of optional build dependencies
|
|
142
146
|
* @param {CallbackCache<void>} callback signals when the dependencies are stored
|
|
143
147
|
* @returns {void}
|
|
144
148
|
*/
|
|
145
|
-
storeBuildDependencies(dependencies, callback) {
|
|
149
|
+
storeBuildDependencies(dependencies, optionalDependencies, callback) {
|
|
146
150
|
this.hooks.storeBuildDependencies.callAsync(
|
|
147
151
|
dependencies,
|
|
152
|
+
optionalDependencies,
|
|
148
153
|
makeWebpackErrorCallback(callback, "Cache.hooks.storeBuildDependencies")
|
|
149
154
|
);
|
|
150
155
|
}
|
package/lib/CacheFacade.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
const { forEachBail } = require("enhanced-resolve");
|
|
9
|
-
const asyncLib = require("neo-async");
|
|
10
9
|
const getLazyHashedEtag = require("./cache/getLazyHashedEtag");
|
|
11
10
|
const mergeEtags = require("./cache/mergeEtags");
|
|
11
|
+
const asyncLib = require("./util/async");
|
|
12
12
|
|
|
13
13
|
/** @import Cache, { Etag } from "./Cache" */
|
|
14
14
|
/** @import { HashableObject } from "./cache/getLazyHashedEtag" */
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
|
+
const HarmonyImportDependency = require("./dependencies/HarmonyImportDependency");
|
|
9
|
+
const HarmonyImportSideEffectDependency = require("./dependencies/HarmonyImportSideEffectDependency");
|
|
8
10
|
const CircularDependenciesWarning = require("./errors/CircularDependenciesWarning");
|
|
9
11
|
const { compareModulesByIdentifier } = require("./util/comparators");
|
|
10
12
|
|
|
@@ -20,6 +22,22 @@ const PLUGIN_NAME = "CircularModulesPlugin";
|
|
|
20
22
|
// Enough to name the worst tangles without printing the module graph.
|
|
21
23
|
const MAX_REPORTED_CYCLES = 5;
|
|
22
24
|
|
|
25
|
+
// After SideEffectsFlagPlugin / FlagDependencyUsagePlugin (stage 0).
|
|
26
|
+
const STAGE_DETECT = 1;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Bit flags for why a module is treated as circular.
|
|
30
|
+
* A module may carry both bits when it sits in a sync SCC and is a binding-read target.
|
|
31
|
+
* @enum {number}
|
|
32
|
+
*/
|
|
33
|
+
const CircularKind = {
|
|
34
|
+
None: 0,
|
|
35
|
+
/** ESM binding-observable target; blocks const export inlining (TDZ). */
|
|
36
|
+
Binding: 1 << 0,
|
|
37
|
+
/** Any synchronous SCC member; blocks value binding. */
|
|
38
|
+
Synchronous: 1 << 1
|
|
39
|
+
};
|
|
40
|
+
|
|
23
41
|
/**
|
|
24
42
|
* The module a connection makes its origin evaluate before it can run, or
|
|
25
43
|
* `null` when it does not: a weak reference never loads its target, and an
|
|
@@ -120,12 +138,26 @@ const formatShortestCycle = (members, moduleGraph, requestShortener) => {
|
|
|
120
138
|
.join(" -> ");
|
|
121
139
|
};
|
|
122
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Whether a sync connection may observe the target's live export binding.
|
|
143
|
+
* Bare side-effect imports do not, so their cycles stay Binding-free.
|
|
144
|
+
* @param {ModuleGraphConnection} connection an outgoing connection
|
|
145
|
+
* @returns {boolean} true when the dependency can read a named/default binding
|
|
146
|
+
*/
|
|
147
|
+
const isBindingRead = (connection) => {
|
|
148
|
+
const dependency = connection.dependency;
|
|
149
|
+
return (
|
|
150
|
+
dependency instanceof HarmonyImportDependency &&
|
|
151
|
+
!(dependency instanceof HarmonyImportSideEffectDependency)
|
|
152
|
+
);
|
|
153
|
+
};
|
|
154
|
+
|
|
123
155
|
/**
|
|
124
156
|
* Detects circular dependencies among synchronous module imports.
|
|
125
157
|
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
158
|
+
* One sync-edge SCC pass yields Synchronous members; Binding is derived from
|
|
159
|
+
* the same components for targets of binding-reads that share a component
|
|
160
|
+
* (or self-import), without a second Tarjan.
|
|
129
161
|
*
|
|
130
162
|
* Use the static `build()` method to create an instance. All intermediate data
|
|
131
163
|
* (adjacency layout, index mappings) is local to `build()` and released on
|
|
@@ -133,12 +165,15 @@ const formatShortestCycle = (members, moduleGraph, requestShortener) => {
|
|
|
133
165
|
*/
|
|
134
166
|
class CycleGraph {
|
|
135
167
|
/**
|
|
136
|
-
* @param {Set<Module>}
|
|
168
|
+
* @param {Set<Module>} synchronousModules sync SCC members / self-loops
|
|
169
|
+
* @param {Set<Module>} bindingModules binding-read targets sharing a sync SCC
|
|
137
170
|
* @param {Module[][]} circularGroups multi-module SCC groups only (for reporting; self-loops omitted)
|
|
138
171
|
*/
|
|
139
|
-
constructor(
|
|
172
|
+
constructor(synchronousModules, bindingModules, circularGroups) {
|
|
140
173
|
/** @type {Set<Module>} */
|
|
141
|
-
this.
|
|
174
|
+
this.synchronousModules = synchronousModules;
|
|
175
|
+
/** @type {Set<Module>} */
|
|
176
|
+
this.bindingModules = bindingModules;
|
|
142
177
|
/** @type {Module[][]} */
|
|
143
178
|
this.circularGroups = circularGroups;
|
|
144
179
|
}
|
|
@@ -149,7 +184,7 @@ class CycleGraph {
|
|
|
149
184
|
* @param {Iterable<Module>} modules the set of modules
|
|
150
185
|
* @param {ModuleGraph} moduleGraph the module graph
|
|
151
186
|
* @param {boolean=} collectGroups also group the modules of each cycle, which
|
|
152
|
-
* only the hint reads — marking
|
|
187
|
+
* only the hint reads — marking kinds needs the sets alone
|
|
153
188
|
* @returns {CycleGraph} the result
|
|
154
189
|
*/
|
|
155
190
|
static build(modules, moduleGraph, collectGroups = false) {
|
|
@@ -163,12 +198,16 @@ class CycleGraph {
|
|
|
163
198
|
}
|
|
164
199
|
|
|
165
200
|
const size = moduleList.length;
|
|
166
|
-
if (size === 0)
|
|
201
|
+
if (size === 0) {
|
|
202
|
+
return new CycleGraph(new Set(), new Set(), []);
|
|
203
|
+
}
|
|
167
204
|
|
|
168
205
|
/** @type {number[][]} */
|
|
169
206
|
const edges = Array.from({ length: size });
|
|
170
207
|
/** @type {boolean[]} */
|
|
171
208
|
const selfLoops = Array.from({ length: size }, () => false);
|
|
209
|
+
/** @type {[number, number][]} */
|
|
210
|
+
const bindingReads = [];
|
|
172
211
|
|
|
173
212
|
for (let i = 0; i < size; i++) {
|
|
174
213
|
const module = moduleList[i];
|
|
@@ -177,13 +216,16 @@ class CycleGraph {
|
|
|
177
216
|
for (const connection of moduleGraph.getOutgoingConnections(module)) {
|
|
178
217
|
const target = getSynchronousTarget(connection, module, moduleGraph);
|
|
179
218
|
if (target === null) continue;
|
|
219
|
+
const binding = isBindingRead(connection);
|
|
180
220
|
if (target === module) {
|
|
181
221
|
selfLoops[i] = true;
|
|
222
|
+
if (binding) bindingReads.push([i, i]);
|
|
182
223
|
continue;
|
|
183
224
|
}
|
|
184
225
|
const targetIdx = moduleToIndex.get(target);
|
|
185
226
|
if (targetIdx !== undefined) {
|
|
186
227
|
deps.push(targetIdx);
|
|
228
|
+
if (binding) bindingReads.push([i, targetIdx]);
|
|
187
229
|
}
|
|
188
230
|
}
|
|
189
231
|
edges[i] = deps;
|
|
@@ -191,9 +233,12 @@ class CycleGraph {
|
|
|
191
233
|
|
|
192
234
|
// Iterative SCC algorithm
|
|
193
235
|
/** @type {Set<Module>} */
|
|
194
|
-
const
|
|
236
|
+
const synchronousModules = new Set();
|
|
195
237
|
/** @type {Module[][]} */
|
|
196
238
|
const circularGroups = [];
|
|
239
|
+
/** @type {Int32Array} */
|
|
240
|
+
const componentOf = new Int32Array(size).fill(-1);
|
|
241
|
+
let nextComponent = 0;
|
|
197
242
|
let nextIndex = 0;
|
|
198
243
|
const nodeIndex = new Int32Array(size).fill(-1);
|
|
199
244
|
const nodeLowLink = new Int32Array(size);
|
|
@@ -246,16 +291,17 @@ class CycleGraph {
|
|
|
246
291
|
w = /** @type {number} */ (sccStack.pop());
|
|
247
292
|
nodeOnStack[w] = 0;
|
|
248
293
|
group.push(w);
|
|
294
|
+
componentOf[w] = nextComponent;
|
|
249
295
|
} while (w !== v);
|
|
296
|
+
nextComponent++;
|
|
250
297
|
|
|
251
298
|
if (group.length > 1 || selfLoops[v]) {
|
|
252
299
|
for (const idx of group) {
|
|
253
|
-
|
|
300
|
+
synchronousModules.add(moduleList[idx]);
|
|
254
301
|
}
|
|
255
302
|
}
|
|
256
303
|
|
|
257
|
-
// A
|
|
258
|
-
// circular for inlining but never a group to report.
|
|
304
|
+
// A self-loop is synchronous-circular but not a group to report.
|
|
259
305
|
if (collectGroups && group.length > 1) {
|
|
260
306
|
circularGroups.push(group.map((idx) => moduleList[idx]));
|
|
261
307
|
}
|
|
@@ -272,7 +318,18 @@ class CycleGraph {
|
|
|
272
318
|
}
|
|
273
319
|
}
|
|
274
320
|
|
|
275
|
-
|
|
321
|
+
/** @type {Set<Module>} */
|
|
322
|
+
const bindingModules = new Set();
|
|
323
|
+
for (const [originIdx, targetIdx] of bindingReads) {
|
|
324
|
+
if (
|
|
325
|
+
originIdx === targetIdx ||
|
|
326
|
+
componentOf[originIdx] === componentOf[targetIdx]
|
|
327
|
+
) {
|
|
328
|
+
bindingModules.add(moduleList[targetIdx]);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
return new CycleGraph(synchronousModules, bindingModules, circularGroups);
|
|
276
333
|
}
|
|
277
334
|
}
|
|
278
335
|
|
|
@@ -282,7 +339,7 @@ class CycleGraph {
|
|
|
282
339
|
*/
|
|
283
340
|
|
|
284
341
|
/**
|
|
285
|
-
* One SCC scan: marks
|
|
342
|
+
* One sync SCC scan: marks Synchronous and Binding kinds, reports groups when hints are set.
|
|
286
343
|
*/
|
|
287
344
|
class CircularModulesPlugin {
|
|
288
345
|
/**
|
|
@@ -293,6 +350,32 @@ class CircularModulesPlugin {
|
|
|
293
350
|
this.hints = options && options.hints;
|
|
294
351
|
}
|
|
295
352
|
|
|
353
|
+
/**
|
|
354
|
+
* The circular kind recorded on `module.buildInfo`, or `undefined` when this
|
|
355
|
+
* plugin did not run for the compilation.
|
|
356
|
+
* @param {Module} module the module
|
|
357
|
+
* @returns {number | undefined} bit flags from CircularKind
|
|
358
|
+
*/
|
|
359
|
+
static getCircularKind(module) {
|
|
360
|
+
const buildInfo = /** @type {BuildInfo | undefined} */ (module.buildInfo);
|
|
361
|
+
if (!buildInfo || buildInfo.circularKind === undefined) return undefined;
|
|
362
|
+
return buildInfo.circularKind;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Whether the module is circular. With `kind`, requires that bit to be set.
|
|
367
|
+
* Without `kind`, any non-None kind counts. Missing kind (plugin off) is false.
|
|
368
|
+
* @param {Module} module the module
|
|
369
|
+
* @param {number=} kind CircularKind bit to test (e.g. CircularKind.Binding)
|
|
370
|
+
* @returns {boolean} true when the module matches
|
|
371
|
+
*/
|
|
372
|
+
static isCircular(module, kind) {
|
|
373
|
+
const value = CircularModulesPlugin.getCircularKind(module);
|
|
374
|
+
if (value === undefined) return false;
|
|
375
|
+
if (kind === undefined) return value !== CircularKind.None;
|
|
376
|
+
return (value & kind) === kind;
|
|
377
|
+
}
|
|
378
|
+
|
|
296
379
|
/**
|
|
297
380
|
* @param {Compiler} compiler the compiler instance
|
|
298
381
|
* @returns {void}
|
|
@@ -304,48 +387,62 @@ class CircularModulesPlugin {
|
|
|
304
387
|
/** @type {CircularDependenciesWarning | undefined} */
|
|
305
388
|
let warning;
|
|
306
389
|
|
|
307
|
-
compilation.hooks.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
)
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
390
|
+
compilation.hooks.optimizeDependencies.tap(
|
|
391
|
+
{
|
|
392
|
+
name: PLUGIN_NAME,
|
|
393
|
+
stage: STAGE_DETECT
|
|
394
|
+
},
|
|
395
|
+
(modules) => {
|
|
396
|
+
const { synchronousModules, bindingModules, circularGroups } =
|
|
397
|
+
CycleGraph.build(modules, compilation.moduleGraph, Boolean(hints));
|
|
398
|
+
|
|
399
|
+
for (const m of modules) {
|
|
400
|
+
let kind = CircularKind.None;
|
|
401
|
+
if (synchronousModules.has(m)) {
|
|
402
|
+
kind |= CircularKind.Synchronous;
|
|
403
|
+
}
|
|
404
|
+
if (bindingModules.has(m)) {
|
|
405
|
+
kind |= CircularKind.Binding;
|
|
406
|
+
}
|
|
407
|
+
const buildInfo = /** @type {BuildInfo} */ (m.buildInfo);
|
|
408
|
+
buildInfo.circularKind = kind;
|
|
409
|
+
// Kept for existing tests / readers that still check the boolean.
|
|
410
|
+
buildInfo.isCircular = (kind & CircularKind.Synchronous) !== 0;
|
|
411
|
+
}
|
|
319
412
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
413
|
+
if (!hints) return;
|
|
414
|
+
if (circularGroups.length === 0) {
|
|
415
|
+
warning = undefined;
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
const { moduleGraph, requestShortener } = compilation;
|
|
420
|
+
|
|
421
|
+
// Largest tangle first; ties break by name, as the order groups are
|
|
422
|
+
// discovered in is not stable.
|
|
423
|
+
circularGroups.sort(
|
|
424
|
+
(a, b) =>
|
|
425
|
+
b.length - a.length ||
|
|
426
|
+
compareModulesByIdentifier(
|
|
427
|
+
getCanonicalMember(a),
|
|
428
|
+
getCanonicalMember(b)
|
|
429
|
+
)
|
|
430
|
+
);
|
|
431
|
+
|
|
432
|
+
// The shortest cycle of a large group names two of its modules, so the
|
|
433
|
+
// size travels with it — otherwise the group reads as a pair.
|
|
434
|
+
const groups = circularGroups
|
|
435
|
+
.slice(0, MAX_REPORTED_CYCLES)
|
|
436
|
+
.map((members) => ({
|
|
437
|
+
size: members.length,
|
|
438
|
+
cycle: formatShortestCycle(members, moduleGraph, requestShortener)
|
|
439
|
+
}));
|
|
440
|
+
warning = new CircularDependenciesWarning(
|
|
441
|
+
groups,
|
|
442
|
+
circularGroups.length
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
);
|
|
349
446
|
|
|
350
447
|
// Reported past the hash: `createHash` folds every message into it, so
|
|
351
448
|
// a hint pushed earlier would change the build's identity.
|
|
@@ -364,4 +461,9 @@ class CircularModulesPlugin {
|
|
|
364
461
|
}
|
|
365
462
|
}
|
|
366
463
|
|
|
464
|
+
/** @type {typeof CircularKind} */
|
|
465
|
+
CircularModulesPlugin.CircularKind = CircularKind;
|
|
466
|
+
/** @type {number} */
|
|
467
|
+
CircularModulesPlugin.STAGE_DETECT = STAGE_DETECT;
|
|
468
|
+
|
|
367
469
|
module.exports = CircularModulesPlugin;
|
package/lib/CleanPlugin.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
const path = require("path");
|
|
9
|
-
const asyncLib = require("neo-async");
|
|
10
9
|
const { SyncBailHook } = require("tapable");
|
|
10
|
+
const asyncLib = require("./util/async");
|
|
11
11
|
const createHooksRegistry = require("./util/createHooksRegistry");
|
|
12
12
|
const { join } = require("./util/fs");
|
|
13
13
|
const { ABSOLUTE_PATH_REGEXP } = require("./util/identifier");
|
|
@@ -98,7 +98,7 @@ const getDiffToFs = (fs, outputPath, currentAssets, callback) => {
|
|
|
98
98
|
const directories = getDirectories(currentAssets);
|
|
99
99
|
/** @type {Diff} */
|
|
100
100
|
const diff = new Set();
|
|
101
|
-
asyncLib.
|
|
101
|
+
asyncLib.eachLimit(
|
|
102
102
|
directories,
|
|
103
103
|
10,
|
|
104
104
|
(directory, callback) => {
|
|
@@ -180,10 +180,9 @@ class CompatibilityPlugin {
|
|
|
180
180
|
});
|
|
181
181
|
return true;
|
|
182
182
|
});
|
|
183
|
-
// `const
|
|
184
|
-
// longer free and `hooks.pattern`
|
|
185
|
-
//
|
|
186
|
-
// Returning nothing lets the variable be defined, keeping the tag.
|
|
183
|
+
// `const` and `let` are block-pre-walked, by which point the name is no
|
|
184
|
+
// longer free and `hooks.pattern` never fires, so they are tagged
|
|
185
|
+
// through the declaration hooks instead.
|
|
187
186
|
for (const hookMap of [
|
|
188
187
|
parser.hooks.varDeclarationConst,
|
|
189
188
|
parser.hooks.varDeclarationLet
|