webpack 5.112.0 → 5.112.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/webpack.js +13 -7
- package/lib/Compilation.js +152 -60
- package/lib/Compiler.js +12 -25
- package/lib/asset/AssetBytesGenerator.js +14 -6
- package/lib/asset/AssetBytesParser.js +10 -8
- package/lib/asset/AssetGenerator.js +36 -48
- package/lib/asset/AssetModule.js +11 -0
- package/lib/asset/AssetModulesPlugin.js +5 -4
- package/lib/asset/AssetParser.js +8 -8
- package/lib/asset/AssetSourceGenerator.js +16 -8
- package/lib/asset/AssetSourceParser.js +10 -8
- package/lib/asset/WebManifestGenerator.js +11 -6
- package/lib/asset/WebManifestParser.js +3 -3
- package/lib/async-modules/AsyncModuleHelpers.js +8 -2
- package/lib/async-modules/InferAsyncModulesPlugin.js +7 -2
- package/lib/cache/CacheFacade.js +1 -1
- package/lib/cache/PackFileCacheStrategy.js +6 -10
- package/lib/cache/ResolverCachePlugin.js +58 -8
- package/lib/config/WebpackOptionsApply.js +8 -28
- package/lib/config/cli.js +9 -6
- package/lib/config/defaults.js +24 -13
- package/lib/config/getClaimedAssetTypes.js +2 -2
- package/lib/config/target.js +1 -1
- package/lib/context/ContextModule.js +1 -1
- package/lib/context/ContextModuleFactory.js +1 -1
- package/lib/context/ContextReplacementPlugin.js +3 -9
- package/lib/css/CssGenerator.js +40 -37
- package/lib/css/CssModule.js +10 -0
- package/lib/css/CssModulesPlugin.js +2 -2
- package/lib/css/CssParser.js +33 -32
- package/lib/css/conventions.js +1 -1
- package/lib/css/data.js +224 -219
- package/lib/css/syntax-parser.js +1159 -298
- package/lib/css/syntax-printer.js +90 -35
- package/lib/debug/ProfilingPlugin.js +65 -43
- package/lib/define/DefinePlugin.js +10 -15
- package/lib/define/DotenvPlugin.js +10 -6
- package/lib/define/EnvironmentPlugin.js +4 -2
- package/lib/dependencies/amd/AMDDefineDependencyParserPlugin.js +1 -2
- package/lib/dependencies/amd/AMDRequireDependenciesBlockParserPlugin.js +4 -1
- package/lib/dependencies/commonjs/CommonJsExportRequireDependency.js +1 -4
- package/lib/dependencies/commonjs/CommonJsExportsParserPlugin.js +18 -33
- package/lib/dependencies/commonjs/CommonJsImportsParserPlugin.js +1 -3
- package/lib/dependencies/commonjs/CommonJsObjectExportDependency.js +4 -4
- package/lib/dependencies/commonjs/CommonJsPlugin.js +2 -5
- package/lib/dependencies/commonjs/RequireEnsureDependenciesBlockParserPlugin.js +4 -1
- package/lib/dependencies/context/ImportMetaContextDependencyParserPlugin.js +1 -2
- package/lib/dependencies/context/ImportMetaGlobDependencyParserPlugin.js +4 -7
- package/lib/dependencies/context/ImportMetaGlobHelpers.js +8 -10
- package/lib/dependencies/core/CachedConstDependency.js +9 -6
- package/lib/dependencies/css/CssIcssExportDependency.js +6 -7
- package/lib/dependencies/css/CssIcssImportDependency.js +1 -3
- package/lib/dependencies/css/CssUrlDependency.js +2 -6
- package/lib/dependencies/esm/ESMDetectionParserPlugin.js +2 -4
- package/lib/dependencies/esm/ESMExportExpressionDependency.js +2 -2
- package/lib/dependencies/esm/ESMExportImportedSpecifierDependency.js +16 -18
- package/lib/dependencies/esm/ESMExportSpecifierDependency.js +20 -3
- package/lib/dependencies/esm/ESMExports.js +2 -10
- package/lib/dependencies/esm/ESMImportDependency.js +17 -2
- package/lib/dependencies/esm/ESMImportDependencyParserPlugin.js +6 -17
- package/lib/dependencies/esm/ESMImportGuard.js +11 -23
- package/lib/dependencies/esm/ESMImportSideEffectDependency.js +1 -1
- package/lib/dependencies/esm/ESMImportSpecifierDependency.js +4 -1
- package/lib/dependencies/esm/ESMLiveExportDependency.js +311 -0
- package/lib/dependencies/esm/ESMLiveExportParserPlugin.js +862 -0
- package/lib/dependencies/esm/ESMModulesPlugin.js +1 -3
- package/lib/dependencies/esm/TopLevelAwaitDependency.js +1 -8
- package/lib/dependencies/helpers/DynamicExports.js +4 -6
- package/lib/dependencies/html/HtmlEntryDependency.js +5 -14
- package/lib/dependencies/html/HtmlInlineHtmlDependency.js +1 -4
- package/lib/dependencies/html/HtmlInlineScriptDependency.js +2 -6
- package/lib/dependencies/html/HtmlInlineStyleDependency.js +1 -4
- package/lib/dependencies/import/ImportParserPlugin.js +3 -6
- package/lib/dependencies/import-meta/ImportMetaPlugin.js +4 -6
- package/lib/dependencies/url/URLParserPlugin.js +1 -1
- package/lib/dependencies/worker/WorkerAndWorkletPlugin.js +51 -20
- package/lib/devtool/ModuleFilenameHelpers.js +1 -1
- package/lib/devtool/SourceMapDevToolPlugin.js +1 -1
- package/lib/dll/DelegatedModule.js +3 -3
- package/lib/dll/DllModule.js +3 -1
- package/lib/dll/DllReferencePlugin.js +1 -4
- package/lib/errors/AbstractMethodError.js +1 -1
- package/lib/errors/ErrorHelpers.js +2 -1
- package/lib/errors/HookWebpackError.js +2 -1
- package/lib/errors/JSONParseError.js +4 -4
- package/lib/errors/WebpackError.js +3 -2
- package/lib/esm/ModuleChunkFormatPlugin.js +36 -1
- package/lib/externals/ExternalModule.js +12 -9
- package/lib/externals/ExternalModuleFactoryPlugin.js +1 -2
- package/lib/externals/ExternalsPlugin.js +1 -1
- package/lib/fs/FileSystemInfo.js +4 -4
- package/lib/graph/AsyncDependenciesBlock.js +1 -1
- package/lib/graph/ChunkGraph.js +5 -0
- package/lib/graph/Dependency.js +8 -2
- package/lib/graph/ExportsInfo.js +1 -1
- package/lib/graph/ModuleGraph.js +14 -3
- package/lib/graph/buildChunkGraph.js +17 -19
- package/lib/graph/findGraphRoots.js +1 -1
- package/lib/hmr/HotModuleReplacement.runtime.js +10 -9
- package/lib/hmr/HotModuleReplacementPlugin.js +5 -11
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +16 -19
- package/lib/hmr/LazyCompilationPlugin.js +1 -7
- package/lib/html/HtmlGenerator.js +25 -17
- package/lib/html/HtmlModule.js +11 -1
- package/lib/html/HtmlModulesPlugin.js +12 -11
- package/lib/html/HtmlParser.js +10 -9
- package/lib/html/builtinEmbeddedRenderer.js +31 -33
- package/lib/html/data.js +42 -21
- package/lib/html/htmlMinify.js +4 -1
- package/lib/html/syntax-parser.js +34 -35
- package/lib/html/syntax-printer.js +2 -3
- package/lib/html/xmlMinify.js +4 -1
- package/lib/ids/HashedModuleIdsPlugin.js +1 -1
- package/lib/index.js +13 -12
- package/lib/javascript/APIPlugin.js +7 -13
- package/lib/javascript/BasicEvaluatedExpression.js +5 -5
- package/lib/javascript/CommonJsChunkFormatPlugin.js +2 -7
- package/lib/javascript/ConstPlugin.js +1 -1
- package/lib/javascript/JavascriptGenerator.js +16 -11
- package/lib/javascript/JavascriptMetaInfoPlugin.js +3 -15
- package/lib/javascript/JavascriptModule.js +10 -0
- package/lib/javascript/JavascriptModulesPlugin.js +2 -4
- package/lib/javascript/JavascriptParser.js +99 -11
- package/lib/javascript/ScopeAnalyzer.js +183 -107
- package/lib/javascript/UseStrictPlugin.js +2 -5
- package/lib/javascript/jsMinify.js +1 -1
- package/lib/javascript/regexp.js +2 -2
- package/lib/javascript/syntax-parser.js +2114 -1506
- package/lib/javascript/syntax-printer-data.js +167 -1
- package/lib/javascript/syntax-printer.js +9554 -2782
- package/lib/json/JsonGenerator.js +15 -7
- package/lib/json/JsonModule.js +11 -0
- package/lib/json/JsonParser.js +7 -6
- package/lib/library/AssignLibraryPlugin.js +1 -1
- package/lib/library/JsonpLibraryPlugin.js +1 -1
- package/lib/library/ModuleLibraryPlugin.js +399 -23
- package/lib/loaders/LoaderRunner.js +76 -38
- package/lib/loaders/loadLoader.js +16 -10
- package/lib/module/Generator.js +17 -9
- package/lib/module/Module.js +2 -2
- package/lib/module/NormalModule.js +7 -5
- package/lib/module/NormalModuleFactory.js +11 -17
- package/lib/module/Parser.js +9 -2
- package/lib/module/extractSourceMap.js +69 -18
- package/lib/module/findCaseMismatch.js +2 -2
- package/lib/node/ExternalModuleInitFragment.js +2 -2
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +4 -12
- package/lib/node/ReadFileCompileWasmPlugin.js +2 -6
- package/lib/node/nodeConsole.js +4 -3
- package/lib/optimize/CircularModulesPlugin.js +1 -1
- package/lib/optimize/ConcatenatedModule.js +2 -6
- package/lib/optimize/FlagDependencyExportsPlugin.js +6 -11
- package/lib/optimize/FlagDependencyUsagePlugin.js +28 -3
- package/lib/optimize/InlineExports.js +4 -7
- package/lib/optimize/LazyBarrels.js +41 -5
- package/lib/optimize/ModuleConcatenationPlugin.js +8 -10
- package/lib/optimize/RealContentHashPlugin.js +2 -6
- package/lib/optimize/SideEffectsFlagPlugin.js +7 -21
- package/lib/optimize/SplitChunksPlugin.js +11 -24
- package/lib/optimize/TupleQueue.js +1 -1
- package/lib/output/CleanPlugin.js +3 -1
- package/lib/output/CopyPlugin.js +3 -4
- package/lib/performance/EvalUsagePlugin.js +1 -3
- package/lib/performance/HotspotsPlugin.js +33 -9
- package/lib/performance/PureAnnotationsPlugin.js +16 -10
- package/lib/performance/TopLevelThisPlugin.js +17 -9
- package/lib/prefetch/ResourceHintPlugin.js +1 -1
- package/lib/provide/ProvidedDependency.js +36 -4
- package/lib/rules/BasicEffectRulePlugin.js +1 -1
- package/lib/rules/RuleSetCompiler.js +15 -5
- package/lib/rules/UseEffectRulePlugin.js +1 -3
- package/lib/runtime/AsyncModuleRuntimeModule.js +7 -1
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +1 -5
- package/lib/runtime/RuntimeGlobals.js +6 -0
- package/lib/runtime/RuntimePlugin.js +2 -0
- package/lib/schemes/HttpUriPlugin.js +1 -2
- package/lib/schemes/VirtualUrlPlugin.js +3 -1
- package/lib/serialization/AggregateErrorSerializer.js +3 -3
- package/lib/serialization/BinaryMiddleware.js +4 -1
- package/lib/serialization/ErrorObjectSerializer.js +2 -5
- package/lib/serialization/ObjectMiddleware.js +17 -15
- package/lib/serialization/PlainObjectSerializer.js +3 -7
- package/lib/serialization/Serializer.js +21 -11
- package/lib/serialization/SerializerMiddleware.js +8 -6
- package/lib/stats/DefaultStatsFactoryPlugin.js +35 -35
- package/lib/stats/DefaultStatsPresetPlugin.js +2 -6
- package/lib/stats/DefaultStatsPrinterPlugin.js +12 -11
- package/lib/stats/StatsFactory.js +194 -24
- package/lib/stats/StatsPrinter.js +126 -13
- package/lib/template/DependencyTemplate.js +1 -1
- package/lib/template/RuntimeTemplate.js +13 -32
- package/lib/template/Template.js +1 -1
- package/lib/util/SourceProcessor.js +98 -15
- package/lib/util/WeakTupleMap.js +10 -4
- package/lib/util/cleverMerge.js +61 -33
- package/lib/util/comparators.js +9 -5
- package/lib/util/dataURL.js +2 -0
- package/lib/util/deprecation.js +4 -3
- package/lib/util/globUtils.js +1 -4
- package/lib/util/internalSerializables.js +2 -0
- package/lib/util/makeSerializable.js +6 -4
- package/lib/util/memoize.js +1 -1
- package/lib/util/parseJson.js +2 -2
- package/lib/util/serialization.js +31 -27
- package/lib/wasm/AsyncWasmModule.js +12 -2
- package/lib/wasm/AsyncWebAssemblyGenerator.js +12 -4
- package/lib/wasm/AsyncWebAssemblyJavascriptGenerator.js +13 -5
- package/lib/wasm/AsyncWebAssemblyParser.js +7 -5
- package/lib/wasm/UniversalCompileAsyncWasmPlugin.js +2 -6
- package/lib/wasm-sync/SyncWasmModule.js +16 -1
- package/lib/wasm-sync/WebAssemblyGenerator.js +15 -10
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +13 -5
- package/lib/wasm-sync/WebAssemblyParser.js +10 -12
- package/lib/web/FetchCompileAsyncWasmPlugin.js +4 -12
- package/lib/web/FetchCompileWasmPlugin.js +2 -6
- package/package.json +16 -18
- package/schemas/WebpackOptions.check.js +3 -3
- package/schemas/WebpackOptions.json +2 -2
- package/schemas/plugins/BannerPlugin.check.js +3 -3
- package/schemas/plugins/HtmlGeneratorOptions.check.js +3 -3
- package/schemas/plugins/HtmlParserOptions.check.js +3 -3
- package/schemas/plugins/IgnorePlugin.check.js +3 -3
- package/schemas/plugins/LoaderOptionsPlugin.check.js +3 -3
- package/schemas/plugins/ManifestPlugin.check.js +3 -3
- package/schemas/plugins/ProgressPlugin.check.js +3 -3
- package/schemas/plugins/SSRManifestPlugin.check.js +3 -3
- package/schemas/plugins/SourceMapDevToolPlugin.check.js +3 -3
- package/schemas/plugins/WatchIgnorePlugin.check.js +3 -3
- package/schemas/plugins/asset/AssetGeneratorOptions.check.js +3 -3
- package/schemas/plugins/asset/AssetInlineGeneratorOptions.check.js +3 -3
- package/schemas/plugins/asset/AssetParserOptions.check.js +3 -3
- package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +3 -3
- package/schemas/plugins/container/ContainerPlugin.check.js +3 -3
- package/schemas/plugins/container/ContainerReferencePlugin.check.js +3 -3
- package/schemas/plugins/container/ExternalsType.check.js +3 -3
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +3 -3
- package/schemas/plugins/css/CssAutoOrModuleParserOptions.check.js +3 -3
- package/schemas/plugins/css/CssGeneratorOptions.check.js +3 -3
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +3 -3
- package/schemas/plugins/css/CssModuleParserOptions.check.js +3 -3
- package/schemas/plugins/css/CssParserOptions.check.js +3 -3
- package/schemas/plugins/debug/ProfilingPlugin.check.js +3 -3
- package/schemas/plugins/define/DotenvPluginOptions.check.js +7 -0
- package/schemas/plugins/define/DotenvPluginOptions.json +3 -0
- package/schemas/plugins/dll/DllPlugin.check.js +3 -3
- package/schemas/plugins/dll/DllReferencePlugin.check.js +3 -3
- package/schemas/plugins/ids/HashedModuleIdsPlugin.check.js +3 -3
- package/schemas/plugins/ids/OccurrenceChunkIdsPlugin.check.js +3 -3
- package/schemas/plugins/ids/OccurrenceModuleIdsPlugin.check.js +3 -3
- package/schemas/plugins/json/JsonModulesPluginGenerator.check.js +3 -3
- package/schemas/plugins/json/JsonModulesPluginParser.check.js +3 -3
- package/schemas/plugins/optimize/AggressiveSplittingPlugin.check.js +3 -3
- package/schemas/plugins/optimize/LimitChunkCountPlugin.check.js +3 -3
- package/schemas/plugins/optimize/MergeDuplicateChunksPlugin.check.js +3 -3
- package/schemas/plugins/optimize/MinChunkSizePlugin.check.js +3 -3
- package/schemas/plugins/output/CleanOptions.check.js +7 -0
- package/schemas/plugins/output/CleanOptions.json +3 -0
- package/schemas/plugins/schemes/HttpUriPlugin.check.js +3 -3
- package/schemas/plugins/schemes/VirtualUrlPlugin.check.js +3 -3
- package/schemas/plugins/sharing/ConsumeSharedPlugin.check.js +3 -3
- package/schemas/plugins/sharing/ProvideSharedPlugin.check.js +3 -3
- package/schemas/plugins/sharing/SharePlugin.check.js +3 -3
- package/types.d.ts +1482 -358
|
@@ -13,9 +13,8 @@ const WebAssemblyExportImportedDependency = require("../dependencies/wasm/WebAss
|
|
|
13
13
|
const WebAssemblyImportDependency = require("../dependencies/wasm/WebAssemblyImportDependency");
|
|
14
14
|
const Parser = require("../module/Parser");
|
|
15
15
|
|
|
16
|
+
/** @import { BuiltSyncWasmModule } from "./SyncWasmModule" */
|
|
16
17
|
/** @import { ModuleImport } from "@webassemblyjs/ast" */
|
|
17
|
-
/** @import { BuildInfo, BuildMeta } from "../module/Module" */
|
|
18
|
-
/** @import { SyncWasmModuleBuildMeta } from "./SyncWasmModule" */
|
|
19
18
|
/** @import { ParserState, PreparsedAst } from "../module/Parser" */
|
|
20
19
|
|
|
21
20
|
const JS_COMPAT_TYPES = new Set(["i32", "i64", "f32", "f64", "externref"]);
|
|
@@ -63,6 +62,9 @@ const decoderOpts = {
|
|
|
63
62
|
ignoreCustomNameSection: true
|
|
64
63
|
};
|
|
65
64
|
|
|
65
|
+
/**
|
|
66
|
+
* @extends {Parser<BuiltSyncWasmModule>}
|
|
67
|
+
*/
|
|
66
68
|
class WebAssemblyParser extends Parser {
|
|
67
69
|
/**
|
|
68
70
|
* Parses the provided source and updates the parser state.
|
|
@@ -76,10 +78,11 @@ class WebAssemblyParser extends Parser {
|
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
// flag it as ESM
|
|
79
|
-
/** @type {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
const { buildInfo, buildMeta } = /** @type {BuiltSyncWasmModule} */ (
|
|
82
|
+
state.module
|
|
83
|
+
);
|
|
84
|
+
buildInfo.strict = true;
|
|
85
|
+
buildMeta.exportsType = "namespace";
|
|
83
86
|
|
|
84
87
|
// parse it
|
|
85
88
|
const program = decode(source, decoderOpts);
|
|
@@ -90,9 +93,6 @@ class WebAssemblyParser extends Parser {
|
|
|
90
93
|
// extract imports and exports
|
|
91
94
|
/** @type {string[]} */
|
|
92
95
|
const exports = [];
|
|
93
|
-
const buildMeta = /** @type {SyncWasmModuleBuildMeta} */ (
|
|
94
|
-
state.module.buildMeta
|
|
95
|
-
);
|
|
96
96
|
/** @type {Record<string, string> | undefined} */
|
|
97
97
|
let jsIncompatibleExports = (buildMeta.jsIncompatibleExports = undefined);
|
|
98
98
|
|
|
@@ -115,9 +115,7 @@ class WebAssemblyParser extends Parser {
|
|
|
115
115
|
|
|
116
116
|
if (incompatibleType) {
|
|
117
117
|
if (jsIncompatibleExports === undefined) {
|
|
118
|
-
jsIncompatibleExports =
|
|
119
|
-
/** @type {SyncWasmModuleBuildMeta} */
|
|
120
|
-
(state.module.buildMeta).jsIncompatibleExports = {};
|
|
118
|
+
jsIncompatibleExports = buildMeta.jsIncompatibleExports = {};
|
|
121
119
|
}
|
|
122
120
|
jsIncompatibleExports[node.name] = incompatibleType;
|
|
123
121
|
}
|
|
@@ -114,9 +114,7 @@ class FetchCompileAsyncWasmPlugin {
|
|
|
114
114
|
if (
|
|
115
115
|
!baked &&
|
|
116
116
|
needsRuntimeFullHash(
|
|
117
|
-
|
|
118
|
-
compilation.outputOptions.webassemblyModuleFilename
|
|
119
|
-
)
|
|
117
|
+
compilation.outputOptions.webassemblyModuleFilename
|
|
120
118
|
)
|
|
121
119
|
) {
|
|
122
120
|
set.add(RuntimeGlobals.getFullHash);
|
|
@@ -125,9 +123,7 @@ class FetchCompileAsyncWasmPlugin {
|
|
|
125
123
|
chunk,
|
|
126
124
|
new AsyncWasmLoadingRuntimeModule({
|
|
127
125
|
fullHashDigest: usesFullHashDigest(
|
|
128
|
-
|
|
129
|
-
compilation.outputOptions.webassemblyModuleFilename
|
|
130
|
-
)
|
|
126
|
+
compilation.outputOptions.webassemblyModuleFilename
|
|
131
127
|
),
|
|
132
128
|
generateLoadBinaryCode: baked
|
|
133
129
|
? generateBakedLoadBinaryCode
|
|
@@ -176,9 +172,7 @@ class FetchCompileAsyncWasmPlugin {
|
|
|
176
172
|
if (
|
|
177
173
|
!baked &&
|
|
178
174
|
needsRuntimeFullHash(
|
|
179
|
-
|
|
180
|
-
compilation.outputOptions.webassemblyModuleFilename
|
|
181
|
-
)
|
|
175
|
+
compilation.outputOptions.webassemblyModuleFilename
|
|
182
176
|
)
|
|
183
177
|
) {
|
|
184
178
|
set.add(RuntimeGlobals.getFullHash);
|
|
@@ -187,9 +181,7 @@ class FetchCompileAsyncWasmPlugin {
|
|
|
187
181
|
chunk,
|
|
188
182
|
new AsyncWasmCompileRuntimeModule({
|
|
189
183
|
fullHashDigest: usesFullHashDigest(
|
|
190
|
-
|
|
191
|
-
compilation.outputOptions.webassemblyModuleFilename
|
|
192
|
-
)
|
|
184
|
+
compilation.outputOptions.webassemblyModuleFilename
|
|
193
185
|
),
|
|
194
186
|
generateLoadBinaryCode: baked
|
|
195
187
|
? generateBakedLoadBinaryCode
|
|
@@ -113,9 +113,7 @@ class FetchCompileWasmPlugin {
|
|
|
113
113
|
}
|
|
114
114
|
if (
|
|
115
115
|
needsRuntimeFullHash(
|
|
116
|
-
|
|
117
|
-
compilation.outputOptions.webassemblyModuleFilename
|
|
118
|
-
)
|
|
116
|
+
compilation.outputOptions.webassemblyModuleFilename
|
|
119
117
|
)
|
|
120
118
|
) {
|
|
121
119
|
set.add(RuntimeGlobals.getFullHash);
|
|
@@ -124,9 +122,7 @@ class FetchCompileWasmPlugin {
|
|
|
124
122
|
chunk,
|
|
125
123
|
new WasmChunkLoadingRuntimeModule({
|
|
126
124
|
fullHashDigest: usesFullHashDigest(
|
|
127
|
-
|
|
128
|
-
compilation.outputOptions.webassemblyModuleFilename
|
|
129
|
-
)
|
|
125
|
+
compilation.outputOptions.webassemblyModuleFilename
|
|
130
126
|
),
|
|
131
127
|
generateLoadBinaryCode: analyzable
|
|
132
128
|
? generateAnalyzableLoadBinaryCode
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webpack",
|
|
3
|
-
"version": "5.112.
|
|
3
|
+
"version": "5.112.1",
|
|
4
4
|
"description": "Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
|
5
5
|
"homepage": "https://github.com/webpack/webpack",
|
|
6
6
|
"bugs": "https://github.com/webpack/webpack/issues",
|
|
@@ -32,10 +32,11 @@
|
|
|
32
32
|
"prepare": "husky",
|
|
33
33
|
"setup": "node ./setup/setup.js",
|
|
34
34
|
"prelint": "yarn setup",
|
|
35
|
-
"lint": "yarn lint:agents && yarn lint:special && node tooling/run-parallel.js lint:code lint:class-names lint:types-all fmt:check lint:spellcheck",
|
|
35
|
+
"lint": "yarn lint:agents && yarn lint:special && node tooling/run-parallel.js lint:code lint:class-names lint:redundant-casts lint:types-all fmt:check lint:spellcheck",
|
|
36
36
|
"lint:agents": "node tooling/check-agents-md-size.js",
|
|
37
37
|
"lint:class-names": "node tooling/check-class-names.js",
|
|
38
38
|
"lint:code": "node node_modules/eslint/bin/eslint.js --cache --concurrency auto .",
|
|
39
|
+
"lint:redundant-casts": "node tooling/check-redundant-type-assertions.js",
|
|
39
40
|
"lint:special": "node tooling/generate-runtime-code.js && node tooling/generate-wasm-code.js && node tooling/generate-css-data.js && node tooling/generate-html-data.js && node tooling/generate-js-data.js && node tooling/generate-schemas.js && node tooling/precompile-schemas.js && node tooling/generate-types.js --no-template-literals && node tooling/generate-internal-serializables.js",
|
|
40
41
|
"lint:types": "node tooling/tsc-incremental.js types",
|
|
41
42
|
"lint:types-test": "node tooling/tsc-incremental.js types-test -p tsconfig.types.test.json",
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
"fix:special": "node tooling/generate-runtime-code.js --write && node tooling/generate-wasm-code.js --write && node tooling/generate-css-data.js --write && node tooling/generate-html-data.js --write && node tooling/generate-js-data.js --write && node tooling/generate-schemas.js --write && node tooling/precompile-schemas.js --write && node tooling/generate-types.js --no-template-literals --write && node tooling/generate-internal-serializables.js --write",
|
|
56
57
|
"fix:serializables": "node tooling/generate-internal-serializables.js --write",
|
|
57
58
|
"build:examples": "cd examples && node buildAll.js",
|
|
58
|
-
"benchmark": "node --max-old-space-size=6144 --experimental-vm-modules --trace-deprecation --hash-seed=1 --random-seed=1 --no-opt --predictable --predictable-gc-schedule --interpreted-frames-native-stack --allow-natives-syntax --expose-gc --no-concurrent-sweeping ./test/BenchmarkTestCases.benchmark.mjs",
|
|
59
|
+
"benchmark": "node --max-old-space-size=6144 --experimental-vm-modules --trace-deprecation --hash-seed=1 --random-seed=1 --no-opt --predictable --predictable-gc-schedule --interpreted-frames-native-stack --allow-natives-syntax --expose-gc --no-concurrent-sweeping --no-minor-gc-task --no-maglev ./test/BenchmarkTestCases.benchmark.mjs",
|
|
59
60
|
"playground": "webpack serve --config test/hotPlayground/webpack.config.js",
|
|
60
61
|
"test:invariants": "yarn test:invariants:css && yarn test:invariants:html && yarn test:invariants:js && yarn test:invariants:xml",
|
|
61
62
|
"test:invariants:css": "node tooling/compare-css-tools.js --invariants",
|
|
@@ -74,15 +75,15 @@
|
|
|
74
75
|
"find-deep-imports": "node tooling/find-deep-webpack-imports.js",
|
|
75
76
|
"find-deep-imports:check": "node tooling/find-deep-webpack-imports.js --check",
|
|
76
77
|
"measure:color-agreement": "node tooling/measure-color-agreement.js",
|
|
78
|
+
"hash:css-outputs": "node tooling/hash-css-outputs.js",
|
|
77
79
|
"setup:browsers": "node tooling/install-browsers.js",
|
|
78
|
-
"setup:webkit": "node node_modules/playwright-core/cli.js install webkit",
|
|
79
80
|
"pretest": "yarn lint",
|
|
80
81
|
"test": "yarn test:base",
|
|
81
82
|
"test:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --workerIdleMemoryLimit=512MB --logHeapUsage",
|
|
82
83
|
"test:basic": "yarn test:base --testMatch \"<rootDir>/test/*.basictest.js\"",
|
|
83
84
|
"test:basic:deno": "yarn test:base:deno --testMatch \"<rootDir>/test/*.basictest.js\"",
|
|
84
85
|
"test:basic:bun": "yarn test:base:bun --testMatch \"<rootDir>/test/*.basictest.js\"",
|
|
85
|
-
"test:unit": "yarn test:base --testMatch \"<rootDir>/test/unitCases
|
|
86
|
+
"test:unit": "yarn test:base --testMatch \"<rootDir>/test/unitCases/**/*.unittest.js\"",
|
|
86
87
|
"test:integration": "yarn test:base --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\"",
|
|
87
88
|
"test:integration:a": "yarn test:base --testMatch \"<rootDir>/test/*.{basictest,test}.js\"",
|
|
88
89
|
"test:integration:b": "yarn test:base --testMatch \"<rootDir>/test/*.longtest.js\"",
|
|
@@ -94,9 +95,9 @@
|
|
|
94
95
|
"test:syntax-equivalence": "yarn test:base --testMatch \"<rootDir>/test/specCases/syntaxEquivalence.spectest.js\"",
|
|
95
96
|
"test:css-parsing": "yarn test:base --testMatch \"<rootDir>/test/specCases/cssParsing-webpack.spectest.js\"",
|
|
96
97
|
"test:xmlconf": "yarn test:base --testMatch \"<rootDir>/test/specCases/xmlconf.spectest.js\"",
|
|
97
|
-
"test:deno": "yarn test:base:deno --reporters default --reporters \"<rootDir>/test/harness/runtimeCrashReporter.js\" --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\" \"<rootDir>/test/unitCases
|
|
98
|
+
"test:deno": "yarn test:base:deno --reporters default --reporters \"<rootDir>/test/harness/runtimeCrashReporter.js\" --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\" \"<rootDir>/test/unitCases/**/*.unittest.js\" --testPathIgnorePatterns \"/node_modules/\" \"(ProfilingPlugin[.]unittest|WebpackDevServer)\"",
|
|
98
99
|
"test:base:deno": "deno --allow-read --allow-env --allow-sys --allow-ffi --allow-write --allow-run --allow-net --import-map=test/harness/runtimes/deno-import-map.json --v8-flags='--max-old-space-size=4096' ./node_modules/jest-cli/bin/jest.js --workerIdleMemoryLimit=512MB --logHeapUsage",
|
|
99
|
-
"test:bun": "yarn test:base:bun --reporters default --reporters \"<rootDir>/test/harness/runtimeCrashReporter.js\" --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\" \"<rootDir>/test/unitCases
|
|
100
|
+
"test:bun": "yarn test:base:bun --reporters default --reporters \"<rootDir>/test/harness/runtimeCrashReporter.js\" --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\" \"<rootDir>/test/unitCases/**/*.unittest.js\" --testPathIgnorePatterns \"/node_modules/\" \"(ProfilingPlugin[.]unittest|WebpackDevServer)\"",
|
|
100
101
|
"test:base:bun": "NODE_EXTRA_CA_CERTS=./test/hotCases/lazy-compilation/https/cert.pem bun --bun --smol --preload ./test/harness/runtimes/bun-preload.js ./node_modules/jest-cli/bin/jest.js --workerThreads --workerIdleMemoryLimit=2048MB --logHeapUsage",
|
|
101
102
|
"test:update-snapshots": "yarn test:base -u",
|
|
102
103
|
"test:size": "node --max-old-space-size=4096 ./test/CodeSizeTestCases.size.js",
|
|
@@ -108,7 +109,7 @@
|
|
|
108
109
|
"cover": "yarn cover:all && yarn report:cover",
|
|
109
110
|
"cover:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --workerIdleMemoryLimit=512MB --logHeapUsage",
|
|
110
111
|
"cover:all": "yarn cover:base --coverage",
|
|
111
|
-
"cover:unit": "yarn cover:base --testMatch \"<rootDir>/test/unitCases
|
|
112
|
+
"cover:unit": "yarn cover:base --testMatch \"<rootDir>/test/unitCases/**/*.unittest.js\" --coverage",
|
|
112
113
|
"cover:basic": "yarn cover:base --testMatch \"<rootDir>/test/*.basictest.js\" --coverage",
|
|
113
114
|
"cover:integration": "yarn cover:base --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\" --coverage",
|
|
114
115
|
"cover:integration:a": "yarn cover:base --testMatch \"<rootDir>/test/*.{basictest,test}.js\" --coverage",
|
|
@@ -117,7 +118,8 @@
|
|
|
117
118
|
"cover:html5lib": "yarn cover:base --testMatch \"<rootDir>/test/specCases/html5lib.spectest.js\" --coverage",
|
|
118
119
|
"cover:syntax-equivalence": "yarn cover:base --testMatch \"<rootDir>/test/specCases/syntaxEquivalence.spectest.js\" --coverage",
|
|
119
120
|
"cover:css-parsing": "yarn cover:base --testMatch \"<rootDir>/test/specCases/cssParsing-webpack.spectest.js\" --coverage",
|
|
120
|
-
"cover:minify": "yarn cover:base --testMatch \"<rootDir>/test/specCases/minify-corpora.spectest.js\"
|
|
121
|
+
"cover:minify": "yarn cover:base --testMatch \"<rootDir>/test/specCases/minify-corpora.spectest.js\" --coverage",
|
|
122
|
+
"cover:minify-fuzz": "yarn cover:base --testMatch \"<rootDir>/test/specCases/js-fuzz.spectest.js\" --coverage",
|
|
121
123
|
"cover:test262-parser": "yarn cover:base --testMatch \"<rootDir>/test/specCases/test262-parser.spectest.js\" --coverage",
|
|
122
124
|
"cover:xmlconf": "yarn cover:base --testMatch \"<rootDir>/test/specCases/xmlconf.spectest.js\" --coverage"
|
|
123
125
|
},
|
|
@@ -144,9 +146,9 @@
|
|
|
144
146
|
"graceful-fs": "^4.2.11",
|
|
145
147
|
"mime-db": "^1.54.0",
|
|
146
148
|
"minimizer-webpack-plugin": "^5.13.0",
|
|
147
|
-
"schema-utils": "^4.
|
|
149
|
+
"schema-utils": "^4.8.1",
|
|
148
150
|
"tapable": "^2.3.0",
|
|
149
|
-
"watchpack": "^2.6.
|
|
151
|
+
"watchpack": "^2.6.3",
|
|
150
152
|
"webpack-sources": "^3.6.0"
|
|
151
153
|
},
|
|
152
154
|
"devDependencies": {
|
|
@@ -154,9 +156,8 @@
|
|
|
154
156
|
"@babel/preset-react": "^8.0.1",
|
|
155
157
|
"@changesets/cli": "^3.0.1",
|
|
156
158
|
"@changesets/get-github-info": "^1.0.1",
|
|
157
|
-
"@codspeed/core": "^
|
|
159
|
+
"@codspeed/core": "^6.1.0",
|
|
158
160
|
"@mdn/browser-compat-data": "^8.1.4",
|
|
159
|
-
"@puppeteer/browsers": "^3.2.2",
|
|
160
161
|
"@types/convert-source-map": "^2.0.3",
|
|
161
162
|
"@types/graceful-fs": "^4.1.9",
|
|
162
163
|
"@types/jest": "^30.0.0",
|
|
@@ -168,14 +169,12 @@
|
|
|
168
169
|
"@webref/elements": "^2.8.0",
|
|
169
170
|
"@webref/idl": "^3.83.1",
|
|
170
171
|
"acorn": "^8.16.0",
|
|
171
|
-
"ajv": "^8.20.0",
|
|
172
172
|
"assemblyscript": "^0.28.18",
|
|
173
173
|
"babel-loader": "^10.0.0",
|
|
174
174
|
"bundle-loader": "^0.5.6",
|
|
175
175
|
"coffee-loader": "^5.0.0",
|
|
176
176
|
"coffeescript": "^2.5.1",
|
|
177
177
|
"color-name": "^2.1.1",
|
|
178
|
-
"commondir": "^1.0.1",
|
|
179
178
|
"core-js": "^3.47.0",
|
|
180
179
|
"cspell": "^10.0.1",
|
|
181
180
|
"css-loader": "^7.1.2",
|
|
@@ -217,15 +216,14 @@
|
|
|
217
216
|
"node-gyp": "^13.0.0",
|
|
218
217
|
"nyc": "^18.0.0",
|
|
219
218
|
"open-cli": "^9.0.0",
|
|
220
|
-
"oxc-minify": "^0.
|
|
221
|
-
"oxc-parser": "^0.
|
|
219
|
+
"oxc-minify": "^0.154.0",
|
|
220
|
+
"oxc-parser": "^0.154.0",
|
|
222
221
|
"pkg-pr-new": "^0.0.91",
|
|
223
222
|
"playwright-core": "^1.63.0",
|
|
224
223
|
"prettier": "^3.8.2",
|
|
225
224
|
"prettier-2": "npm:prettier@^2",
|
|
226
225
|
"pretty-format": "^30.0.5",
|
|
227
226
|
"pug": "^3.0.3",
|
|
228
|
-
"puppeteer-core": "^25.3.0",
|
|
229
227
|
"raw-loader": "^4.0.1",
|
|
230
228
|
"react": "^19.2.7",
|
|
231
229
|
"react-dom": "^19.2.7",
|