webpack 5.90.2 → 5.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/README.md +5 -5
- package/bin/webpack.js +5 -1
- package/lib/APIPlugin.js +8 -4
- package/lib/AutomaticPrefetchPlugin.js +1 -1
- package/lib/BannerPlugin.js +3 -1
- package/lib/Cache.js +7 -1
- package/lib/CacheFacade.js +3 -3
- package/lib/ChunkGraph.js +32 -18
- package/lib/ChunkGroup.js +14 -14
- package/lib/CleanPlugin.js +7 -5
- package/lib/Compilation.js +263 -94
- package/lib/Compiler.js +199 -83
- package/lib/ConditionalInitFragment.js +4 -5
- package/lib/ContextModule.js +4 -1
- package/lib/ContextModuleFactory.js +4 -2
- package/lib/ContextReplacementPlugin.js +3 -2
- package/lib/CssModule.js +0 -3
- package/lib/DefinePlugin.js +4 -2
- package/lib/DelegatedModule.js +2 -1
- package/lib/Dependency.js +4 -2
- package/lib/DependencyTemplate.js +7 -2
- package/lib/DllModule.js +3 -1
- package/lib/DllReferencePlugin.js +6 -2
- package/lib/EntryOptionPlugin.js +4 -1
- package/lib/EntryPlugin.js +6 -1
- package/lib/Entrypoint.js +1 -1
- package/lib/ExportsInfo.js +1 -4
- package/lib/ExternalModule.js +120 -25
- package/lib/ExternalModuleFactoryPlugin.js +37 -2
- package/lib/FileSystemInfo.js +1 -1
- package/lib/Generator.js +2 -1
- package/lib/HookWebpackError.js +2 -2
- package/lib/InitFragment.js +5 -3
- package/lib/LibManifestPlugin.js +15 -7
- package/lib/Module.js +54 -5
- package/lib/ModuleFilenameHelpers.js +1 -1
- package/lib/ModuleGraph.js +56 -27
- package/lib/ModuleGraphConnection.js +2 -1
- package/lib/MultiCompiler.js +61 -17
- package/lib/NodeStuffPlugin.js +14 -3
- package/lib/NormalModule.js +239 -86
- package/lib/NormalModuleFactory.js +163 -32
- package/lib/NormalModuleReplacementPlugin.js +5 -1
- package/lib/ProvidePlugin.js +3 -1
- package/lib/RawModule.js +4 -2
- package/lib/ResolverFactory.js +5 -1
- package/lib/RuntimeModule.js +6 -5
- package/lib/RuntimePlugin.js +1 -0
- package/lib/RuntimeTemplate.js +102 -34
- package/lib/SourceMapDevToolPlugin.js +4 -1
- package/lib/Stats.js +12 -5
- package/lib/TemplatedPathPlugin.js +32 -6
- package/lib/Watching.js +67 -60
- package/lib/WebpackError.js +6 -6
- package/lib/WebpackOptionsApply.js +18 -5
- package/lib/asset/RawDataUrlModule.js +5 -2
- package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
- package/lib/buildChunkGraph.js +220 -392
- package/lib/cache/IdleFileCachePlugin.js +8 -3
- package/lib/cache/MemoryCachePlugin.js +1 -1
- package/lib/cache/MemoryWithGcCachePlugin.js +6 -2
- package/lib/cache/PackFileCacheStrategy.js +49 -16
- package/lib/cache/ResolverCachePlugin.js +14 -6
- package/lib/cache/getLazyHashedEtag.js +1 -1
- package/lib/config/defaults.js +24 -1
- package/lib/config/normalization.js +3 -1
- package/lib/container/ContainerEntryDependency.js +2 -1
- package/lib/container/ContainerEntryModule.js +5 -2
- package/lib/container/ContainerPlugin.js +14 -10
- package/lib/container/FallbackModule.js +3 -2
- package/lib/container/RemoteModule.js +2 -1
- package/lib/container/RemoteRuntimeModule.js +12 -3
- package/lib/css/CssExportsGenerator.js +34 -17
- package/lib/css/CssGenerator.js +20 -2
- package/lib/css/CssLoadingRuntimeModule.js +212 -96
- package/lib/css/CssModulesPlugin.js +47 -13
- package/lib/debug/ProfilingPlugin.js +27 -2
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +9 -5
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +4 -1
- package/lib/dependencies/CommonJsDependencyHelpers.js +2 -1
- package/lib/dependencies/CommonJsExportRequireDependency.js +33 -18
- package/lib/dependencies/CommonJsExportsDependency.js +13 -5
- package/lib/dependencies/CommonJsExportsParserPlugin.js +20 -15
- package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -2
- package/lib/dependencies/ContextDependencyHelpers.js +49 -29
- package/lib/dependencies/ContextElementDependency.js +8 -1
- package/lib/dependencies/CssLocalIdentifierDependency.js +63 -8
- package/lib/dependencies/CssUrlDependency.js +5 -3
- package/lib/dependencies/ExportsInfoDependency.js +4 -3
- package/lib/dependencies/ExternalModuleInitFragment.js +5 -3
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +4 -4
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +43 -23
- package/lib/dependencies/HarmonyExportHeaderDependency.js +1 -1
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +73 -32
- package/lib/dependencies/HarmonyExportInitFragment.js +10 -2
- package/lib/dependencies/HarmonyImportDependency.js +28 -12
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +44 -16
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +7 -6
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +21 -10
- package/lib/dependencies/ImportDependency.js +9 -2
- package/lib/dependencies/ImportEagerDependency.js +4 -2
- package/lib/dependencies/ImportMetaContextDependency.js +7 -0
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +25 -14
- package/lib/dependencies/ImportParserPlugin.js +12 -4
- package/lib/dependencies/ImportWeakDependency.js +4 -2
- package/lib/dependencies/LoaderDependency.js +2 -1
- package/lib/dependencies/LoaderImportDependency.js +2 -1
- package/lib/dependencies/ModuleDependency.js +4 -5
- package/lib/dependencies/PureExpressionDependency.js +4 -1
- package/lib/dependencies/RequireContextPlugin.js +1 -1
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +26 -14
- package/lib/dependencies/RequireEnsureDependency.js +1 -1
- package/lib/dependencies/URLDependency.js +7 -4
- package/lib/dependencies/WorkerDependency.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +6 -5
- package/lib/dependencies/getFunctionExpression.js +3 -1
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +2 -1
- package/lib/hmr/LazyCompilationPlugin.js +2 -1
- package/lib/javascript/BasicEvaluatedExpression.js +2 -2
- package/lib/javascript/ChunkHelpers.js +2 -2
- package/lib/javascript/JavascriptParser.js +169 -57
- package/lib/javascript/JavascriptParserHelpers.js +1 -1
- package/lib/javascript/StartupHelpers.js +22 -5
- package/lib/logging/Logger.js +27 -2
- package/lib/logging/createConsoleLogger.js +11 -7
- package/lib/node/NodeEnvironmentPlugin.js +13 -7
- package/lib/node/NodeWatchFileSystem.js +37 -26
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +2 -1
- package/lib/node/RequireChunkLoadingRuntimeModule.js +2 -1
- package/lib/node/nodeConsole.js +24 -1
- package/lib/optimize/AggressiveSplittingPlugin.js +1 -0
- package/lib/optimize/ConcatenatedModule.js +140 -55
- package/lib/optimize/EnsureChunkConditionsPlugin.js +1 -1
- package/lib/optimize/InnerGraph.js +7 -2
- package/lib/optimize/InnerGraphPlugin.js +36 -13
- package/lib/optimize/ModuleConcatenationPlugin.js +12 -2
- package/lib/optimize/RemoveParentModulesPlugin.js +1 -0
- package/lib/optimize/RuntimeChunkPlugin.js +6 -1
- package/lib/optimize/SideEffectsFlagPlugin.js +46 -15
- package/lib/optimize/SplitChunksPlugin.js +2 -2
- package/lib/performance/SizeLimitsPlugin.js +11 -0
- package/lib/rules/ObjectMatcherRulePlugin.js +4 -0
- package/lib/runtime/EnsureChunkRuntimeModule.js +2 -1
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +2 -1
- package/lib/serialization/FileMiddleware.js +1 -0
- package/lib/serialization/ObjectMiddleware.js +2 -0
- package/lib/serialization/Serializer.js +19 -0
- package/lib/sharing/ConsumeSharedModule.js +3 -2
- package/lib/sharing/ConsumeSharedPlugin.js +17 -3
- package/lib/sharing/ConsumeSharedRuntimeModule.js +9 -2
- package/lib/sharing/ProvideSharedModule.js +2 -1
- package/lib/sharing/ProvideSharedPlugin.js +12 -5
- package/lib/sharing/resolveMatchedConfigs.js +2 -2
- package/lib/sharing/utils.js +13 -6
- package/lib/util/StackedCacheMap.js +26 -0
- package/lib/util/WeakTupleMap.js +57 -13
- package/lib/util/cleverMerge.js +24 -11
- package/lib/util/comparators.js +34 -14
- package/lib/util/conventions.js +129 -0
- package/lib/util/fs.js +379 -65
- package/lib/util/hash/BatchedHash.js +3 -0
- package/lib/util/hash/xxhash64.js +2 -2
- package/lib/util/memoize.js +2 -0
- package/lib/util/runtime.js +1 -1
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +4 -2
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +15 -6
- package/lib/wasm-sync/WebAssemblyGenerator.js +27 -6
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +2 -1
- package/lib/wasm-sync/WebAssemblyParser.js +7 -4
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +2 -1
- package/lib/webpack.js +11 -5
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +2 -1
- package/package.json +25 -26
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +69 -8
- package/schemas/plugins/BannerPlugin.check.js +1 -1
- package/schemas/plugins/BannerPlugin.json +5 -1
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +1 -1
- package/types.d.ts +1772 -673
@@ -25,6 +25,14 @@ const WebAssemblyExportImportedDependency = require("../dependencies/WebAssembly
|
|
25
25
|
/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */
|
26
26
|
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
|
27
27
|
/** @typedef {import("./WebAssemblyUtils").UsedWasmDependency} UsedWasmDependency */
|
28
|
+
/** @typedef {import("@webassemblyjs/ast").Instruction} Instruction */
|
29
|
+
/** @typedef {import("@webassemblyjs/ast").ModuleImport} ModuleImport */
|
30
|
+
/** @typedef {import("@webassemblyjs/ast").ModuleExport} ModuleExport */
|
31
|
+
/** @typedef {import("@webassemblyjs/ast").Global} Global */
|
32
|
+
/**
|
33
|
+
* @template T
|
34
|
+
* @typedef {import("@webassemblyjs/ast").NodePath<T>} NodePath
|
35
|
+
*/
|
28
36
|
|
29
37
|
/**
|
30
38
|
* @typedef {(buf: ArrayBuffer) => ArrayBuffer} ArrayBufferTransform
|
@@ -32,7 +40,7 @@ const WebAssemblyExportImportedDependency = require("../dependencies/WebAssembly
|
|
32
40
|
|
33
41
|
/**
|
34
42
|
* @template T
|
35
|
-
* @param {
|
43
|
+
* @param {((prev: ArrayBuffer) => ArrayBuffer)[]} fns transforms
|
36
44
|
* @returns {Function} composed transform
|
37
45
|
*/
|
38
46
|
const compose = (...fns) => {
|
@@ -47,7 +55,8 @@ const compose = (...fns) => {
|
|
47
55
|
/**
|
48
56
|
* Removes the start instruction
|
49
57
|
*
|
50
|
-
* @param {Object} state
|
58
|
+
* @param {Object} state state
|
59
|
+
* @param {Object} state.ast Module's ast
|
51
60
|
* @returns {ArrayBufferTransform} transform
|
52
61
|
*/
|
53
62
|
const removeStartFunc = state => bin => {
|
@@ -118,7 +127,7 @@ const getNextTypeIndex = ast => {
|
|
118
127
|
/**
|
119
128
|
* Get next func index
|
120
129
|
*
|
121
|
-
* The Func section metadata provide
|
130
|
+
* The Func section metadata provide information for implemented funcs
|
122
131
|
* in order to have the correct index we shift the index by number of external
|
123
132
|
* functions.
|
124
133
|
*
|
@@ -169,7 +178,9 @@ const createDefaultInitForGlobal = globalType => {
|
|
169
178
|
*
|
170
179
|
* Note that globals will become mutable.
|
171
180
|
*
|
172
|
-
* @param {Object} state
|
181
|
+
* @param {Object} state transformation state
|
182
|
+
* @param {Object} state.ast Module's ast
|
183
|
+
* @param {t.Instruction[]} state.additionalInitCode list of addition instructions for the init function
|
173
184
|
* @returns {ArrayBufferTransform} transform
|
174
185
|
*/
|
175
186
|
const rewriteImportedGlobals = state => bin => {
|
@@ -180,7 +191,7 @@ const rewriteImportedGlobals = state => bin => {
|
|
180
191
|
bin = editWithAST(state.ast, bin, {
|
181
192
|
ModuleImport(path) {
|
182
193
|
if (t.isGlobalType(path.node.descr)) {
|
183
|
-
const globalType = path.node.descr;
|
194
|
+
const globalType = /** @type {TODO} */ (path.node.descr);
|
184
195
|
|
185
196
|
globalType.mutability = "var";
|
186
197
|
|
@@ -197,6 +208,9 @@ const rewriteImportedGlobals = state => bin => {
|
|
197
208
|
|
198
209
|
// in order to preserve non-imported global's order we need to re-inject
|
199
210
|
// those as well
|
211
|
+
/**
|
212
|
+
* @param {NodePath<Global>} path path
|
213
|
+
*/
|
200
214
|
Global(path) {
|
201
215
|
const { node } = path;
|
202
216
|
const [init] = node.init;
|
@@ -246,6 +260,9 @@ const rewriteExportNames =
|
|
246
260
|
({ ast, moduleGraph, module, externalExports, runtime }) =>
|
247
261
|
bin => {
|
248
262
|
return editWithAST(ast, bin, {
|
263
|
+
/**
|
264
|
+
* @param {NodePath<ModuleExport>} path path
|
265
|
+
*/
|
249
266
|
ModuleExport(path) {
|
250
267
|
const isExternal = externalExports.has(path.node.name);
|
251
268
|
if (isExternal) {
|
@@ -259,7 +276,7 @@ const rewriteExportNames =
|
|
259
276
|
path.remove();
|
260
277
|
return;
|
261
278
|
}
|
262
|
-
path.node.name = usedName;
|
279
|
+
path.node.name = /** @type {string} */ (usedName);
|
263
280
|
}
|
264
281
|
});
|
265
282
|
};
|
@@ -275,6 +292,9 @@ const rewriteImports =
|
|
275
292
|
({ ast, usedDependencyMap }) =>
|
276
293
|
bin => {
|
277
294
|
return editWithAST(ast, bin, {
|
295
|
+
/**
|
296
|
+
* @param {NodePath<ModuleImport>} path path
|
297
|
+
*/
|
278
298
|
ModuleImport(path) {
|
279
299
|
const result = usedDependencyMap.get(
|
280
300
|
path.node.module + ":" + path.node.name
|
@@ -326,6 +346,7 @@ const addInitFunction =
|
|
326
346
|
);
|
327
347
|
});
|
328
348
|
|
349
|
+
/** @type {Instruction[]} */
|
329
350
|
const funcBody = [];
|
330
351
|
importedGlobals.forEach((importedGlobal, index) => {
|
331
352
|
const args = [t.indexLiteral(index)];
|
@@ -19,6 +19,7 @@ const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDe
|
|
19
19
|
/** @typedef {import("../Dependency")} Dependency */
|
20
20
|
/** @typedef {import("../DependencyTemplates")} DependencyTemplates */
|
21
21
|
/** @typedef {import("../Generator").GenerateContext} GenerateContext */
|
22
|
+
/** @typedef {import("../Module")} Module */
|
22
23
|
/** @typedef {import("../NormalModule")} NormalModule */
|
23
24
|
/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */
|
24
25
|
|
@@ -127,7 +128,7 @@ class WebAssemblyJavascriptGenerator extends Generator {
|
|
127
128
|
const defineStatement = Template.asString([
|
128
129
|
`${exportProp} = ${runtimeTemplate.exportFromImport({
|
129
130
|
moduleGraph,
|
130
|
-
module: moduleGraph.getModule(dep),
|
131
|
+
module: /** @type {Module} */ (moduleGraph.getModule(dep)),
|
131
132
|
request: dep.request,
|
132
133
|
importVar: importData.importVar,
|
133
134
|
originModule: module,
|
@@ -97,8 +97,9 @@ class WebAssemblyParser extends Parser {
|
|
97
97
|
// extract imports and exports
|
98
98
|
/** @type {string[]} */
|
99
99
|
const exports = [];
|
100
|
-
|
101
|
-
|
100
|
+
const buildMeta = /** @type {BuildMeta} */ (state.module.buildMeta);
|
101
|
+
/** @type {Record<string, string> | undefined} */
|
102
|
+
let jsIncompatibleExports = (buildMeta.jsIncompatibleExports = undefined);
|
102
103
|
|
103
104
|
/** @type {TODO[]} */
|
104
105
|
const importedGlobals = [];
|
@@ -118,7 +119,8 @@ class WebAssemblyParser extends Parser {
|
|
118
119
|
if (incompatibleType) {
|
119
120
|
if (jsIncompatibleExports === undefined) {
|
120
121
|
jsIncompatibleExports =
|
121
|
-
|
122
|
+
/** @type {BuildMeta} */
|
123
|
+
(state.module.buildMeta).jsIncompatibleExports = {};
|
122
124
|
}
|
123
125
|
jsIncompatibleExports[node.name] = incompatibleType;
|
124
126
|
}
|
@@ -127,7 +129,8 @@ class WebAssemblyParser extends Parser {
|
|
127
129
|
exports.push(node.name);
|
128
130
|
|
129
131
|
if (node.descr && node.descr.exportType === "Global") {
|
130
|
-
const refNode =
|
132
|
+
const refNode =
|
133
|
+
importedGlobals[/** @type {TODO} */ (node.descr.id.value)];
|
131
134
|
if (refNode) {
|
132
135
|
const dep = new WebAssemblyExportImportedDependency(
|
133
136
|
node.name,
|
@@ -15,6 +15,7 @@ const compileBooleanMatcher = require("../util/compileBooleanMatcher");
|
|
15
15
|
|
16
16
|
/** @typedef {import("../Chunk")} Chunk */
|
17
17
|
/** @typedef {import("../ChunkGraph")} ChunkGraph */
|
18
|
+
/** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
|
18
19
|
|
19
20
|
/**
|
20
21
|
* @typedef {Object} JsonpCompilationPluginHooks
|
@@ -48,7 +49,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
48
49
|
}
|
49
50
|
|
50
51
|
/**
|
51
|
-
* @param {
|
52
|
+
* @param {ReadOnlyRuntimeRequirements} runtimeRequirements runtime requirements
|
52
53
|
*/
|
53
54
|
constructor(runtimeRequirements) {
|
54
55
|
super("jsonp chunk loading", RuntimeModule.STAGE_ATTACH);
|
package/lib/webpack.js
CHANGED
@@ -20,6 +20,7 @@ const NodeEnvironmentPlugin = require("./node/NodeEnvironmentPlugin");
|
|
20
20
|
const memoize = require("./util/memoize");
|
21
21
|
|
22
22
|
/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */
|
23
|
+
/** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */
|
23
24
|
/** @typedef {import("./Compiler").WatchOptions} WatchOptions */
|
24
25
|
/** @typedef {import("./MultiCompiler").MultiCompilerOptions} MultiCompilerOptions */
|
25
26
|
/** @typedef {import("./MultiStats")} MultiStats */
|
@@ -30,7 +31,7 @@ const getValidateSchema = memoize(() => require("./validateSchema"));
|
|
30
31
|
/**
|
31
32
|
* @template T
|
32
33
|
* @callback Callback
|
33
|
-
* @param {Error
|
34
|
+
* @param {Error | null} err
|
34
35
|
* @param {T=} stats
|
35
36
|
* @returns {void}
|
36
37
|
*/
|
@@ -71,7 +72,8 @@ const createCompiler = rawOptions => {
|
|
71
72
|
if (Array.isArray(options.plugins)) {
|
72
73
|
for (const plugin of options.plugins) {
|
73
74
|
if (typeof plugin === "function") {
|
74
|
-
|
75
|
+
/** @type {WebpackPluginFunction} */
|
76
|
+
(plugin).call(compiler, compiler);
|
75
77
|
} else if (plugin) {
|
76
78
|
plugin.apply(compiler);
|
77
79
|
}
|
@@ -111,7 +113,7 @@ const webpack = /** @type {WebpackFunctionSingle & WebpackFunctionMulti} */ (
|
|
111
113
|
/**
|
112
114
|
* @param {WebpackOptions | (ReadonlyArray<WebpackOptions> & MultiCompilerOptions)} options options
|
113
115
|
* @param {Callback<Stats> & Callback<MultiStats>=} callback callback
|
114
|
-
* @returns {Compiler | MultiCompiler} Compiler or MultiCompiler
|
116
|
+
* @returns {Compiler | MultiCompiler | null} Compiler or MultiCompiler
|
115
117
|
*/
|
116
118
|
(options, callback) => {
|
117
119
|
const create = () => {
|
@@ -154,13 +156,17 @@ const webpack = /** @type {WebpackFunctionSingle & WebpackFunctionMulti} */ (
|
|
154
156
|
} else {
|
155
157
|
compiler.run((err, stats) => {
|
156
158
|
compiler.close(err2 => {
|
157
|
-
callback(
|
159
|
+
callback(
|
160
|
+
err || err2,
|
161
|
+
/** @type {options extends WebpackOptions ? Stats : MultiStats} */
|
162
|
+
(stats)
|
163
|
+
);
|
158
164
|
});
|
159
165
|
});
|
160
166
|
}
|
161
167
|
return compiler;
|
162
168
|
} catch (err) {
|
163
|
-
process.nextTick(() => callback(err));
|
169
|
+
process.nextTick(() => callback(/** @type {Error} */ (err)));
|
164
170
|
return null;
|
165
171
|
}
|
166
172
|
} else {
|
@@ -18,10 +18,11 @@ const { getUndoPath } = require("../util/identifier");
|
|
18
18
|
/** @typedef {import("../Chunk")} Chunk */
|
19
19
|
/** @typedef {import("../ChunkGraph")} ChunkGraph */
|
20
20
|
/** @typedef {import("../Compilation")} Compilation */
|
21
|
+
/** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
|
21
22
|
|
22
23
|
class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
|
23
24
|
/**
|
24
|
-
* @param {
|
25
|
+
* @param {ReadOnlyRuntimeRequirements} runtimeRequirements runtime requirements
|
25
26
|
* @param {boolean} withCreateScriptUrl with createScriptUrl support
|
26
27
|
*/
|
27
28
|
constructor(runtimeRequirements, withCreateScriptUrl) {
|
package/package.json
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.91.0",
|
4
4
|
"author": "Tobias Koppers @sokra",
|
5
5
|
"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.",
|
6
6
|
"license": "MIT",
|
7
7
|
"dependencies": {
|
8
8
|
"@types/eslint-scope": "^3.7.3",
|
9
9
|
"@types/estree": "^1.0.5",
|
10
|
-
"@webassemblyjs/ast": "^1.
|
11
|
-
"@webassemblyjs/wasm-edit": "^1.
|
12
|
-
"@webassemblyjs/wasm-parser": "^1.
|
10
|
+
"@webassemblyjs/ast": "^1.12.1",
|
11
|
+
"@webassemblyjs/wasm-edit": "^1.12.1",
|
12
|
+
"@webassemblyjs/wasm-parser": "^1.12.1",
|
13
13
|
"acorn": "^8.7.1",
|
14
14
|
"acorn-import-assertions": "^1.9.0",
|
15
15
|
"browserslist": "^4.21.10",
|
16
16
|
"chrome-trace-event": "^1.0.2",
|
17
|
-
"enhanced-resolve": "^5.
|
17
|
+
"enhanced-resolve": "^5.16.0",
|
18
18
|
"es-module-lexer": "^1.2.1",
|
19
19
|
"eslint-scope": "5.1.1",
|
20
20
|
"events": "^3.2.0",
|
21
21
|
"glob-to-regexp": "^0.4.1",
|
22
|
-
"graceful-fs": "^4.2.
|
22
|
+
"graceful-fs": "^4.2.11",
|
23
23
|
"json-parse-even-better-errors": "^2.3.1",
|
24
24
|
"loader-runner": "^4.2.0",
|
25
25
|
"mime-types": "^2.1.27",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"schema-utils": "^3.2.0",
|
28
28
|
"tapable": "^2.1.1",
|
29
29
|
"terser-webpack-plugin": "^5.3.10",
|
30
|
-
"watchpack": "^2.4.
|
30
|
+
"watchpack": "^2.4.1",
|
31
31
|
"webpack-sources": "^3.2.3"
|
32
32
|
},
|
33
33
|
"peerDependenciesMeta": {
|
@@ -38,9 +38,10 @@
|
|
38
38
|
"devDependencies": {
|
39
39
|
"@babel/core": "^7.23.7",
|
40
40
|
"@babel/preset-react": "^7.23.3",
|
41
|
+
"@types/glob-to-regexp": "^0.4.4",
|
41
42
|
"@types/jest": "^29.5.11",
|
42
43
|
"@types/mime-types": "^2.1.4",
|
43
|
-
"@types/node": "^20.
|
44
|
+
"@types/node": "^20.11.27",
|
44
45
|
"assemblyscript": "^0.27.22",
|
45
46
|
"babel-loader": "^8.1.0",
|
46
47
|
"benchmark": "^2.1.4",
|
@@ -49,7 +50,7 @@
|
|
49
50
|
"coffeescript": "^2.5.1",
|
50
51
|
"core-js": "^3.6.5",
|
51
52
|
"coveralls": "^3.1.0",
|
52
|
-
"cspell": "^6.
|
53
|
+
"cspell": "^8.6.0",
|
53
54
|
"css-loader": "^5.0.1",
|
54
55
|
"date-fns": "^3.2.0",
|
55
56
|
"es5-ext": "^0.10.53",
|
@@ -61,9 +62,9 @@
|
|
61
62
|
"eslint-plugin-n": "^16.6.2",
|
62
63
|
"eslint-plugin-prettier": "^5.1.3",
|
63
64
|
"file-loader": "^6.0.0",
|
64
|
-
"fork-ts-checker-webpack-plugin": "^
|
65
|
+
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
65
66
|
"hash-wasm": "^4.9.0",
|
66
|
-
"husky": "^
|
67
|
+
"husky": "^9.0.11",
|
67
68
|
"is-ci": "^3.0.0",
|
68
69
|
"istanbul": "^0.4.5",
|
69
70
|
"jest": "^29.7.0",
|
@@ -76,16 +77,16 @@
|
|
76
77
|
"json5": "^2.1.3",
|
77
78
|
"less": "^4.0.0",
|
78
79
|
"less-loader": "^8.0.0",
|
79
|
-
"lint-staged": "^
|
80
|
+
"lint-staged": "^15.2.2",
|
80
81
|
"lodash": "^4.17.19",
|
81
82
|
"lodash-es": "^4.17.15",
|
82
|
-
"memfs": "^
|
83
|
+
"memfs": "^4.7.7",
|
83
84
|
"mini-css-extract-plugin": "^1.6.1",
|
84
85
|
"mini-svg-data-uri": "^1.2.3",
|
85
86
|
"nyc": "^15.1.0",
|
86
|
-
"open-cli": "^
|
87
|
-
"prettier-2": "npm:prettier@^2",
|
87
|
+
"open-cli": "^8.0.0",
|
88
88
|
"prettier": "^3.2.1",
|
89
|
+
"prettier-2": "npm:prettier@^2",
|
89
90
|
"pretty-format": "^29.5.0",
|
90
91
|
"pug": "^3.0.0",
|
91
92
|
"pug-loader": "^2.4.0",
|
@@ -99,11 +100,11 @@
|
|
99
100
|
"style-loader": "^2.0.0",
|
100
101
|
"terser": "^5.26.0",
|
101
102
|
"toml": "^3.0.0",
|
102
|
-
"tooling": "webpack/tooling#v1.23.
|
103
|
-
"ts-loader": "^9.
|
104
|
-
"typescript": "^5.
|
103
|
+
"tooling": "webpack/tooling#v1.23.3",
|
104
|
+
"ts-loader": "^9.5.1",
|
105
|
+
"typescript": "^5.4.2",
|
105
106
|
"url-loader": "^4.1.0",
|
106
|
-
"wast-loader": "^1.
|
107
|
+
"wast-loader": "^1.12.1",
|
107
108
|
"webassembly-feature": "1.3.0",
|
108
109
|
"webpack-cli": "^5.0.1",
|
109
110
|
"xxhashjs": "^0.2.2",
|
@@ -154,12 +155,12 @@
|
|
154
155
|
"type-lint": "tsc",
|
155
156
|
"typings-test": "tsc -p tsconfig.types.test.json",
|
156
157
|
"module-typings-test": "tsc -p tsconfig.module.test.json",
|
157
|
-
"spellcheck": "cspell --no-
|
158
|
+
"spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
|
158
159
|
"special-lint": "node node_modules/tooling/lockfile-lint && node node_modules/tooling/schemas-lint && node node_modules/tooling/inherit-types && node node_modules/tooling/format-schemas && node tooling/generate-runtime-code.js && node tooling/generate-wasm-code.js && node node_modules/tooling/format-file-header && node node_modules/tooling/compile-to-definitions && node node_modules/tooling/precompile-schemas && node node_modules/tooling/generate-types --no-template-literals",
|
159
160
|
"special-lint-fix": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/format-schemas --write && node tooling/generate-runtime-code.js --write && node tooling/generate-wasm-code.js --write && node node_modules/tooling/format-file-header --write && node node_modules/tooling/compile-to-definitions --write && node node_modules/tooling/precompile-schemas --write && node node_modules/tooling/generate-types --no-template-literals --write",
|
160
161
|
"fix": "yarn code-lint --fix && yarn special-lint-fix && yarn pretty-lint-fix",
|
161
|
-
"prepare": "husky
|
162
|
-
"pretty-lint-base": "node node_modules/prettier/bin/prettier.cjs --cache .",
|
162
|
+
"prepare": "husky",
|
163
|
+
"pretty-lint-base": "node node_modules/prettier/bin/prettier.cjs --cache --ignore-unknown .",
|
163
164
|
"pretty-lint-fix": "yarn pretty-lint-base --loglevel warn --write",
|
164
165
|
"pretty-lint": "yarn pretty-lint-base --check",
|
165
166
|
"yarn-lint": "yarn-deduplicate --fail --list -s highest yarn.lock",
|
@@ -182,10 +183,8 @@
|
|
182
183
|
"eslint --cache --fix"
|
183
184
|
],
|
184
185
|
"*": [
|
185
|
-
"prettier --cache --ignore-unknown"
|
186
|
-
|
187
|
-
"*.md|{.github,benchmark,bin,examples,hot,lib,schemas,setup,tooling}/**/*.{md,yml,yaml,js,json}": [
|
188
|
-
"cspell"
|
186
|
+
"prettier --cache --write --ignore-unknown",
|
187
|
+
"cspell --cache --no-must-find-files"
|
189
188
|
]
|
190
189
|
}
|
191
190
|
}
|