webpack 5.99.5 → 5.99.6
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 +1 -1
- package/lib/APIPlugin.js +2 -2
- package/lib/Cache.js +1 -1
- package/lib/Chunk.js +12 -9
- package/lib/Compilation.js +36 -27
- package/lib/Compiler.js +4 -3
- package/lib/ContextModule.js +2 -1
- package/lib/HotModuleReplacementPlugin.js +3 -3
- package/lib/Module.js +10 -2
- package/lib/ModuleFilenameHelpers.js +1 -1
- package/lib/ModuleGraph.js +15 -10
- package/lib/NormalModule.js +1 -1
- package/lib/PrefetchPlugin.js +1 -1
- package/lib/RecordIdsPlugin.js +1 -1
- package/lib/SourceMapDevToolPlugin.js +1 -1
- package/lib/Template.js +1 -1
- package/lib/WebpackOptionsApply.js +17 -2
- package/lib/buildChunkGraph.js +7 -2
- package/lib/cache/IdleFileCachePlugin.js +1 -1
- package/lib/cache/MemoryCachePlugin.js +2 -1
- package/lib/cache/MemoryWithGcCachePlugin.js +3 -2
- package/lib/cache/PackFileCacheStrategy.js +13 -21
- package/lib/cache/ResolverCachePlugin.js +14 -16
- package/lib/cli.js +3 -3
- package/lib/config/defaults.js +2 -2
- package/lib/config/target.js +6 -6
- package/lib/css/CssParser.js +1 -1
- package/lib/debug/ProfilingPlugin.js +1 -1
- package/lib/dependencies/ContextDependencyHelpers.js +1 -1
- package/lib/dependencies/CssIcssImportDependency.js +3 -2
- package/lib/dependencies/HarmonyExportExpressionDependency.js +1 -1
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +2 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +1 -1
- package/lib/dependencies/JsonExportsDependency.js +1 -1
- package/lib/dependencies/LocalModulesHelpers.js +1 -1
- package/lib/dependencies/RequireResolveDependency.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +2 -2
- package/lib/esm/ModuleChunkLoadingPlugin.js +20 -0
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +11 -9
- package/lib/ids/DeterministicChunkIdsPlugin.js +1 -1
- package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
- package/lib/ids/NamedChunkIdsPlugin.js +2 -2
- package/lib/ids/NamedModuleIdsPlugin.js +2 -2
- package/lib/index.js +1 -1
- package/lib/javascript/BasicEvaluatedExpression.js +2 -2
- package/lib/javascript/JavascriptParser.js +41 -37
- package/lib/library/EnableLibraryPlugin.js +15 -2
- package/lib/library/ModuleLibraryPlugin.js +6 -1
- package/lib/logging/createConsoleLogger.js +0 -1
- package/lib/node/CommonJsChunkLoadingPlugin.js +2 -2
- package/lib/node/NodeTemplatePlugin.js +2 -2
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +2 -2
- package/lib/node/ReadFileCompileWasmPlugin.js +3 -3
- package/lib/optimize/AggressiveMergingPlugin.js +1 -1
- package/lib/optimize/SplitChunksPlugin.js +2 -1
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +3 -4
- package/lib/serialization/BinaryMiddleware.js +22 -38
- package/lib/serialization/FileMiddleware.js +29 -33
- package/lib/serialization/ObjectMiddleware.js +29 -30
- package/lib/serialization/Serializer.js +29 -18
- package/lib/serialization/SerializerMiddleware.js +105 -72
- package/lib/serialization/SingleItemMiddleware.js +4 -5
- package/lib/stats/DefaultStatsFactoryPlugin.js +39 -24
- package/lib/stats/DefaultStatsPrinterPlugin.js +267 -80
- package/lib/stats/StatsFactory.js +47 -10
- package/lib/stats/StatsPrinter.js +52 -31
- package/lib/util/ArrayQueue.js +1 -1
- package/lib/util/AsyncQueue.js +1 -1
- package/lib/util/TupleQueue.js +9 -7
- package/lib/util/TupleSet.js +37 -18
- package/lib/util/WeakTupleMap.js +50 -37
- package/lib/util/cleverMerge.js +2 -2
- package/lib/util/comparators.js +1 -1
- package/lib/util/createHash.js +1 -1
- package/lib/util/fs.js +1 -1
- package/lib/util/makeSerializable.js +1 -1
- package/lib/util/runtime.js +1 -0
- package/lib/util/serialization.js +50 -42
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +1 -1
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +1 -1
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +2 -2
- package/lib/wasm-sync/WebAssemblyGenerator.js +1 -1
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +1 -1
- package/lib/web/FetchCompileWasmPlugin.js +2 -2
- package/lib/webpack.js +1 -1
- package/package.json +1 -1
- package/types.d.ts +125 -73
package/types.d.ts
CHANGED
@@ -669,7 +669,15 @@ declare abstract class BasicEvaluatedExpression {
|
|
669
669
|
/**
|
670
670
|
* Gets the compile-time value of the expression
|
671
671
|
*/
|
672
|
-
asCompileTimeValue():
|
672
|
+
asCompileTimeValue():
|
673
|
+
| undefined
|
674
|
+
| null
|
675
|
+
| string
|
676
|
+
| number
|
677
|
+
| bigint
|
678
|
+
| boolean
|
679
|
+
| RegExp
|
680
|
+
| any[];
|
673
681
|
isTruthy(): boolean;
|
674
682
|
isFalsy(): boolean;
|
675
683
|
isNullish(): undefined | boolean;
|
@@ -1116,7 +1124,7 @@ declare class Chunk {
|
|
1116
1124
|
getChildIdsByOrders(
|
1117
1125
|
chunkGraph: ChunkGraph,
|
1118
1126
|
filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
|
1119
|
-
): Record<string,
|
1127
|
+
): Record<string, ChunkId[]>;
|
1120
1128
|
getChildrenOfTypeInOrder(
|
1121
1129
|
chunkGraph: ChunkGraph,
|
1122
1130
|
type: string
|
@@ -1476,6 +1484,7 @@ declare interface ChunkModuleMaps {
|
|
1476
1484
|
id: Record<string | number, (string | number)[]>;
|
1477
1485
|
hash: Record<string | number, string>;
|
1478
1486
|
}
|
1487
|
+
type ChunkName = null | string;
|
1479
1488
|
declare interface ChunkPathData {
|
1480
1489
|
id: string | number;
|
1481
1490
|
name?: string;
|
@@ -1987,8 +1996,8 @@ declare class Compilation {
|
|
1987
1996
|
chunkTemplate: ChunkTemplate;
|
1988
1997
|
runtimeTemplate: RuntimeTemplate;
|
1989
1998
|
moduleTemplates: ModuleTemplates;
|
1990
|
-
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
|
1991
|
-
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
|
1999
|
+
moduleMemCaches?: Map<Module, WeakTupleMap<any[], any>>;
|
2000
|
+
moduleMemCaches2?: Map<Module, WeakTupleMap<any[], any>>;
|
1992
2001
|
moduleGraph: ModuleGraph;
|
1993
2002
|
chunkGraph: ChunkGraph;
|
1994
2003
|
codeGenerationResults: CodeGenerationResults;
|
@@ -3073,7 +3082,7 @@ declare interface ContextModuleOptions {
|
|
3073
3082
|
resource: string | false | string[];
|
3074
3083
|
resourceQuery?: string;
|
3075
3084
|
resourceFragment?: string;
|
3076
|
-
resolveOptions
|
3085
|
+
resolveOptions?: ResolveOptions;
|
3077
3086
|
}
|
3078
3087
|
declare class ContextReplacementPlugin {
|
3079
3088
|
constructor(
|
@@ -3114,6 +3123,7 @@ type CreateWriteStreamFSImplementation = FSImplementation & {
|
|
3114
3123
|
write: (...args: any[]) => any;
|
3115
3124
|
close?: (...args: any[]) => any;
|
3116
3125
|
};
|
3126
|
+
declare interface CreatedObject<T, F> {}
|
3117
3127
|
|
3118
3128
|
/**
|
3119
3129
|
* Generator options for css/auto modules.
|
@@ -3936,8 +3946,9 @@ declare class EnableChunkLoadingPlugin {
|
|
3936
3946
|
static checkEnabled(compiler: Compiler, type: string): void;
|
3937
3947
|
}
|
3938
3948
|
declare class EnableLibraryPlugin {
|
3939
|
-
constructor(type: string);
|
3949
|
+
constructor(type: string, options?: EnableLibraryPluginOptions);
|
3940
3950
|
type: string;
|
3951
|
+
options: EnableLibraryPluginOptions;
|
3941
3952
|
|
3942
3953
|
/**
|
3943
3954
|
* Apply the plugin
|
@@ -3946,6 +3957,12 @@ declare class EnableLibraryPlugin {
|
|
3946
3957
|
static setEnabled(compiler: Compiler, type: string): void;
|
3947
3958
|
static checkEnabled(compiler: Compiler, type: string): void;
|
3948
3959
|
}
|
3960
|
+
declare interface EnableLibraryPluginOptions {
|
3961
|
+
/**
|
3962
|
+
* function that runs when applying the current plugin.
|
3963
|
+
*/
|
3964
|
+
additionalApply?: () => void;
|
3965
|
+
}
|
3949
3966
|
declare class EnableWasmLoadingPlugin {
|
3950
3967
|
constructor(type: string);
|
3951
3968
|
type: string;
|
@@ -4330,6 +4347,7 @@ declare class EvalSourceMapDevToolPlugin {
|
|
4330
4347
|
*/
|
4331
4348
|
apply(compiler: Compiler): void;
|
4332
4349
|
}
|
4350
|
+
type ExcludeModulesType = "module" | "chunk" | "root-of-chunk" | "nested";
|
4333
4351
|
declare interface ExecuteModuleArgument {
|
4334
4352
|
module: Module;
|
4335
4353
|
moduleObject?: ExecuteModuleObject;
|
@@ -7757,7 +7775,7 @@ declare interface KnownNormalizedStatsOptions {
|
|
7757
7775
|
excludeModules: ((
|
7758
7776
|
name: string,
|
7759
7777
|
module: StatsModule,
|
7760
|
-
type:
|
7778
|
+
type: ExcludeModulesType
|
7761
7779
|
) => boolean)[];
|
7762
7780
|
warningsFilter: ((warning: StatsError, textValue: string) => boolean)[];
|
7763
7781
|
cachedModules: boolean;
|
@@ -7791,12 +7809,12 @@ declare interface KnownStatsAsset {
|
|
7791
7809
|
comparedForEmit: boolean;
|
7792
7810
|
cached: boolean;
|
7793
7811
|
related?: StatsAsset[];
|
7794
|
-
|
7795
|
-
|
7796
|
-
|
7797
|
-
|
7798
|
-
|
7799
|
-
auxiliaryChunkIdHints?:
|
7812
|
+
chunks?: ChunkId[];
|
7813
|
+
chunkNames?: ChunkName[];
|
7814
|
+
chunkIdHints?: string[];
|
7815
|
+
auxiliaryChunks?: ChunkId[];
|
7816
|
+
auxiliaryChunkNames?: ChunkName[];
|
7817
|
+
auxiliaryChunkIdHints?: string[];
|
7800
7818
|
filteredRelated?: number;
|
7801
7819
|
isOverSizeLimit?: boolean;
|
7802
7820
|
}
|
@@ -7814,7 +7832,7 @@ declare interface KnownStatsChunk {
|
|
7814
7832
|
files: string[];
|
7815
7833
|
auxiliaryFiles: string[];
|
7816
7834
|
hash: string;
|
7817
|
-
childrenByOrder: Record<string,
|
7835
|
+
childrenByOrder: Record<string, ChunkId[]>;
|
7818
7836
|
id?: string | number;
|
7819
7837
|
siblings?: (string | number)[];
|
7820
7838
|
parents?: (string | number)[];
|
@@ -7845,7 +7863,7 @@ declare interface KnownStatsChunkOrigin {
|
|
7845
7863
|
moduleId?: string | number;
|
7846
7864
|
}
|
7847
7865
|
declare interface KnownStatsCompilation {
|
7848
|
-
env?: any
|
7866
|
+
env?: Record<string, any>;
|
7849
7867
|
name?: string;
|
7850
7868
|
hash?: string;
|
7851
7869
|
version?: string;
|
@@ -7868,6 +7886,8 @@ declare interface KnownStatsCompilation {
|
|
7868
7886
|
warningsCount?: number;
|
7869
7887
|
children?: StatsCompilation[];
|
7870
7888
|
logging?: Record<string, StatsLogging>;
|
7889
|
+
filteredWarningDetailsCount?: number;
|
7890
|
+
filteredErrorDetailsCount?: number;
|
7871
7891
|
}
|
7872
7892
|
declare interface KnownStatsError {
|
7873
7893
|
message: string;
|
@@ -7936,7 +7956,7 @@ declare interface KnownStatsModule {
|
|
7936
7956
|
dependent?: boolean;
|
7937
7957
|
issuer?: null | string;
|
7938
7958
|
issuerName?: null | string;
|
7939
|
-
issuerPath?: StatsModuleIssuer[];
|
7959
|
+
issuerPath?: null | StatsModuleIssuer[];
|
7940
7960
|
failed?: boolean;
|
7941
7961
|
errors?: number;
|
7942
7962
|
warnings?: number;
|
@@ -7982,13 +8002,13 @@ declare interface KnownStatsModuleTraceItem {
|
|
7982
8002
|
originId?: string | number;
|
7983
8003
|
moduleId?: string | number;
|
7984
8004
|
}
|
7985
|
-
declare interface
|
7986
|
-
bold?: (
|
7987
|
-
yellow?: (
|
7988
|
-
red?: (
|
7989
|
-
green?: (
|
7990
|
-
magenta?: (
|
7991
|
-
cyan?: (
|
8005
|
+
declare interface KnownStatsPrinterColorFunctions {
|
8006
|
+
bold?: (value: string | number) => string;
|
8007
|
+
yellow?: (value: string | number) => string;
|
8008
|
+
red?: (value: string | number) => string;
|
8009
|
+
green?: (value: string | number) => string;
|
8010
|
+
magenta?: (value: string | number) => string;
|
8011
|
+
cyan?: (value: string | number) => string;
|
7992
8012
|
}
|
7993
8013
|
declare interface KnownStatsPrinterContext {
|
7994
8014
|
type?: string;
|
@@ -8173,6 +8193,20 @@ declare interface LazyCompilationOptions {
|
|
8173
8193
|
*/
|
8174
8194
|
test?: string | RegExp | ((module: Module) => boolean);
|
8175
8195
|
}
|
8196
|
+
type LazyFunction<
|
8197
|
+
InputValue,
|
8198
|
+
OutputValue,
|
8199
|
+
InternalLazyTarget extends SerializerMiddleware<
|
8200
|
+
any,
|
8201
|
+
any,
|
8202
|
+
Record<string, any>
|
8203
|
+
>,
|
8204
|
+
InternalLazyOptions extends undefined | LazyOptions
|
8205
|
+
> = (() => InputValue | Promise<InputValue>) &
|
8206
|
+
Partial<{ options: InternalLazyOptions }>;
|
8207
|
+
declare interface LazyOptions {
|
8208
|
+
[index: string]: any;
|
8209
|
+
}
|
8176
8210
|
declare class LazySet<T> {
|
8177
8211
|
constructor(iterable?: Iterable<T>);
|
8178
8212
|
get size(): number;
|
@@ -9340,14 +9374,20 @@ declare class ModuleGraph {
|
|
9340
9374
|
getMetaIfExisting(thing: object): any;
|
9341
9375
|
freeze(cacheStage?: string): void;
|
9342
9376
|
unfreeze(): void;
|
9343
|
-
cached<T,
|
9344
|
-
fn: (moduleGraph: ModuleGraph, ...args: T[]) =>
|
9377
|
+
cached<T, R>(
|
9378
|
+
fn: (moduleGraph: ModuleGraph, ...args: T[]) => R,
|
9345
9379
|
...args: T[]
|
9346
|
-
):
|
9380
|
+
): R;
|
9347
9381
|
setModuleMemCaches(
|
9348
|
-
moduleMemCaches: Map<Module, WeakTupleMap<any, any>>
|
9382
|
+
moduleMemCaches: Map<Module, WeakTupleMap<any[], any>>
|
9349
9383
|
): void;
|
9350
|
-
dependencyCacheProvide
|
9384
|
+
dependencyCacheProvide<D extends Dependency, ARGS extends any[], R>(
|
9385
|
+
dependency: D,
|
9386
|
+
...args: [
|
9387
|
+
ARGS,
|
9388
|
+
...((moduleGraph: ModuleGraph, dependency: D, ...args: ARGS) => R)[]
|
9389
|
+
]
|
9390
|
+
): R;
|
9351
9391
|
static getModuleGraphForModule(
|
9352
9392
|
module: Module,
|
9353
9393
|
deprecateMessage: string,
|
@@ -9413,7 +9453,7 @@ type ModuleInfo = ConcatenatedModuleInfo | ExternalModuleInfo;
|
|
9413
9453
|
declare interface ModuleMemCachesItem {
|
9414
9454
|
buildInfo: BuildInfo;
|
9415
9455
|
references?: WeakMap<Dependency, Module>;
|
9416
|
-
memCache: WeakTupleMap<
|
9456
|
+
memCache: WeakTupleMap<any[], any>;
|
9417
9457
|
}
|
9418
9458
|
|
9419
9459
|
/**
|
@@ -10253,7 +10293,7 @@ declare class NullDependencyTemplate extends DependencyTemplate {
|
|
10253
10293
|
}
|
10254
10294
|
declare interface ObjectDeserializerContext {
|
10255
10295
|
read: () => any;
|
10256
|
-
setCircularReference: (value
|
10296
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
10257
10297
|
}
|
10258
10298
|
declare interface ObjectEncodingOptions {
|
10259
10299
|
encoding?:
|
@@ -10280,11 +10320,14 @@ declare interface ObjectSerializer {
|
|
10280
10320
|
}
|
10281
10321
|
declare interface ObjectSerializerContext {
|
10282
10322
|
write: (value?: any) => void;
|
10283
|
-
setCircularReference: (value
|
10323
|
+
setCircularReference: (value: ReferenceableItem) => void;
|
10284
10324
|
snapshot: () => ObjectSerializerSnapshot;
|
10285
10325
|
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
10286
10326
|
writeLazy?: (item?: any) => void;
|
10287
|
-
writeSeparate?: (
|
10327
|
+
writeSeparate?: (
|
10328
|
+
item: any,
|
10329
|
+
obj?: LazyOptions
|
10330
|
+
) => LazyFunction<any, any, any, LazyOptions>;
|
10288
10331
|
}
|
10289
10332
|
declare interface ObjectSerializerSnapshot {
|
10290
10333
|
length: number;
|
@@ -11614,7 +11657,7 @@ declare interface PreparsedAst {
|
|
11614
11657
|
}
|
11615
11658
|
declare interface PrintedElement {
|
11616
11659
|
element: string;
|
11617
|
-
content
|
11660
|
+
content?: string;
|
11618
11661
|
}
|
11619
11662
|
declare interface Problem {
|
11620
11663
|
type: ProblemType;
|
@@ -11639,7 +11682,7 @@ declare class Profiler {
|
|
11639
11682
|
inspector: any;
|
11640
11683
|
hasSession(): boolean;
|
11641
11684
|
startProfiling(): Promise<void> | Promise<[any, any, any]>;
|
11642
|
-
sendCommand(method: string, params
|
11685
|
+
sendCommand(method: string, params?: Record<string, any>): Promise<any>;
|
11643
11686
|
destroy(): Promise<void>;
|
11644
11687
|
stopProfiling(): Promise<{ profile: any }>;
|
11645
11688
|
}
|
@@ -12445,6 +12488,7 @@ type RecursiveArrayOrRecord<T> =
|
|
12445
12488
|
| { [index: string]: RecursiveArrayOrRecord<T> }
|
12446
12489
|
| RecursiveArrayOrRecord<T>[]
|
12447
12490
|
| T;
|
12491
|
+
type ReferenceableItem = string | object;
|
12448
12492
|
declare interface ReferencedExport {
|
12449
12493
|
/**
|
12450
12494
|
* name of the referenced export
|
@@ -14188,31 +14232,36 @@ declare interface ScopeInfo {
|
|
14188
14232
|
inTry: boolean;
|
14189
14233
|
isStrict: boolean;
|
14190
14234
|
isAsmJs: boolean;
|
14191
|
-
|
14192
|
-
/**
|
14193
|
-
* false for unknown state
|
14194
|
-
*/
|
14195
|
-
inExecutedPath: boolean;
|
14196
|
-
terminated?: "return" | "throw";
|
14235
|
+
terminated?: 1 | 2;
|
14197
14236
|
}
|
14198
14237
|
declare interface Selector<A, B> {
|
14199
14238
|
(input: A): undefined | null | B;
|
14200
14239
|
}
|
14201
|
-
declare abstract class Serializer {
|
14202
|
-
serializeMiddlewares: SerializerMiddleware<any, any>[];
|
14203
|
-
deserializeMiddlewares: SerializerMiddleware<any, any>[];
|
14204
|
-
context
|
14205
|
-
serialize(
|
14206
|
-
|
14207
|
-
|
14208
|
-
|
14240
|
+
declare abstract class Serializer<DeserializedValue, SerializedValue, Context> {
|
14241
|
+
serializeMiddlewares: SerializerMiddleware<any, any, any>[];
|
14242
|
+
deserializeMiddlewares: SerializerMiddleware<any, any, any>[];
|
14243
|
+
context?: Context;
|
14244
|
+
serialize<ExtendedContext>(
|
14245
|
+
obj: DeserializedValue | Promise<DeserializedValue>,
|
14246
|
+
context: Context & ExtendedContext
|
14247
|
+
): Promise<SerializedValue>;
|
14248
|
+
deserialize<ExtendedContext>(
|
14249
|
+
value: SerializedValue | Promise<SerializedValue>,
|
14250
|
+
context: Context & ExtendedContext
|
14251
|
+
): Promise<DeserializedValue>;
|
14252
|
+
}
|
14253
|
+
declare abstract class SerializerMiddleware<
|
14254
|
+
DeserializedType,
|
14255
|
+
SerializedType,
|
14256
|
+
Context
|
14257
|
+
> {
|
14209
14258
|
serialize(
|
14210
14259
|
data: DeserializedType,
|
14211
|
-
context
|
14260
|
+
context: Context
|
14212
14261
|
): null | SerializedType | Promise<SerializedType>;
|
14213
14262
|
deserialize(
|
14214
14263
|
data: SerializedType,
|
14215
|
-
context
|
14264
|
+
context: Context
|
14216
14265
|
): DeserializedType | Promise<DeserializedType>;
|
14217
14266
|
}
|
14218
14267
|
declare class SharePlugin {
|
@@ -14840,11 +14889,11 @@ type StatsCompilation = KnownStatsCompilation & Record<string, any>;
|
|
14840
14889
|
type StatsError = KnownStatsError & Record<string, any>;
|
14841
14890
|
declare abstract class StatsFactory {
|
14842
14891
|
hooks: StatsFactoryHooks;
|
14843
|
-
create(
|
14892
|
+
create<FactoryData, FallbackCreatedObject>(
|
14844
14893
|
type: string,
|
14845
|
-
data:
|
14894
|
+
data: FactoryData,
|
14846
14895
|
baseContext: Omit<StatsFactoryContext, "type">
|
14847
|
-
):
|
14896
|
+
): CreatedObject<FactoryData, FallbackCreatedObject>;
|
14848
14897
|
}
|
14849
14898
|
type StatsFactoryContext = KnownStatsFactoryContext & Record<string, any>;
|
14850
14899
|
declare interface StatsFactoryHooks {
|
@@ -15341,23 +15390,32 @@ declare interface StatsOptions {
|
|
15341
15390
|
declare interface StatsPrintHooks {
|
15342
15391
|
sortElements: HookMap<SyncBailHook<[string[], StatsPrinterContext], void>>;
|
15343
15392
|
printElements: HookMap<
|
15344
|
-
SyncBailHook<
|
15393
|
+
SyncBailHook<
|
15394
|
+
[PrintedElement[], StatsPrinterContext],
|
15395
|
+
undefined | string | void
|
15396
|
+
>
|
15345
15397
|
>;
|
15346
15398
|
sortItems: HookMap<
|
15347
15399
|
SyncBailHook<[any[], StatsPrinterContext], boolean | void>
|
15348
15400
|
>;
|
15349
15401
|
getItemName: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
|
15350
15402
|
printItems: HookMap<
|
15351
|
-
SyncBailHook<[string[], StatsPrinterContext],
|
15403
|
+
SyncBailHook<[string[], StatsPrinterContext], undefined | string>
|
15404
|
+
>;
|
15405
|
+
print: HookMap<
|
15406
|
+
SyncBailHook<[any, StatsPrinterContext], undefined | string | void>
|
15352
15407
|
>;
|
15353
|
-
print: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
|
15354
15408
|
result: HookMap<SyncWaterfallHook<[string, StatsPrinterContext]>>;
|
15355
15409
|
}
|
15356
15410
|
declare abstract class StatsPrinter {
|
15357
15411
|
hooks: StatsPrintHooks;
|
15358
|
-
print(
|
15412
|
+
print(
|
15413
|
+
type: string,
|
15414
|
+
object?: any,
|
15415
|
+
baseContext?: StatsPrinterContext
|
15416
|
+
): undefined | string;
|
15359
15417
|
}
|
15360
|
-
type StatsPrinterContext =
|
15418
|
+
type StatsPrinterContext = KnownStatsPrinterColorFunctions &
|
15361
15419
|
KnownStatsPrinterFormatters &
|
15362
15420
|
KnownStatsPrinterContext &
|
15363
15421
|
Record<string, any>;
|
@@ -15413,12 +15471,6 @@ declare const TRANSITIVE_ONLY: unique symbol;
|
|
15413
15471
|
declare interface TagData {
|
15414
15472
|
[index: string]: any;
|
15415
15473
|
}
|
15416
|
-
|
15417
|
-
/**
|
15418
|
-
* Helper function for joining two ranges into a single range. This is useful
|
15419
|
-
* when working with AST nodes, as it allows you to combine the ranges of child nodes
|
15420
|
-
* to create the range of the _parent node_.
|
15421
|
-
*/
|
15422
15474
|
declare interface TagInfo {
|
15423
15475
|
tag: symbol;
|
15424
15476
|
data?: TagData;
|
@@ -15675,12 +15727,12 @@ declare abstract class Watching {
|
|
15675
15727
|
resume(): void;
|
15676
15728
|
close(callback: CallbackFunction_1<void>): void;
|
15677
15729
|
}
|
15678
|
-
declare abstract class WeakTupleMap<
|
15679
|
-
set(...args: [
|
15680
|
-
has(...args:
|
15681
|
-
get(...args:
|
15682
|
-
provide(...args: [
|
15683
|
-
delete(...args:
|
15730
|
+
declare abstract class WeakTupleMap<K extends any[], V> {
|
15731
|
+
set(...args: [K, ...V[]]): void;
|
15732
|
+
has(...args: K): boolean;
|
15733
|
+
get(...args: K): undefined | V;
|
15734
|
+
provide(...args: [K, ...((...args: K) => V)[]]): V;
|
15735
|
+
delete(...args: K): void;
|
15684
15736
|
clear(): void;
|
15685
15737
|
}
|
15686
15738
|
declare interface WebAssemblyRenderContext {
|
@@ -16647,11 +16699,11 @@ declare namespace exports {
|
|
16647
16699
|
) => void;
|
16648
16700
|
export const registerNotSerializable: (Constructor: Constructor) => void;
|
16649
16701
|
export const NOT_SERIALIZABLE: object;
|
16650
|
-
export const buffersSerializer: Serializer
|
16651
|
-
export let createFileSerializer: (
|
16702
|
+
export const buffersSerializer: Serializer<any, any, any>;
|
16703
|
+
export let createFileSerializer: <D, S, C>(
|
16652
16704
|
fs: IntermediateFileSystem,
|
16653
16705
|
hashFunction: string | typeof Hash
|
16654
|
-
) => Serializer
|
16706
|
+
) => Serializer<D, S, C>;
|
16655
16707
|
export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
|
16656
16708
|
}
|
16657
16709
|
export const cleverMerge: <T, O>(
|