webpack 5.99.6 → 5.99.8
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/lib/AutomaticPrefetchPlugin.js +21 -22
- package/lib/BannerPlugin.js +31 -35
- package/lib/CleanPlugin.js +5 -3
- package/lib/Compilation.js +21 -15
- package/lib/Compiler.js +2 -1
- package/lib/ContextExclusionPlugin.js +4 -2
- package/lib/ContextModule.js +1 -1
- package/lib/ContextModuleFactory.js +1 -2
- package/lib/ContextReplacementPlugin.js +7 -4
- package/lib/DefinePlugin.js +2 -2
- package/lib/DelegatedModule.js +18 -8
- package/lib/DelegatedModuleFactoryPlugin.js +9 -7
- package/lib/DelegatedPlugin.js +4 -2
- package/lib/DllEntryPlugin.js +4 -2
- package/lib/DllPlugin.js +5 -3
- package/lib/DllReferencePlugin.js +56 -60
- package/lib/DynamicEntryPlugin.js +4 -2
- package/lib/EntryOptionPlugin.js +3 -1
- package/lib/EntryPlugin.js +4 -2
- package/lib/EnvironmentPlugin.js +4 -2
- package/lib/EvalDevToolModulePlugin.js +9 -7
- package/lib/EvalSourceMapDevToolPlugin.js +138 -139
- package/lib/ExportsInfo.js +35 -16
- package/lib/ExternalModule.js +6 -5
- package/lib/ExternalsPlugin.js +3 -1
- package/lib/FileSystemInfo.js +2 -2
- package/lib/FlagDependencyExportsPlugin.js +2 -1
- package/lib/IgnorePlugin.js +6 -4
- package/lib/IgnoreWarningsPlugin.js +4 -2
- package/lib/LibManifestPlugin.js +5 -6
- package/lib/LoaderOptionsPlugin.js +4 -2
- package/lib/LoaderTargetPlugin.js +4 -2
- package/lib/Module.js +19 -12
- package/lib/ModuleFilenameHelpers.js +8 -4
- package/lib/ModuleInfoHeaderPlugin.js +11 -12
- package/lib/MultiCompiler.js +5 -3
- package/lib/NoEmitOnErrorsPlugin.js +5 -3
- package/lib/NormalModule.js +13 -8
- package/lib/NormalModuleReplacementPlugin.js +33 -36
- package/lib/PlatformPlugin.js +3 -1
- package/lib/PrefetchPlugin.js +4 -2
- package/lib/ProgressPlugin.js +23 -26
- package/lib/RecordIdsPlugin.js +72 -102
- package/lib/RuntimePlugin.js +34 -32
- package/lib/SourceMapDevToolPlugin.js +9 -8
- package/lib/WarnCaseSensitiveModulesPlugin.js +36 -37
- package/lib/WarnNoModeSetPlugin.js +3 -1
- package/lib/WatchIgnorePlugin.js +3 -1
- package/lib/WebpackError.js +11 -3
- package/lib/WebpackOptionsApply.js +6 -7
- package/lib/asset/AssetGenerator.js +2 -2
- package/lib/async-modules/InferAsyncModulesPlugin.js +25 -26
- package/lib/cache/IdleFileCachePlugin.js +11 -12
- package/lib/cache/MemoryWithGcCachePlugin.js +7 -5
- package/lib/cache/ResolverCachePlugin.js +8 -6
- package/lib/cli.js +5 -1
- package/lib/config/defaults.js +10 -6
- package/lib/config/normalization.js +14 -8
- package/lib/container/ContainerReferencePlugin.js +24 -26
- package/lib/container/ModuleFederationPlugin.js +2 -1
- package/lib/css/CssGenerator.js +1 -1
- package/lib/css/CssModulesPlugin.js +8 -6
- package/lib/debug/ProfilingPlugin.js +18 -21
- package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -1
- package/lib/dependencies/ContextElementDependency.js +1 -1
- package/lib/dependencies/CssLocalIdentifierDependency.js +2 -2
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +9 -15
- package/lib/dependencies/HarmonyTopLevelThisParserPlugin.js +15 -15
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +4 -2
- package/lib/dependencies/LoaderPlugin.js +5 -3
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +46 -46
- package/lib/dependencies/RequireContextPlugin.js +2 -1
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +94 -100
- package/lib/dependencies/WorkerPlugin.js +2 -2
- package/lib/esm/ModuleChunkLoadingPlugin.js +72 -73
- package/lib/hmr/HotModuleReplacement.runtime.js +0 -1
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +0 -2
- package/lib/hmr/LazyCompilationPlugin.js +17 -18
- package/lib/ids/ChunkModuleIdRangePlugin.js +6 -6
- package/lib/ids/DeterministicModuleIdsPlugin.js +47 -48
- package/lib/ids/HashedModuleIdsPlugin.js +4 -2
- package/lib/ids/NamedChunkIdsPlugin.js +4 -2
- package/lib/ids/NamedModuleIdsPlugin.js +4 -2
- package/lib/ids/NaturalChunkIdsPlugin.js +4 -2
- package/lib/ids/NaturalModuleIdsPlugin.js +4 -2
- package/lib/ids/OccurrenceChunkIdsPlugin.js +4 -2
- package/lib/ids/OccurrenceModuleIdsPlugin.js +4 -2
- package/lib/index.js +11 -0
- package/lib/javascript/JavascriptModulesPlugin.js +2 -2
- package/lib/javascript/JavascriptParser.js +634 -656
- package/lib/json/JsonModulesPlugin.js +4 -4
- package/lib/library/AbstractLibraryPlugin.js +1 -1
- package/lib/library/ModuleLibraryPlugin.js +60 -42
- package/lib/node/CommonJsChunkLoadingPlugin.js +69 -73
- package/lib/node/NodeEnvironmentPlugin.js +3 -1
- package/lib/node/nodeConsole.js +3 -2
- package/lib/optimize/AggressiveSplittingPlugin.js +224 -232
- package/lib/optimize/ConcatenatedModule.js +15 -16
- package/lib/optimize/FlagIncludedChunksPlugin.js +92 -97
- package/lib/optimize/LimitChunkCountPlugin.js +4 -2
- package/lib/optimize/MangleExportsPlugin.js +15 -16
- package/lib/optimize/MinChunkSizePlugin.js +4 -2
- package/lib/optimize/ModuleConcatenationPlugin.js +6 -4
- package/lib/optimize/RealContentHashPlugin.js +4 -2
- package/lib/optimize/RemoveEmptyChunksPlugin.js +5 -3
- package/lib/optimize/RemoveParentModulesPlugin.js +4 -2
- package/lib/optimize/RuntimeChunkPlugin.js +21 -23
- package/lib/optimize/SideEffectsFlagPlugin.js +9 -6
- package/lib/optimize/SplitChunksPlugin.js +9 -7
- package/lib/performance/SizeLimitsPlugin.js +3 -1
- package/lib/prefetch/ChunkPrefetchPreloadPlugin.js +61 -62
- package/lib/rules/BasicEffectRulePlugin.js +1 -2
- package/lib/rules/ObjectMatcherRulePlugin.js +2 -1
- package/lib/rules/RuleSetCompiler.js +19 -5
- package/lib/rules/UseEffectRulePlugin.js +4 -6
- package/lib/runtime/StartupChunkDependenciesPlugin.js +39 -42
- package/lib/schemes/DataUriPlugin.js +5 -3
- package/lib/schemes/FileUriPlugin.js +5 -3
- package/lib/schemes/HttpUriPlugin.js +186 -188
- package/lib/serialization/AggregateErrorSerializer.js +42 -0
- package/lib/serialization/ErrorObjectSerializer.js +7 -2
- package/lib/serialization/ObjectMiddleware.js +13 -0
- package/lib/sharing/ProvideSharedPlugin.js +6 -4
- package/lib/stats/DefaultStatsFactoryPlugin.js +89 -33
- package/lib/stats/DefaultStatsPresetPlugin.js +25 -20
- package/lib/stats/DefaultStatsPrinterPlugin.js +306 -341
- package/lib/util/concatenate.js +4 -2
- package/lib/util/createHash.js +3 -3
- package/lib/wasm-sync/WasmFinalizeExportsPlugin.js +55 -57
- package/lib/web/JsonpChunkLoadingPlugin.js +73 -74
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +77 -78
- package/package.json +35 -30
- package/schemas/WebpackOptions.check.d.ts +1 -1
- package/schemas/WebpackOptions.check.js +2 -2
- package/schemas/WebpackOptions.json +267 -26
- package/schemas/plugins/BannerPlugin.check.d.ts +1 -1
- package/schemas/plugins/BannerPlugin.check.js +1 -1
- package/schemas/plugins/DllPlugin.check.d.ts +1 -1
- package/schemas/plugins/DllPlugin.check.js +1 -1
- package/schemas/plugins/DllReferencePlugin.check.d.ts +1 -1
- package/schemas/plugins/DllReferencePlugin.check.js +1 -1
- package/schemas/plugins/HashedModuleIdsPlugin.check.d.ts +1 -1
- package/schemas/plugins/HashedModuleIdsPlugin.check.js +1 -1
- package/schemas/plugins/IgnorePlugin.check.d.ts +1 -1
- package/schemas/plugins/IgnorePlugin.check.js +1 -1
- package/schemas/plugins/LoaderOptionsPlugin.check.d.ts +1 -1
- package/schemas/plugins/LoaderOptionsPlugin.check.js +1 -1
- package/schemas/plugins/ProgressPlugin.check.d.ts +1 -1
- package/schemas/plugins/ProgressPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.check.d.ts +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.json +2 -2
- package/schemas/plugins/WatchIgnorePlugin.check.d.ts +1 -1
- package/schemas/plugins/WatchIgnorePlugin.check.js +1 -1
- package/schemas/plugins/asset/AssetGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/asset/AssetGeneratorOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetInlineGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/asset/AssetInlineGeneratorOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetParserOptions.check.d.ts +1 -1
- package/schemas/plugins/asset/AssetParserOptions.check.js +1 -1
- package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/asset/AssetResourceGeneratorOptions.check.js +1 -1
- package/schemas/plugins/container/ContainerPlugin.check.d.ts +1 -1
- package/schemas/plugins/container/ContainerPlugin.check.js +1 -1
- package/schemas/plugins/container/ContainerReferencePlugin.check.d.ts +1 -1
- package/schemas/plugins/container/ContainerReferencePlugin.check.js +1 -1
- package/schemas/plugins/container/ExternalsType.check.d.ts +1 -1
- package/schemas/plugins/container/ExternalsType.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.d.ts +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssAutoParserOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssAutoParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGlobalParserOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssGlobalParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssModuleParserOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssModuleParserOptions.check.js +1 -1
- package/schemas/plugins/css/CssParserOptions.check.d.ts +1 -1
- package/schemas/plugins/css/CssParserOptions.check.js +1 -1
- package/schemas/plugins/debug/ProfilingPlugin.check.d.ts +1 -1
- package/schemas/plugins/debug/ProfilingPlugin.check.js +1 -1
- package/schemas/plugins/ids/OccurrenceChunkIdsPlugin.check.d.ts +1 -1
- package/schemas/plugins/ids/OccurrenceChunkIdsPlugin.check.js +1 -1
- package/schemas/plugins/ids/OccurrenceModuleIdsPlugin.check.d.ts +1 -1
- package/schemas/plugins/ids/OccurrenceModuleIdsPlugin.check.js +1 -1
- package/schemas/plugins/json/JsonModulesPluginGenerator.check.d.ts +7 -0
- package/schemas/plugins/{JsonModulesPluginGenerator.check.js → json/JsonModulesPluginGenerator.check.js} +1 -1
- package/schemas/plugins/json/JsonModulesPluginGenerator.json +3 -0
- package/schemas/plugins/json/JsonModulesPluginParser.check.d.ts +7 -0
- package/schemas/plugins/{JsonModulesPluginParser.check.js → json/JsonModulesPluginParser.check.js} +1 -1
- package/schemas/plugins/json/JsonModulesPluginParser.json +3 -0
- package/schemas/plugins/optimize/AggressiveSplittingPlugin.check.d.ts +1 -1
- package/schemas/plugins/optimize/AggressiveSplittingPlugin.check.js +1 -1
- package/schemas/plugins/optimize/LimitChunkCountPlugin.check.d.ts +1 -1
- package/schemas/plugins/optimize/LimitChunkCountPlugin.check.js +1 -1
- package/schemas/plugins/optimize/MergeDuplicateChunksPlugin.check.d.ts +1 -1
- package/schemas/plugins/optimize/MergeDuplicateChunksPlugin.check.js +1 -1
- package/schemas/plugins/optimize/MinChunkSizePlugin.check.d.ts +1 -1
- package/schemas/plugins/optimize/MinChunkSizePlugin.check.js +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.check.d.ts +1 -1
- package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
- package/schemas/plugins/sharing/ConsumeSharedPlugin.check.d.ts +1 -1
- package/schemas/plugins/sharing/ConsumeSharedPlugin.check.js +1 -1
- package/schemas/plugins/sharing/ProvideSharedPlugin.check.d.ts +1 -1
- package/schemas/plugins/sharing/ProvideSharedPlugin.check.js +1 -1
- package/schemas/plugins/sharing/SharePlugin.check.d.ts +1 -1
- package/schemas/plugins/sharing/SharePlugin.check.js +1 -1
- package/types.d.ts +587 -207
- package/schemas/plugins/JsonModulesPluginGenerator.check.d.ts +0 -7
- package/schemas/plugins/JsonModulesPluginGenerator.json +0 -11
- package/schemas/plugins/JsonModulesPluginParser.check.d.ts +0 -7
- package/schemas/plugins/JsonModulesPluginParser.json +0 -16
package/lib/util/concatenate.js
CHANGED
@@ -198,11 +198,13 @@ const RESERVED_NAMES = new Set(
|
|
198
198
|
.split(",")
|
199
199
|
);
|
200
200
|
|
201
|
+
/** @typedef {{ usedNames: UsedNames, alreadyCheckedScopes: ScopeSet }} ScopeInfo */
|
202
|
+
|
201
203
|
/**
|
202
|
-
* @param {Map<string,
|
204
|
+
* @param {Map<string, ScopeInfo>} usedNamesInScopeInfo used names in scope info
|
203
205
|
* @param {string} module module identifier
|
204
206
|
* @param {string} id export id
|
205
|
-
* @returns {
|
207
|
+
* @returns {ScopeInfo} info
|
206
208
|
*/
|
207
209
|
const getUsedNamesInScopeInfo = (usedNamesInScopeInfo, module, id) => {
|
208
210
|
const key = `${module}-${id}`;
|
package/lib/util/createHash.js
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
|
8
8
|
const Hash = require("./Hash");
|
9
9
|
|
10
|
+
/** @typedef {import("../../declarations/WebpackOptions").HashFunction} HashFunction */
|
11
|
+
|
10
12
|
const BULK_SIZE = 2000;
|
11
13
|
|
12
14
|
// We are using an object instead of a Map as this will stay static during the runtime
|
@@ -141,11 +143,9 @@ let createMd4;
|
|
141
143
|
/** @type {typeof import("./hash/BatchedHash") | undefined} */
|
142
144
|
let BatchedHash;
|
143
145
|
|
144
|
-
/** @typedef {string | typeof Hash} Algorithm */
|
145
|
-
|
146
146
|
/**
|
147
147
|
* Creates a hash by name or function
|
148
|
-
* @param {
|
148
|
+
* @param {HashFunction} algorithm the algorithm name or a constructor creating a hash
|
149
149
|
* @returns {Hash} the hash
|
150
150
|
*/
|
151
151
|
module.exports = algorithm => {
|
@@ -13,6 +13,8 @@ const UnsupportedWebAssemblyFeatureError = require("./UnsupportedWebAssemblyFeat
|
|
13
13
|
/** @typedef {import("../Module")} Module */
|
14
14
|
/** @typedef {import("../Module").BuildMeta} BuildMeta */
|
15
15
|
|
16
|
+
const PLUGIN_NAME = "WasmFinalizeExportsPlugin";
|
17
|
+
|
16
18
|
class WasmFinalizeExportsPlugin {
|
17
19
|
/**
|
18
20
|
* Apply the plugin
|
@@ -20,72 +22,68 @@ class WasmFinalizeExportsPlugin {
|
|
20
22
|
* @returns {void}
|
21
23
|
*/
|
22
24
|
apply(compiler) {
|
23
|
-
compiler.hooks.compilation.tap(
|
24
|
-
compilation.hooks.finishModules.tap(
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
/** @type {BuildMeta} */
|
32
|
-
(module.buildMeta).jsIncompatibleExports;
|
25
|
+
compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
|
26
|
+
compilation.hooks.finishModules.tap(PLUGIN_NAME, modules => {
|
27
|
+
for (const module of modules) {
|
28
|
+
// 1. if a WebAssembly module
|
29
|
+
if (module.type.startsWith("webassembly") === true) {
|
30
|
+
const jsIncompatibleExports =
|
31
|
+
/** @type {BuildMeta} */
|
32
|
+
(module.buildMeta).jsIncompatibleExports;
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
if (jsIncompatibleExports === undefined) {
|
35
|
+
continue;
|
36
|
+
}
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
38
|
+
for (const connection of compilation.moduleGraph.getIncomingConnections(
|
39
|
+
module
|
40
|
+
)) {
|
41
|
+
// 2. is active and referenced by a non-WebAssembly module
|
42
|
+
if (
|
43
|
+
connection.isTargetActive(undefined) &&
|
44
|
+
/** @type {Module} */
|
45
|
+
(connection.originModule).type.startsWith("webassembly") ===
|
46
|
+
false
|
47
|
+
) {
|
48
|
+
const referencedExports =
|
49
|
+
compilation.getDependencyReferencedExports(
|
50
|
+
/** @type {Dependency} */ (connection.dependency),
|
51
|
+
undefined
|
52
|
+
);
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
compilation.errors.push(error);
|
81
|
-
}
|
54
|
+
for (const info of referencedExports) {
|
55
|
+
const names = Array.isArray(info) ? info : info.name;
|
56
|
+
if (names.length === 0) continue;
|
57
|
+
const name = names[0];
|
58
|
+
if (typeof name === "object") continue;
|
59
|
+
// 3. and uses a func with an incompatible JS signature
|
60
|
+
if (
|
61
|
+
Object.prototype.hasOwnProperty.call(
|
62
|
+
jsIncompatibleExports,
|
63
|
+
name
|
64
|
+
)
|
65
|
+
) {
|
66
|
+
// 4. error
|
67
|
+
const error = new UnsupportedWebAssemblyFeatureError(
|
68
|
+
`Export "${name}" with ${jsIncompatibleExports[name]} can only be used for direct wasm to wasm dependencies\n` +
|
69
|
+
`It's used from ${
|
70
|
+
/** @type {Module} */
|
71
|
+
(connection.originModule).readableIdentifier(
|
72
|
+
compilation.requestShortener
|
73
|
+
)
|
74
|
+
} at ${formatLocation(
|
75
|
+
/** @type {Dependency} */ (connection.dependency).loc
|
76
|
+
)}.`
|
77
|
+
);
|
78
|
+
error.module = module;
|
79
|
+
compilation.errors.push(error);
|
82
80
|
}
|
83
81
|
}
|
84
82
|
}
|
85
83
|
}
|
86
84
|
}
|
87
85
|
}
|
88
|
-
);
|
86
|
+
});
|
89
87
|
});
|
90
88
|
}
|
91
89
|
}
|
@@ -11,6 +11,8 @@ const JsonpChunkLoadingRuntimeModule = require("./JsonpChunkLoadingRuntimeModule
|
|
11
11
|
/** @typedef {import("../Chunk")} Chunk */
|
12
12
|
/** @typedef {import("../Compiler")} Compiler */
|
13
13
|
|
14
|
+
const PLUGIN_NAME = "JsonpChunkLoadingPlugin";
|
15
|
+
|
14
16
|
class JsonpChunkLoadingPlugin {
|
15
17
|
/**
|
16
18
|
* Apply the plugin
|
@@ -18,82 +20,79 @@ class JsonpChunkLoadingPlugin {
|
|
18
20
|
* @returns {void}
|
19
21
|
*/
|
20
22
|
apply(compiler) {
|
21
|
-
compiler.hooks.thisCompilation.tap(
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
const
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
23
|
+
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, compilation => {
|
24
|
+
const globalChunkLoading = compilation.outputOptions.chunkLoading;
|
25
|
+
/**
|
26
|
+
* @param {Chunk} chunk chunk
|
27
|
+
* @returns {boolean} true, if wasm loading is enabled for the chunk
|
28
|
+
*/
|
29
|
+
const isEnabledForChunk = chunk => {
|
30
|
+
const options = chunk.getEntryOptions();
|
31
|
+
const chunkLoading =
|
32
|
+
options && options.chunkLoading !== undefined
|
33
|
+
? options.chunkLoading
|
34
|
+
: globalChunkLoading;
|
35
|
+
return chunkLoading === "jsonp";
|
36
|
+
};
|
37
|
+
const onceForChunkSet = new WeakSet();
|
38
|
+
/**
|
39
|
+
* @param {Chunk} chunk chunk
|
40
|
+
* @param {Set<string>} set runtime requirements
|
41
|
+
*/
|
42
|
+
const handler = (chunk, set) => {
|
43
|
+
if (onceForChunkSet.has(chunk)) return;
|
44
|
+
onceForChunkSet.add(chunk);
|
45
|
+
if (!isEnabledForChunk(chunk)) return;
|
46
|
+
set.add(RuntimeGlobals.moduleFactoriesAddOnly);
|
47
|
+
set.add(RuntimeGlobals.hasOwnProperty);
|
48
|
+
compilation.addRuntimeModule(
|
49
|
+
chunk,
|
50
|
+
new JsonpChunkLoadingRuntimeModule(set)
|
51
|
+
);
|
52
|
+
};
|
53
|
+
compilation.hooks.runtimeRequirementInTree
|
54
|
+
.for(RuntimeGlobals.ensureChunkHandlers)
|
55
|
+
.tap(PLUGIN_NAME, handler);
|
56
|
+
compilation.hooks.runtimeRequirementInTree
|
57
|
+
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
|
58
|
+
.tap(PLUGIN_NAME, handler);
|
59
|
+
compilation.hooks.runtimeRequirementInTree
|
60
|
+
.for(RuntimeGlobals.hmrDownloadManifest)
|
61
|
+
.tap(PLUGIN_NAME, handler);
|
62
|
+
compilation.hooks.runtimeRequirementInTree
|
63
|
+
.for(RuntimeGlobals.baseURI)
|
64
|
+
.tap(PLUGIN_NAME, handler);
|
65
|
+
compilation.hooks.runtimeRequirementInTree
|
66
|
+
.for(RuntimeGlobals.onChunksLoaded)
|
67
|
+
.tap(PLUGIN_NAME, handler);
|
68
|
+
|
69
|
+
compilation.hooks.runtimeRequirementInTree
|
70
|
+
.for(RuntimeGlobals.ensureChunkHandlers)
|
71
|
+
.tap(PLUGIN_NAME, (chunk, set) => {
|
72
|
+
if (!isEnabledForChunk(chunk)) return;
|
73
|
+
set.add(RuntimeGlobals.publicPath);
|
74
|
+
set.add(RuntimeGlobals.loadScript);
|
75
|
+
set.add(RuntimeGlobals.getChunkScriptFilename);
|
76
|
+
});
|
77
|
+
compilation.hooks.runtimeRequirementInTree
|
78
|
+
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
|
79
|
+
.tap(PLUGIN_NAME, (chunk, set) => {
|
45
80
|
if (!isEnabledForChunk(chunk)) return;
|
81
|
+
set.add(RuntimeGlobals.publicPath);
|
82
|
+
set.add(RuntimeGlobals.loadScript);
|
83
|
+
set.add(RuntimeGlobals.getChunkUpdateScriptFilename);
|
84
|
+
set.add(RuntimeGlobals.moduleCache);
|
85
|
+
set.add(RuntimeGlobals.hmrModuleData);
|
46
86
|
set.add(RuntimeGlobals.moduleFactoriesAddOnly);
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
);
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
compilation.hooks.runtimeRequirementInTree
|
57
|
-
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
|
58
|
-
.tap("JsonpChunkLoadingPlugin", handler);
|
59
|
-
compilation.hooks.runtimeRequirementInTree
|
60
|
-
.for(RuntimeGlobals.hmrDownloadManifest)
|
61
|
-
.tap("JsonpChunkLoadingPlugin", handler);
|
62
|
-
compilation.hooks.runtimeRequirementInTree
|
63
|
-
.for(RuntimeGlobals.baseURI)
|
64
|
-
.tap("JsonpChunkLoadingPlugin", handler);
|
65
|
-
compilation.hooks.runtimeRequirementInTree
|
66
|
-
.for(RuntimeGlobals.onChunksLoaded)
|
67
|
-
.tap("JsonpChunkLoadingPlugin", handler);
|
68
|
-
|
69
|
-
compilation.hooks.runtimeRequirementInTree
|
70
|
-
.for(RuntimeGlobals.ensureChunkHandlers)
|
71
|
-
.tap("JsonpChunkLoadingPlugin", (chunk, set) => {
|
72
|
-
if (!isEnabledForChunk(chunk)) return;
|
73
|
-
set.add(RuntimeGlobals.publicPath);
|
74
|
-
set.add(RuntimeGlobals.loadScript);
|
75
|
-
set.add(RuntimeGlobals.getChunkScriptFilename);
|
76
|
-
});
|
77
|
-
compilation.hooks.runtimeRequirementInTree
|
78
|
-
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
|
79
|
-
.tap("JsonpChunkLoadingPlugin", (chunk, set) => {
|
80
|
-
if (!isEnabledForChunk(chunk)) return;
|
81
|
-
set.add(RuntimeGlobals.publicPath);
|
82
|
-
set.add(RuntimeGlobals.loadScript);
|
83
|
-
set.add(RuntimeGlobals.getChunkUpdateScriptFilename);
|
84
|
-
set.add(RuntimeGlobals.moduleCache);
|
85
|
-
set.add(RuntimeGlobals.hmrModuleData);
|
86
|
-
set.add(RuntimeGlobals.moduleFactoriesAddOnly);
|
87
|
-
});
|
88
|
-
compilation.hooks.runtimeRequirementInTree
|
89
|
-
.for(RuntimeGlobals.hmrDownloadManifest)
|
90
|
-
.tap("JsonpChunkLoadingPlugin", (chunk, set) => {
|
91
|
-
if (!isEnabledForChunk(chunk)) return;
|
92
|
-
set.add(RuntimeGlobals.publicPath);
|
93
|
-
set.add(RuntimeGlobals.getUpdateManifestFilename);
|
94
|
-
});
|
95
|
-
}
|
96
|
-
);
|
87
|
+
});
|
88
|
+
compilation.hooks.runtimeRequirementInTree
|
89
|
+
.for(RuntimeGlobals.hmrDownloadManifest)
|
90
|
+
.tap(PLUGIN_NAME, (chunk, set) => {
|
91
|
+
if (!isEnabledForChunk(chunk)) return;
|
92
|
+
set.add(RuntimeGlobals.publicPath);
|
93
|
+
set.add(RuntimeGlobals.getUpdateManifestFilename);
|
94
|
+
});
|
95
|
+
});
|
97
96
|
}
|
98
97
|
}
|
99
98
|
|
@@ -12,6 +12,8 @@ const ImportScriptsChunkLoadingRuntimeModule = require("./ImportScriptsChunkLoad
|
|
12
12
|
/** @typedef {import("../Chunk")} Chunk */
|
13
13
|
/** @typedef {import("../Compiler")} Compiler */
|
14
14
|
|
15
|
+
const PLUGIN_NAME = "ImportScriptsChunkLoadingPlugin";
|
16
|
+
|
15
17
|
class ImportScriptsChunkLoadingPlugin {
|
16
18
|
/**
|
17
19
|
* Apply the plugin
|
@@ -23,86 +25,83 @@ class ImportScriptsChunkLoadingPlugin {
|
|
23
25
|
chunkLoading: "import-scripts",
|
24
26
|
asyncChunkLoading: true
|
25
27
|
}).apply(compiler);
|
26
|
-
compiler.hooks.thisCompilation.tap(
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
const
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
28
|
+
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, compilation => {
|
29
|
+
const globalChunkLoading = compilation.outputOptions.chunkLoading;
|
30
|
+
/**
|
31
|
+
* @param {Chunk} chunk chunk
|
32
|
+
* @returns {boolean} true, if wasm loading is enabled for the chunk
|
33
|
+
*/
|
34
|
+
const isEnabledForChunk = chunk => {
|
35
|
+
const options = chunk.getEntryOptions();
|
36
|
+
const chunkLoading =
|
37
|
+
options && options.chunkLoading !== undefined
|
38
|
+
? options.chunkLoading
|
39
|
+
: globalChunkLoading;
|
40
|
+
return chunkLoading === "import-scripts";
|
41
|
+
};
|
42
|
+
const onceForChunkSet = new WeakSet();
|
43
|
+
/**
|
44
|
+
* @param {Chunk} chunk chunk
|
45
|
+
* @param {Set<string>} set runtime requirements
|
46
|
+
*/
|
47
|
+
const handler = (chunk, set) => {
|
48
|
+
if (onceForChunkSet.has(chunk)) return;
|
49
|
+
onceForChunkSet.add(chunk);
|
50
|
+
if (!isEnabledForChunk(chunk)) return;
|
51
|
+
const withCreateScriptUrl = Boolean(
|
52
|
+
compilation.outputOptions.trustedTypes
|
53
|
+
);
|
54
|
+
set.add(RuntimeGlobals.moduleFactoriesAddOnly);
|
55
|
+
set.add(RuntimeGlobals.hasOwnProperty);
|
56
|
+
if (withCreateScriptUrl) {
|
57
|
+
set.add(RuntimeGlobals.createScriptUrl);
|
58
|
+
}
|
59
|
+
compilation.addRuntimeModule(
|
60
|
+
chunk,
|
61
|
+
new ImportScriptsChunkLoadingRuntimeModule(set, withCreateScriptUrl)
|
62
|
+
);
|
63
|
+
};
|
64
|
+
compilation.hooks.runtimeRequirementInTree
|
65
|
+
.for(RuntimeGlobals.ensureChunkHandlers)
|
66
|
+
.tap(PLUGIN_NAME, handler);
|
67
|
+
compilation.hooks.runtimeRequirementInTree
|
68
|
+
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
|
69
|
+
.tap(PLUGIN_NAME, handler);
|
70
|
+
compilation.hooks.runtimeRequirementInTree
|
71
|
+
.for(RuntimeGlobals.hmrDownloadManifest)
|
72
|
+
.tap(PLUGIN_NAME, handler);
|
73
|
+
compilation.hooks.runtimeRequirementInTree
|
74
|
+
.for(RuntimeGlobals.baseURI)
|
75
|
+
.tap(PLUGIN_NAME, handler);
|
76
|
+
compilation.hooks.runtimeRequirementInTree
|
77
|
+
.for(RuntimeGlobals.onChunksLoaded)
|
78
|
+
.tap(PLUGIN_NAME, handler);
|
79
|
+
|
80
|
+
compilation.hooks.runtimeRequirementInTree
|
81
|
+
.for(RuntimeGlobals.ensureChunkHandlers)
|
82
|
+
.tap(PLUGIN_NAME, (chunk, set) => {
|
83
|
+
if (!isEnabledForChunk(chunk)) return;
|
84
|
+
set.add(RuntimeGlobals.publicPath);
|
85
|
+
set.add(RuntimeGlobals.getChunkScriptFilename);
|
86
|
+
});
|
87
|
+
compilation.hooks.runtimeRequirementInTree
|
88
|
+
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
|
89
|
+
.tap(PLUGIN_NAME, (chunk, set) => {
|
50
90
|
if (!isEnabledForChunk(chunk)) return;
|
51
|
-
|
52
|
-
|
53
|
-
);
|
91
|
+
set.add(RuntimeGlobals.publicPath);
|
92
|
+
set.add(RuntimeGlobals.getChunkUpdateScriptFilename);
|
93
|
+
set.add(RuntimeGlobals.moduleCache);
|
94
|
+
set.add(RuntimeGlobals.hmrModuleData);
|
54
95
|
set.add(RuntimeGlobals.moduleFactoriesAddOnly);
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
compilation.hooks.runtimeRequirementInTree
|
65
|
-
.for(RuntimeGlobals.ensureChunkHandlers)
|
66
|
-
.tap("ImportScriptsChunkLoadingPlugin", handler);
|
67
|
-
compilation.hooks.runtimeRequirementInTree
|
68
|
-
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
|
69
|
-
.tap("ImportScriptsChunkLoadingPlugin", handler);
|
70
|
-
compilation.hooks.runtimeRequirementInTree
|
71
|
-
.for(RuntimeGlobals.hmrDownloadManifest)
|
72
|
-
.tap("ImportScriptsChunkLoadingPlugin", handler);
|
73
|
-
compilation.hooks.runtimeRequirementInTree
|
74
|
-
.for(RuntimeGlobals.baseURI)
|
75
|
-
.tap("ImportScriptsChunkLoadingPlugin", handler);
|
76
|
-
compilation.hooks.runtimeRequirementInTree
|
77
|
-
.for(RuntimeGlobals.onChunksLoaded)
|
78
|
-
.tap("ImportScriptsChunkLoadingPlugin", handler);
|
79
|
-
|
80
|
-
compilation.hooks.runtimeRequirementInTree
|
81
|
-
.for(RuntimeGlobals.ensureChunkHandlers)
|
82
|
-
.tap("ImportScriptsChunkLoadingPlugin", (chunk, set) => {
|
83
|
-
if (!isEnabledForChunk(chunk)) return;
|
84
|
-
set.add(RuntimeGlobals.publicPath);
|
85
|
-
set.add(RuntimeGlobals.getChunkScriptFilename);
|
86
|
-
});
|
87
|
-
compilation.hooks.runtimeRequirementInTree
|
88
|
-
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
|
89
|
-
.tap("ImportScriptsChunkLoadingPlugin", (chunk, set) => {
|
90
|
-
if (!isEnabledForChunk(chunk)) return;
|
91
|
-
set.add(RuntimeGlobals.publicPath);
|
92
|
-
set.add(RuntimeGlobals.getChunkUpdateScriptFilename);
|
93
|
-
set.add(RuntimeGlobals.moduleCache);
|
94
|
-
set.add(RuntimeGlobals.hmrModuleData);
|
95
|
-
set.add(RuntimeGlobals.moduleFactoriesAddOnly);
|
96
|
-
});
|
97
|
-
compilation.hooks.runtimeRequirementInTree
|
98
|
-
.for(RuntimeGlobals.hmrDownloadManifest)
|
99
|
-
.tap("ImportScriptsChunkLoadingPlugin", (chunk, set) => {
|
100
|
-
if (!isEnabledForChunk(chunk)) return;
|
101
|
-
set.add(RuntimeGlobals.publicPath);
|
102
|
-
set.add(RuntimeGlobals.getUpdateManifestFilename);
|
103
|
-
});
|
104
|
-
}
|
105
|
-
);
|
96
|
+
});
|
97
|
+
compilation.hooks.runtimeRequirementInTree
|
98
|
+
.for(RuntimeGlobals.hmrDownloadManifest)
|
99
|
+
.tap(PLUGIN_NAME, (chunk, set) => {
|
100
|
+
if (!isEnabledForChunk(chunk)) return;
|
101
|
+
set.add(RuntimeGlobals.publicPath);
|
102
|
+
set.add(RuntimeGlobals.getUpdateManifestFilename);
|
103
|
+
});
|
104
|
+
});
|
106
105
|
}
|
107
106
|
}
|
108
107
|
module.exports = ImportScriptsChunkLoadingPlugin;
|
package/package.json
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "5.99.
|
3
|
+
"version": "5.99.8",
|
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.7",
|
9
9
|
"@types/estree": "^1.0.6",
|
10
|
+
"@types/json-schema": "^7.0.15",
|
10
11
|
"@webassemblyjs/ast": "^1.14.1",
|
11
12
|
"@webassemblyjs/wasm-edit": "^1.14.1",
|
12
13
|
"@webassemblyjs/wasm-parser": "^1.14.1",
|
@@ -23,7 +24,7 @@
|
|
23
24
|
"loader-runner": "^4.2.0",
|
24
25
|
"mime-types": "^2.1.27",
|
25
26
|
"neo-async": "^2.6.2",
|
26
|
-
"schema-utils": "^4.3.
|
27
|
+
"schema-utils": "^4.3.2",
|
27
28
|
"tapable": "^2.1.1",
|
28
29
|
"terser-webpack-plugin": "^5.3.11",
|
29
30
|
"watchpack": "^2.4.1",
|
@@ -35,14 +36,16 @@
|
|
35
36
|
}
|
36
37
|
},
|
37
38
|
"devDependencies": {
|
38
|
-
"@babel/core": "^7.
|
39
|
-
"@babel/preset-react": "^7.
|
39
|
+
"@babel/core": "^7.27.1",
|
40
|
+
"@babel/preset-react": "^7.27.1",
|
41
|
+
"@codspeed/benchmark.js-plugin": "^4.0.1",
|
40
42
|
"@eslint/js": "^9.21.0",
|
41
43
|
"@stylistic/eslint-plugin": "^4.2.0",
|
42
44
|
"@types/glob-to-regexp": "^0.4.4",
|
43
45
|
"@types/jest": "^29.5.11",
|
44
46
|
"@types/mime-types": "^2.1.4",
|
45
|
-
"@types/node": "^22.
|
47
|
+
"@types/node": "^22.15.11",
|
48
|
+
"@types/xxhashjs": "^0.2.4",
|
46
49
|
"assemblyscript": "^0.27.34",
|
47
50
|
"babel-loader": "^10.0.0",
|
48
51
|
"benchmark": "^2.1.4",
|
@@ -61,7 +64,7 @@
|
|
61
64
|
"eslint-plugin-jsdoc": "^50.6.3",
|
62
65
|
"eslint-plugin-n": "^17.16.2",
|
63
66
|
"eslint-plugin-prettier": "^5.1.3",
|
64
|
-
"eslint-plugin-unicorn": "^
|
67
|
+
"eslint-plugin-unicorn": "^59.0.0",
|
65
68
|
"file-loader": "^6.0.0",
|
66
69
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
67
70
|
"globals": "^16.0.0",
|
@@ -84,6 +87,7 @@
|
|
84
87
|
"memfs": "^4.14.0",
|
85
88
|
"mini-css-extract-plugin": "^2.9.0",
|
86
89
|
"mini-svg-data-uri": "^1.2.3",
|
90
|
+
"node-gyp": "^11.2.0",
|
87
91
|
"nyc": "^17.1.0",
|
88
92
|
"open-cli": "^8.0.0",
|
89
93
|
"prettier": "^3.5.1",
|
@@ -100,8 +104,9 @@
|
|
100
104
|
"strip-ansi": "^6.0.0",
|
101
105
|
"style-loader": "^4.0.0",
|
102
106
|
"terser": "^5.38.1",
|
107
|
+
"three": "^0.176.0",
|
103
108
|
"toml": "^3.0.0",
|
104
|
-
"tooling": "webpack/tooling#v1.23.
|
109
|
+
"tooling": "webpack/tooling#v1.23.8",
|
105
110
|
"ts-loader": "^9.5.1",
|
106
111
|
"typescript": "^5.8.2",
|
107
112
|
"url-loader": "^4.1.0",
|
@@ -140,34 +145,34 @@
|
|
140
145
|
"types.d.ts"
|
141
146
|
],
|
142
147
|
"scripts": {
|
148
|
+
"prepare": "husky",
|
143
149
|
"setup": "node ./setup/setup.js",
|
144
|
-
"
|
150
|
+
"prelint": "yarn setup",
|
151
|
+
"lint": "yarn lint:code && yarn lint:special && yarn lint:types && yarn lint:types-test && yarn lint:types-module-test && yarn lint:yarn && yarn fmt:check && yarn lint:spellcheck",
|
152
|
+
"lint:code": "node node_modules/eslint/bin/eslint.js --cache .",
|
153
|
+
"lint:special": "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",
|
154
|
+
"lint:types": "tsc",
|
155
|
+
"lint:types-test": "tsc -p tsconfig.types.test.json",
|
156
|
+
"lint:types-module-test": "tsc -p tsconfig.module.test.json",
|
157
|
+
"lint:yarn": "yarn-deduplicate --fail --list -s highest yarn.lock",
|
158
|
+
"lint:spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
|
159
|
+
"report:types": "rimraf coverage && yarn cover:types && yarn cover:report && open-cli coverage/lcov-report/index.html",
|
160
|
+
"validate:types": "tsc -p tsconfig.validation.json",
|
161
|
+
"fmt": "yarn fmt:base --log-level warn --write",
|
162
|
+
"fmt:check": "yarn fmt:base --check",
|
163
|
+
"fmt:base": "node node_modules/prettier/bin/prettier.cjs --cache --ignore-unknown .",
|
164
|
+
"fix": "yarn fix:code && fix:yarn && fix:special && yarn fmt",
|
165
|
+
"fix:code": "yarn lint:code --fix",
|
166
|
+
"fix:yarn": "yarn-deduplicate -s highest yarn.lock",
|
167
|
+
"fix:special": "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",
|
168
|
+
"build:examples": "cd examples && node buildAll.js",
|
169
|
+
"benchmark": "node --max-old-space-size=4096 --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",
|
170
|
+
"pretest": "yarn lint",
|
145
171
|
"test": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage",
|
146
|
-
"test:update-snapshots": "yarn
|
172
|
+
"test:update-snapshots": "yarn test -u",
|
147
173
|
"test:integration": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\"",
|
148
174
|
"test:basic": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage --testMatch \"<rootDir>/test/*.basictest.js\"",
|
149
175
|
"test:unit": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\"",
|
150
|
-
"build:examples": "cd examples && node buildAll.js",
|
151
|
-
"type-report": "rimraf coverage && yarn cover:types && yarn cover:report && open-cli coverage/lcov-report/index.html",
|
152
|
-
"pretest": "yarn lint",
|
153
|
-
"prelint": "yarn setup",
|
154
|
-
"lint": "yarn code-lint && yarn special-lint && yarn type-lint && yarn typings-test && yarn module-typings-test && yarn yarn-lint && yarn pretty-lint && yarn spellcheck",
|
155
|
-
"code-lint": "node node_modules/eslint/bin/eslint.js --cache .",
|
156
|
-
"type-lint": "tsc",
|
157
|
-
"type-validate": "tsc -p tsconfig.validation.json",
|
158
|
-
"typings-test": "tsc -p tsconfig.types.test.json",
|
159
|
-
"module-typings-test": "tsc -p tsconfig.module.test.json",
|
160
|
-
"spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
|
161
|
-
"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",
|
162
|
-
"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",
|
163
|
-
"fix": "yarn code-lint --fix && yarn special-lint-fix && yarn pretty-lint-fix",
|
164
|
-
"prepare": "husky",
|
165
|
-
"pretty-lint-base": "node node_modules/prettier/bin/prettier.cjs --cache --ignore-unknown .",
|
166
|
-
"pretty-lint-fix": "yarn pretty-lint-base --log-level warn --write",
|
167
|
-
"pretty-lint": "yarn pretty-lint-base --check",
|
168
|
-
"yarn-lint": "yarn-deduplicate --fail --list -s highest yarn.lock",
|
169
|
-
"yarn-lint-fix": "yarn-deduplicate -s highest yarn.lock",
|
170
|
-
"benchmark": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.benchmark.js\" --runInBand",
|
171
176
|
"cover": "yarn cover:all && yarn cover:report",
|
172
177
|
"cover:clean": "rimraf .nyc_output coverage",
|
173
178
|
"cover:all": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage --coverage",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* This file was automatically generated.
|
3
3
|
* DO NOT MODIFY BY HAND.
|
4
|
-
* Run `yarn special
|
4
|
+
* Run `yarn fix:special` to update
|
5
5
|
*/
|
6
6
|
declare const check: (options: import("../declarations/WebpackOptions").WebpackOptions) => boolean;
|
7
7
|
export = check;
|