webpack 5.104.1 → 5.105.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/README.md +2 -2
- package/bin/webpack.js +6 -3
- package/lib/APIPlugin.js +85 -15
- package/lib/AbstractMethodError.js +1 -0
- package/lib/AsyncDependenciesBlock.js +17 -2
- package/lib/AsyncDependencyToInitialChunkError.js +3 -0
- package/lib/AutomaticPrefetchPlugin.js +1 -1
- package/lib/BannerPlugin.js +5 -1
- package/lib/CacheFacade.js +2 -2
- package/lib/CaseSensitiveModulesWarning.js +1 -0
- package/lib/Chunk.js +9 -5
- package/lib/ChunkGraph.js +30 -9
- package/lib/ChunkGroup.js +6 -3
- package/lib/ChunkRenderError.js +9 -2
- package/lib/CleanPlugin.js +4 -1
- package/lib/CodeGenerationError.js +7 -1
- package/lib/CodeGenerationResults.js +10 -3
- package/lib/CommentCompilationWarning.js +2 -1
- package/lib/Compilation.js +284 -236
- package/lib/Compiler.js +4 -3
- package/lib/ConcatenationScope.js +2 -1
- package/lib/ConcurrentCompilationError.js +3 -3
- package/lib/ContextModule.js +248 -111
- package/lib/ContextModuleFactory.js +14 -2
- package/lib/DefinePlugin.js +15 -8
- package/lib/DelegatedModule.js +6 -0
- package/lib/DelegatedModuleFactoryPlugin.js +2 -0
- package/lib/Dependency.js +6 -1
- package/lib/DependencyTemplates.js +3 -2
- package/lib/DllModule.js +2 -0
- package/lib/DllReferencePlugin.js +1 -0
- package/lib/DotenvPlugin.js +11 -5
- package/lib/DynamicEntryPlugin.js +8 -1
- package/lib/EnvironmentNotSupportAsyncWarning.js +1 -0
- package/lib/EvalSourceMapDevToolPlugin.js +17 -13
- package/lib/ExportsInfo.js +8 -4
- package/lib/ExternalModule.js +16 -0
- package/lib/ExternalModuleFactoryPlugin.js +9 -2
- package/lib/ExternalsPlugin.js +2 -1
- package/lib/FalseIIFEUmdWarning.js +1 -0
- package/lib/FileSystemInfo.js +49 -25
- package/lib/FlagDependencyExportsPlugin.js +8 -1
- package/lib/FlagDependencyUsagePlugin.js +9 -7
- package/lib/HarmonyLinkingError.js +1 -0
- package/lib/HookWebpackError.js +2 -0
- package/lib/HotModuleReplacementPlugin.js +16 -2
- package/lib/IgnoreWarningsPlugin.js +5 -2
- package/lib/InitFragment.js +1 -0
- package/lib/InvalidDependenciesModuleWarning.js +1 -0
- package/lib/LibManifestPlugin.js +1 -0
- package/lib/ManifestPlugin.js +8 -1
- package/lib/Module.js +7 -4
- package/lib/ModuleBuildError.js +3 -1
- package/lib/ModuleDependencyError.js +1 -0
- package/lib/ModuleDependencyWarning.js +1 -0
- package/lib/ModuleError.js +4 -1
- package/lib/ModuleFilenameHelpers.js +4 -2
- package/lib/ModuleGraph.js +3 -0
- package/lib/ModuleGraphConnection.js +10 -1
- package/lib/ModuleHashingError.js +2 -0
- package/lib/ModuleInfoHeaderPlugin.js +6 -1
- package/lib/ModuleNotFoundError.js +1 -0
- package/lib/ModuleParseError.js +5 -1
- package/lib/ModuleProfile.js +1 -1
- package/lib/ModuleRestoreError.js +2 -0
- package/lib/ModuleSourceTypeConstants.js +1 -11
- package/lib/ModuleStoreError.js +2 -0
- package/lib/ModuleWarning.js +3 -1
- package/lib/MultiCompiler.js +11 -7
- package/lib/MultiWatching.js +2 -2
- package/lib/NoModeWarning.js +1 -0
- package/lib/NodeStuffInWebError.js +1 -0
- package/lib/NormalModule.js +28 -5
- package/lib/NormalModuleFactory.js +20 -4
- package/lib/OptionsApply.js +3 -1
- package/lib/ProgressPlugin.js +4 -0
- package/lib/RawModule.js +2 -0
- package/lib/RuntimeModule.js +10 -0
- package/lib/RuntimePlugin.js +7 -9
- package/lib/RuntimeTemplate.js +14 -7
- package/lib/SourceMapDevToolPlugin.js +30 -23
- package/lib/Template.js +10 -5
- package/lib/TemplatedPathPlugin.js +4 -2
- package/lib/UnhandledSchemeError.js +1 -0
- package/lib/UnsupportedFeatureWarning.js +3 -0
- package/lib/WarnDeprecatedOptionPlugin.js +1 -0
- package/lib/WatchIgnorePlugin.js +1 -1
- package/lib/Watching.js +5 -0
- package/lib/WebpackError.js +4 -0
- package/lib/WebpackOptionsApply.js +61 -41
- package/lib/asset/AssetBytesGenerator.js +1 -0
- package/lib/asset/AssetGenerator.js +18 -3
- package/lib/asset/AssetModulesPlugin.js +33 -2
- package/lib/asset/AssetParser.js +4 -0
- package/lib/asset/AssetSourceGenerator.js +1 -0
- package/lib/asset/RawDataUrlModule.js +4 -0
- package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -1
- package/lib/buildChunkGraph.js +31 -2
- package/lib/cache/MemoryWithGcCachePlugin.js +1 -0
- package/lib/cache/PackFileCacheStrategy.js +41 -8
- package/lib/cache/getLazyHashedEtag.js +13 -4
- package/lib/cache/mergeEtags.js +3 -1
- package/lib/cli.js +3 -1
- package/lib/config/defaults.js +65 -44
- package/lib/config/normalization.js +96 -0
- package/lib/container/ContainerEntryDependency.js +3 -0
- package/lib/container/ContainerEntryModule.js +7 -0
- package/lib/container/ContainerExposedDependency.js +1 -0
- package/lib/container/FallbackDependency.js +1 -0
- package/lib/container/FallbackItemDependency.js +1 -0
- package/lib/container/FallbackModule.js +4 -0
- package/lib/container/HoistContainerReferencesPlugin.js +6 -0
- package/lib/container/ModuleFederationPlugin.js +1 -1
- package/lib/container/RemoteModule.js +24 -0
- package/lib/css/CssGenerator.js +31 -4
- package/lib/css/CssModulesPlugin.js +26 -30
- package/lib/css/CssParser.js +12 -9
- package/lib/debug/ProfilingPlugin.js +1 -0
- package/lib/dependencies/AMDDefineDependency.js +3 -1
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +6 -0
- package/lib/dependencies/AMDPlugin.js +1 -1
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +7 -1
- package/lib/dependencies/CachedConstDependency.js +1 -0
- package/lib/dependencies/CommonJsDependencyHelpers.js +2 -0
- package/lib/dependencies/CommonJsExportRequireDependency.js +1 -0
- package/lib/dependencies/CommonJsFullRequireDependency.js +2 -0
- package/lib/dependencies/CommonJsImportsParserPlugin.js +3 -0
- package/lib/dependencies/CommonJsRequireContextDependency.js +2 -2
- package/lib/dependencies/CommonJsSelfReferenceDependency.js +1 -0
- package/lib/dependencies/ConstDependency.js +1 -0
- package/lib/dependencies/ContextDependencyHelpers.js +11 -4
- package/lib/dependencies/ContextElementDependency.js +1 -0
- package/lib/dependencies/CriticalDependencyWarning.js +1 -0
- package/lib/dependencies/CssIcssExportDependency.js +7 -4
- package/lib/dependencies/CssIcssSymbolDependency.js +1 -0
- package/lib/dependencies/CssUrlDependency.js +2 -3
- package/lib/dependencies/ExternalModuleInitFragment.js +4 -1
- package/lib/dependencies/ExternalModuleInitFragmentDependency.js +0 -9
- package/lib/dependencies/HarmonyAcceptDependency.js +3 -0
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +3 -1
- package/lib/dependencies/HarmonyExportExpressionDependency.js +4 -0
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +8 -1
- package/lib/dependencies/HarmonyExportInitFragment.js +17 -3
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +4 -0
- package/lib/dependencies/HarmonyImportDependency.js +1 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +269 -5
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +22 -3
- package/lib/dependencies/ImportDependency.js +1 -0
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +1 -0
- package/lib/dependencies/ImportMetaPlugin.js +53 -11
- package/lib/dependencies/ImportParserPlugin.js +7 -12
- package/lib/dependencies/LoaderPlugin.js +3 -0
- package/lib/dependencies/ModuleDecoratorDependency.js +1 -0
- package/lib/dependencies/ModuleDependency.js +1 -0
- package/lib/dependencies/ModuleInitFragmentDependency.js +87 -0
- package/lib/dependencies/ProvidedDependency.js +1 -0
- package/lib/dependencies/RequireContextPlugin.js +1 -0
- package/lib/dependencies/RequireEnsureDependenciesBlock.js +1 -1
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +7 -2
- package/lib/dependencies/RuntimeRequirementsDependency.js +1 -0
- package/lib/dependencies/WorkerDependency.js +9 -3
- package/lib/dependencies/WorkerPlugin.js +1 -0
- package/lib/dependencies/getFunctionExpression.js +3 -1
- package/lib/electron/ElectronTargetPlugin.js +3 -1
- package/lib/errors/BuildCycleError.js +4 -1
- package/lib/esm/ModuleChunkFormatPlugin.js +6 -4
- package/lib/esm/ModuleChunkLoadingPlugin.js +1 -0
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +1 -0
- package/lib/hmr/LazyCompilationPlugin.js +5 -0
- package/lib/hmr/lazyCompilationBackend.js +3 -2
- package/lib/ids/ChunkModuleIdRangePlugin.js +9 -7
- package/lib/ids/DeterministicChunkIdsPlugin.js +1 -0
- package/lib/ids/DeterministicModuleIdsPlugin.js +1 -0
- package/lib/ids/HashedModuleIdsPlugin.js +3 -8
- package/lib/ids/IdHelpers.js +10 -8
- package/lib/ids/NamedChunkIdsPlugin.js +7 -5
- package/lib/ids/NamedModuleIdsPlugin.js +1 -0
- package/lib/ids/OccurrenceChunkIdsPlugin.js +2 -2
- package/lib/ids/OccurrenceModuleIdsPlugin.js +18 -10
- package/lib/ids/SyncModuleIdsPlugin.js +30 -20
- package/lib/index.js +2 -2
- package/lib/javascript/BasicEvaluatedExpression.js +1 -0
- package/lib/javascript/EnableChunkLoadingPlugin.js +5 -2
- package/lib/javascript/JavascriptModulesPlugin.js +29 -8
- package/lib/javascript/JavascriptParser.js +47 -14
- package/lib/json/JsonGenerator.js +1 -0
- package/lib/json/JsonParser.js +9 -2
- package/lib/library/AbstractLibraryPlugin.js +4 -1
- package/lib/library/AmdLibraryPlugin.js +2 -1
- package/lib/library/AssignLibraryPlugin.js +6 -2
- package/lib/library/EnableLibraryPlugin.js +1 -0
- package/lib/library/ExportPropertyLibraryPlugin.js +1 -1
- package/lib/library/JsonpLibraryPlugin.js +1 -1
- package/lib/library/ModuleLibraryPlugin.js +130 -13
- package/lib/library/SystemLibraryPlugin.js +4 -1
- package/lib/library/UmdLibraryPlugin.js +4 -3
- package/lib/logging/Logger.js +9 -5
- package/lib/logging/createConsoleLogger.js +4 -0
- package/lib/logging/truncateArgs.js +1 -1
- package/lib/node/CommonJsChunkLoadingPlugin.js +6 -4
- package/lib/node/NodeEnvironmentPlugin.js +1 -0
- package/lib/node/NodeTargetPlugin.js +10 -1
- package/lib/node/NodeTemplatePlugin.js +1 -0
- package/lib/node/NodeWatchFileSystem.js +6 -0
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +1 -0
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +1 -0
- package/lib/node/ReadFileCompileWasmPlugin.js +1 -0
- package/lib/node/RequireChunkLoadingRuntimeModule.js +1 -0
- package/lib/node/nodeConsole.js +18 -1
- package/lib/optimize/AggressiveMergingPlugin.js +2 -1
- package/lib/optimize/AggressiveSplittingPlugin.js +15 -6
- package/lib/optimize/ConcatenatedModule.js +33 -19
- package/lib/optimize/FlagIncludedChunksPlugin.js +11 -1
- package/lib/optimize/InnerGraph.js +5 -3
- package/lib/optimize/InnerGraphPlugin.js +25 -25
- package/lib/optimize/LimitChunkCountPlugin.js +3 -2
- package/lib/optimize/MangleExportsPlugin.js +14 -2
- package/lib/optimize/MergeDuplicateChunksPlugin.js +5 -1
- package/lib/optimize/MinChunkSizePlugin.js +5 -2
- package/lib/optimize/ModuleConcatenationPlugin.js +19 -4
- package/lib/optimize/RealContentHashPlugin.js +37 -27
- package/lib/optimize/RemoveParentModulesPlugin.js +12 -3
- package/lib/optimize/RuntimeChunkPlugin.js +3 -5
- package/lib/optimize/SideEffectsFlagPlugin.js +3 -0
- package/lib/optimize/SplitChunksPlugin.js +23 -5
- package/lib/performance/AssetsOverSizeLimitWarning.js +6 -2
- package/lib/performance/EntrypointsOverSizeLimitWarning.js +6 -2
- package/lib/performance/NoAsyncChunksWarning.js +1 -0
- package/lib/performance/SizeLimitsPlugin.js +6 -6
- package/lib/prefetch/ChunkPrefetchFunctionRuntimeModule.js +2 -0
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +3 -1
- package/lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js +1 -0
- package/lib/prefetch/ChunkPreloadTriggerRuntimeModule.js +1 -0
- package/lib/rules/BasicEffectRulePlugin.js +2 -0
- package/lib/rules/BasicMatcherRulePlugin.js +3 -0
- package/lib/rules/ObjectMatcherRulePlugin.js +5 -1
- package/lib/rules/RuleSetCompiler.js +6 -0
- package/lib/runtime/AsyncModuleRuntimeModule.js +1 -0
- package/lib/runtime/ChunkNameRuntimeModule.js +1 -0
- package/lib/runtime/CompatRuntimeModule.js +1 -0
- package/lib/runtime/EnsureChunkRuntimeModule.js +1 -0
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +5 -0
- package/lib/runtime/GetFullHashRuntimeModule.js +1 -0
- package/lib/runtime/GetMainFilenameRuntimeModule.js +2 -0
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +1 -0
- package/lib/runtime/LoadScriptRuntimeModule.js +2 -0
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +16 -32
- package/lib/runtime/PublicPathRuntimeModule.js +1 -0
- package/lib/runtime/StartupChunkDependenciesPlugin.js +2 -0
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +1 -0
- package/lib/runtime/StartupEntrypointRuntimeModule.js +1 -0
- package/lib/schemes/HttpUriPlugin.js +39 -20
- package/lib/schemes/VirtualUrlPlugin.js +28 -2
- package/lib/serialization/BinaryMiddleware.js +4 -0
- package/lib/serialization/FileMiddleware.js +9 -4
- package/lib/serialization/ObjectMiddleware.js +34 -11
- package/lib/serialization/PlainObjectSerializer.js +2 -0
- package/lib/sharing/ConsumeSharedModule.js +60 -0
- package/lib/sharing/ConsumeSharedPlugin.js +5 -4
- package/lib/sharing/ProvideSharedModule.js +4 -0
- package/lib/sharing/ProvideSharedPlugin.js +24 -25
- package/lib/sharing/resolveMatchedConfigs.js +2 -2
- package/lib/sharing/utils.js +8 -6
- package/lib/stats/DefaultStatsFactoryPlugin.js +20 -12
- package/lib/stats/DefaultStatsPrinterPlugin.js +6 -5
- package/lib/stats/StatsFactory.js +2 -2
- package/lib/url/URLParserPlugin.js +5 -3
- package/lib/util/AppendOnlyStackedSet.js +57 -0
- package/lib/util/Hash.js +1 -0
- package/lib/util/IterableHelpers.js +1 -0
- package/lib/util/LazyBucketSortedSet.js +1 -0
- package/lib/util/LazySet.js +1 -0
- package/lib/util/ParallelismFactorCalculator.js +1 -0
- package/lib/util/SortableSet.js +1 -0
- package/lib/util/StringXor.js +1 -0
- package/lib/util/binarySearchBounds.js +15 -8
- package/lib/util/chainedImports.js +1 -1
- package/lib/util/cleverMerge.js +6 -1
- package/lib/util/comparators.js +21 -1
- package/lib/util/compileBooleanMatcher.js +3 -3
- package/lib/util/concatenate.js +3 -2
- package/lib/util/conventions.js +3 -2
- package/lib/util/deterministicGrouping.js +13 -1
- package/lib/util/extractSourceMap.js +12 -13
- package/lib/util/fs.js +15 -19
- package/lib/util/hash/BatchedHash.js +4 -0
- package/lib/util/hash/BulkUpdateHash.js +8 -1
- package/lib/util/hash/hash-digest.js +1 -0
- package/lib/util/hash/wasm-hash.js +18 -2
- package/lib/util/identifier.js +7 -2
- package/lib/util/magicComment.js +1 -1
- package/lib/util/propertyName.js +1 -1
- package/lib/util/registerExternalSerializer.js +1 -0
- package/lib/util/runtime.js +15 -1
- package/lib/util/semver.js +1 -0
- package/lib/util/serialization.js +2 -2
- package/lib/wasm/EnableWasmLoadingPlugin.js +2 -0
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +11 -3
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +1 -0
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +3 -2
- package/lib/wasm-sync/UnsupportedWebAssemblyFeatureError.js +5 -1
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +3 -0
- package/lib/wasm-sync/WebAssemblyInInitialChunkError.js +2 -0
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +7 -3
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +2 -2
- package/lib/wasm-sync/WebAssemblyParser.js +3 -1
- package/lib/web/FetchCompileWasmPlugin.js +1 -0
- package/lib/web/JsonpChunkLoadingPlugin.js +1 -0
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -0
- package/lib/webpack.js +16 -4
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +1 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +2 -0
- package/package.json +33 -36
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +121 -55
- package/schemas/plugins/BannerPlugin.json +2 -2
- package/schemas/plugins/IgnorePlugin.json +1 -1
- package/schemas/plugins/ManifestPlugin.json +3 -3
- package/schemas/plugins/ProgressPlugin.json +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.json +2 -2
- package/schemas/plugins/schemes/HttpUriPlugin.json +1 -1
- package/schemas/plugins/schemes/VirtualUrlPlugin.json +3 -3
- package/types.d.ts +440 -137
package/lib/util/propertyName.js
CHANGED
package/lib/util/runtime.js
CHANGED
|
@@ -10,7 +10,8 @@ const SortableSet = require("./SortableSet");
|
|
|
10
10
|
/** @typedef {import("../Compilation")} Compilation */
|
|
11
11
|
/** @typedef {import("../Entrypoint").EntryOptions} EntryOptions */
|
|
12
12
|
|
|
13
|
-
/** @typedef {
|
|
13
|
+
/** @typedef {SortableSet<string>} RuntimeSpecSortableSet */
|
|
14
|
+
/** @typedef {string | RuntimeSpecSortableSet | undefined} RuntimeSpec */
|
|
14
15
|
/** @typedef {RuntimeSpec | boolean} RuntimeCondition */
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -20,7 +21,9 @@ const SortableSet = require("./SortableSet");
|
|
|
20
21
|
* @returns {RuntimeSpec} runtime
|
|
21
22
|
*/
|
|
22
23
|
const getEntryRuntime = (compilation, name, options) => {
|
|
24
|
+
/** @type {EntryOptions["dependOn"]} */
|
|
23
25
|
let dependOn;
|
|
26
|
+
/** @type {EntryOptions["runtime"]} */
|
|
24
27
|
let runtime;
|
|
25
28
|
if (options) {
|
|
26
29
|
({ dependOn, runtime } = options);
|
|
@@ -194,6 +197,7 @@ const mergeRuntime = (a, b) => {
|
|
|
194
197
|
return a;
|
|
195
198
|
} else if (typeof a === "string") {
|
|
196
199
|
if (typeof b === "string") {
|
|
200
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
197
201
|
const set = new SortableSet();
|
|
198
202
|
set.add(a);
|
|
199
203
|
set.add(b);
|
|
@@ -201,16 +205,19 @@ const mergeRuntime = (a, b) => {
|
|
|
201
205
|
} else if (b.has(a)) {
|
|
202
206
|
return b;
|
|
203
207
|
}
|
|
208
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
204
209
|
const set = new SortableSet(b);
|
|
205
210
|
set.add(a);
|
|
206
211
|
return set;
|
|
207
212
|
}
|
|
208
213
|
if (typeof b === "string") {
|
|
209
214
|
if (a.has(b)) return a;
|
|
215
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
210
216
|
const set = new SortableSet(a);
|
|
211
217
|
set.add(b);
|
|
212
218
|
return set;
|
|
213
219
|
}
|
|
220
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
214
221
|
const set = new SortableSet(a);
|
|
215
222
|
for (const item of b) set.add(item);
|
|
216
223
|
if (set.size === a.size) return a;
|
|
@@ -271,14 +278,17 @@ const mergeRuntimeOwned = (a, b) => {
|
|
|
271
278
|
if (typeof b === "string") {
|
|
272
279
|
return b;
|
|
273
280
|
}
|
|
281
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
274
282
|
return new SortableSet(b);
|
|
275
283
|
} else if (typeof a === "string") {
|
|
276
284
|
if (typeof b === "string") {
|
|
285
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
277
286
|
const set = new SortableSet();
|
|
278
287
|
set.add(a);
|
|
279
288
|
set.add(b);
|
|
280
289
|
return set;
|
|
281
290
|
}
|
|
291
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
282
292
|
const set = new SortableSet(b);
|
|
283
293
|
set.add(a);
|
|
284
294
|
return set;
|
|
@@ -315,6 +325,7 @@ const intersectRuntime = (a, b) => {
|
|
|
315
325
|
if (a.has(b)) return b;
|
|
316
326
|
return;
|
|
317
327
|
}
|
|
328
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
318
329
|
const set = new SortableSet();
|
|
319
330
|
for (const item of b) {
|
|
320
331
|
if (a.has(item)) set.add(item);
|
|
@@ -354,10 +365,12 @@ const subtractRuntime = (a, b) => {
|
|
|
354
365
|
if (item !== b) return item;
|
|
355
366
|
}
|
|
356
367
|
}
|
|
368
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
357
369
|
const set = new SortableSet(a);
|
|
358
370
|
set.delete(b);
|
|
359
371
|
return set;
|
|
360
372
|
}
|
|
373
|
+
/** @type {RuntimeSpecSortableSet} */
|
|
361
374
|
const set = new SortableSet();
|
|
362
375
|
for (const item of a) {
|
|
363
376
|
if (!b.has(item)) set.add(item);
|
|
@@ -394,6 +407,7 @@ const filterRuntime = (runtime, filter) => {
|
|
|
394
407
|
if (typeof runtime === "string") return filter(runtime);
|
|
395
408
|
let some = false;
|
|
396
409
|
let every = true;
|
|
410
|
+
/** @type {RuntimeSpec} */
|
|
397
411
|
let result;
|
|
398
412
|
for (const r of runtime) {
|
|
399
413
|
const v = filter(r);
|
package/lib/util/semver.js
CHANGED
|
@@ -9,7 +9,7 @@ const memoize = require("./memoize");
|
|
|
9
9
|
|
|
10
10
|
/** @typedef {import("../serialization/BinaryMiddleware").MEASURE_END_OPERATION_TYPE} MEASURE_END_OPERATION */
|
|
11
11
|
/** @typedef {import("../serialization/BinaryMiddleware").MEASURE_START_OPERATION_TYPE} MEASURE_START_OPERATION */
|
|
12
|
-
/** @typedef {
|
|
12
|
+
/** @typedef {import("../util/Hash").HashFunction} HashFunction */
|
|
13
13
|
/** @typedef {import("../util/fs").IntermediateFileSystem} IntermediateFileSystem */
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -111,7 +111,7 @@ module.exports = {
|
|
|
111
111
|
/**
|
|
112
112
|
* @template D, S, C
|
|
113
113
|
* @param {IntermediateFileSystem} fs filesystem
|
|
114
|
-
* @param {
|
|
114
|
+
* @param {HashFunction} hashFunction hash function to use
|
|
115
115
|
* @returns {Serializer<D, S, C>} file serializer
|
|
116
116
|
*/
|
|
117
117
|
createFileSerializer: (fs, hashFunction) => {
|
|
@@ -20,6 +20,7 @@ const enabledTypes = new WeakMap();
|
|
|
20
20
|
const getEnabledTypes = (compiler) => {
|
|
21
21
|
let set = enabledTypes.get(compiler);
|
|
22
22
|
if (set === undefined) {
|
|
23
|
+
/** @type {WasmLoadingTypes} */
|
|
23
24
|
set = new Set();
|
|
24
25
|
enabledTypes.set(compiler, set);
|
|
25
26
|
}
|
|
@@ -31,6 +32,7 @@ class EnableWasmLoadingPlugin {
|
|
|
31
32
|
* @param {WasmLoadingType} type library type that should be available
|
|
32
33
|
*/
|
|
33
34
|
constructor(type) {
|
|
35
|
+
/** @type {WasmLoadingType} */
|
|
34
36
|
this.type = type;
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -12,11 +12,15 @@ const Template = require("../Template");
|
|
|
12
12
|
/** @typedef {import("../Chunk")} Chunk */
|
|
13
13
|
/** @typedef {import("../Compilation")} Compilation */
|
|
14
14
|
|
|
15
|
+
/** @typedef {(wasmModuleSrcPath: string) => string} GenerateBeforeLoadBinaryCode */
|
|
16
|
+
/** @typedef {(wasmModuleSrcPath: string) => string} GenerateLoadBinaryCode */
|
|
17
|
+
/** @typedef {() => string} GenerateBeforeInstantiateStreaming */
|
|
18
|
+
|
|
15
19
|
/**
|
|
16
20
|
* @typedef {object} AsyncWasmLoadingRuntimeModuleOptions
|
|
17
|
-
* @property {
|
|
18
|
-
* @property {
|
|
19
|
-
* @property {
|
|
21
|
+
* @property {GenerateLoadBinaryCode} generateLoadBinaryCode
|
|
22
|
+
* @property {GenerateBeforeLoadBinaryCode=} generateBeforeLoadBinaryCode
|
|
23
|
+
* @property {GenerateBeforeInstantiateStreaming=} generateBeforeInstantiateStreaming
|
|
20
24
|
* @property {boolean} supportsStreaming
|
|
21
25
|
*/
|
|
22
26
|
|
|
@@ -31,10 +35,14 @@ class AsyncWasmLoadingRuntimeModule extends RuntimeModule {
|
|
|
31
35
|
supportsStreaming
|
|
32
36
|
}) {
|
|
33
37
|
super("wasm loading", RuntimeModule.STAGE_NORMAL);
|
|
38
|
+
/** @type {GenerateLoadBinaryCode} */
|
|
34
39
|
this.generateLoadBinaryCode = generateLoadBinaryCode;
|
|
40
|
+
/** @type {generateBeforeLoadBinaryCode | undefined} */
|
|
35
41
|
this.generateBeforeLoadBinaryCode = generateBeforeLoadBinaryCode;
|
|
42
|
+
/** @type {generateBeforeInstantiateStreaming | undefined} */
|
|
36
43
|
this.generateBeforeInstantiateStreaming =
|
|
37
44
|
generateBeforeInstantiateStreaming;
|
|
45
|
+
/** @type {boolean} */
|
|
38
46
|
this.supportsStreaming = supportsStreaming;
|
|
39
47
|
}
|
|
40
48
|
|
|
@@ -11,7 +11,7 @@ const Generator = require("../Generator");
|
|
|
11
11
|
const { tryRunOrWebpackError } = require("../HookWebpackError");
|
|
12
12
|
const { WEBASSEMBLY_MODULE_TYPE_ASYNC } = require("../ModuleTypeConstants");
|
|
13
13
|
const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDependency");
|
|
14
|
-
const {
|
|
14
|
+
const { compareModulesByFullName } = require("../util/comparators");
|
|
15
15
|
const memoize = require("../util/memoize");
|
|
16
16
|
|
|
17
17
|
/** @typedef {import("webpack-sources").Source} Source */
|
|
@@ -89,6 +89,7 @@ class AsyncWebAssemblyModulesPlugin {
|
|
|
89
89
|
* @param {AsyncWebAssemblyModulesPluginOptions} options options
|
|
90
90
|
*/
|
|
91
91
|
constructor(options) {
|
|
92
|
+
/** @type {AsyncWebAssemblyModulesPluginOptions} */
|
|
92
93
|
this.options = options;
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -139,7 +140,7 @@ class AsyncWebAssemblyModulesPlugin {
|
|
|
139
140
|
|
|
140
141
|
for (const module of chunkGraph.getOrderedChunkModulesIterable(
|
|
141
142
|
chunk,
|
|
142
|
-
|
|
143
|
+
compareModulesByFullName(compiler)
|
|
143
144
|
)) {
|
|
144
145
|
if (module.type === WEBASSEMBLY_MODULE_TYPE_ASYNC) {
|
|
145
146
|
const filenameTemplate = outputOptions.webassemblyModuleFilename;
|
|
@@ -7,9 +7,13 @@
|
|
|
7
7
|
const WebpackError = require("../WebpackError");
|
|
8
8
|
|
|
9
9
|
module.exports = class UnsupportedWebAssemblyFeatureError extends WebpackError {
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* @param {string} message Error message
|
|
12
|
+
*/
|
|
11
13
|
constructor(message) {
|
|
12
14
|
super(message);
|
|
15
|
+
|
|
16
|
+
/** @type {string} */
|
|
13
17
|
this.name = "UnsupportedWebAssemblyFeatureError";
|
|
14
18
|
this.hideStack = true;
|
|
15
19
|
}
|
|
@@ -31,6 +31,7 @@ const WebAssemblyUtils = require("./WebAssemblyUtils");
|
|
|
31
31
|
*/
|
|
32
32
|
const getAllWasmModules = (moduleGraph, chunkGraph, chunk) => {
|
|
33
33
|
const wasmModules = chunk.getAllAsyncChunks();
|
|
34
|
+
/** @type {Module[]} */
|
|
34
35
|
const array = [];
|
|
35
36
|
for (const chunk of wasmModules) {
|
|
36
37
|
for (const m of chunkGraph.getOrderedChunkModulesIterable(
|
|
@@ -67,6 +68,7 @@ const generateImportObject = (
|
|
|
67
68
|
const moduleGraph = chunkGraph.moduleGraph;
|
|
68
69
|
/** @type {Map<string, ModuleId>} */
|
|
69
70
|
const waitForInstances = new Map();
|
|
71
|
+
/** @type {{ module: string, name: string, value: string }[]} */
|
|
70
72
|
const properties = [];
|
|
71
73
|
const usedWasmDependencies = WebAssemblyUtils.getUsedDependencies(
|
|
72
74
|
moduleGraph,
|
|
@@ -136,6 +138,7 @@ const generateImportObject = (
|
|
|
136
138
|
}
|
|
137
139
|
}
|
|
138
140
|
|
|
141
|
+
/** @type {string[]} */
|
|
139
142
|
let importObject;
|
|
140
143
|
if (mangle) {
|
|
141
144
|
importObject = [
|
|
@@ -102,6 +102,8 @@ Add an async split point (i. e. import()) somewhere between your entrypoint and
|
|
|
102
102
|
${moduleChains.map((s) => `* ${s}`).join("\n")}`;
|
|
103
103
|
|
|
104
104
|
super(message);
|
|
105
|
+
|
|
106
|
+
/** @type {string} */
|
|
105
107
|
this.name = "WebAssemblyInInitialChunkError";
|
|
106
108
|
this.hideStack = true;
|
|
107
109
|
this.module = module;
|
|
@@ -60,17 +60,21 @@ class WebAssemblyJavascriptGenerator extends Generator {
|
|
|
60
60
|
const exportsInfo = moduleGraph.getExportsInfo(module);
|
|
61
61
|
|
|
62
62
|
let needExportsCopy = false;
|
|
63
|
+
/** @typedef {{ dependency: ModuleDependency | undefined, importVar: string, index: number, request: string | undefined, names: Set<string>, reexports: string[] }} ImportData */
|
|
64
|
+
/** @type {Map<Module, ImportData>} */
|
|
63
65
|
const importedModules = new Map();
|
|
66
|
+
/** @type {string[]} */
|
|
64
67
|
const initParams = [];
|
|
65
68
|
let index = 0;
|
|
66
69
|
for (const dep of module.dependencies) {
|
|
67
70
|
const moduleDep =
|
|
68
71
|
dep && dep instanceof ModuleDependency ? dep : undefined;
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
const mod = moduleGraph.getModule(dep);
|
|
73
|
+
if (mod) {
|
|
74
|
+
let importData = importedModules.get(mod);
|
|
71
75
|
if (importData === undefined) {
|
|
72
76
|
importedModules.set(
|
|
73
|
-
|
|
77
|
+
mod,
|
|
74
78
|
(importData = {
|
|
75
79
|
dependency: moduleDep,
|
|
76
80
|
importVar: `m${index}`,
|
|
@@ -13,7 +13,7 @@ const {
|
|
|
13
13
|
const { WEBASSEMBLY_MODULE_TYPE_SYNC } = require("../ModuleTypeConstants");
|
|
14
14
|
const WebAssemblyExportImportedDependency = require("../dependencies/WebAssemblyExportImportedDependency");
|
|
15
15
|
const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDependency");
|
|
16
|
-
const {
|
|
16
|
+
const { compareModulesByFullName } = require("../util/comparators");
|
|
17
17
|
const memoize = require("../util/memoize");
|
|
18
18
|
const WebAssemblyInInitialChunkError = require("./WebAssemblyInInitialChunkError");
|
|
19
19
|
|
|
@@ -89,7 +89,7 @@ class WebAssemblyModulesPlugin {
|
|
|
89
89
|
|
|
90
90
|
for (const module of chunkGraph.getOrderedChunkModulesIterable(
|
|
91
91
|
chunk,
|
|
92
|
-
|
|
92
|
+
compareModulesByFullName(compiler)
|
|
93
93
|
)) {
|
|
94
94
|
if (module.type === WEBASSEMBLY_MODULE_TYPE_SYNC) {
|
|
95
95
|
const filenameTemplate = outputOptions.webassemblyModuleFilename;
|
|
@@ -92,7 +92,8 @@ class WebAssemblyParser extends Parser {
|
|
|
92
92
|
/** @type {Record<string, string> | undefined} */
|
|
93
93
|
let jsIncompatibleExports = (buildMeta.jsIncompatibleExports = undefined);
|
|
94
94
|
|
|
95
|
-
/** @
|
|
95
|
+
/** @typedef {ModuleImport | null} ImportNode */
|
|
96
|
+
/** @type {ImportNode[]} */
|
|
96
97
|
const importedGlobals = [];
|
|
97
98
|
|
|
98
99
|
t.traverse(module, {
|
|
@@ -139,6 +140,7 @@ class WebAssemblyParser extends Parser {
|
|
|
139
140
|
Global({ node }) {
|
|
140
141
|
const init = node.init[0];
|
|
141
142
|
|
|
143
|
+
/** @type {ImportNode} */
|
|
142
144
|
let importNode = null;
|
|
143
145
|
|
|
144
146
|
if (init.id === "get_global") {
|
|
@@ -56,6 +56,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
|
56
56
|
*/
|
|
57
57
|
constructor(runtimeRequirements) {
|
|
58
58
|
super("jsonp chunk loading", RuntimeModule.STAGE_ATTACH);
|
|
59
|
+
/** @type {ReadOnlyRuntimeRequirements} */
|
|
59
60
|
this._runtimeRequirements = runtimeRequirements;
|
|
60
61
|
}
|
|
61
62
|
|
package/lib/webpack.js
CHANGED
|
@@ -15,19 +15,25 @@ const {
|
|
|
15
15
|
applyWebpackOptionsBaseDefaults,
|
|
16
16
|
applyWebpackOptionsDefaults
|
|
17
17
|
} = require("./config/defaults");
|
|
18
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
applyWebpackOptionsInterception,
|
|
20
|
+
getNormalizedWebpackOptions
|
|
21
|
+
} = require("./config/normalization");
|
|
19
22
|
const NodeEnvironmentPlugin = require("./node/NodeEnvironmentPlugin");
|
|
20
23
|
const memoize = require("./util/memoize");
|
|
21
24
|
|
|
22
25
|
/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */
|
|
23
|
-
/** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */
|
|
24
26
|
/** @typedef {import("./config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptionsNormalizedWithDefaults */
|
|
27
|
+
/** @typedef {import("./config/normalization").WebpackOptionsInterception} WebpackOptionsInterception */
|
|
25
28
|
/** @typedef {import("./Compiler").WatchOptions} WatchOptions */
|
|
26
29
|
/** @typedef {import("./MultiCompiler").MultiCompilerOptions} MultiCompilerOptions */
|
|
27
30
|
/** @typedef {import("./MultiCompiler").MultiWebpackOptions} MultiWebpackOptions */
|
|
28
31
|
/** @typedef {import("./MultiStats")} MultiStats */
|
|
29
32
|
/** @typedef {import("./Stats")} Stats */
|
|
30
33
|
|
|
34
|
+
/** @typedef {(this: Compiler, compiler: Compiler) => void} WebpackPluginFunction */
|
|
35
|
+
/** @typedef {(compiler: Compiler) => void} WebpackPluginInstance */
|
|
36
|
+
|
|
31
37
|
const getValidateSchema = memoize(() => require("./validateSchema"));
|
|
32
38
|
|
|
33
39
|
/**
|
|
@@ -68,8 +74,13 @@ const createMultiCompiler = (childOptions, options) => {
|
|
|
68
74
|
* @returns {Compiler} a compiler
|
|
69
75
|
*/
|
|
70
76
|
const createCompiler = (rawOptions, compilerIndex) => {
|
|
71
|
-
|
|
77
|
+
let options = getNormalizedWebpackOptions(rawOptions);
|
|
72
78
|
applyWebpackOptionsBaseDefaults(options);
|
|
79
|
+
|
|
80
|
+
/** @type {WebpackOptionsInterception=} */
|
|
81
|
+
let interception;
|
|
82
|
+
({ options, interception } = applyWebpackOptionsInterception(options));
|
|
83
|
+
|
|
73
84
|
const compiler = new Compiler(
|
|
74
85
|
/** @type {string} */ (options.context),
|
|
75
86
|
options
|
|
@@ -99,7 +110,8 @@ const createCompiler = (rawOptions, compilerIndex) => {
|
|
|
99
110
|
new WebpackOptionsApply().process(
|
|
100
111
|
/** @type {WebpackOptionsNormalizedWithDefaults} */
|
|
101
112
|
(options),
|
|
102
|
-
compiler
|
|
113
|
+
compiler,
|
|
114
|
+
interception
|
|
103
115
|
);
|
|
104
116
|
compiler.hooks.initialize.call();
|
|
105
117
|
return compiler;
|
|
@@ -30,7 +30,9 @@ class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
|
|
|
30
30
|
*/
|
|
31
31
|
constructor(runtimeRequirements, withCreateScriptUrl) {
|
|
32
32
|
super("importScripts chunk loading", RuntimeModule.STAGE_ATTACH);
|
|
33
|
+
/** @type {ReadOnlyRuntimeRequirements} */
|
|
33
34
|
this.runtimeRequirements = runtimeRequirements;
|
|
35
|
+
/** @type {boolean} */
|
|
34
36
|
this._withCreateScriptUrl = withCreateScriptUrl;
|
|
35
37
|
}
|
|
36
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webpack",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.105.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,7 +32,7 @@
|
|
|
32
32
|
"prepare": "husky",
|
|
33
33
|
"setup": "node ./setup/setup.js",
|
|
34
34
|
"prelint": "yarn setup",
|
|
35
|
-
"lint": "yarn lint:code && yarn lint:special && yarn lint:types && yarn lint:types-test && yarn lint:types-benchmark && yarn lint:types-module-test && yarn lint:types-hot && yarn
|
|
35
|
+
"lint": "yarn lint:code && yarn lint:special && yarn lint:types && yarn lint:types-test && yarn lint:types-benchmark && yarn lint:types-module-test && yarn lint:types-hot && yarn fmt:check && yarn lint:spellcheck",
|
|
36
36
|
"lint:code": "node node_modules/eslint/bin/eslint.js --cache .",
|
|
37
37
|
"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/compile-to-definitions && node node_modules/tooling/precompile-schemas && node node_modules/tooling/generate-types --no-template-literals",
|
|
38
38
|
"lint:types": "tsc",
|
|
@@ -40,40 +40,38 @@
|
|
|
40
40
|
"lint:types-benchmark": "tsc -p tsconfig.types.benchmark.json",
|
|
41
41
|
"lint:types-hot": "tsc -p tsconfig.hot.json",
|
|
42
42
|
"lint:types-module-test": "tsc -p tsconfig.module.test.json",
|
|
43
|
-
"lint:yarn": "yarn-deduplicate --fail --list -s highest yarn.lock",
|
|
44
43
|
"lint:spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
|
|
45
|
-
"report:types": "rimraf coverage && yarn cover:types && yarn cover:report && open-cli coverage/lcov-report/index.html",
|
|
46
44
|
"validate:types": "tsc -p tsconfig.validation.json",
|
|
47
45
|
"fmt": "yarn fmt:base --log-level warn --write",
|
|
48
46
|
"fmt:check": "yarn fmt:base --check",
|
|
49
47
|
"fmt:base": "node node_modules/prettier/bin/prettier.cjs --cache --ignore-unknown .",
|
|
50
|
-
"fix": "yarn fix:code && yarn fix:
|
|
48
|
+
"fix": "yarn fix:code && yarn fix:special && yarn fmt",
|
|
51
49
|
"fix:code": "yarn lint:code --fix",
|
|
52
|
-
"fix:yarn": "yarn-deduplicate -s highest yarn.lock",
|
|
53
50
|
"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/compile-to-definitions --write && node node_modules/tooling/precompile-schemas --write && node node_modules/tooling/generate-types --no-template-literals --write",
|
|
54
51
|
"build:examples": "cd examples && node buildAll.js",
|
|
55
52
|
"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",
|
|
56
53
|
"pretest": "yarn lint",
|
|
57
54
|
"test": "yarn test:base",
|
|
58
|
-
"test:
|
|
55
|
+
"test:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --logHeapUsage",
|
|
59
56
|
"test:basic": "yarn test:base --testMatch \"<rootDir>/test/*.basictest.js\"",
|
|
60
57
|
"test:basic:deno": "yarn test:base:deno --testMatch \"<rootDir>/test/*.basictest.js\"",
|
|
61
58
|
"test:unit": "yarn test:base --testMatch \"<rootDir>/test/*.unittest.js\"",
|
|
62
59
|
"test:integration": "yarn test:base --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\"",
|
|
63
60
|
"test:base:deno": "deno --allow-read --allow-env --allow-sys --allow-ffi --allow-write --allow-run --v8-flags='--max-old-space-size=4096' ./node_modules/jest-cli/bin/jest.js --logHeapUsage",
|
|
64
|
-
"test:
|
|
65
|
-
"cover": "
|
|
66
|
-
"cover:clean": "rimraf .nyc_output coverage",
|
|
61
|
+
"test:update-snapshots": "yarn test:base -u",
|
|
62
|
+
"report:cover": "nyc report --reporter=lcov --reporter=text -t coverage",
|
|
63
|
+
"report:cover:clean": "rimraf .nyc_output coverage",
|
|
64
|
+
"report:cover:merge": "yarn mkdirp .nyc_output && nyc merge .nyc_output coverage/coverage-nyc.json && rimraf .nyc_output",
|
|
65
|
+
"types:cover": "node node_modules/tooling/type-coverage",
|
|
66
|
+
"types:cover:report": "rimraf coverage && yarn types:cover && yarn report:cover && open-cli coverage/lcov-report/index.html",
|
|
67
|
+
"cover": "yarn cover:all && yarn report:cover",
|
|
68
|
+
"cover:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage",
|
|
67
69
|
"cover:all": "yarn cover:base --coverage",
|
|
68
70
|
"cover:unit": "yarn cover:base --testMatch \"<rootDir>/test/*.unittest.js\" --coverage",
|
|
69
71
|
"cover:basic": "yarn cover:base --testMatch \"<rootDir>/test/*.basictest.js\" --coverage",
|
|
70
72
|
"cover:integration": "yarn cover:base --testMatch \"<rootDir>/test/*.{basictest,longtest,test}.js\" --coverage",
|
|
71
73
|
"cover:integration:a": "yarn cover:base --testMatch \"<rootDir>/test/*.{basictest,test}.js\" --coverage",
|
|
72
|
-
"cover:integration:b": "yarn cover:base --testMatch \"<rootDir>/test/*.longtest.js\" --coverage"
|
|
73
|
-
"cover:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --logHeapUsage",
|
|
74
|
-
"cover:types": "node node_modules/tooling/type-coverage",
|
|
75
|
-
"cover:merge": "yarn mkdirp .nyc_output && nyc merge .nyc_output coverage/coverage-nyc.json && rimraf .nyc_output",
|
|
76
|
-
"cover:report": "nyc report --reporter=lcov --reporter=text -t coverage"
|
|
74
|
+
"cover:integration:b": "yarn cover:base --testMatch \"<rootDir>/test/*.longtest.js\" --coverage"
|
|
77
75
|
},
|
|
78
76
|
"lint-staged": {
|
|
79
77
|
"*.{js,cjs,mjs}": [
|
|
@@ -95,7 +93,7 @@
|
|
|
95
93
|
"acorn-import-phases": "^1.0.3",
|
|
96
94
|
"browserslist": "^4.28.1",
|
|
97
95
|
"chrome-trace-event": "^1.0.2",
|
|
98
|
-
"enhanced-resolve": "^5.
|
|
96
|
+
"enhanced-resolve": "^5.19.0",
|
|
99
97
|
"es-module-lexer": "^2.0.0",
|
|
100
98
|
"eslint-scope": "5.1.1",
|
|
101
99
|
"events": "^3.2.0",
|
|
@@ -108,22 +106,21 @@
|
|
|
108
106
|
"schema-utils": "^4.3.3",
|
|
109
107
|
"tapable": "^2.3.0",
|
|
110
108
|
"terser-webpack-plugin": "^5.3.16",
|
|
111
|
-
"watchpack": "^2.
|
|
109
|
+
"watchpack": "^2.5.1",
|
|
112
110
|
"webpack-sources": "^3.3.3"
|
|
113
111
|
},
|
|
114
112
|
"devDependencies": {
|
|
115
113
|
"@babel/core": "^7.27.1",
|
|
116
114
|
"@babel/preset-react": "^7.27.1",
|
|
117
115
|
"@changesets/cli": "^2.29.8",
|
|
118
|
-
"@
|
|
119
|
-
"@
|
|
120
|
-
"@eslint/markdown": "^7.4.0",
|
|
121
|
-
"@stylistic/eslint-plugin": "^5.6.0",
|
|
116
|
+
"@changesets/get-github-info": "^0.7.0",
|
|
117
|
+
"@codspeed/core": "^5.1.0",
|
|
122
118
|
"@types/glob-to-regexp": "^0.4.4",
|
|
123
119
|
"@types/graceful-fs": "^4.1.9",
|
|
124
120
|
"@types/jest": "^30.0.0",
|
|
125
121
|
"@types/mime-types": "^2.1.4",
|
|
126
|
-
"@types/
|
|
122
|
+
"@types/neo-async": "^2.6.7",
|
|
123
|
+
"@types/node": "^25.1.0",
|
|
127
124
|
"@types/xxhashjs": "^0.2.4",
|
|
128
125
|
"assemblyscript": "^0.28.9",
|
|
129
126
|
"babel-loader": "^10.0.0",
|
|
@@ -137,18 +134,12 @@
|
|
|
137
134
|
"es5-ext": "^0.10.53",
|
|
138
135
|
"es6-promise-polyfill": "^1.2.0",
|
|
139
136
|
"eslint": "^9.39.2",
|
|
140
|
-
"eslint-config-
|
|
141
|
-
"eslint-config-webpack": "^4.7.3",
|
|
142
|
-
"eslint-plugin-import": "^2.32.0",
|
|
143
|
-
"eslint-plugin-jest": "^29.5.0",
|
|
144
|
-
"eslint-plugin-jsdoc": "^61.5.0",
|
|
145
|
-
"eslint-plugin-n": "^17.23.1",
|
|
146
|
-
"eslint-plugin-prettier": "^5.5.0",
|
|
147
|
-
"eslint-plugin-unicorn": "^62.0.0",
|
|
137
|
+
"eslint-config-webpack": "^4.9.1",
|
|
148
138
|
"file-loader": "^6.0.0",
|
|
149
139
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
150
|
-
"globals": "^
|
|
140
|
+
"globals": "^17.0.0",
|
|
151
141
|
"hash-wasm": "^4.9.0",
|
|
142
|
+
"html-loader": "^5.1.0",
|
|
152
143
|
"husky": "^9.0.11",
|
|
153
144
|
"istanbul": "^0.4.5",
|
|
154
145
|
"jest": "^30.2.0",
|
|
@@ -171,7 +162,7 @@
|
|
|
171
162
|
"node-gyp": "^12.1.0",
|
|
172
163
|
"nyc": "^17.1.0",
|
|
173
164
|
"open-cli": "^8.0.0",
|
|
174
|
-
"pkg-pr-new": "^0.0.
|
|
165
|
+
"pkg-pr-new": "^0.0.63",
|
|
175
166
|
"prettier": "^3.7.4",
|
|
176
167
|
"prettier-2": "npm:prettier@^2",
|
|
177
168
|
"pretty-format": "^30.0.5",
|
|
@@ -180,6 +171,12 @@
|
|
|
180
171
|
"raw-loader": "^4.0.1",
|
|
181
172
|
"react": "^19.2.3",
|
|
182
173
|
"react-dom": "^19.2.3",
|
|
174
|
+
"rehype-sanitize": "^6.0.0",
|
|
175
|
+
"rehype-stringify": "^10.0.1",
|
|
176
|
+
"remark-frontmatter": "^5.0.0",
|
|
177
|
+
"remark-gfm": "^4.0.1",
|
|
178
|
+
"remark-parse": "^11.0.0",
|
|
179
|
+
"remark-rehype": "^11.1.2",
|
|
183
180
|
"rimraf": "^3.0.2",
|
|
184
181
|
"script-loader": "^0.7.2",
|
|
185
182
|
"simple-git": "^3.28.0",
|
|
@@ -187,18 +184,18 @@
|
|
|
187
184
|
"style-loader": "^4.0.0",
|
|
188
185
|
"terser": "^5.43.1",
|
|
189
186
|
"three": "^0.182.0",
|
|
190
|
-
"tinybench": "^
|
|
187
|
+
"tinybench": "^6.0.0",
|
|
191
188
|
"toml": "^3.0.0",
|
|
192
|
-
"tooling": "webpack/tooling#v1.24.
|
|
189
|
+
"tooling": "webpack/tooling#v1.24.5",
|
|
193
190
|
"ts-loader": "^9.5.4",
|
|
194
191
|
"typescript": "^5.9.3",
|
|
192
|
+
"unified": "^11.0.5",
|
|
195
193
|
"url-loader": "^4.1.0",
|
|
196
194
|
"wast-loader": "^1.12.1",
|
|
197
195
|
"webassembly-feature": "1.3.0",
|
|
198
196
|
"webpack-cli": "^6.0.1",
|
|
199
197
|
"xxhashjs": "^0.2.2",
|
|
200
|
-
"yamljs": "^0.3.0"
|
|
201
|
-
"yarn-deduplicate": "^6.0.1"
|
|
198
|
+
"yamljs": "^0.3.0"
|
|
202
199
|
},
|
|
203
200
|
"peerDependenciesMeta": {
|
|
204
201
|
"webpack-cli": {
|