webpack 5.90.3 → 5.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/README.md +5 -5
- package/bin/webpack.js +5 -1
- package/lib/APIPlugin.js +8 -4
- package/lib/AutomaticPrefetchPlugin.js +1 -1
- package/lib/BannerPlugin.js +3 -1
- package/lib/Cache.js +7 -1
- package/lib/CacheFacade.js +3 -3
- package/lib/ChunkGraph.js +32 -18
- package/lib/ChunkGroup.js +14 -14
- package/lib/CleanPlugin.js +7 -5
- package/lib/Compilation.js +262 -93
- package/lib/Compiler.js +199 -83
- package/lib/ConditionalInitFragment.js +4 -5
- package/lib/ContextModule.js +2 -0
- package/lib/ContextModuleFactory.js +4 -2
- package/lib/ContextReplacementPlugin.js +3 -2
- package/lib/DefinePlugin.js +4 -2
- package/lib/Dependency.js +4 -2
- package/lib/DependencyTemplate.js +7 -2
- package/lib/DllModule.js +1 -0
- package/lib/DllReferencePlugin.js +6 -2
- package/lib/EntryOptionPlugin.js +4 -1
- package/lib/EntryPlugin.js +6 -1
- package/lib/Entrypoint.js +1 -1
- package/lib/ExportsInfo.js +1 -4
- package/lib/ExternalModule.js +118 -24
- package/lib/ExternalModuleFactoryPlugin.js +37 -2
- package/lib/FileSystemInfo.js +1 -1
- package/lib/Generator.js +2 -1
- package/lib/HookWebpackError.js +2 -2
- package/lib/InitFragment.js +5 -3
- package/lib/LibManifestPlugin.js +15 -7
- package/lib/Module.js +30 -2
- package/lib/ModuleFilenameHelpers.js +1 -1
- package/lib/ModuleGraph.js +56 -27
- package/lib/ModuleGraphConnection.js +2 -1
- package/lib/MultiCompiler.js +26 -8
- package/lib/NodeStuffPlugin.js +14 -3
- package/lib/NormalModule.js +3 -1
- package/lib/NormalModuleFactory.js +1 -1
- package/lib/NormalModuleReplacementPlugin.js +5 -1
- package/lib/ProvidePlugin.js +3 -1
- package/lib/RawModule.js +2 -1
- package/lib/ResolverFactory.js +3 -1
- package/lib/RuntimeModule.js +4 -4
- package/lib/RuntimePlugin.js +1 -0
- package/lib/RuntimeTemplate.js +102 -34
- package/lib/SourceMapDevToolPlugin.js +4 -1
- package/lib/Stats.js +10 -3
- package/lib/TemplatedPathPlugin.js +32 -6
- package/lib/Watching.js +67 -60
- package/lib/WebpackError.js +6 -6
- package/lib/WebpackOptionsApply.js +18 -5
- package/lib/asset/RawDataUrlModule.js +3 -1
- package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
- package/lib/buildChunkGraph.js +117 -64
- package/lib/cache/IdleFileCachePlugin.js +8 -3
- package/lib/cache/MemoryCachePlugin.js +1 -1
- package/lib/cache/MemoryWithGcCachePlugin.js +6 -2
- package/lib/cache/PackFileCacheStrategy.js +49 -16
- package/lib/cache/ResolverCachePlugin.js +14 -6
- package/lib/cache/getLazyHashedEtag.js +1 -1
- package/lib/config/defaults.js +24 -1
- package/lib/config/normalization.js +3 -1
- package/lib/container/ContainerEntryDependency.js +2 -1
- package/lib/container/ContainerEntryModule.js +3 -1
- package/lib/container/ContainerPlugin.js +14 -10
- package/lib/container/FallbackModule.js +1 -1
- package/lib/container/RemoteRuntimeModule.js +12 -3
- package/lib/css/CssExportsGenerator.js +34 -17
- package/lib/css/CssGenerator.js +20 -2
- package/lib/css/CssLoadingRuntimeModule.js +212 -96
- package/lib/css/CssModulesPlugin.js +47 -13
- package/lib/debug/ProfilingPlugin.js +27 -2
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +9 -5
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +4 -1
- package/lib/dependencies/CommonJsDependencyHelpers.js +2 -1
- package/lib/dependencies/CommonJsExportRequireDependency.js +33 -18
- package/lib/dependencies/CommonJsExportsDependency.js +13 -5
- package/lib/dependencies/CommonJsExportsParserPlugin.js +20 -15
- package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -2
- package/lib/dependencies/ContextDependencyHelpers.js +49 -29
- package/lib/dependencies/ContextElementDependency.js +8 -1
- package/lib/dependencies/CssLocalIdentifierDependency.js +63 -8
- package/lib/dependencies/CssUrlDependency.js +5 -3
- package/lib/dependencies/ExportsInfoDependency.js +4 -3
- package/lib/dependencies/ExternalModuleInitFragment.js +5 -3
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +4 -4
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +43 -23
- package/lib/dependencies/HarmonyExportHeaderDependency.js +1 -1
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +73 -32
- package/lib/dependencies/HarmonyExportInitFragment.js +10 -2
- package/lib/dependencies/HarmonyImportDependency.js +28 -12
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +44 -16
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +7 -6
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +6 -5
- package/lib/dependencies/ImportDependency.js +9 -2
- package/lib/dependencies/ImportEagerDependency.js +4 -2
- package/lib/dependencies/ImportMetaContextDependency.js +7 -0
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +25 -14
- package/lib/dependencies/ImportParserPlugin.js +12 -4
- package/lib/dependencies/ImportWeakDependency.js +4 -2
- package/lib/dependencies/LoaderDependency.js +2 -1
- package/lib/dependencies/LoaderImportDependency.js +2 -1
- package/lib/dependencies/ModuleDependency.js +4 -5
- package/lib/dependencies/PureExpressionDependency.js +4 -1
- package/lib/dependencies/RequireContextPlugin.js +1 -1
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +26 -14
- package/lib/dependencies/RequireEnsureDependency.js +1 -1
- package/lib/dependencies/URLDependency.js +7 -4
- package/lib/dependencies/WorkerPlugin.js +2 -1
- package/lib/dependencies/getFunctionExpression.js +3 -1
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +2 -1
- package/lib/javascript/BasicEvaluatedExpression.js +2 -2
- package/lib/javascript/ChunkHelpers.js +2 -2
- package/lib/javascript/JavascriptParser.js +169 -57
- package/lib/javascript/JavascriptParserHelpers.js +1 -1
- package/lib/javascript/StartupHelpers.js +22 -5
- package/lib/logging/Logger.js +27 -2
- package/lib/logging/createConsoleLogger.js +11 -7
- package/lib/node/NodeEnvironmentPlugin.js +13 -7
- package/lib/node/NodeWatchFileSystem.js +37 -26
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +2 -1
- package/lib/node/RequireChunkLoadingRuntimeModule.js +2 -1
- package/lib/node/nodeConsole.js +24 -1
- package/lib/optimize/AggressiveSplittingPlugin.js +1 -0
- package/lib/optimize/ConcatenatedModule.js +138 -54
- package/lib/optimize/EnsureChunkConditionsPlugin.js +1 -1
- package/lib/optimize/InnerGraph.js +7 -2
- package/lib/optimize/InnerGraphPlugin.js +36 -13
- package/lib/optimize/ModuleConcatenationPlugin.js +12 -2
- package/lib/optimize/RemoveParentModulesPlugin.js +1 -0
- package/lib/optimize/RuntimeChunkPlugin.js +6 -1
- package/lib/optimize/SideEffectsFlagPlugin.js +46 -15
- package/lib/optimize/SplitChunksPlugin.js +2 -2
- package/lib/performance/SizeLimitsPlugin.js +11 -0
- package/lib/rules/ObjectMatcherRulePlugin.js +4 -0
- package/lib/runtime/EnsureChunkRuntimeModule.js +2 -1
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +2 -1
- package/lib/serialization/FileMiddleware.js +1 -0
- package/lib/serialization/ObjectMiddleware.js +2 -0
- package/lib/serialization/Serializer.js +19 -0
- package/lib/sharing/ConsumeSharedModule.js +1 -1
- package/lib/sharing/ConsumeSharedPlugin.js +17 -3
- package/lib/sharing/ConsumeSharedRuntimeModule.js +9 -2
- package/lib/sharing/ProvideSharedPlugin.js +12 -5
- package/lib/sharing/resolveMatchedConfigs.js +2 -2
- package/lib/sharing/utils.js +13 -6
- package/lib/util/StackedCacheMap.js +26 -0
- package/lib/util/WeakTupleMap.js +57 -13
- package/lib/util/cleverMerge.js +24 -11
- package/lib/util/comparators.js +34 -14
- package/lib/util/conventions.js +129 -0
- package/lib/util/fs.js +379 -65
- package/lib/util/hash/BatchedHash.js +3 -0
- package/lib/util/hash/xxhash64.js +2 -2
- package/lib/util/runtime.js +1 -1
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +4 -2
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +15 -6
- package/lib/wasm-sync/WebAssemblyGenerator.js +27 -6
- package/lib/wasm-sync/WebAssemblyParser.js +7 -4
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +2 -1
- package/lib/webpack.js +7 -3
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +2 -1
- package/package.json +25 -26
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +69 -8
- package/schemas/plugins/BannerPlugin.check.js +1 -1
- package/schemas/plugins/BannerPlugin.json +5 -1
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +1 -1
- package/types.d.ts +1668 -613
package/types.d.ts
CHANGED
@@ -83,7 +83,6 @@ import {
|
|
83
83
|
WithStatement,
|
84
84
|
YieldExpression
|
85
85
|
} from "estree";
|
86
|
-
import { Dirent } from "fs";
|
87
86
|
import {
|
88
87
|
IncomingMessage,
|
89
88
|
ServerOptions as ServerOptionsImport,
|
@@ -106,8 +105,15 @@ import {
|
|
106
105
|
SyncWaterfallHook
|
107
106
|
} from "tapable";
|
108
107
|
import { SecureContextOptions, TlsOptions } from "tls";
|
108
|
+
import { URL } from "url";
|
109
109
|
import { Context } from "vm";
|
110
110
|
|
111
|
+
declare interface Abortable {
|
112
|
+
/**
|
113
|
+
* When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
|
114
|
+
*/
|
115
|
+
signal?: AbortSignal;
|
116
|
+
}
|
111
117
|
declare class AbstractLibraryPlugin<T> {
|
112
118
|
constructor(__0: {
|
113
119
|
/**
|
@@ -237,9 +243,19 @@ declare interface ArgumentConfig {
|
|
237
243
|
type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset";
|
238
244
|
values?: any[];
|
239
245
|
}
|
240
|
-
|
241
|
-
|
242
|
-
|
246
|
+
type ArrayBufferView =
|
247
|
+
| Uint8Array
|
248
|
+
| Uint8ClampedArray
|
249
|
+
| Uint16Array
|
250
|
+
| Uint32Array
|
251
|
+
| Int8Array
|
252
|
+
| Int16Array
|
253
|
+
| Int32Array
|
254
|
+
| BigUint64Array
|
255
|
+
| BigInt64Array
|
256
|
+
| Float32Array
|
257
|
+
| Float64Array
|
258
|
+
| DataView;
|
243
259
|
declare interface Asset {
|
244
260
|
/**
|
245
261
|
* the filename of the asset
|
@@ -414,6 +430,9 @@ declare interface AsyncWebAssemblyModulesPluginOptions {
|
|
414
430
|
*/
|
415
431
|
mangleImports?: boolean;
|
416
432
|
}
|
433
|
+
declare interface Attributes {
|
434
|
+
[index: string]: any;
|
435
|
+
}
|
417
436
|
declare class AutomaticPrefetchPlugin {
|
418
437
|
constructor();
|
419
438
|
|
@@ -430,7 +449,7 @@ declare interface BackendApi {
|
|
430
449
|
declare class BannerPlugin {
|
431
450
|
constructor(options: BannerPluginArgument);
|
432
451
|
options: BannerPluginOptions;
|
433
|
-
banner: (data: { hash
|
452
|
+
banner: (data: { hash?: string; chunk: Chunk; filename: string }) => string;
|
434
453
|
|
435
454
|
/**
|
436
455
|
* Apply the plugin
|
@@ -440,14 +459,14 @@ declare class BannerPlugin {
|
|
440
459
|
type BannerPluginArgument =
|
441
460
|
| string
|
442
461
|
| BannerPluginOptions
|
443
|
-
| ((data: { hash
|
462
|
+
| ((data: { hash?: string; chunk: Chunk; filename: string }) => string);
|
444
463
|
declare interface BannerPluginOptions {
|
445
464
|
/**
|
446
465
|
* Specifies the banner.
|
447
466
|
*/
|
448
467
|
banner:
|
449
468
|
| string
|
450
|
-
| ((data: { hash
|
469
|
+
| ((data: { hash?: string; chunk: Chunk; filename: string }) => string);
|
451
470
|
|
452
471
|
/**
|
453
472
|
* If true, the banner will only be added to the entry chunks.
|
@@ -474,6 +493,11 @@ declare interface BannerPluginOptions {
|
|
474
493
|
*/
|
475
494
|
raw?: boolean;
|
476
495
|
|
496
|
+
/**
|
497
|
+
* Specifies the banner.
|
498
|
+
*/
|
499
|
+
stage?: number;
|
500
|
+
|
477
501
|
/**
|
478
502
|
* Include all modules that pass test assertion.
|
479
503
|
*/
|
@@ -484,7 +508,7 @@ declare interface BaseResolveRequest {
|
|
484
508
|
context?: object;
|
485
509
|
descriptionFilePath?: string;
|
486
510
|
descriptionFileRoot?: string;
|
487
|
-
descriptionFileData?:
|
511
|
+
descriptionFileData?: JsonObjectTypes;
|
488
512
|
relativePath?: string;
|
489
513
|
ignoreSymlinks?: boolean;
|
490
514
|
fullySpecified?: boolean;
|
@@ -683,9 +707,9 @@ declare abstract class BasicEvaluatedExpression {
|
|
683
707
|
* Wraps an array of expressions with a prefix and postfix expression.
|
684
708
|
*/
|
685
709
|
setWrapped(
|
686
|
-
prefix
|
687
|
-
postfix
|
688
|
-
innerExpressions
|
710
|
+
prefix?: null | BasicEvaluatedExpression,
|
711
|
+
postfix?: null | BasicEvaluatedExpression,
|
712
|
+
innerExpressions?: BasicEvaluatedExpression[]
|
689
713
|
): BasicEvaluatedExpression;
|
690
714
|
|
691
715
|
/**
|
@@ -817,6 +841,20 @@ declare abstract class BasicEvaluatedExpression {
|
|
817
841
|
| TemplateElement
|
818
842
|
): BasicEvaluatedExpression;
|
819
843
|
}
|
844
|
+
type BufferEncoding =
|
845
|
+
| "ascii"
|
846
|
+
| "utf8"
|
847
|
+
| "utf-8"
|
848
|
+
| "utf16le"
|
849
|
+
| "utf-16le"
|
850
|
+
| "ucs2"
|
851
|
+
| "ucs-2"
|
852
|
+
| "latin1"
|
853
|
+
| "binary"
|
854
|
+
| "base64"
|
855
|
+
| "base64url"
|
856
|
+
| "hex";
|
857
|
+
type BufferEncodingOption = "buffer" | { encoding: "buffer" };
|
820
858
|
type BuildInfo = KnownBuildInfo & Record<string, any>;
|
821
859
|
type BuildMeta = KnownBuildMeta & Record<string, any>;
|
822
860
|
declare abstract class ByTypeGenerator extends Generator {
|
@@ -843,13 +881,13 @@ declare class Cache {
|
|
843
881
|
get<T>(
|
844
882
|
identifier: string,
|
845
883
|
etag: null | Etag,
|
846
|
-
callback:
|
884
|
+
callback: CallbackCacheCache<T>
|
847
885
|
): void;
|
848
886
|
store<T>(
|
849
887
|
identifier: string,
|
850
888
|
etag: null | Etag,
|
851
889
|
data: T,
|
852
|
-
callback:
|
890
|
+
callback: CallbackCacheCache<void>
|
853
891
|
): void;
|
854
892
|
|
855
893
|
/**
|
@@ -857,11 +895,11 @@ declare class Cache {
|
|
857
895
|
*/
|
858
896
|
storeBuildDependencies(
|
859
897
|
dependencies: Iterable<string>,
|
860
|
-
callback:
|
898
|
+
callback: CallbackCacheCache<void>
|
861
899
|
): void;
|
862
900
|
beginIdle(): void;
|
863
|
-
endIdle(callback:
|
864
|
-
shutdown(callback:
|
901
|
+
endIdle(callback: CallbackCacheCache<void>): void;
|
902
|
+
shutdown(callback: CallbackCacheCache<void>): void;
|
865
903
|
static STAGE_MEMORY: number;
|
866
904
|
static STAGE_DEFAULT: number;
|
867
905
|
static STAGE_DISK: number;
|
@@ -875,14 +913,14 @@ declare abstract class CacheFacade {
|
|
875
913
|
get<T>(
|
876
914
|
identifier: string,
|
877
915
|
etag: null | Etag,
|
878
|
-
callback:
|
916
|
+
callback: CallbackCacheCacheFacade<T>
|
879
917
|
): void;
|
880
918
|
getPromise<T>(identifier: string, etag: null | Etag): Promise<T>;
|
881
919
|
store<T>(
|
882
920
|
identifier: string,
|
883
921
|
etag: null | Etag,
|
884
922
|
data: T,
|
885
|
-
callback:
|
923
|
+
callback: CallbackCacheCacheFacade<void>
|
886
924
|
): void;
|
887
925
|
storePromise<T>(
|
888
926
|
identifier: string,
|
@@ -953,18 +991,27 @@ declare interface CallExpressionInfo {
|
|
953
991
|
declare interface CallbackAsyncQueue<T> {
|
954
992
|
(err?: null | WebpackError, result?: T): any;
|
955
993
|
}
|
956
|
-
declare interface
|
957
|
-
(err
|
994
|
+
declare interface CallbackCacheCache<T> {
|
995
|
+
(err: null | WebpackError, result?: T): void;
|
996
|
+
}
|
997
|
+
declare interface CallbackCacheCacheFacade<T> {
|
998
|
+
(err?: null | Error, result?: null | T): void;
|
958
999
|
}
|
959
1000
|
declare interface CallbackFunction_1<T> {
|
960
|
-
(err
|
1001
|
+
(err: null | Error, result?: T): any;
|
961
1002
|
}
|
962
1003
|
declare interface CallbackFunction_2<T> {
|
963
|
-
(err?: null | Error,
|
1004
|
+
(err?: null | Error, result?: T): any;
|
964
1005
|
}
|
965
1006
|
declare interface CallbackNormalErrorCache<T> {
|
966
1007
|
(err?: null | Error, result?: T): void;
|
967
1008
|
}
|
1009
|
+
declare interface CallbackNormalModuleFactory<T> {
|
1010
|
+
(err?: null | Error, stats?: T): void;
|
1011
|
+
}
|
1012
|
+
declare interface CallbackWebpack<T> {
|
1013
|
+
(err: null | Error, stats?: T): void;
|
1014
|
+
}
|
968
1015
|
type Cell<T> = undefined | T;
|
969
1016
|
declare class Chunk {
|
970
1017
|
constructor(name?: string, backCompat?: boolean);
|
@@ -1157,7 +1204,7 @@ declare class ChunkGraph {
|
|
1157
1204
|
getChunkEntryModulesWithChunkGroupIterable(
|
1158
1205
|
chunk: Chunk
|
1159
1206
|
): Iterable<[Module, undefined | Entrypoint]>;
|
1160
|
-
getBlockChunkGroup(depBlock: AsyncDependenciesBlock): ChunkGroup;
|
1207
|
+
getBlockChunkGroup(depBlock: AsyncDependenciesBlock): undefined | ChunkGroup;
|
1161
1208
|
connectBlockAndChunkGroup(
|
1162
1209
|
depBlock: AsyncDependenciesBlock,
|
1163
1210
|
chunkGroup: ChunkGroup
|
@@ -1257,7 +1304,7 @@ declare abstract class ChunkGroup {
|
|
1257
1304
|
* add a chunk into ChunkGroup. Is pushed on or prepended
|
1258
1305
|
*/
|
1259
1306
|
pushChunk(chunk: Chunk): boolean;
|
1260
|
-
replaceChunk(oldChunk: Chunk, newChunk: Chunk): boolean;
|
1307
|
+
replaceChunk(oldChunk: Chunk, newChunk: Chunk): undefined | boolean;
|
1261
1308
|
removeChunk(chunk: Chunk): boolean;
|
1262
1309
|
isInitial(): boolean;
|
1263
1310
|
addChild(group: ChunkGroup): boolean;
|
@@ -1534,7 +1581,7 @@ declare interface CodeGenerationContext {
|
|
1534
1581
|
/**
|
1535
1582
|
* code generation results of other modules (need to have a codeGenerationDependency to use that)
|
1536
1583
|
*/
|
1537
|
-
codeGenerationResults
|
1584
|
+
codeGenerationResults?: CodeGenerationResults;
|
1538
1585
|
|
1539
1586
|
/**
|
1540
1587
|
* the compilation
|
@@ -1667,13 +1714,16 @@ declare class Compilation {
|
|
1667
1714
|
optimize: SyncHook<[]>;
|
1668
1715
|
optimizeModules: SyncBailHook<[Iterable<Module>], any>;
|
1669
1716
|
afterOptimizeModules: SyncHook<[Iterable<Module>]>;
|
1670
|
-
optimizeChunks: SyncBailHook<
|
1717
|
+
optimizeChunks: SyncBailHook<
|
1718
|
+
[Iterable<Chunk>, ChunkGroup[]],
|
1719
|
+
boolean | void
|
1720
|
+
>;
|
1671
1721
|
afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
|
1672
1722
|
optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
|
1673
1723
|
afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
|
1674
1724
|
optimizeChunkModules: AsyncSeriesBailHook<
|
1675
1725
|
[Iterable<Chunk>, Iterable<Module>],
|
1676
|
-
|
1726
|
+
void
|
1677
1727
|
>;
|
1678
1728
|
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
|
1679
1729
|
shouldRecord: SyncBailHook<[], undefined | boolean>;
|
@@ -1681,7 +1731,7 @@ declare class Compilation {
|
|
1681
1731
|
[Chunk, Set<string>, RuntimeRequirementsContext]
|
1682
1732
|
>;
|
1683
1733
|
runtimeRequirementInChunk: HookMap<
|
1684
|
-
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext],
|
1734
|
+
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], void>
|
1685
1735
|
>;
|
1686
1736
|
additionalModuleRuntimeRequirements: SyncHook<
|
1687
1737
|
[Module, Set<string>, RuntimeRequirementsContext]
|
@@ -1755,7 +1805,7 @@ declare class Compilation {
|
|
1755
1805
|
>;
|
1756
1806
|
afterProcessAssets: SyncHook<[CompilationAssets]>;
|
1757
1807
|
processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
|
1758
|
-
needAdditionalSeal: SyncBailHook<[], boolean>;
|
1808
|
+
needAdditionalSeal: SyncBailHook<[], undefined | boolean>;
|
1759
1809
|
afterSeal: AsyncSeriesHook<[]>;
|
1760
1810
|
renderManifest: SyncWaterfallHook<
|
1761
1811
|
[RenderManifestEntry[], RenderManifestOptions]
|
@@ -1781,8 +1831,8 @@ declare class Compilation {
|
|
1781
1831
|
get normalModuleLoader(): SyncHook<[object, NormalModule]>;
|
1782
1832
|
}>;
|
1783
1833
|
name?: string;
|
1784
|
-
startTime
|
1785
|
-
endTime
|
1834
|
+
startTime?: number;
|
1835
|
+
endTime?: number;
|
1786
1836
|
compiler: Compiler;
|
1787
1837
|
resolverFactory: ResolverFactory;
|
1788
1838
|
inputFileSystem: InputFileSystem;
|
@@ -1799,7 +1849,7 @@ declare class Compilation {
|
|
1799
1849
|
mainTemplate: MainTemplate;
|
1800
1850
|
chunkTemplate: ChunkTemplate;
|
1801
1851
|
runtimeTemplate: RuntimeTemplate;
|
1802
|
-
moduleTemplates:
|
1852
|
+
moduleTemplates: ModuleTemplates;
|
1803
1853
|
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
|
1804
1854
|
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
|
1805
1855
|
moduleGraph: ModuleGraph;
|
@@ -1853,14 +1903,14 @@ declare class Compilation {
|
|
1853
1903
|
contextDependencies: LazySet<string>;
|
1854
1904
|
missingDependencies: LazySet<string>;
|
1855
1905
|
buildDependencies: LazySet<string>;
|
1856
|
-
compilationDependencies: { add: (item
|
1906
|
+
compilationDependencies: { add: (item: string) => LazySet<string> };
|
1857
1907
|
getStats(): Stats;
|
1858
1908
|
createStatsOptions(
|
1859
1909
|
optionsOrPreset?: string | boolean | StatsOptions,
|
1860
1910
|
context?: CreateStatsOptionsContext
|
1861
1911
|
): NormalizedStatsOptions;
|
1862
|
-
createStatsFactory(options
|
1863
|
-
createStatsPrinter(options
|
1912
|
+
createStatsFactory(options: NormalizedStatsOptions): StatsFactory;
|
1913
|
+
createStatsPrinter(options: NormalizedStatsOptions): StatsPrinter;
|
1864
1914
|
getCache(name: string): CacheFacade;
|
1865
1915
|
getLogger(name: string | (() => string)): WebpackLogger;
|
1866
1916
|
addModule(
|
@@ -1932,14 +1982,14 @@ declare class Compilation {
|
|
1932
1982
|
module: Module,
|
1933
1983
|
callback: (err?: null | WebpackError, result?: Module) => void
|
1934
1984
|
): void;
|
1935
|
-
finish(callback?:
|
1985
|
+
finish(callback: (err?: null | WebpackError) => void): void;
|
1936
1986
|
unseal(): void;
|
1937
1987
|
seal(callback: (err?: null | WebpackError) => void): void;
|
1938
1988
|
reportDependencyErrorsAndWarnings(
|
1939
1989
|
module: Module,
|
1940
1990
|
blocks: DependenciesBlock[]
|
1941
1991
|
): boolean;
|
1942
|
-
codeGeneration(callback?:
|
1992
|
+
codeGeneration(callback: (err?: null | WebpackError) => void): void;
|
1943
1993
|
processRuntimeRequirements(__0?: {
|
1944
1994
|
/**
|
1945
1995
|
* the chunk graph
|
@@ -2019,7 +2069,7 @@ declare class Compilation {
|
|
2019
2069
|
newSourceOrFunction: Source | ((arg0: Source) => Source),
|
2020
2070
|
assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
|
2021
2071
|
): void;
|
2022
|
-
renameAsset(file
|
2072
|
+
renameAsset(file: string, newFile: string): void;
|
2023
2073
|
deleteAsset(file: string): void;
|
2024
2074
|
getAssets(): Readonly<Asset>[];
|
2025
2075
|
getAsset(name: string): undefined | Readonly<Asset>;
|
@@ -2238,13 +2288,13 @@ declare class Compiler {
|
|
2238
2288
|
root: Compiler;
|
2239
2289
|
outputPath: string;
|
2240
2290
|
watching?: Watching;
|
2241
|
-
outputFileSystem: OutputFileSystem;
|
2242
|
-
intermediateFileSystem: IntermediateFileSystem;
|
2243
|
-
inputFileSystem: InputFileSystem;
|
2244
|
-
watchFileSystem: WatchFileSystem;
|
2291
|
+
outputFileSystem: null | OutputFileSystem;
|
2292
|
+
intermediateFileSystem: null | IntermediateFileSystem;
|
2293
|
+
inputFileSystem: null | InputFileSystem;
|
2294
|
+
watchFileSystem: null | WatchFileSystem;
|
2245
2295
|
recordsInputPath: null | string;
|
2246
2296
|
recordsOutputPath: null | string;
|
2247
|
-
records:
|
2297
|
+
records: Record<string, any>;
|
2248
2298
|
managedPaths: Set<string | RegExp>;
|
2249
2299
|
unmanagedPaths: Set<string | RegExp>;
|
2250
2300
|
immutablePaths: Set<string | RegExp>;
|
@@ -2257,7 +2307,7 @@ declare class Compiler {
|
|
2257
2307
|
>;
|
2258
2308
|
fsStartTime?: number;
|
2259
2309
|
resolverFactory: ResolverFactory;
|
2260
|
-
infrastructureLogger: any;
|
2310
|
+
infrastructureLogger?: (arg0: string, arg1: LogTypeEnum, arg2: any[]) => void;
|
2261
2311
|
options: WebpackOptionsNormalized;
|
2262
2312
|
context: string;
|
2263
2313
|
requestShortener: RequestShortener;
|
@@ -2265,8 +2315,8 @@ declare class Compiler {
|
|
2265
2315
|
moduleMemCaches?: Map<
|
2266
2316
|
Module,
|
2267
2317
|
{
|
2268
|
-
buildInfo:
|
2269
|
-
references
|
2318
|
+
buildInfo: BuildInfo;
|
2319
|
+
references?: WeakMap<Dependency, Module>;
|
2270
2320
|
memCache: WeakTupleMap<any, any>;
|
2271
2321
|
}
|
2272
2322
|
>;
|
@@ -2276,14 +2326,11 @@ declare class Compiler {
|
|
2276
2326
|
watchMode: boolean;
|
2277
2327
|
getCache(name: string): CacheFacade;
|
2278
2328
|
getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
|
2279
|
-
watch(
|
2280
|
-
|
2281
|
-
handler: CallbackFunction_1<Stats>
|
2282
|
-
): Watching;
|
2283
|
-
run(callback: CallbackFunction_1<Stats>): void;
|
2329
|
+
watch(watchOptions: WatchOptions, handler: RunCallback<Stats>): Watching;
|
2330
|
+
run(callback: RunCallback<Stats>): void;
|
2284
2331
|
runAsChild(
|
2285
2332
|
callback: (
|
2286
|
-
err
|
2333
|
+
err: null | Error,
|
2287
2334
|
entries?: Chunk[],
|
2288
2335
|
compilation?: Compilation
|
2289
2336
|
) => any
|
@@ -2291,10 +2338,10 @@ declare class Compiler {
|
|
2291
2338
|
purgeInputFileSystem(): void;
|
2292
2339
|
emitAssets(
|
2293
2340
|
compilation: Compilation,
|
2294
|
-
callback:
|
2341
|
+
callback: CallbackFunction_2<void>
|
2295
2342
|
): void;
|
2296
|
-
emitRecords(callback:
|
2297
|
-
readRecords(callback:
|
2343
|
+
emitRecords(callback: CallbackFunction_2<void>): void;
|
2344
|
+
readRecords(callback: CallbackFunction_2<void>): void;
|
2298
2345
|
createChildCompiler(
|
2299
2346
|
compilation: Compilation,
|
2300
2347
|
compilerName: string,
|
@@ -2303,7 +2350,7 @@ declare class Compiler {
|
|
2303
2350
|
plugins?: WebpackPluginInstance[]
|
2304
2351
|
): Compiler;
|
2305
2352
|
isChild(): boolean;
|
2306
|
-
createCompilation(params
|
2353
|
+
createCompilation(params: CompilationParams): Compilation;
|
2307
2354
|
newCompilation(params: CompilationParams): Compilation;
|
2308
2355
|
createNormalModuleFactory(): NormalModuleFactory;
|
2309
2356
|
createContextModuleFactory(): ContextModuleFactory;
|
@@ -2311,8 +2358,8 @@ declare class Compiler {
|
|
2311
2358
|
normalModuleFactory: NormalModuleFactory;
|
2312
2359
|
contextModuleFactory: ContextModuleFactory;
|
2313
2360
|
};
|
2314
|
-
compile(callback:
|
2315
|
-
close(callback:
|
2361
|
+
compile(callback: RunCallback<Compilation>): void;
|
2362
|
+
close(callback: RunCallback<void>): void;
|
2316
2363
|
}
|
2317
2364
|
declare class ConcatSource extends Source {
|
2318
2365
|
constructor(...args: (string | Source)[]);
|
@@ -2576,12 +2623,12 @@ declare interface Configuration {
|
|
2576
2623
|
/**
|
2577
2624
|
* Options for the resolver.
|
2578
2625
|
*/
|
2579
|
-
resolve?:
|
2626
|
+
resolve?: ResolveOptions;
|
2580
2627
|
|
2581
2628
|
/**
|
2582
2629
|
* Options for the resolver when resolving loaders.
|
2583
2630
|
*/
|
2584
|
-
resolveLoader?:
|
2631
|
+
resolveLoader?: ResolveOptions;
|
2585
2632
|
|
2586
2633
|
/**
|
2587
2634
|
* Options affecting how file system snapshots are created and validated.
|
@@ -2858,6 +2905,7 @@ declare interface ContextModuleOptions {
|
|
2858
2905
|
*/
|
2859
2906
|
referencedExports?: null | string[][];
|
2860
2907
|
layer?: string;
|
2908
|
+
attributes?: Attributes;
|
2861
2909
|
resource: string | false | string[];
|
2862
2910
|
resourceQuery?: string;
|
2863
2911
|
resourceFragment?: string;
|
@@ -2891,15 +2939,35 @@ declare interface ContextTimestampAndHash {
|
|
2891
2939
|
}
|
2892
2940
|
type CreateStatsOptionsContext = KnownCreateStatsOptionsContext &
|
2893
2941
|
Record<string, any>;
|
2942
|
+
type CreateWriteStreamFSImplementation = FSImplementation & {
|
2943
|
+
write: (...args: any[]) => any;
|
2944
|
+
close?: (...args: any[]) => any;
|
2945
|
+
};
|
2894
2946
|
|
2895
2947
|
/**
|
2896
2948
|
* Generator options for css/auto modules.
|
2897
2949
|
*/
|
2898
2950
|
declare interface CssAutoGeneratorOptions {
|
2951
|
+
/**
|
2952
|
+
* Specifies the convention of exported names.
|
2953
|
+
*/
|
2954
|
+
exportsConvention?:
|
2955
|
+
| "as-is"
|
2956
|
+
| "camel-case"
|
2957
|
+
| "camel-case-only"
|
2958
|
+
| "dashes"
|
2959
|
+
| "dashes-only"
|
2960
|
+
| ((name: string) => string);
|
2961
|
+
|
2899
2962
|
/**
|
2900
2963
|
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2901
2964
|
*/
|
2902
2965
|
exportsOnly?: boolean;
|
2966
|
+
|
2967
|
+
/**
|
2968
|
+
* Configure the generated local ident name.
|
2969
|
+
*/
|
2970
|
+
localIdentName?: string;
|
2903
2971
|
}
|
2904
2972
|
|
2905
2973
|
/**
|
@@ -2916,6 +2984,17 @@ declare interface CssAutoParserOptions {
|
|
2916
2984
|
* Generator options for css modules.
|
2917
2985
|
*/
|
2918
2986
|
declare interface CssGeneratorOptions {
|
2987
|
+
/**
|
2988
|
+
* Specifies the convention of exported names.
|
2989
|
+
*/
|
2990
|
+
exportsConvention?:
|
2991
|
+
| "as-is"
|
2992
|
+
| "camel-case"
|
2993
|
+
| "camel-case-only"
|
2994
|
+
| "dashes"
|
2995
|
+
| "dashes-only"
|
2996
|
+
| ((name: string) => string);
|
2997
|
+
|
2919
2998
|
/**
|
2920
2999
|
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2921
3000
|
*/
|
@@ -2926,10 +3005,26 @@ declare interface CssGeneratorOptions {
|
|
2926
3005
|
* Generator options for css/global modules.
|
2927
3006
|
*/
|
2928
3007
|
declare interface CssGlobalGeneratorOptions {
|
3008
|
+
/**
|
3009
|
+
* Specifies the convention of exported names.
|
3010
|
+
*/
|
3011
|
+
exportsConvention?:
|
3012
|
+
| "as-is"
|
3013
|
+
| "camel-case"
|
3014
|
+
| "camel-case-only"
|
3015
|
+
| "dashes"
|
3016
|
+
| "dashes-only"
|
3017
|
+
| ((name: string) => string);
|
3018
|
+
|
2929
3019
|
/**
|
2930
3020
|
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2931
3021
|
*/
|
2932
3022
|
exportsOnly?: boolean;
|
3023
|
+
|
3024
|
+
/**
|
3025
|
+
* Configure the generated local ident name.
|
3026
|
+
*/
|
3027
|
+
localIdentName?: string;
|
2933
3028
|
}
|
2934
3029
|
|
2935
3030
|
/**
|
@@ -2941,15 +3036,36 @@ declare interface CssGlobalParserOptions {
|
|
2941
3036
|
*/
|
2942
3037
|
namedExports?: boolean;
|
2943
3038
|
}
|
3039
|
+
declare interface CssImportDependencyMeta {
|
3040
|
+
layer?: string;
|
3041
|
+
supports?: string;
|
3042
|
+
media?: string;
|
3043
|
+
}
|
2944
3044
|
|
2945
3045
|
/**
|
2946
3046
|
* Generator options for css/module modules.
|
2947
3047
|
*/
|
2948
3048
|
declare interface CssModuleGeneratorOptions {
|
3049
|
+
/**
|
3050
|
+
* Specifies the convention of exported names.
|
3051
|
+
*/
|
3052
|
+
exportsConvention?:
|
3053
|
+
| "as-is"
|
3054
|
+
| "camel-case"
|
3055
|
+
| "camel-case-only"
|
3056
|
+
| "dashes"
|
3057
|
+
| "dashes-only"
|
3058
|
+
| ((name: string) => string);
|
3059
|
+
|
2949
3060
|
/**
|
2950
3061
|
* Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
|
2951
3062
|
*/
|
2952
3063
|
exportsOnly?: boolean;
|
3064
|
+
|
3065
|
+
/**
|
3066
|
+
* Configure the generated local ident name.
|
3067
|
+
*/
|
3068
|
+
localIdentName?: string;
|
2953
3069
|
}
|
2954
3070
|
|
2955
3071
|
/**
|
@@ -3245,6 +3361,17 @@ declare interface DeterministicModuleIdsPluginOptions {
|
|
3245
3361
|
*/
|
3246
3362
|
failOnConflict?: boolean;
|
3247
3363
|
}
|
3364
|
+
declare interface Dirent {
|
3365
|
+
isFile: () => boolean;
|
3366
|
+
isDirectory: () => boolean;
|
3367
|
+
isBlockDevice: () => boolean;
|
3368
|
+
isCharacterDevice: () => boolean;
|
3369
|
+
isSymbolicLink: () => boolean;
|
3370
|
+
isFIFO: () => boolean;
|
3371
|
+
isSocket: () => boolean;
|
3372
|
+
name: string;
|
3373
|
+
path: string;
|
3374
|
+
}
|
3248
3375
|
declare class DllPlugin {
|
3249
3376
|
constructor(options: DllPluginOptions);
|
3250
3377
|
options: {
|
@@ -3524,6 +3651,22 @@ declare class EnableWasmLoadingPlugin {
|
|
3524
3651
|
static setEnabled(compiler: Compiler, type: string): void;
|
3525
3652
|
static checkEnabled(compiler: Compiler, type: string): void;
|
3526
3653
|
}
|
3654
|
+
type EncodingOption =
|
3655
|
+
| undefined
|
3656
|
+
| null
|
3657
|
+
| "ascii"
|
3658
|
+
| "utf8"
|
3659
|
+
| "utf-8"
|
3660
|
+
| "utf16le"
|
3661
|
+
| "utf-16le"
|
3662
|
+
| "ucs2"
|
3663
|
+
| "ucs-2"
|
3664
|
+
| "latin1"
|
3665
|
+
| "binary"
|
3666
|
+
| "base64"
|
3667
|
+
| "base64url"
|
3668
|
+
| "hex"
|
3669
|
+
| ObjectEncodingOptions;
|
3527
3670
|
type Entry =
|
3528
3671
|
| string
|
3529
3672
|
| (() => string | EntryObject | string[] | Promise<EntryStatic>)
|
@@ -4143,7 +4286,7 @@ declare abstract class ExportsInfo {
|
|
4143
4286
|
isEquallyUsed(runtimeA: RuntimeSpec, runtimeB: RuntimeSpec): boolean;
|
4144
4287
|
getUsed(name: string | string[], runtime: RuntimeSpec): UsageStateType;
|
4145
4288
|
getUsedName(
|
4146
|
-
name: string | string[],
|
4289
|
+
name: undefined | string | string[],
|
4147
4290
|
runtime: RuntimeSpec
|
4148
4291
|
): string | false | string[];
|
4149
4292
|
updateHash(hash: Hash, runtime: RuntimeSpec): void;
|
@@ -4298,7 +4441,7 @@ declare interface ExternalItemFunctionData {
|
|
4298
4441
|
* Get a resolve function with the current resolver options.
|
4299
4442
|
*/
|
4300
4443
|
getResolve?: (
|
4301
|
-
options?:
|
4444
|
+
options?: ResolveOptions
|
4302
4445
|
) =>
|
4303
4446
|
| ((
|
4304
4447
|
context: string,
|
@@ -4335,15 +4478,21 @@ type ExternalItemValue = string | boolean | string[] | { [index: string]: any };
|
|
4335
4478
|
declare class ExternalModule extends Module {
|
4336
4479
|
constructor(
|
4337
4480
|
request: string | string[] | Record<string, string | string[]>,
|
4338
|
-
type:
|
4339
|
-
userRequest: string
|
4481
|
+
type: string,
|
4482
|
+
userRequest: string,
|
4483
|
+
dependencyMeta?: ImportDependencyMeta | CssImportDependencyMeta
|
4340
4484
|
);
|
4341
4485
|
request: string | string[] | Record<string, string | string[]>;
|
4342
4486
|
externalType: string;
|
4343
4487
|
userRequest: string;
|
4488
|
+
dependencyMeta?: ImportDependencyMeta | CssImportDependencyMeta;
|
4489
|
+
|
4490
|
+
/**
|
4491
|
+
* restore unsafe cache data
|
4492
|
+
*/
|
4344
4493
|
restoreFromUnsafeCache(
|
4345
|
-
unsafeCacheData
|
4346
|
-
normalModuleFactory
|
4494
|
+
unsafeCacheData: object,
|
4495
|
+
normalModuleFactory: NormalModuleFactory
|
4347
4496
|
): void;
|
4348
4497
|
}
|
4349
4498
|
declare interface ExternalModuleInfo {
|
@@ -4440,6 +4589,10 @@ type ExternalsType =
|
|
4440
4589
|
| "promise"
|
4441
4590
|
| "script"
|
4442
4591
|
| "node-commonjs";
|
4592
|
+
declare interface FSImplementation {
|
4593
|
+
open?: (...args: any[]) => any;
|
4594
|
+
close?: (...args: any[]) => any;
|
4595
|
+
}
|
4443
4596
|
declare interface FactorizeModuleOptions {
|
4444
4597
|
currentProfile: ModuleProfile;
|
4445
4598
|
factory: ModuleFactory;
|
@@ -4594,71 +4747,19 @@ declare interface FileCacheOptions {
|
|
4594
4747
|
version?: string;
|
4595
4748
|
}
|
4596
4749
|
declare interface FileSystem {
|
4597
|
-
readFile:
|
4598
|
-
|
4599
|
-
|
4600
|
-
|
4601
|
-
|
4602
|
-
|
4603
|
-
|
4604
|
-
};
|
4605
|
-
readdir: (
|
4606
|
-
arg0: string,
|
4607
|
-
arg1?:
|
4608
|
-
| null
|
4609
|
-
| "ascii"
|
4610
|
-
| "utf8"
|
4611
|
-
| "utf16le"
|
4612
|
-
| "ucs2"
|
4613
|
-
| "latin1"
|
4614
|
-
| "binary"
|
4615
|
-
| ((
|
4616
|
-
arg0?: null | NodeJS.ErrnoException,
|
4617
|
-
arg1?: (string | Buffer)[] | Dirent[]
|
4618
|
-
) => void)
|
4619
|
-
| ReaddirOptions
|
4620
|
-
| "utf-8"
|
4621
|
-
| "ucs-2"
|
4622
|
-
| "base64"
|
4623
|
-
| "base64url"
|
4624
|
-
| "hex"
|
4625
|
-
| "buffer",
|
4626
|
-
arg2?: (
|
4627
|
-
arg0?: null | NodeJS.ErrnoException,
|
4628
|
-
arg1?: (string | Buffer)[] | Dirent[]
|
4750
|
+
readFile: ReadFileTypes;
|
4751
|
+
readdir: ReaddirTypes;
|
4752
|
+
readJson?: (
|
4753
|
+
arg0: PathOrFileDescriptorTypes,
|
4754
|
+
arg1: (
|
4755
|
+
arg0: null | Error | NodeJS.ErrnoException,
|
4756
|
+
arg1?: JsonObjectTypes
|
4629
4757
|
) => void
|
4630
4758
|
) => void;
|
4631
|
-
|
4632
|
-
|
4633
|
-
|
4634
|
-
|
4635
|
-
readlink: {
|
4636
|
-
(arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
|
4637
|
-
(
|
4638
|
-
arg0: string,
|
4639
|
-
arg1: object,
|
4640
|
-
arg2: FileSystemCallback<string | Buffer>
|
4641
|
-
): void;
|
4642
|
-
};
|
4643
|
-
lstat?: {
|
4644
|
-
(arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
|
4645
|
-
(
|
4646
|
-
arg0: string,
|
4647
|
-
arg1: object,
|
4648
|
-
arg2: FileSystemCallback<string | Buffer>
|
4649
|
-
): void;
|
4650
|
-
};
|
4651
|
-
stat: {
|
4652
|
-
(arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
|
4653
|
-
(
|
4654
|
-
arg0: string,
|
4655
|
-
arg1: object,
|
4656
|
-
arg2: FileSystemCallback<string | Buffer>
|
4657
|
-
): void;
|
4658
|
-
};
|
4659
|
-
}
|
4660
|
-
declare interface FileSystemCallback<T> {
|
4661
|
-
(err?: null | (PossibleFileSystemError & Error), result?: T): any;
|
4759
|
+
readlink: ReadlinkTypes;
|
4760
|
+
lstat?: LStatTypes;
|
4761
|
+
stat: StatTypes;
|
4762
|
+
realpath?: RealPathTypes;
|
4662
4763
|
}
|
4663
4764
|
declare abstract class FileSystemInfo {
|
4664
4765
|
fs: InputFileSystem;
|
@@ -4753,10 +4854,6 @@ declare interface FileSystemInfoEntry {
|
|
4753
4854
|
safeTime: number;
|
4754
4855
|
timestamp?: number;
|
4755
4856
|
}
|
4756
|
-
declare interface FileSystemStats {
|
4757
|
-
isDirectory: () => boolean;
|
4758
|
-
isFile: () => boolean;
|
4759
|
-
}
|
4760
4857
|
type FilterItemTypes = string | RegExp | ((value: string) => boolean);
|
4761
4858
|
declare interface GenerateContext {
|
4762
4859
|
/**
|
@@ -4972,7 +5069,7 @@ declare interface HandleModuleCreationOptions {
|
|
4972
5069
|
checkCycle?: boolean;
|
4973
5070
|
}
|
4974
5071
|
declare class HarmonyImportDependency extends ModuleDependency {
|
4975
|
-
constructor(request: string, sourceOrder: number,
|
5072
|
+
constructor(request: string, sourceOrder: number, attributes?: Attributes);
|
4976
5073
|
sourceOrder: number;
|
4977
5074
|
getImportVar(moduleGraph: ModuleGraph): string;
|
4978
5075
|
getImportStatement(
|
@@ -4990,7 +5087,7 @@ declare class HarmonyImportDependency extends ModuleDependency {
|
|
4990
5087
|
WARN: 1;
|
4991
5088
|
AUTO: 2;
|
4992
5089
|
ERROR: 3;
|
4993
|
-
fromUserOption(str
|
5090
|
+
fromUserOption(str: string | false): 0 | 1 | 2 | 3;
|
4994
5091
|
};
|
4995
5092
|
static NO_EXPORTS_REFERENCED: string[][];
|
4996
5093
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
@@ -5113,7 +5210,13 @@ declare class HttpUriPlugin {
|
|
5113
5210
|
*/
|
5114
5211
|
apply(compiler: Compiler): void;
|
5115
5212
|
}
|
5116
|
-
|
5213
|
+
type IBigIntStats = IStatsBase<bigint> & {
|
5214
|
+
atimeNs: bigint;
|
5215
|
+
mtimeNs: bigint;
|
5216
|
+
ctimeNs: bigint;
|
5217
|
+
birthtimeNs: bigint;
|
5218
|
+
};
|
5219
|
+
declare interface IStats {
|
5117
5220
|
isFile: () => boolean;
|
5118
5221
|
isDirectory: () => boolean;
|
5119
5222
|
isBlockDevice: () => boolean;
|
@@ -5121,9 +5224,26 @@ declare interface IDirent {
|
|
5121
5224
|
isSymbolicLink: () => boolean;
|
5122
5225
|
isFIFO: () => boolean;
|
5123
5226
|
isSocket: () => boolean;
|
5124
|
-
|
5227
|
+
dev: number;
|
5228
|
+
ino: number;
|
5229
|
+
mode: number;
|
5230
|
+
nlink: number;
|
5231
|
+
uid: number;
|
5232
|
+
gid: number;
|
5233
|
+
rdev: number;
|
5234
|
+
size: number;
|
5235
|
+
blksize: number;
|
5236
|
+
blocks: number;
|
5237
|
+
atimeMs: number;
|
5238
|
+
mtimeMs: number;
|
5239
|
+
ctimeMs: number;
|
5240
|
+
birthtimeMs: number;
|
5241
|
+
atime: Date;
|
5242
|
+
mtime: Date;
|
5243
|
+
ctime: Date;
|
5244
|
+
birthtime: Date;
|
5125
5245
|
}
|
5126
|
-
declare interface
|
5246
|
+
declare interface IStatsBase<T> {
|
5127
5247
|
isFile: () => boolean;
|
5128
5248
|
isDirectory: () => boolean;
|
5129
5249
|
isBlockDevice: () => boolean;
|
@@ -5131,20 +5251,20 @@ declare interface IStats {
|
|
5131
5251
|
isSymbolicLink: () => boolean;
|
5132
5252
|
isFIFO: () => boolean;
|
5133
5253
|
isSocket: () => boolean;
|
5134
|
-
dev:
|
5135
|
-
ino:
|
5136
|
-
mode:
|
5137
|
-
nlink:
|
5138
|
-
uid:
|
5139
|
-
gid:
|
5140
|
-
rdev:
|
5141
|
-
size:
|
5142
|
-
blksize:
|
5143
|
-
blocks:
|
5144
|
-
atimeMs:
|
5145
|
-
mtimeMs:
|
5146
|
-
ctimeMs:
|
5147
|
-
birthtimeMs:
|
5254
|
+
dev: T;
|
5255
|
+
ino: T;
|
5256
|
+
mode: T;
|
5257
|
+
nlink: T;
|
5258
|
+
uid: T;
|
5259
|
+
gid: T;
|
5260
|
+
rdev: T;
|
5261
|
+
size: T;
|
5262
|
+
blksize: T;
|
5263
|
+
blocks: T;
|
5264
|
+
atimeMs: T;
|
5265
|
+
mtimeMs: T;
|
5266
|
+
ctimeMs: T;
|
5267
|
+
birthtimeMs: T;
|
5148
5268
|
atime: Date;
|
5149
5269
|
mtime: Date;
|
5150
5270
|
ctime: Date;
|
@@ -5182,6 +5302,9 @@ type IgnorePluginOptions =
|
|
5182
5302
|
*/
|
5183
5303
|
checkResource: (resource: string, context: string) => boolean;
|
5184
5304
|
};
|
5305
|
+
declare interface ImportDependencyMeta {
|
5306
|
+
attributes?: Attributes;
|
5307
|
+
}
|
5185
5308
|
declare interface ImportModuleOptions {
|
5186
5309
|
/**
|
5187
5310
|
* the target layer
|
@@ -5246,50 +5369,39 @@ declare interface InfrastructureLogging {
|
|
5246
5369
|
stream?: NodeJS.WritableStream;
|
5247
5370
|
}
|
5248
5371
|
declare abstract class InitFragment<GenerateContext> {
|
5249
|
-
content
|
5372
|
+
content?: string | Source;
|
5250
5373
|
stage: number;
|
5251
5374
|
position: number;
|
5252
5375
|
key?: string;
|
5253
5376
|
endContent?: string | Source;
|
5254
|
-
getContent(context: GenerateContext): string | Source;
|
5377
|
+
getContent(context: GenerateContext): undefined | string | Source;
|
5255
5378
|
getEndContent(context: GenerateContext): undefined | string | Source;
|
5256
5379
|
serialize(context: ObjectSerializerContext): void;
|
5257
5380
|
deserialize(context: ObjectDeserializerContext): void;
|
5258
5381
|
merge: any;
|
5259
5382
|
}
|
5260
5383
|
declare interface InputFileSystem {
|
5261
|
-
readFile:
|
5262
|
-
|
5263
|
-
|
5264
|
-
|
5384
|
+
readFile: ReadFileFs;
|
5385
|
+
readFileSync?: ReadFileSync;
|
5386
|
+
readlink: ReadlinkFs;
|
5387
|
+
readlinkSync?: ReadlinkSync;
|
5388
|
+
readdir: ReaddirFs;
|
5389
|
+
readdirSync?: ReaddirSync;
|
5390
|
+
stat: StatFs;
|
5391
|
+
statSync?: StatSync;
|
5392
|
+
lstat?: LStatFs;
|
5393
|
+
lstatSync?: LStatSync;
|
5394
|
+
realpath?: RealPathFs;
|
5395
|
+
realpathSync?: RealPathSync;
|
5265
5396
|
readJson?: (
|
5266
|
-
arg0:
|
5267
|
-
arg1: (arg0?: null | Error | NodeJS.ErrnoException, arg1?: any) => void
|
5268
|
-
) => void;
|
5269
|
-
readlink: (
|
5270
|
-
arg0: string,
|
5271
|
-
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
5272
|
-
) => void;
|
5273
|
-
readdir: (
|
5274
|
-
arg0: string,
|
5397
|
+
arg0: PathOrFileDescriptorFs,
|
5275
5398
|
arg1: (
|
5276
|
-
arg0
|
5277
|
-
arg1?:
|
5399
|
+
arg0: null | Error | NodeJS.ErrnoException,
|
5400
|
+
arg1?: JsonObjectFs
|
5278
5401
|
) => void
|
5279
5402
|
) => void;
|
5280
|
-
|
5281
|
-
|
5282
|
-
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
5283
|
-
) => void;
|
5284
|
-
lstat?: (
|
5285
|
-
arg0: string,
|
5286
|
-
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
5287
|
-
) => void;
|
5288
|
-
realpath?: (
|
5289
|
-
arg0: string,
|
5290
|
-
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
5291
|
-
) => void;
|
5292
|
-
purge?: (arg0?: string) => void;
|
5403
|
+
readJsonSync?: (arg0: PathOrFileDescriptorFs) => JsonObjectFs;
|
5404
|
+
purge?: (arg0?: string | string[] | Set<string>) => void;
|
5293
5405
|
join?: (arg0: string, arg1: string) => string;
|
5294
5406
|
relative?: (arg0: string, arg1: string) => string;
|
5295
5407
|
dirname?: (arg0: string) => string;
|
@@ -5298,36 +5410,41 @@ type IntermediateFileSystem = InputFileSystem &
|
|
5298
5410
|
OutputFileSystem &
|
5299
5411
|
IntermediateFileSystemExtras;
|
5300
5412
|
declare interface IntermediateFileSystemExtras {
|
5301
|
-
mkdirSync:
|
5302
|
-
createWriteStream: (
|
5303
|
-
|
5304
|
-
|
5305
|
-
|
5306
|
-
|
5307
|
-
|
5308
|
-
|
5309
|
-
|
5310
|
-
|
5311
|
-
|
5312
|
-
|
5313
|
-
|
5314
|
-
|
5315
|
-
|
5413
|
+
mkdirSync: MkdirSync;
|
5414
|
+
createWriteStream: (
|
5415
|
+
arg0: PathLikeFs,
|
5416
|
+
arg1?:
|
5417
|
+
| "ascii"
|
5418
|
+
| "utf8"
|
5419
|
+
| "utf-8"
|
5420
|
+
| "utf16le"
|
5421
|
+
| "utf-16le"
|
5422
|
+
| "ucs2"
|
5423
|
+
| "ucs-2"
|
5424
|
+
| "latin1"
|
5425
|
+
| "binary"
|
5426
|
+
| "base64"
|
5427
|
+
| "base64url"
|
5428
|
+
| "hex"
|
5429
|
+
| WriteStreamOptions
|
5430
|
+
) => NodeJS.WritableStream;
|
5431
|
+
open: Open;
|
5432
|
+
read: Read<Buffer>;
|
5316
5433
|
close: (
|
5317
5434
|
arg0: number,
|
5318
|
-
arg1: (arg0
|
5435
|
+
arg1: (arg0: null | NodeJS.ErrnoException) => void
|
5319
5436
|
) => void;
|
5320
5437
|
rename: (
|
5321
|
-
arg0:
|
5322
|
-
arg1:
|
5323
|
-
arg2: (arg0
|
5438
|
+
arg0: PathLikeFs,
|
5439
|
+
arg1: PathLikeFs,
|
5440
|
+
arg2: (arg0: null | NodeJS.ErrnoException) => void
|
5324
5441
|
) => void;
|
5325
5442
|
}
|
5326
5443
|
type InternalCell<T> = T | typeof TOMBSTONE | typeof UNDEFINED_MARKER;
|
5327
5444
|
declare abstract class ItemCacheFacade {
|
5328
|
-
get<T>(callback:
|
5445
|
+
get<T>(callback: CallbackCacheCacheFacade<T>): void;
|
5329
5446
|
getPromise<T>(): Promise<T>;
|
5330
|
-
store<T>(data: T, callback:
|
5447
|
+
store<T>(data: T, callback: CallbackCacheCacheFacade<void>): void;
|
5331
5448
|
storePromise<T>(data: T): Promise<void>;
|
5332
5449
|
provide<T>(
|
5333
5450
|
computer: (arg0: CallbackNormalErrorCache<T>) => void,
|
@@ -5418,7 +5535,7 @@ declare class JavascriptParser extends Parser {
|
|
5418
5535
|
>;
|
5419
5536
|
evaluateCallExpressionMember: HookMap<
|
5420
5537
|
SyncBailHook<
|
5421
|
-
[CallExpression,
|
5538
|
+
[CallExpression, BasicEvaluatedExpression],
|
5422
5539
|
undefined | null | BasicEvaluatedExpression
|
5423
5540
|
>
|
5424
5541
|
>;
|
@@ -5583,7 +5700,7 @@ declare class JavascriptParser extends Parser {
|
|
5583
5700
|
boolean | void
|
5584
5701
|
>;
|
5585
5702
|
export: SyncBailHook<
|
5586
|
-
[ExportNamedDeclaration |
|
5703
|
+
[ExportNamedDeclaration | ExportDefaultDeclaration],
|
5587
5704
|
boolean | void
|
5588
5705
|
>;
|
5589
5706
|
exportImport: SyncBailHook<
|
@@ -5591,16 +5708,27 @@ declare class JavascriptParser extends Parser {
|
|
5591
5708
|
boolean | void
|
5592
5709
|
>;
|
5593
5710
|
exportDeclaration: SyncBailHook<
|
5594
|
-
[
|
5711
|
+
[
|
5712
|
+
(
|
5713
|
+
| ExportNamedDeclaration
|
5714
|
+
| ExportDefaultDeclaration
|
5715
|
+
| ExportAllDeclaration
|
5716
|
+
),
|
5717
|
+
Declaration
|
5718
|
+
],
|
5595
5719
|
boolean | void
|
5596
5720
|
>;
|
5597
5721
|
exportExpression: SyncBailHook<
|
5598
|
-
[ExportDefaultDeclaration,
|
5722
|
+
[ExportDefaultDeclaration, FunctionDeclaration | ClassDeclaration],
|
5599
5723
|
boolean | void
|
5600
5724
|
>;
|
5601
5725
|
exportSpecifier: SyncBailHook<
|
5602
5726
|
[
|
5603
|
-
|
5727
|
+
(
|
5728
|
+
| ExportNamedDeclaration
|
5729
|
+
| ExportDefaultDeclaration
|
5730
|
+
| ExportAllDeclaration
|
5731
|
+
),
|
5604
5732
|
string,
|
5605
5733
|
string,
|
5606
5734
|
undefined | number
|
@@ -5635,7 +5763,39 @@ declare class JavascriptParser extends Parser {
|
|
5635
5763
|
>;
|
5636
5764
|
typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
|
5637
5765
|
importCall: SyncBailHook<[ImportExpression], boolean | void>;
|
5638
|
-
topLevelAwait: SyncBailHook<
|
5766
|
+
topLevelAwait: SyncBailHook<
|
5767
|
+
[
|
5768
|
+
| UnaryExpression
|
5769
|
+
| ArrayExpression
|
5770
|
+
| ArrowFunctionExpression
|
5771
|
+
| AssignmentExpression
|
5772
|
+
| AwaitExpression
|
5773
|
+
| BinaryExpression
|
5774
|
+
| SimpleCallExpression
|
5775
|
+
| NewExpression
|
5776
|
+
| ChainExpression
|
5777
|
+
| ClassExpression
|
5778
|
+
| ConditionalExpression
|
5779
|
+
| FunctionExpression
|
5780
|
+
| Identifier
|
5781
|
+
| ImportExpression
|
5782
|
+
| SimpleLiteral
|
5783
|
+
| RegExpLiteral
|
5784
|
+
| BigIntLiteral
|
5785
|
+
| LogicalExpression
|
5786
|
+
| MemberExpression
|
5787
|
+
| MetaProperty
|
5788
|
+
| ObjectExpression
|
5789
|
+
| SequenceExpression
|
5790
|
+
| TaggedTemplateExpression
|
5791
|
+
| TemplateLiteral
|
5792
|
+
| ThisExpression
|
5793
|
+
| UpdateExpression
|
5794
|
+
| YieldExpression
|
5795
|
+
| ForOfStatement
|
5796
|
+
],
|
5797
|
+
boolean | void
|
5798
|
+
>;
|
5639
5799
|
call: HookMap<SyncBailHook<[CallExpression], boolean | void>>;
|
5640
5800
|
callMemberChain: HookMap<
|
5641
5801
|
SyncBailHook<
|
@@ -5979,19 +6139,19 @@ declare class JavascriptParser extends Parser {
|
|
5979
6139
|
walkForStatement(statement: ForStatement): void;
|
5980
6140
|
preWalkForInStatement(statement: ForInStatement): void;
|
5981
6141
|
walkForInStatement(statement: ForInStatement): void;
|
5982
|
-
preWalkForOfStatement(statement
|
6142
|
+
preWalkForOfStatement(statement: ForOfStatement): void;
|
5983
6143
|
walkForOfStatement(statement: ForOfStatement): void;
|
5984
6144
|
preWalkFunctionDeclaration(statement: FunctionDeclaration): void;
|
5985
6145
|
walkFunctionDeclaration(statement: FunctionDeclaration): void;
|
5986
6146
|
blockPreWalkExpressionStatement(statement: ExpressionStatement): void;
|
5987
6147
|
preWalkAssignmentExpression(expression: AssignmentExpression): void;
|
5988
|
-
blockPreWalkImportDeclaration(statement
|
6148
|
+
blockPreWalkImportDeclaration(statement: ImportDeclaration): void;
|
5989
6149
|
enterDeclaration(declaration: Declaration, onIdent?: any): void;
|
5990
|
-
blockPreWalkExportNamedDeclaration(statement
|
6150
|
+
blockPreWalkExportNamedDeclaration(statement: ExportNamedDeclaration): void;
|
5991
6151
|
walkExportNamedDeclaration(statement: ExportNamedDeclaration): void;
|
5992
6152
|
blockPreWalkExportDefaultDeclaration(statement?: any): void;
|
5993
|
-
walkExportDefaultDeclaration(statement
|
5994
|
-
blockPreWalkExportAllDeclaration(statement
|
6153
|
+
walkExportDefaultDeclaration(statement: ExportDefaultDeclaration): void;
|
6154
|
+
blockPreWalkExportAllDeclaration(statement: ExportAllDeclaration): void;
|
5995
6155
|
preWalkVariableDeclaration(statement: VariableDeclaration): void;
|
5996
6156
|
blockPreWalkVariableDeclaration(statement: VariableDeclaration): void;
|
5997
6157
|
preWalkVariableDeclarator(declarator: VariableDeclarator): void;
|
@@ -6004,7 +6164,7 @@ declare class JavascriptParser extends Parser {
|
|
6004
6164
|
walkCatchClause(catchClause: CatchClause): void;
|
6005
6165
|
walkPattern(pattern: Pattern): void;
|
6006
6166
|
walkAssignmentPattern(pattern: AssignmentPattern): void;
|
6007
|
-
walkObjectPattern(pattern
|
6167
|
+
walkObjectPattern(pattern: ObjectPattern): void;
|
6008
6168
|
walkArrayPattern(pattern: ArrayPattern): void;
|
6009
6169
|
walkRestElement(pattern: RestElement): void;
|
6010
6170
|
walkExpressions(
|
@@ -6065,7 +6225,7 @@ declare class JavascriptParser extends Parser {
|
|
6065
6225
|
walkClassExpression(expression: ClassExpression): void;
|
6066
6226
|
walkChainExpression(expression: ChainExpression): void;
|
6067
6227
|
walkImportExpression(expression: ImportExpression): void;
|
6068
|
-
walkCallExpression(expression
|
6228
|
+
walkCallExpression(expression: CallExpression): void;
|
6069
6229
|
walkMemberExpression(expression: MemberExpression): void;
|
6070
6230
|
walkMemberExpressionWithExpressionName(
|
6071
6231
|
expression: any,
|
@@ -6156,6 +6316,7 @@ declare class JavascriptParser extends Parser {
|
|
6156
6316
|
): void;
|
6157
6317
|
enterPatterns(
|
6158
6318
|
patterns: (
|
6319
|
+
| string
|
6159
6320
|
| Identifier
|
6160
6321
|
| MemberExpression
|
6161
6322
|
| ObjectPattern
|
@@ -6184,7 +6345,7 @@ declare class JavascriptParser extends Parser {
|
|
6184
6345
|
enterAssignmentPattern(pattern: AssignmentPattern, onIdent?: any): void;
|
6185
6346
|
evaluateExpression(expression?: any): BasicEvaluatedExpression;
|
6186
6347
|
parseString(expression: Expression): string;
|
6187
|
-
parseCalculatedString(expression
|
6348
|
+
parseCalculatedString(expression: Expression): any;
|
6188
6349
|
evaluate(source: string): BasicEvaluatedExpression;
|
6189
6350
|
isPure(
|
6190
6351
|
expr:
|
@@ -6482,19 +6643,42 @@ declare interface JavascriptParserOptions {
|
|
6482
6643
|
*/
|
6483
6644
|
wrappedContextRegExp?: RegExp;
|
6484
6645
|
}
|
6485
|
-
type
|
6646
|
+
type JsonObjectFs = { [index: string]: JsonValueFs } & {
|
6647
|
+
[index: string]:
|
6648
|
+
| undefined
|
6649
|
+
| null
|
6650
|
+
| string
|
6651
|
+
| number
|
6652
|
+
| boolean
|
6653
|
+
| JsonObjectFs
|
6654
|
+
| JsonValueFs[];
|
6655
|
+
};
|
6656
|
+
type JsonObjectTypes = { [index: string]: JsonValueTypes } & {
|
6486
6657
|
[index: string]:
|
6487
6658
|
| undefined
|
6488
6659
|
| null
|
6489
6660
|
| string
|
6490
6661
|
| number
|
6491
6662
|
| boolean
|
6492
|
-
|
|
6493
|
-
|
|
6663
|
+
| JsonObjectTypes
|
6664
|
+
| JsonValueTypes[];
|
6494
6665
|
};
|
6495
|
-
type
|
6666
|
+
type JsonValueFs =
|
6667
|
+
| null
|
6668
|
+
| string
|
6669
|
+
| number
|
6670
|
+
| boolean
|
6671
|
+
| JsonObjectFs
|
6672
|
+
| JsonValueFs[];
|
6673
|
+
type JsonValueTypes =
|
6674
|
+
| null
|
6675
|
+
| string
|
6676
|
+
| number
|
6677
|
+
| boolean
|
6678
|
+
| JsonObjectTypes
|
6679
|
+
| JsonValueTypes[];
|
6496
6680
|
declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
6497
|
-
constructor(runtimeRequirements:
|
6681
|
+
constructor(runtimeRequirements: ReadonlySet<string>);
|
6498
6682
|
static getCompilationHooks(
|
6499
6683
|
compilation: Compilation
|
6500
6684
|
): JsonpCompilationPluginHooks;
|
@@ -6919,6 +7103,75 @@ declare interface KnownStatsProfile {
|
|
6919
7103
|
factory: number;
|
6920
7104
|
dependencies: number;
|
6921
7105
|
}
|
7106
|
+
declare interface LStatFs {
|
7107
|
+
(
|
7108
|
+
path: PathLikeFs,
|
7109
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
7110
|
+
): void;
|
7111
|
+
(
|
7112
|
+
path: PathLikeFs,
|
7113
|
+
options: undefined | (StatOptions & { bigint?: false }),
|
7114
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
7115
|
+
): void;
|
7116
|
+
(
|
7117
|
+
path: PathLikeFs,
|
7118
|
+
options: StatOptions & { bigint: true },
|
7119
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
|
7120
|
+
): void;
|
7121
|
+
(
|
7122
|
+
path: PathLikeFs,
|
7123
|
+
options: undefined | StatOptions,
|
7124
|
+
callback: (
|
7125
|
+
arg0: null | NodeJS.ErrnoException,
|
7126
|
+
arg1?: IStats | IBigIntStats
|
7127
|
+
) => void
|
7128
|
+
): void;
|
7129
|
+
}
|
7130
|
+
declare interface LStatSync {
|
7131
|
+
(path: PathLikeFs, options?: undefined): IStats;
|
7132
|
+
(
|
7133
|
+
path: PathLikeFs,
|
7134
|
+
options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }
|
7135
|
+
): undefined | IStats;
|
7136
|
+
(
|
7137
|
+
path: PathLikeFs,
|
7138
|
+
options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }
|
7139
|
+
): undefined | IBigIntStats;
|
7140
|
+
(path: PathLikeFs, options?: StatSyncOptions & { bigint?: false }): IStats;
|
7141
|
+
(path: PathLikeFs, options: StatSyncOptions & { bigint: true }): IBigIntStats;
|
7142
|
+
(
|
7143
|
+
path: PathLikeFs,
|
7144
|
+
options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }
|
7145
|
+
): IStats | IBigIntStats;
|
7146
|
+
(
|
7147
|
+
path: PathLikeFs,
|
7148
|
+
options?: StatSyncOptions
|
7149
|
+
): undefined | IStats | IBigIntStats;
|
7150
|
+
}
|
7151
|
+
declare interface LStatTypes {
|
7152
|
+
(
|
7153
|
+
path: PathLikeTypes,
|
7154
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
7155
|
+
): void;
|
7156
|
+
(
|
7157
|
+
path: PathLikeTypes,
|
7158
|
+
options: undefined | (StatOptions & { bigint?: false }),
|
7159
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
7160
|
+
): void;
|
7161
|
+
(
|
7162
|
+
path: PathLikeTypes,
|
7163
|
+
options: StatOptions & { bigint: true },
|
7164
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
|
7165
|
+
): void;
|
7166
|
+
(
|
7167
|
+
path: PathLikeTypes,
|
7168
|
+
options: undefined | StatOptions,
|
7169
|
+
callback: (
|
7170
|
+
arg0: null | NodeJS.ErrnoException,
|
7171
|
+
arg1?: IStats | IBigIntStats
|
7172
|
+
) => void
|
7173
|
+
): void;
|
7174
|
+
}
|
6922
7175
|
|
6923
7176
|
/**
|
6924
7177
|
* Options for the default backend.
|
@@ -7472,6 +7725,21 @@ declare interface LogEntry {
|
|
7472
7725
|
time: number;
|
7473
7726
|
trace?: string[];
|
7474
7727
|
}
|
7728
|
+
type LogTypeEnum =
|
7729
|
+
| "error"
|
7730
|
+
| "warn"
|
7731
|
+
| "info"
|
7732
|
+
| "log"
|
7733
|
+
| "debug"
|
7734
|
+
| "profile"
|
7735
|
+
| "trace"
|
7736
|
+
| "group"
|
7737
|
+
| "groupCollapsed"
|
7738
|
+
| "groupEnd"
|
7739
|
+
| "profileEnd"
|
7740
|
+
| "time"
|
7741
|
+
| "clear"
|
7742
|
+
| "status";
|
7475
7743
|
declare const MEASURE_END_OPERATION: unique symbol;
|
7476
7744
|
declare const MEASURE_START_OPERATION: unique symbol;
|
7477
7745
|
declare interface MainRenderContext {
|
@@ -7555,6 +7823,10 @@ declare abstract class MainTemplate {
|
|
7555
7823
|
get requireFn(): "__webpack_require__";
|
7556
7824
|
get outputOptions(): Output;
|
7557
7825
|
}
|
7826
|
+
declare interface MakeDirectoryOptions {
|
7827
|
+
recursive?: boolean;
|
7828
|
+
mode?: string | number;
|
7829
|
+
}
|
7558
7830
|
declare interface MapOptions {
|
7559
7831
|
columns?: boolean;
|
7560
7832
|
module?: boolean;
|
@@ -7618,6 +7890,50 @@ declare interface MinChunkSizePluginOptions {
|
|
7618
7890
|
*/
|
7619
7891
|
minChunkSize: number;
|
7620
7892
|
}
|
7893
|
+
declare interface Mkdir {
|
7894
|
+
(
|
7895
|
+
file: PathLikeFs,
|
7896
|
+
options: MakeDirectoryOptions & { recursive: true },
|
7897
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
7898
|
+
): void;
|
7899
|
+
(
|
7900
|
+
file: PathLikeFs,
|
7901
|
+
options:
|
7902
|
+
| undefined
|
7903
|
+
| null
|
7904
|
+
| string
|
7905
|
+
| number
|
7906
|
+
| (MakeDirectoryOptions & { recursive?: false }),
|
7907
|
+
callback: (arg0: null | NodeJS.ErrnoException) => void
|
7908
|
+
): void;
|
7909
|
+
(
|
7910
|
+
file: PathLikeFs,
|
7911
|
+
options: undefined | null | string | number | MakeDirectoryOptions,
|
7912
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
7913
|
+
): void;
|
7914
|
+
(
|
7915
|
+
file: PathLikeFs,
|
7916
|
+
callback: (arg0: null | NodeJS.ErrnoException) => void
|
7917
|
+
): void;
|
7918
|
+
}
|
7919
|
+
declare interface MkdirSync {
|
7920
|
+
(
|
7921
|
+
path: PathLikeFs,
|
7922
|
+
options: MakeDirectoryOptions & { recursive: true }
|
7923
|
+
): undefined | string;
|
7924
|
+
(
|
7925
|
+
path: PathLikeFs,
|
7926
|
+
options?:
|
7927
|
+
| null
|
7928
|
+
| string
|
7929
|
+
| number
|
7930
|
+
| (MakeDirectoryOptions & { recursive?: false })
|
7931
|
+
): void;
|
7932
|
+
(
|
7933
|
+
path: PathLikeFs,
|
7934
|
+
options?: null | string | number | MakeDirectoryOptions
|
7935
|
+
): undefined | string;
|
7936
|
+
}
|
7621
7937
|
declare class Module extends DependenciesBlock {
|
7622
7938
|
constructor(type: string, context?: null | string, layer?: null | string);
|
7623
7939
|
type: string;
|
@@ -7625,7 +7941,7 @@ declare class Module extends DependenciesBlock {
|
|
7625
7941
|
layer: null | string;
|
7626
7942
|
needId: boolean;
|
7627
7943
|
debugId: number;
|
7628
|
-
resolveOptions?:
|
7944
|
+
resolveOptions?: ResolveOptions;
|
7629
7945
|
factoryMeta?: FactoryMeta;
|
7630
7946
|
useSourceMap: boolean;
|
7631
7947
|
useSimpleSourceMap: boolean;
|
@@ -7636,11 +7952,11 @@ declare class Module extends DependenciesBlock {
|
|
7636
7952
|
id: string | number;
|
7637
7953
|
get hash(): string;
|
7638
7954
|
get renderedHash(): string;
|
7639
|
-
profile
|
7955
|
+
profile?: ModuleProfile;
|
7640
7956
|
index: null | number;
|
7641
7957
|
index2: null | number;
|
7642
7958
|
depth: null | number;
|
7643
|
-
issuer
|
7959
|
+
issuer?: null | Module;
|
7644
7960
|
get usedExports(): null | boolean | SortableSet<string>;
|
7645
7961
|
get optimizationBailout(): (
|
7646
7962
|
| string
|
@@ -7770,7 +8086,7 @@ declare class ModuleDependency extends Dependency {
|
|
7770
8086
|
request: string;
|
7771
8087
|
userRequest: string;
|
7772
8088
|
range: any;
|
7773
|
-
assertions?:
|
8089
|
+
assertions?: Attributes;
|
7774
8090
|
static Template: typeof DependencyTemplate;
|
7775
8091
|
static NO_EXPORTS_REFERENCED: string[][];
|
7776
8092
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
@@ -7784,7 +8100,7 @@ declare abstract class ModuleFactory {
|
|
7784
8100
|
}
|
7785
8101
|
declare interface ModuleFactoryCreateData {
|
7786
8102
|
contextInfo: ModuleFactoryCreateDataContextInfo;
|
7787
|
-
resolveOptions?:
|
8103
|
+
resolveOptions?: ResolveOptions;
|
7788
8104
|
context: string;
|
7789
8105
|
dependencies: Dependency[];
|
7790
8106
|
}
|
@@ -7898,11 +8214,11 @@ declare class ModuleGraph {
|
|
7898
8214
|
module: Module,
|
7899
8215
|
indexInBlock?: number
|
7900
8216
|
): void;
|
7901
|
-
getParentModule(dependency: Dependency): Module;
|
7902
|
-
getParentBlock(dependency: Dependency): DependenciesBlock;
|
8217
|
+
getParentModule(dependency: Dependency): undefined | Module;
|
8218
|
+
getParentBlock(dependency: Dependency): undefined | DependenciesBlock;
|
7903
8219
|
getParentBlockIndex(dependency: Dependency): number;
|
7904
8220
|
setResolvedModule(
|
7905
|
-
originModule: Module,
|
8221
|
+
originModule: null | Module,
|
7906
8222
|
dependency: Dependency,
|
7907
8223
|
module: Module
|
7908
8224
|
): void;
|
@@ -7932,13 +8248,13 @@ declare class ModuleGraph {
|
|
7932
8248
|
getOutgoingConnections(module: Module): Iterable<ModuleGraphConnection>;
|
7933
8249
|
getIncomingConnectionsByOriginModule(
|
7934
8250
|
module: Module
|
7935
|
-
): Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
|
8251
|
+
): Map<undefined | null | Module, ReadonlyArray<ModuleGraphConnection>>;
|
7936
8252
|
getOutgoingConnectionsByModule(
|
7937
8253
|
module: Module
|
7938
8254
|
): undefined | Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
|
7939
|
-
getProfile(module: Module):
|
7940
|
-
setProfile(module: Module, profile
|
7941
|
-
getIssuer(module: Module): null | Module;
|
8255
|
+
getProfile(module: Module): undefined | ModuleProfile;
|
8256
|
+
setProfile(module: Module, profile?: ModuleProfile): void;
|
8257
|
+
getIssuer(module: Module): undefined | null | Module;
|
7942
8258
|
setIssuer(module: Module, issuer: null | Module): void;
|
7943
8259
|
setIssuerIfUnset(module: Module, issuer: null | Module): void;
|
7944
8260
|
getOptimizationBailout(
|
@@ -7999,6 +8315,7 @@ declare class ModuleGraphConnection {
|
|
7999
8315
|
explanation?: string,
|
8000
8316
|
weak?: boolean,
|
8001
8317
|
condition?:
|
8318
|
+
| null
|
8002
8319
|
| false
|
8003
8320
|
| ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState)
|
8004
8321
|
);
|
@@ -8253,7 +8570,7 @@ declare interface ModuleSettings {
|
|
8253
8570
|
/**
|
8254
8571
|
* Options for the resolver.
|
8255
8572
|
*/
|
8256
|
-
resolve?:
|
8573
|
+
resolve?: ResolveOptions;
|
8257
8574
|
|
8258
8575
|
/**
|
8259
8576
|
* Options for parsing.
|
@@ -8281,6 +8598,9 @@ declare abstract class ModuleTemplate {
|
|
8281
8598
|
}>;
|
8282
8599
|
get runtimeTemplate(): any;
|
8283
8600
|
}
|
8601
|
+
declare interface ModuleTemplates {
|
8602
|
+
javascript: ModuleTemplate;
|
8603
|
+
}
|
8284
8604
|
declare class MultiCompiler {
|
8285
8605
|
constructor(
|
8286
8606
|
compilers: Compiler[] | Record<string, Compiler>,
|
@@ -8336,10 +8656,10 @@ declare abstract class MultiStats {
|
|
8336
8656
|
declare abstract class MultiWatching {
|
8337
8657
|
watchings: Watching[];
|
8338
8658
|
compiler: MultiCompiler;
|
8339
|
-
invalidate(callback?:
|
8659
|
+
invalidate(callback?: CallbackFunction_2<void>): void;
|
8340
8660
|
suspend(): void;
|
8341
8661
|
resume(): void;
|
8342
|
-
close(callback:
|
8662
|
+
close(callback: CallbackFunction_2<void>): void;
|
8343
8663
|
}
|
8344
8664
|
declare class NamedChunkIdsPlugin {
|
8345
8665
|
constructor(options?: NamedChunkIdsPluginOptions);
|
@@ -8598,7 +8918,7 @@ declare interface NormalModuleCreateData {
|
|
8598
8918
|
/**
|
8599
8919
|
* options used for resolving requests from this module
|
8600
8920
|
*/
|
8601
|
-
resolveOptions?:
|
8921
|
+
resolveOptions?: ResolveOptions;
|
8602
8922
|
}
|
8603
8923
|
declare abstract class NormalModuleFactory extends ModuleFactory {
|
8604
8924
|
hooks: Readonly<{
|
@@ -8609,7 +8929,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
8609
8929
|
resolveInScheme: HookMap<
|
8610
8930
|
AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
|
8611
8931
|
>;
|
8612
|
-
factorize: AsyncSeriesBailHook<[ResolveData], Module>;
|
8932
|
+
factorize: AsyncSeriesBailHook<[ResolveData], undefined | Module>;
|
8613
8933
|
beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
8614
8934
|
afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
|
8615
8935
|
createModule: AsyncSeriesBailHook<
|
@@ -8658,7 +8978,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
8658
8978
|
array: LoaderItem[],
|
8659
8979
|
resolver: ResolverWithOptions,
|
8660
8980
|
resolveContext: ResolveContext,
|
8661
|
-
callback:
|
8981
|
+
callback: CallbackNormalModuleFactory<LoaderItem[]>
|
8662
8982
|
): void;
|
8663
8983
|
getParser(type: string, parserOptions?: ParserOptions): Parser;
|
8664
8984
|
createParser(type: string, parserOptions?: ParserOptions): Parser;
|
@@ -8801,12 +9121,30 @@ declare interface ObjectDeserializerContext {
|
|
8801
9121
|
read: () => any;
|
8802
9122
|
setCircularReference: (arg0?: any) => void;
|
8803
9123
|
}
|
9124
|
+
declare interface ObjectEncodingOptions {
|
9125
|
+
encoding?:
|
9126
|
+
| null
|
9127
|
+
| "ascii"
|
9128
|
+
| "utf8"
|
9129
|
+
| "utf-8"
|
9130
|
+
| "utf16le"
|
9131
|
+
| "utf-16le"
|
9132
|
+
| "ucs2"
|
9133
|
+
| "ucs-2"
|
9134
|
+
| "latin1"
|
9135
|
+
| "binary"
|
9136
|
+
| "base64"
|
9137
|
+
| "base64url"
|
9138
|
+
| "hex";
|
9139
|
+
}
|
8804
9140
|
declare interface ObjectSerializer {
|
8805
9141
|
serialize: (arg0: any, arg1: ObjectSerializerContext) => void;
|
8806
9142
|
deserialize: (arg0: ObjectDeserializerContext) => any;
|
8807
9143
|
}
|
8808
9144
|
declare interface ObjectSerializerContext {
|
8809
9145
|
write: (arg0?: any) => void;
|
9146
|
+
writeLazy?: (arg0?: any) => void;
|
9147
|
+
writeSeparate?: (arg0: any, arg1?: object) => () => any;
|
8810
9148
|
setCircularReference: (arg0?: any) => void;
|
8811
9149
|
}
|
8812
9150
|
declare class OccurrenceChunkIdsPlugin {
|
@@ -8839,6 +9177,23 @@ declare interface OccurrenceModuleIdsPluginOptions {
|
|
8839
9177
|
*/
|
8840
9178
|
prioritiseInitial?: boolean;
|
8841
9179
|
}
|
9180
|
+
declare interface Open {
|
9181
|
+
(
|
9182
|
+
file: PathLikeFs,
|
9183
|
+
flags: undefined | string | number,
|
9184
|
+
mode: undefined | null | string | number,
|
9185
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: number) => void
|
9186
|
+
): void;
|
9187
|
+
(
|
9188
|
+
file: PathLikeFs,
|
9189
|
+
flags: undefined | string | number,
|
9190
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: number) => void
|
9191
|
+
): void;
|
9192
|
+
(
|
9193
|
+
file: PathLikeFs,
|
9194
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: number) => void
|
9195
|
+
): void;
|
9196
|
+
}
|
8842
9197
|
|
8843
9198
|
/**
|
8844
9199
|
* Enables/Disables integrated optimizations.
|
@@ -9335,7 +9690,12 @@ declare interface Output {
|
|
9335
9690
|
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
9336
9691
|
|
9337
9692
|
/**
|
9338
|
-
*
|
9693
|
+
* Compress the data in the head tag of CSS files.
|
9694
|
+
*/
|
9695
|
+
cssHeadDataCompression?: boolean;
|
9696
|
+
|
9697
|
+
/**
|
9698
|
+
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
9339
9699
|
*/
|
9340
9700
|
devtoolFallbackModuleFilenameTemplate?: string | Function;
|
9341
9701
|
|
@@ -9535,42 +9895,17 @@ declare interface Output {
|
|
9535
9895
|
workerWasmLoading?: string | false;
|
9536
9896
|
}
|
9537
9897
|
declare interface OutputFileSystem {
|
9538
|
-
writeFile:
|
9539
|
-
|
9540
|
-
|
9541
|
-
|
9542
|
-
) => void;
|
9543
|
-
mkdir: (
|
9544
|
-
arg0: string,
|
9545
|
-
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
9546
|
-
) => void;
|
9547
|
-
readdir?: (
|
9548
|
-
arg0: string,
|
9549
|
-
arg1: (
|
9550
|
-
arg0?: null | NodeJS.ErrnoException,
|
9551
|
-
arg1?: (string | Buffer)[] | IDirent[]
|
9552
|
-
) => void
|
9553
|
-
) => void;
|
9554
|
-
rmdir?: (
|
9555
|
-
arg0: string,
|
9556
|
-
arg1: (arg0?: null | NodeJS.ErrnoException) => void
|
9557
|
-
) => void;
|
9898
|
+
writeFile: WriteFile;
|
9899
|
+
mkdir: Mkdir;
|
9900
|
+
readdir?: ReaddirFs;
|
9901
|
+
rmdir?: Rmdir;
|
9558
9902
|
unlink?: (
|
9559
|
-
arg0:
|
9560
|
-
arg1: (arg0
|
9561
|
-
) => void;
|
9562
|
-
stat: (
|
9563
|
-
arg0: string,
|
9564
|
-
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
9565
|
-
) => void;
|
9566
|
-
lstat?: (
|
9567
|
-
arg0: string,
|
9568
|
-
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
9569
|
-
) => void;
|
9570
|
-
readFile: (
|
9571
|
-
arg0: string,
|
9572
|
-
arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
|
9903
|
+
arg0: PathLikeFs,
|
9904
|
+
arg1: (arg0: null | NodeJS.ErrnoException) => void
|
9573
9905
|
) => void;
|
9906
|
+
stat: StatFs;
|
9907
|
+
lstat?: LStatFs;
|
9908
|
+
readFile: ReadFileFs;
|
9574
9909
|
join?: (arg0: string, arg1: string) => string;
|
9575
9910
|
relative?: (arg0: string, arg1: string) => string;
|
9576
9911
|
dirname?: (arg0: string) => string;
|
@@ -9653,6 +9988,11 @@ declare interface OutputNormalized {
|
|
9653
9988
|
| string
|
9654
9989
|
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
9655
9990
|
|
9991
|
+
/**
|
9992
|
+
* Compress the data in the head tag of CSS files.
|
9993
|
+
*/
|
9994
|
+
cssHeadDataCompression?: boolean;
|
9995
|
+
|
9656
9996
|
/**
|
9657
9997
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
9658
9998
|
*/
|
@@ -9958,6 +10298,10 @@ declare interface PathData {
|
|
9958
10298
|
noChunkHash?: boolean;
|
9959
10299
|
url?: string;
|
9960
10300
|
}
|
10301
|
+
type PathLikeFs = string | Buffer | URL;
|
10302
|
+
type PathLikeTypes = string | Buffer | URL_url;
|
10303
|
+
type PathOrFileDescriptorFs = string | number | Buffer | URL;
|
10304
|
+
type PathOrFileDescriptorTypes = string | number | Buffer | URL_url;
|
9961
10305
|
type Pattern =
|
9962
10306
|
| Identifier
|
9963
10307
|
| MemberExpression
|
@@ -10013,14 +10357,12 @@ type Plugin =
|
|
10013
10357
|
| 0
|
10014
10358
|
| { apply: (arg0: Resolver) => void }
|
10015
10359
|
| ((this: Resolver, arg1: Resolver) => void);
|
10016
|
-
declare interface
|
10017
|
-
resolveToUnqualified: (
|
10018
|
-
|
10019
|
-
|
10020
|
-
|
10021
|
-
|
10022
|
-
path?: string;
|
10023
|
-
syscall?: string;
|
10360
|
+
declare interface PnpApi {
|
10361
|
+
resolveToUnqualified: (
|
10362
|
+
arg0: string,
|
10363
|
+
arg1: string,
|
10364
|
+
arg2: object
|
10365
|
+
) => null | string;
|
10024
10366
|
}
|
10025
10367
|
declare class PrefetchPlugin {
|
10026
10368
|
constructor(context: string, request?: string);
|
@@ -10270,6 +10612,43 @@ declare interface RawSourceMap {
|
|
10270
10612
|
mappings: string;
|
10271
10613
|
file: string;
|
10272
10614
|
}
|
10615
|
+
declare interface Read<TBuffer extends ArrayBufferView = Buffer> {
|
10616
|
+
(
|
10617
|
+
fd: number,
|
10618
|
+
buffer: TBuffer,
|
10619
|
+
offset: number,
|
10620
|
+
length: number,
|
10621
|
+
position: null | number | bigint,
|
10622
|
+
callback: (
|
10623
|
+
err: null | NodeJS.ErrnoException,
|
10624
|
+
bytesRead: number,
|
10625
|
+
buffer: TBuffer
|
10626
|
+
) => void
|
10627
|
+
): void;
|
10628
|
+
(
|
10629
|
+
fd: number,
|
10630
|
+
options: ReadAsyncOptions<TBuffer>,
|
10631
|
+
callback: (
|
10632
|
+
err: null | NodeJS.ErrnoException,
|
10633
|
+
bytesRead: number,
|
10634
|
+
buffer: TBuffer
|
10635
|
+
) => void
|
10636
|
+
): void;
|
10637
|
+
(
|
10638
|
+
fd: number,
|
10639
|
+
callback: (
|
10640
|
+
err: null | NodeJS.ErrnoException,
|
10641
|
+
bytesRead: number,
|
10642
|
+
buffer: ArrayBufferView
|
10643
|
+
) => void
|
10644
|
+
): void;
|
10645
|
+
}
|
10646
|
+
declare interface ReadAsyncOptions<TBuffer extends ArrayBufferView> {
|
10647
|
+
offset?: number;
|
10648
|
+
length?: number;
|
10649
|
+
position?: null | number | bigint;
|
10650
|
+
buffer?: TBuffer;
|
10651
|
+
}
|
10273
10652
|
declare class ReadFileCompileWasmPlugin {
|
10274
10653
|
constructor(options?: ReadFileCompileWasmPluginOptions);
|
10275
10654
|
options: ReadFileCompileWasmPluginOptions;
|
@@ -10285,89 +10664,565 @@ declare interface ReadFileCompileWasmPluginOptions {
|
|
10285
10664
|
*/
|
10286
10665
|
mangleImports?: boolean;
|
10287
10666
|
}
|
10288
|
-
declare interface
|
10289
|
-
|
10290
|
-
|
10291
|
-
|
10292
|
-
|
10293
|
-
|
10294
|
-
|
10295
|
-
|
|
10296
|
-
|
10297
|
-
|
10298
|
-
|
10299
|
-
|
10300
|
-
|
10301
|
-
|
10302
|
-
|
10303
|
-
|
10304
|
-
|
10305
|
-
|
10306
|
-
|
10307
|
-
|
10308
|
-
|
10309
|
-
|
10310
|
-
|
10311
|
-
|
10312
|
-
|
10313
|
-
|
10314
|
-
|
10315
|
-
|
10316
|
-
|
10317
|
-
|
10318
|
-
|
10319
|
-
|
10320
|
-
|
10321
|
-
|
10322
|
-
|
10323
|
-
|
10324
|
-
|
10325
|
-
|
10326
|
-
|
10327
|
-
|
10328
|
-
|
10667
|
+
declare interface ReadFileFs {
|
10668
|
+
(
|
10669
|
+
path: PathOrFileDescriptorFs,
|
10670
|
+
options:
|
10671
|
+
| undefined
|
10672
|
+
| null
|
10673
|
+
| ({ encoding?: null; flag?: string } & Abortable),
|
10674
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
10675
|
+
): void;
|
10676
|
+
(
|
10677
|
+
path: PathOrFileDescriptorFs,
|
10678
|
+
options:
|
10679
|
+
| "ascii"
|
10680
|
+
| "utf8"
|
10681
|
+
| "utf-8"
|
10682
|
+
| "utf16le"
|
10683
|
+
| "utf-16le"
|
10684
|
+
| "ucs2"
|
10685
|
+
| "ucs-2"
|
10686
|
+
| "latin1"
|
10687
|
+
| "binary"
|
10688
|
+
| "base64"
|
10689
|
+
| "base64url"
|
10690
|
+
| "hex"
|
10691
|
+
| ({ encoding: BufferEncoding; flag?: string } & Abortable),
|
10692
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
10693
|
+
): void;
|
10694
|
+
(
|
10695
|
+
path: PathOrFileDescriptorFs,
|
10696
|
+
options:
|
10697
|
+
| undefined
|
10698
|
+
| null
|
10699
|
+
| "ascii"
|
10700
|
+
| "utf8"
|
10701
|
+
| "utf-8"
|
10702
|
+
| "utf16le"
|
10703
|
+
| "utf-16le"
|
10704
|
+
| "ucs2"
|
10705
|
+
| "ucs-2"
|
10706
|
+
| "latin1"
|
10707
|
+
| "binary"
|
10708
|
+
| "base64"
|
10709
|
+
| "base64url"
|
10710
|
+
| "hex"
|
10711
|
+
| (ObjectEncodingOptions & { flag?: string } & Abortable),
|
10712
|
+
callback: (
|
10713
|
+
arg0: null | NodeJS.ErrnoException,
|
10714
|
+
arg1?: string | Buffer
|
10715
|
+
) => void
|
10716
|
+
): void;
|
10717
|
+
(
|
10718
|
+
path: PathOrFileDescriptorFs,
|
10719
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
10720
|
+
): void;
|
10329
10721
|
}
|
10330
|
-
|
10331
|
-
|
10332
|
-
|
10333
|
-
|
10334
|
-
|
10335
|
-
|
10336
|
-
|
10337
|
-
|
10338
|
-
|
10339
|
-
|
10340
|
-
|
10341
|
-
|
10342
|
-
|
10343
|
-
|
10722
|
+
declare interface ReadFileSync {
|
10723
|
+
(
|
10724
|
+
path: PathOrFileDescriptorFs,
|
10725
|
+
options?: null | { encoding?: null; flag?: string }
|
10726
|
+
): Buffer;
|
10727
|
+
(
|
10728
|
+
path: PathOrFileDescriptorFs,
|
10729
|
+
options:
|
10730
|
+
| "ascii"
|
10731
|
+
| "utf8"
|
10732
|
+
| "utf-8"
|
10733
|
+
| "utf16le"
|
10734
|
+
| "utf-16le"
|
10735
|
+
| "ucs2"
|
10736
|
+
| "ucs-2"
|
10737
|
+
| "latin1"
|
10738
|
+
| "binary"
|
10739
|
+
| "base64"
|
10740
|
+
| "base64url"
|
10741
|
+
| "hex"
|
10742
|
+
| { encoding: BufferEncoding; flag?: string }
|
10743
|
+
): string;
|
10744
|
+
(
|
10745
|
+
path: PathOrFileDescriptorFs,
|
10746
|
+
options?:
|
10747
|
+
| null
|
10748
|
+
| "ascii"
|
10749
|
+
| "utf8"
|
10750
|
+
| "utf-8"
|
10751
|
+
| "utf16le"
|
10752
|
+
| "utf-16le"
|
10753
|
+
| "ucs2"
|
10754
|
+
| "ucs-2"
|
10755
|
+
| "latin1"
|
10756
|
+
| "binary"
|
10757
|
+
| "base64"
|
10758
|
+
| "base64url"
|
10759
|
+
| "hex"
|
10760
|
+
| (ObjectEncodingOptions & { flag?: string })
|
10761
|
+
): string | Buffer;
|
10344
10762
|
}
|
10345
|
-
|
10346
|
-
|
10347
|
-
|
10348
|
-
|
10349
|
-
|
10350
|
-
|
10351
|
-
|
10352
|
-
|
10353
|
-
|
10354
|
-
|
10355
|
-
|
10356
|
-
|
10357
|
-
|
10358
|
-
|
10359
|
-
|
10763
|
+
declare interface ReadFileTypes {
|
10764
|
+
(
|
10765
|
+
path: PathOrFileDescriptorTypes,
|
10766
|
+
options:
|
10767
|
+
| undefined
|
10768
|
+
| null
|
10769
|
+
| ({ encoding?: null; flag?: string } & Abortable),
|
10770
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
10771
|
+
): void;
|
10772
|
+
(
|
10773
|
+
path: PathOrFileDescriptorTypes,
|
10774
|
+
options:
|
10775
|
+
| "ascii"
|
10776
|
+
| "utf8"
|
10777
|
+
| "utf-8"
|
10778
|
+
| "utf16le"
|
10779
|
+
| "utf-16le"
|
10780
|
+
| "ucs2"
|
10781
|
+
| "ucs-2"
|
10782
|
+
| "latin1"
|
10783
|
+
| "binary"
|
10784
|
+
| ({ encoding: BufferEncoding; flag?: string } & Abortable)
|
10785
|
+
| "base64"
|
10786
|
+
| "base64url"
|
10787
|
+
| "hex",
|
10788
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
10789
|
+
): void;
|
10790
|
+
(
|
10791
|
+
path: PathOrFileDescriptorTypes,
|
10792
|
+
options:
|
10793
|
+
| undefined
|
10794
|
+
| null
|
10795
|
+
| "ascii"
|
10796
|
+
| "utf8"
|
10797
|
+
| "utf-8"
|
10798
|
+
| "utf16le"
|
10799
|
+
| "utf-16le"
|
10800
|
+
| "ucs2"
|
10801
|
+
| "ucs-2"
|
10802
|
+
| "latin1"
|
10803
|
+
| "binary"
|
10804
|
+
| "base64"
|
10805
|
+
| "base64url"
|
10806
|
+
| "hex"
|
10807
|
+
| (ObjectEncodingOptions & { flag?: string } & Abortable),
|
10808
|
+
callback: (
|
10809
|
+
arg0: null | NodeJS.ErrnoException,
|
10810
|
+
arg1?: string | Buffer
|
10811
|
+
) => void
|
10812
|
+
): void;
|
10813
|
+
(
|
10814
|
+
path: PathOrFileDescriptorTypes,
|
10815
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
10816
|
+
): void;
|
10360
10817
|
}
|
10361
|
-
|
10362
|
-
|
10363
|
-
|
10364
|
-
|
10365
|
-
|
10366
|
-
|
10818
|
+
declare interface ReaddirFs {
|
10819
|
+
(
|
10820
|
+
path: PathLikeFs,
|
10821
|
+
options:
|
10822
|
+
| undefined
|
10823
|
+
| null
|
10824
|
+
| "ascii"
|
10825
|
+
| "utf8"
|
10826
|
+
| "utf-8"
|
10827
|
+
| "utf16le"
|
10828
|
+
| "utf-16le"
|
10829
|
+
| "ucs2"
|
10830
|
+
| "ucs-2"
|
10831
|
+
| "latin1"
|
10832
|
+
| "binary"
|
10833
|
+
| "base64"
|
10834
|
+
| "base64url"
|
10835
|
+
| "hex"
|
10836
|
+
| {
|
10837
|
+
encoding:
|
10838
|
+
| null
|
10839
|
+
| "ascii"
|
10840
|
+
| "utf8"
|
10841
|
+
| "utf-8"
|
10842
|
+
| "utf16le"
|
10843
|
+
| "utf-16le"
|
10844
|
+
| "ucs2"
|
10845
|
+
| "ucs-2"
|
10846
|
+
| "latin1"
|
10847
|
+
| "binary"
|
10848
|
+
| "base64"
|
10849
|
+
| "base64url"
|
10850
|
+
| "hex";
|
10851
|
+
withFileTypes?: false;
|
10852
|
+
recursive?: boolean;
|
10853
|
+
},
|
10854
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
|
10855
|
+
): void;
|
10856
|
+
(
|
10857
|
+
path: PathLikeFs,
|
10858
|
+
options:
|
10859
|
+
| "buffer"
|
10860
|
+
| { encoding: "buffer"; withFileTypes?: false; recursive?: boolean },
|
10861
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer[]) => void
|
10862
|
+
): void;
|
10863
|
+
(
|
10864
|
+
path: PathLikeFs,
|
10865
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
|
10866
|
+
): void;
|
10867
|
+
(
|
10868
|
+
path: PathLikeFs,
|
10869
|
+
options:
|
10870
|
+
| undefined
|
10871
|
+
| null
|
10872
|
+
| "ascii"
|
10873
|
+
| "utf8"
|
10874
|
+
| "utf-8"
|
10875
|
+
| "utf16le"
|
10876
|
+
| "utf-16le"
|
10877
|
+
| "ucs2"
|
10878
|
+
| "ucs-2"
|
10879
|
+
| "latin1"
|
10880
|
+
| "binary"
|
10881
|
+
| "base64"
|
10882
|
+
| "base64url"
|
10883
|
+
| "hex"
|
10884
|
+
| (ObjectEncodingOptions & {
|
10885
|
+
withFileTypes?: false;
|
10886
|
+
recursive?: boolean;
|
10887
|
+
}),
|
10888
|
+
callback: (
|
10889
|
+
arg0: null | NodeJS.ErrnoException,
|
10890
|
+
arg1?: string[] | Buffer[]
|
10891
|
+
) => void
|
10892
|
+
): void;
|
10893
|
+
(
|
10894
|
+
path: PathLikeFs,
|
10895
|
+
options: ObjectEncodingOptions & {
|
10896
|
+
withFileTypes: true;
|
10897
|
+
recursive?: boolean;
|
10898
|
+
},
|
10899
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Dirent[]) => void
|
10900
|
+
): void;
|
10367
10901
|
}
|
10368
|
-
declare interface
|
10369
|
-
|
10370
|
-
|
10902
|
+
declare interface ReaddirSync {
|
10903
|
+
(
|
10904
|
+
path: PathLikeFs,
|
10905
|
+
options?:
|
10906
|
+
| null
|
10907
|
+
| "ascii"
|
10908
|
+
| "utf8"
|
10909
|
+
| "utf-8"
|
10910
|
+
| "utf16le"
|
10911
|
+
| "utf-16le"
|
10912
|
+
| "ucs2"
|
10913
|
+
| "ucs-2"
|
10914
|
+
| "latin1"
|
10915
|
+
| "binary"
|
10916
|
+
| "base64"
|
10917
|
+
| "base64url"
|
10918
|
+
| "hex"
|
10919
|
+
| {
|
10920
|
+
encoding:
|
10921
|
+
| null
|
10922
|
+
| "ascii"
|
10923
|
+
| "utf8"
|
10924
|
+
| "utf-8"
|
10925
|
+
| "utf16le"
|
10926
|
+
| "utf-16le"
|
10927
|
+
| "ucs2"
|
10928
|
+
| "ucs-2"
|
10929
|
+
| "latin1"
|
10930
|
+
| "binary"
|
10931
|
+
| "base64"
|
10932
|
+
| "base64url"
|
10933
|
+
| "hex";
|
10934
|
+
withFileTypes?: false;
|
10935
|
+
recursive?: boolean;
|
10936
|
+
}
|
10937
|
+
): string[];
|
10938
|
+
(
|
10939
|
+
path: PathLikeFs,
|
10940
|
+
options:
|
10941
|
+
| "buffer"
|
10942
|
+
| { encoding: "buffer"; withFileTypes?: false; recursive?: boolean }
|
10943
|
+
): Buffer[];
|
10944
|
+
(
|
10945
|
+
path: PathLikeFs,
|
10946
|
+
options?:
|
10947
|
+
| null
|
10948
|
+
| "ascii"
|
10949
|
+
| "utf8"
|
10950
|
+
| "utf-8"
|
10951
|
+
| "utf16le"
|
10952
|
+
| "utf-16le"
|
10953
|
+
| "ucs2"
|
10954
|
+
| "ucs-2"
|
10955
|
+
| "latin1"
|
10956
|
+
| "binary"
|
10957
|
+
| "base64"
|
10958
|
+
| "base64url"
|
10959
|
+
| "hex"
|
10960
|
+
| (ObjectEncodingOptions & { withFileTypes?: false; recursive?: boolean })
|
10961
|
+
): string[] | Buffer[];
|
10962
|
+
(
|
10963
|
+
path: PathLikeFs,
|
10964
|
+
options: ObjectEncodingOptions & {
|
10965
|
+
withFileTypes: true;
|
10966
|
+
recursive?: boolean;
|
10967
|
+
}
|
10968
|
+
): Dirent[];
|
10969
|
+
}
|
10970
|
+
declare interface ReaddirTypes {
|
10971
|
+
(
|
10972
|
+
path: PathLikeTypes,
|
10973
|
+
options:
|
10974
|
+
| undefined
|
10975
|
+
| null
|
10976
|
+
| "ascii"
|
10977
|
+
| "utf8"
|
10978
|
+
| "utf-8"
|
10979
|
+
| "utf16le"
|
10980
|
+
| "utf-16le"
|
10981
|
+
| "ucs2"
|
10982
|
+
| "ucs-2"
|
10983
|
+
| "latin1"
|
10984
|
+
| "binary"
|
10985
|
+
| "base64"
|
10986
|
+
| "base64url"
|
10987
|
+
| "hex"
|
10988
|
+
| {
|
10989
|
+
encoding:
|
10990
|
+
| null
|
10991
|
+
| "ascii"
|
10992
|
+
| "utf8"
|
10993
|
+
| "utf-8"
|
10994
|
+
| "utf16le"
|
10995
|
+
| "utf-16le"
|
10996
|
+
| "ucs2"
|
10997
|
+
| "ucs-2"
|
10998
|
+
| "latin1"
|
10999
|
+
| "binary"
|
11000
|
+
| "base64"
|
11001
|
+
| "base64url"
|
11002
|
+
| "hex";
|
11003
|
+
withFileTypes?: false;
|
11004
|
+
recursive?: boolean;
|
11005
|
+
},
|
11006
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
|
11007
|
+
): void;
|
11008
|
+
(
|
11009
|
+
path: PathLikeTypes,
|
11010
|
+
options:
|
11011
|
+
| { encoding: "buffer"; withFileTypes?: false; recursive?: boolean }
|
11012
|
+
| "buffer",
|
11013
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer[]) => void
|
11014
|
+
): void;
|
11015
|
+
(
|
11016
|
+
path: PathLikeTypes,
|
11017
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
|
11018
|
+
): void;
|
11019
|
+
(
|
11020
|
+
path: PathLikeTypes,
|
11021
|
+
options:
|
11022
|
+
| undefined
|
11023
|
+
| null
|
11024
|
+
| "ascii"
|
11025
|
+
| "utf8"
|
11026
|
+
| "utf-8"
|
11027
|
+
| "utf16le"
|
11028
|
+
| "utf-16le"
|
11029
|
+
| "ucs2"
|
11030
|
+
| "ucs-2"
|
11031
|
+
| "latin1"
|
11032
|
+
| "binary"
|
11033
|
+
| "base64"
|
11034
|
+
| "base64url"
|
11035
|
+
| "hex"
|
11036
|
+
| (ObjectEncodingOptions & {
|
11037
|
+
withFileTypes?: false;
|
11038
|
+
recursive?: boolean;
|
11039
|
+
}),
|
11040
|
+
callback: (
|
11041
|
+
arg0: null | NodeJS.ErrnoException,
|
11042
|
+
arg1?: string[] | Buffer[]
|
11043
|
+
) => void
|
11044
|
+
): void;
|
11045
|
+
(
|
11046
|
+
path: PathLikeTypes,
|
11047
|
+
options: ObjectEncodingOptions & {
|
11048
|
+
withFileTypes: true;
|
11049
|
+
recursive?: boolean;
|
11050
|
+
},
|
11051
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Dirent[]) => void
|
11052
|
+
): void;
|
11053
|
+
}
|
11054
|
+
declare interface ReadlinkFs {
|
11055
|
+
(
|
11056
|
+
path: PathLikeFs,
|
11057
|
+
options: EncodingOption,
|
11058
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
11059
|
+
): void;
|
11060
|
+
(
|
11061
|
+
path: PathLikeFs,
|
11062
|
+
options: BufferEncodingOption,
|
11063
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
11064
|
+
): void;
|
11065
|
+
(
|
11066
|
+
path: PathLikeFs,
|
11067
|
+
options: EncodingOption,
|
11068
|
+
callback: (
|
11069
|
+
arg0: null | NodeJS.ErrnoException,
|
11070
|
+
arg1?: string | Buffer
|
11071
|
+
) => void
|
11072
|
+
): void;
|
11073
|
+
(
|
11074
|
+
path: PathLikeFs,
|
11075
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
11076
|
+
): void;
|
11077
|
+
}
|
11078
|
+
declare interface ReadlinkSync {
|
11079
|
+
(path: PathLikeFs, options?: EncodingOption): string;
|
11080
|
+
(path: PathLikeFs, options: BufferEncodingOption): Buffer;
|
11081
|
+
(path: PathLikeFs, options?: EncodingOption): string | Buffer;
|
11082
|
+
}
|
11083
|
+
declare interface ReadlinkTypes {
|
11084
|
+
(
|
11085
|
+
path: PathLikeTypes,
|
11086
|
+
options: EncodingOption,
|
11087
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
11088
|
+
): void;
|
11089
|
+
(
|
11090
|
+
path: PathLikeTypes,
|
11091
|
+
options: BufferEncodingOption,
|
11092
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
11093
|
+
): void;
|
11094
|
+
(
|
11095
|
+
path: PathLikeTypes,
|
11096
|
+
options: EncodingOption,
|
11097
|
+
callback: (
|
11098
|
+
arg0: null | NodeJS.ErrnoException,
|
11099
|
+
arg1?: string | Buffer
|
11100
|
+
) => void
|
11101
|
+
): void;
|
11102
|
+
(
|
11103
|
+
path: PathLikeTypes,
|
11104
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
11105
|
+
): void;
|
11106
|
+
}
|
11107
|
+
declare class RealContentHashPlugin {
|
11108
|
+
constructor(__0: {
|
11109
|
+
/**
|
11110
|
+
* the hash function to use
|
11111
|
+
*/
|
11112
|
+
hashFunction: string | typeof Hash;
|
11113
|
+
/**
|
11114
|
+
* the hash digest to use
|
11115
|
+
*/
|
11116
|
+
hashDigest: string;
|
11117
|
+
});
|
11118
|
+
|
11119
|
+
/**
|
11120
|
+
* Apply the plugin
|
11121
|
+
*/
|
11122
|
+
apply(compiler: Compiler): void;
|
11123
|
+
static getCompilationHooks(
|
11124
|
+
compilation: Compilation
|
11125
|
+
): CompilationHooksRealContentHashPlugin;
|
11126
|
+
}
|
11127
|
+
declare interface RealDependencyLocation {
|
11128
|
+
start: SourcePosition;
|
11129
|
+
end?: SourcePosition;
|
11130
|
+
index?: number;
|
11131
|
+
}
|
11132
|
+
declare interface RealPathFs {
|
11133
|
+
(
|
11134
|
+
path: PathLikeFs,
|
11135
|
+
options: EncodingOption,
|
11136
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
11137
|
+
): void;
|
11138
|
+
(
|
11139
|
+
path: PathLikeFs,
|
11140
|
+
options: BufferEncodingOption,
|
11141
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
11142
|
+
): void;
|
11143
|
+
(
|
11144
|
+
path: PathLikeFs,
|
11145
|
+
options: EncodingOption,
|
11146
|
+
callback: (
|
11147
|
+
arg0: null | NodeJS.ErrnoException,
|
11148
|
+
arg1?: string | Buffer
|
11149
|
+
) => void
|
11150
|
+
): void;
|
11151
|
+
(
|
11152
|
+
path: PathLikeFs,
|
11153
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
11154
|
+
): void;
|
11155
|
+
}
|
11156
|
+
declare interface RealPathSync {
|
11157
|
+
(path: PathLikeFs, options?: EncodingOption): string;
|
11158
|
+
(path: PathLikeFs, options: BufferEncodingOption): Buffer;
|
11159
|
+
(path: PathLikeFs, options?: EncodingOption): string | Buffer;
|
11160
|
+
}
|
11161
|
+
declare interface RealPathTypes {
|
11162
|
+
(
|
11163
|
+
path: PathLikeTypes,
|
11164
|
+
options: EncodingOption,
|
11165
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
11166
|
+
): void;
|
11167
|
+
(
|
11168
|
+
path: PathLikeTypes,
|
11169
|
+
options: BufferEncodingOption,
|
11170
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
|
11171
|
+
): void;
|
11172
|
+
(
|
11173
|
+
path: PathLikeTypes,
|
11174
|
+
options: EncodingOption,
|
11175
|
+
callback: (
|
11176
|
+
arg0: null | NodeJS.ErrnoException,
|
11177
|
+
arg1?: string | Buffer
|
11178
|
+
) => void
|
11179
|
+
): void;
|
11180
|
+
(
|
11181
|
+
path: PathLikeTypes,
|
11182
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
11183
|
+
): void;
|
11184
|
+
}
|
11185
|
+
type RecursiveArrayOrRecord<T> =
|
11186
|
+
| { [index: string]: RecursiveArrayOrRecord<T> }
|
11187
|
+
| RecursiveArrayOrRecord<T>[]
|
11188
|
+
| T;
|
11189
|
+
declare interface ReferencedExport {
|
11190
|
+
/**
|
11191
|
+
* name of the referenced export
|
11192
|
+
*/
|
11193
|
+
name: string[];
|
11194
|
+
|
11195
|
+
/**
|
11196
|
+
* when false, referenced export can not be mangled, defaults to true
|
11197
|
+
*/
|
11198
|
+
canMangle?: boolean;
|
11199
|
+
}
|
11200
|
+
type Remotes = (string | RemotesObject)[] | RemotesObject;
|
11201
|
+
|
11202
|
+
/**
|
11203
|
+
* Advanced configuration for container locations from which modules should be resolved and loaded at runtime.
|
11204
|
+
*/
|
11205
|
+
declare interface RemotesConfig {
|
11206
|
+
/**
|
11207
|
+
* Container locations from which modules should be resolved and loaded at runtime.
|
11208
|
+
*/
|
11209
|
+
external: string | string[];
|
11210
|
+
|
11211
|
+
/**
|
11212
|
+
* The name of the share scope shared with this remote.
|
11213
|
+
*/
|
11214
|
+
shareScope?: string;
|
11215
|
+
}
|
11216
|
+
|
11217
|
+
/**
|
11218
|
+
* Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.
|
11219
|
+
*/
|
11220
|
+
declare interface RemotesObject {
|
11221
|
+
[index: string]: string | RemotesConfig | string[];
|
11222
|
+
}
|
11223
|
+
declare interface RenderBootstrapContext {
|
11224
|
+
/**
|
11225
|
+
* the chunk
|
10371
11226
|
*/
|
10372
11227
|
chunk: Chunk;
|
10373
11228
|
|
@@ -10524,10 +11379,6 @@ declare interface ResolveBuildDependenciesResult {
|
|
10524
11379
|
missing: Set<string>;
|
10525
11380
|
};
|
10526
11381
|
}
|
10527
|
-
|
10528
|
-
/**
|
10529
|
-
* Resolve context
|
10530
|
-
*/
|
10531
11382
|
declare interface ResolveContext {
|
10532
11383
|
contextDependencies?: WriteOnlySet<string>;
|
10533
11384
|
|
@@ -10558,7 +11409,7 @@ declare interface ResolveContext {
|
|
10558
11409
|
}
|
10559
11410
|
declare interface ResolveData {
|
10560
11411
|
contextInfo: ModuleFactoryCreateDataContextInfo;
|
10561
|
-
resolveOptions?:
|
11412
|
+
resolveOptions?: ResolveOptions;
|
10562
11413
|
context: string;
|
10563
11414
|
request: string;
|
10564
11415
|
assertions?: Record<string, any>;
|
@@ -10574,44 +11425,11 @@ declare interface ResolveData {
|
|
10574
11425
|
*/
|
10575
11426
|
cacheable: boolean;
|
10576
11427
|
}
|
10577
|
-
declare interface ResolveOptionsTypes {
|
10578
|
-
alias: AliasOption[];
|
10579
|
-
fallback: AliasOption[];
|
10580
|
-
aliasFields: Set<string | string[]>;
|
10581
|
-
extensionAlias: ExtensionAliasOption[];
|
10582
|
-
cachePredicate: (arg0: ResolveRequest) => boolean;
|
10583
|
-
cacheWithContext: boolean;
|
10584
|
-
|
10585
|
-
/**
|
10586
|
-
* A list of exports field condition names.
|
10587
|
-
*/
|
10588
|
-
conditionNames: Set<string>;
|
10589
|
-
descriptionFiles: string[];
|
10590
|
-
enforceExtension: boolean;
|
10591
|
-
exportsFields: Set<string | string[]>;
|
10592
|
-
importsFields: Set<string | string[]>;
|
10593
|
-
extensions: Set<string>;
|
10594
|
-
fileSystem: FileSystem;
|
10595
|
-
unsafeCache: false | object;
|
10596
|
-
symlinks: boolean;
|
10597
|
-
resolver?: Resolver;
|
10598
|
-
modules: (string | string[])[];
|
10599
|
-
mainFields: { name: string[]; forceRelative: boolean }[];
|
10600
|
-
mainFiles: Set<string>;
|
10601
|
-
plugins: Plugin[];
|
10602
|
-
pnpApi: null | PnpApiImpl;
|
10603
|
-
roots: Set<string>;
|
10604
|
-
fullySpecified: boolean;
|
10605
|
-
resolveToContext: boolean;
|
10606
|
-
restrictions: Set<string | RegExp>;
|
10607
|
-
preferRelative: boolean;
|
10608
|
-
preferAbsolute: boolean;
|
10609
|
-
}
|
10610
11428
|
|
10611
11429
|
/**
|
10612
11430
|
* Options object for resolving requests.
|
10613
11431
|
*/
|
10614
|
-
declare interface
|
11432
|
+
declare interface ResolveOptions {
|
10615
11433
|
/**
|
10616
11434
|
* Redirect module requests.
|
10617
11435
|
*/
|
@@ -10640,7 +11458,7 @@ declare interface ResolveOptionsWebpackOptions {
|
|
10640
11458
|
/**
|
10641
11459
|
* Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
|
10642
11460
|
*/
|
10643
|
-
byDependency?: { [index: string]:
|
11461
|
+
byDependency?: { [index: string]: ResolveOptions };
|
10644
11462
|
|
10645
11463
|
/**
|
10646
11464
|
* Enable caching of successfully resolved requests (cache entries are revalidated).
|
@@ -10746,7 +11564,14 @@ declare interface ResolveOptionsWebpackOptions {
|
|
10746
11564
|
| false
|
10747
11565
|
| ""
|
10748
11566
|
| 0
|
10749
|
-
|
|
11567
|
+
| {
|
11568
|
+
[index: string]: any;
|
11569
|
+
/**
|
11570
|
+
* The run point of the plugin, required method.
|
11571
|
+
*/
|
11572
|
+
apply: (arg0: Resolver) => void;
|
11573
|
+
}
|
11574
|
+
| ((this: Resolver, arg1: Resolver) => void)
|
10750
11575
|
| "..."
|
10751
11576
|
)[];
|
10752
11577
|
|
@@ -10766,46 +11591,221 @@ declare interface ResolveOptionsWebpackOptions {
|
|
10766
11591
|
resolver?: Resolver;
|
10767
11592
|
|
10768
11593
|
/**
|
10769
|
-
* A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.
|
11594
|
+
* A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.
|
11595
|
+
*/
|
11596
|
+
restrictions?: (string | RegExp)[];
|
11597
|
+
|
11598
|
+
/**
|
11599
|
+
* A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
|
11600
|
+
*/
|
11601
|
+
roots?: string[];
|
11602
|
+
|
11603
|
+
/**
|
11604
|
+
* Enable resolving symlinks to the original location.
|
11605
|
+
*/
|
11606
|
+
symlinks?: boolean;
|
11607
|
+
|
11608
|
+
/**
|
11609
|
+
* Enable caching of successfully resolved requests (cache entries are not revalidated).
|
11610
|
+
*/
|
11611
|
+
unsafeCache?: boolean | { [index: string]: any };
|
11612
|
+
|
11613
|
+
/**
|
11614
|
+
* Use synchronous filesystem calls for the resolver.
|
11615
|
+
*/
|
11616
|
+
useSyncFileSystemCalls?: boolean;
|
11617
|
+
}
|
11618
|
+
declare interface ResolveOptionsResolverFactoryObject1 {
|
11619
|
+
alias: AliasOption[];
|
11620
|
+
fallback: AliasOption[];
|
11621
|
+
aliasFields: Set<string | string[]>;
|
11622
|
+
extensionAlias: ExtensionAliasOption[];
|
11623
|
+
cachePredicate: (arg0: ResolveRequest) => boolean;
|
11624
|
+
cacheWithContext: boolean;
|
11625
|
+
|
11626
|
+
/**
|
11627
|
+
* A list of exports field condition names.
|
11628
|
+
*/
|
11629
|
+
conditionNames: Set<string>;
|
11630
|
+
descriptionFiles: string[];
|
11631
|
+
enforceExtension: boolean;
|
11632
|
+
exportsFields: Set<string | string[]>;
|
11633
|
+
importsFields: Set<string | string[]>;
|
11634
|
+
extensions: Set<string>;
|
11635
|
+
fileSystem: FileSystem;
|
11636
|
+
unsafeCache: false | object;
|
11637
|
+
symlinks: boolean;
|
11638
|
+
resolver?: Resolver;
|
11639
|
+
modules: (string | string[])[];
|
11640
|
+
mainFields: { name: string[]; forceRelative: boolean }[];
|
11641
|
+
mainFiles: Set<string>;
|
11642
|
+
plugins: Plugin[];
|
11643
|
+
pnpApi: null | PnpApi;
|
11644
|
+
roots: Set<string>;
|
11645
|
+
fullySpecified: boolean;
|
11646
|
+
resolveToContext: boolean;
|
11647
|
+
restrictions: Set<string | RegExp>;
|
11648
|
+
preferRelative: boolean;
|
11649
|
+
preferAbsolute: boolean;
|
11650
|
+
}
|
11651
|
+
declare interface ResolveOptionsResolverFactoryObject2 {
|
11652
|
+
/**
|
11653
|
+
* A list of module alias configurations or an object which maps key to value
|
11654
|
+
*/
|
11655
|
+
alias?: AliasOption[] | AliasOptions;
|
11656
|
+
|
11657
|
+
/**
|
11658
|
+
* A list of module alias configurations or an object which maps key to value, applied only after modules option
|
11659
|
+
*/
|
11660
|
+
fallback?: AliasOption[] | AliasOptions;
|
11661
|
+
|
11662
|
+
/**
|
11663
|
+
* An object which maps extension to extension aliases
|
11664
|
+
*/
|
11665
|
+
extensionAlias?: ExtensionAliasOptions;
|
11666
|
+
|
11667
|
+
/**
|
11668
|
+
* A list of alias fields in description files
|
11669
|
+
*/
|
11670
|
+
aliasFields?: (string | string[])[];
|
11671
|
+
|
11672
|
+
/**
|
11673
|
+
* A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
|
11674
|
+
*/
|
11675
|
+
cachePredicate?: (arg0: ResolveRequest) => boolean;
|
11676
|
+
|
11677
|
+
/**
|
11678
|
+
* Whether or not the unsafeCache should include request context as part of the cache key.
|
11679
|
+
*/
|
11680
|
+
cacheWithContext?: boolean;
|
11681
|
+
|
11682
|
+
/**
|
11683
|
+
* A list of description files to read from
|
11684
|
+
*/
|
11685
|
+
descriptionFiles?: string[];
|
11686
|
+
|
11687
|
+
/**
|
11688
|
+
* A list of exports field condition names.
|
11689
|
+
*/
|
11690
|
+
conditionNames?: string[];
|
11691
|
+
|
11692
|
+
/**
|
11693
|
+
* Enforce that a extension from extensions must be used
|
11694
|
+
*/
|
11695
|
+
enforceExtension?: boolean;
|
11696
|
+
|
11697
|
+
/**
|
11698
|
+
* A list of exports fields in description files
|
11699
|
+
*/
|
11700
|
+
exportsFields?: (string | string[])[];
|
11701
|
+
|
11702
|
+
/**
|
11703
|
+
* A list of imports fields in description files
|
11704
|
+
*/
|
11705
|
+
importsFields?: (string | string[])[];
|
11706
|
+
|
11707
|
+
/**
|
11708
|
+
* A list of extensions which should be tried for files
|
11709
|
+
*/
|
11710
|
+
extensions?: string[];
|
11711
|
+
|
11712
|
+
/**
|
11713
|
+
* The file system which should be used
|
11714
|
+
*/
|
11715
|
+
fileSystem: FileSystem;
|
11716
|
+
|
11717
|
+
/**
|
11718
|
+
* Use this cache object to unsafely cache the successful requests
|
11719
|
+
*/
|
11720
|
+
unsafeCache?: boolean | object;
|
11721
|
+
|
11722
|
+
/**
|
11723
|
+
* Resolve symlinks to their symlinked location
|
11724
|
+
*/
|
11725
|
+
symlinks?: boolean;
|
11726
|
+
|
11727
|
+
/**
|
11728
|
+
* A prepared Resolver to which the plugins are attached
|
11729
|
+
*/
|
11730
|
+
resolver?: Resolver;
|
11731
|
+
|
11732
|
+
/**
|
11733
|
+
* A list of directories to resolve modules from, can be absolute path or folder name
|
11734
|
+
*/
|
11735
|
+
modules?: string | string[];
|
11736
|
+
|
11737
|
+
/**
|
11738
|
+
* A list of main fields in description files
|
11739
|
+
*/
|
11740
|
+
mainFields?: (
|
11741
|
+
| string
|
11742
|
+
| string[]
|
11743
|
+
| { name: string | string[]; forceRelative: boolean }
|
11744
|
+
)[];
|
11745
|
+
|
11746
|
+
/**
|
11747
|
+
* A list of main files in directories
|
11748
|
+
*/
|
11749
|
+
mainFiles?: string[];
|
11750
|
+
|
11751
|
+
/**
|
11752
|
+
* A list of additional resolve plugins which should be applied
|
11753
|
+
*/
|
11754
|
+
plugins?: Plugin[];
|
11755
|
+
|
11756
|
+
/**
|
11757
|
+
* A PnP API that should be used - null is "never", undefined is "auto"
|
11758
|
+
*/
|
11759
|
+
pnpApi?: null | PnpApi;
|
11760
|
+
|
11761
|
+
/**
|
11762
|
+
* A list of root paths
|
11763
|
+
*/
|
11764
|
+
roots?: string[];
|
11765
|
+
|
11766
|
+
/**
|
11767
|
+
* The request is already fully specified and no extensions or directories are resolved for it
|
11768
|
+
*/
|
11769
|
+
fullySpecified?: boolean;
|
11770
|
+
|
11771
|
+
/**
|
11772
|
+
* Resolve to a context instead of a file
|
10770
11773
|
*/
|
10771
|
-
|
11774
|
+
resolveToContext?: boolean;
|
10772
11775
|
|
10773
11776
|
/**
|
10774
|
-
* A list of
|
11777
|
+
* A list of resolve restrictions
|
10775
11778
|
*/
|
10776
|
-
|
11779
|
+
restrictions?: (string | RegExp)[];
|
10777
11780
|
|
10778
11781
|
/**
|
10779
|
-
*
|
11782
|
+
* Use only the sync constraints of the file system calls
|
10780
11783
|
*/
|
10781
|
-
|
11784
|
+
useSyncFileSystemCalls?: boolean;
|
10782
11785
|
|
10783
11786
|
/**
|
10784
|
-
*
|
11787
|
+
* Prefer to resolve module requests as relative requests before falling back to modules
|
10785
11788
|
*/
|
10786
|
-
|
11789
|
+
preferRelative?: boolean;
|
10787
11790
|
|
10788
11791
|
/**
|
10789
|
-
*
|
11792
|
+
* Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
|
10790
11793
|
*/
|
10791
|
-
|
11794
|
+
preferAbsolute?: boolean;
|
10792
11795
|
}
|
10793
|
-
type ResolveOptionsWithDependencyType =
|
11796
|
+
type ResolveOptionsWithDependencyType = ResolveOptions & {
|
10794
11797
|
dependencyType?: string;
|
10795
11798
|
resolveToContext?: boolean;
|
10796
11799
|
};
|
10797
|
-
|
10798
|
-
|
10799
|
-
|
10800
|
-
|
10801
|
-
|
10802
|
-
|
10803
|
-
|
10804
|
-
|
10805
|
-
|
10806
|
-
*/
|
10807
|
-
apply: (resolver: Resolver) => void;
|
10808
|
-
}
|
11800
|
+
type ResolvePluginInstance =
|
11801
|
+
| {
|
11802
|
+
[index: string]: any;
|
11803
|
+
/**
|
11804
|
+
* The run point of the plugin, required method.
|
11805
|
+
*/
|
11806
|
+
apply: (arg0: Resolver) => void;
|
11807
|
+
}
|
11808
|
+
| ((this: Resolver, arg1: Resolver) => void);
|
10809
11809
|
type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>;
|
10810
11810
|
declare interface ResolvedContextFileSystemInfoEntry {
|
10811
11811
|
safeTime: number;
|
@@ -10818,7 +11818,7 @@ declare interface ResolvedContextTimestampAndHash {
|
|
10818
11818
|
}
|
10819
11819
|
declare abstract class Resolver {
|
10820
11820
|
fileSystem: FileSystem;
|
10821
|
-
options:
|
11821
|
+
options: ResolveOptionsResolverFactoryObject1;
|
10822
11822
|
hooks: KnownHooks;
|
10823
11823
|
ensureHook(
|
10824
11824
|
name:
|
@@ -10881,7 +11881,13 @@ declare abstract class ResolverFactory {
|
|
10881
11881
|
SyncWaterfallHook<[ResolveOptionsWithDependencyType]>
|
10882
11882
|
>;
|
10883
11883
|
resolver: HookMap<
|
10884
|
-
SyncHook<
|
11884
|
+
SyncHook<
|
11885
|
+
[
|
11886
|
+
Resolver,
|
11887
|
+
ResolveOptionsResolverFactoryObject2,
|
11888
|
+
ResolveOptionsWithDependencyType
|
11889
|
+
]
|
11890
|
+
>
|
10885
11891
|
>;
|
10886
11892
|
}>;
|
10887
11893
|
cache: Map<string, ResolverCache>;
|
@@ -10900,6 +11906,22 @@ declare interface ResourceDataWithData {
|
|
10900
11906
|
context?: string;
|
10901
11907
|
data: Record<string, any>;
|
10902
11908
|
}
|
11909
|
+
declare interface RmDirOptions {
|
11910
|
+
maxRetries?: number;
|
11911
|
+
recursive?: boolean;
|
11912
|
+
retryDelay?: number;
|
11913
|
+
}
|
11914
|
+
declare interface Rmdir {
|
11915
|
+
(
|
11916
|
+
file: PathLikeFs,
|
11917
|
+
callback: (arg0: null | NodeJS.ErrnoException) => void
|
11918
|
+
): void;
|
11919
|
+
(
|
11920
|
+
file: PathLikeFs,
|
11921
|
+
options: RmDirOptions,
|
11922
|
+
callback: (arg0: null | NodeJS.ErrnoException) => void
|
11923
|
+
): void;
|
11924
|
+
}
|
10903
11925
|
type Rule = string | RegExp;
|
10904
11926
|
declare interface RuleSet {
|
10905
11927
|
/**
|
@@ -11113,7 +12135,7 @@ declare interface RuleSetRule {
|
|
11113
12135
|
/**
|
11114
12136
|
* Options for the resolver.
|
11115
12137
|
*/
|
11116
|
-
resolve?:
|
12138
|
+
resolve?: ResolveOptions;
|
11117
12139
|
|
11118
12140
|
/**
|
11119
12141
|
* Match the resource path of the module.
|
@@ -11327,9 +12349,16 @@ type RuleSetUseItem =
|
|
11327
12349
|
options?: string | { [index: string]: any };
|
11328
12350
|
}
|
11329
12351
|
| __TypeWebpackOptions;
|
12352
|
+
declare interface RunCallback<T> {
|
12353
|
+
(err: null | Error, result?: T): any;
|
12354
|
+
}
|
11330
12355
|
declare class RuntimeChunkPlugin {
|
11331
|
-
constructor(options?:
|
11332
|
-
options:
|
12356
|
+
constructor(options: { name?: (entrypoint: { name: string }) => string });
|
12357
|
+
options: {
|
12358
|
+
name:
|
12359
|
+
| ((entrypoint: { name: string }) => string)
|
12360
|
+
| ((entrypoint: Entrypoint) => string);
|
12361
|
+
};
|
11333
12362
|
|
11334
12363
|
/**
|
11335
12364
|
* Apply the plugin
|
@@ -11420,15 +12449,15 @@ declare abstract class RuntimeTemplate {
|
|
11420
12449
|
supportsDynamicImport(): undefined | boolean;
|
11421
12450
|
supportsEcmaScriptModuleSyntax(): undefined | boolean;
|
11422
12451
|
supportTemplateLiteral(): undefined | boolean;
|
11423
|
-
returningFunction(returnValue
|
11424
|
-
basicFunction(args
|
12452
|
+
returningFunction(returnValue: string, args?: string): string;
|
12453
|
+
basicFunction(args: string, body: string | string[]): string;
|
11425
12454
|
concatenation(...args: (string | { expr: string })[]): string;
|
11426
|
-
expressionFunction(expression
|
11427
|
-
emptyFunction():
|
11428
|
-
destructureArray(items
|
11429
|
-
destructureObject(items
|
11430
|
-
iife(args
|
11431
|
-
forEach(variable
|
12455
|
+
expressionFunction(expression: string, args?: string): string;
|
12456
|
+
emptyFunction(): string;
|
12457
|
+
destructureArray(items: string[], value: string): string;
|
12458
|
+
destructureObject(items: string[], value: string): string;
|
12459
|
+
iife(args: string, body: string): string;
|
12460
|
+
forEach(variable: string, array: string, body: string | string[]): string;
|
11432
12461
|
|
11433
12462
|
/**
|
11434
12463
|
* Add a comment
|
@@ -11497,7 +12526,7 @@ declare abstract class RuntimeTemplate {
|
|
11497
12526
|
/**
|
11498
12527
|
* the request that should be printed as comment
|
11499
12528
|
*/
|
11500
|
-
request
|
12529
|
+
request?: string;
|
11501
12530
|
/**
|
11502
12531
|
* expression to use as id expression
|
11503
12532
|
*/
|
@@ -11519,7 +12548,7 @@ declare abstract class RuntimeTemplate {
|
|
11519
12548
|
/**
|
11520
12549
|
* the request that should be printed as comment
|
11521
12550
|
*/
|
11522
|
-
request
|
12551
|
+
request?: string;
|
11523
12552
|
/**
|
11524
12553
|
* if the dependency is weak (will create a nice error message)
|
11525
12554
|
*/
|
@@ -11537,7 +12566,7 @@ declare abstract class RuntimeTemplate {
|
|
11537
12566
|
/**
|
11538
12567
|
* the request that should be printed as comment
|
11539
12568
|
*/
|
11540
|
-
request
|
12569
|
+
request?: string;
|
11541
12570
|
/**
|
11542
12571
|
* if the dependency is weak (will create a nice error message)
|
11543
12572
|
*/
|
@@ -11739,7 +12768,7 @@ declare abstract class RuntimeTemplate {
|
|
11739
12768
|
/**
|
11740
12769
|
* the async block
|
11741
12770
|
*/
|
11742
|
-
block
|
12771
|
+
block?: AsyncDependenciesBlock;
|
11743
12772
|
/**
|
11744
12773
|
* the message
|
11745
12774
|
*/
|
@@ -11856,14 +12885,24 @@ declare interface ScopeInfo {
|
|
11856
12885
|
isAsmJs: boolean;
|
11857
12886
|
}
|
11858
12887
|
declare interface Selector<A, B> {
|
11859
|
-
(input: A): B;
|
12888
|
+
(input: A): undefined | null | B;
|
11860
12889
|
}
|
11861
12890
|
declare abstract class Serializer {
|
11862
|
-
serializeMiddlewares: any;
|
11863
|
-
deserializeMiddlewares: any;
|
12891
|
+
serializeMiddlewares: SerializerMiddleware<any, any>[];
|
12892
|
+
deserializeMiddlewares: SerializerMiddleware<any, any>[];
|
11864
12893
|
context: any;
|
11865
|
-
serialize(obj?: any, context?: any): any
|
11866
|
-
deserialize(value?: any, context?: any): any
|
12894
|
+
serialize(obj?: any, context?: any): Promise<any>;
|
12895
|
+
deserialize(value?: any, context?: any): Promise<any>;
|
12896
|
+
}
|
12897
|
+
declare abstract class SerializerMiddleware<DeserializedType, SerializedType> {
|
12898
|
+
serialize(
|
12899
|
+
data: DeserializedType,
|
12900
|
+
context: Object
|
12901
|
+
): SerializedType | Promise<SerializedType>;
|
12902
|
+
deserialize(
|
12903
|
+
data: SerializedType,
|
12904
|
+
context: Object
|
12905
|
+
): DeserializedType | Promise<DeserializedType>;
|
11867
12906
|
}
|
11868
12907
|
type ServerOptionsHttps<
|
11869
12908
|
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
@@ -12313,6 +13352,82 @@ declare abstract class StackedMap<K, V> {
|
|
12313
13352
|
createChild(): StackedMap<K, V>;
|
12314
13353
|
}
|
12315
13354
|
type StartupRenderContext = RenderContext & { inlined: boolean };
|
13355
|
+
declare interface StatFs {
|
13356
|
+
(
|
13357
|
+
path: PathLikeFs,
|
13358
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
13359
|
+
): void;
|
13360
|
+
(
|
13361
|
+
path: PathLikeFs,
|
13362
|
+
options: undefined | (StatOptions & { bigint?: false }),
|
13363
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
13364
|
+
): void;
|
13365
|
+
(
|
13366
|
+
path: PathLikeFs,
|
13367
|
+
options: StatOptions & { bigint: true },
|
13368
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
|
13369
|
+
): void;
|
13370
|
+
(
|
13371
|
+
path: PathLikeFs,
|
13372
|
+
options: undefined | StatOptions,
|
13373
|
+
callback: (
|
13374
|
+
arg0: null | NodeJS.ErrnoException,
|
13375
|
+
arg1?: IStats | IBigIntStats
|
13376
|
+
) => void
|
13377
|
+
): void;
|
13378
|
+
}
|
13379
|
+
declare interface StatOptions {
|
13380
|
+
bigint?: boolean;
|
13381
|
+
}
|
13382
|
+
declare interface StatSync {
|
13383
|
+
(path: PathLikeFs, options?: undefined): IStats;
|
13384
|
+
(
|
13385
|
+
path: PathLikeFs,
|
13386
|
+
options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }
|
13387
|
+
): undefined | IStats;
|
13388
|
+
(
|
13389
|
+
path: PathLikeFs,
|
13390
|
+
options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }
|
13391
|
+
): undefined | IBigIntStats;
|
13392
|
+
(path: PathLikeFs, options?: StatSyncOptions & { bigint?: false }): IStats;
|
13393
|
+
(path: PathLikeFs, options: StatSyncOptions & { bigint: true }): IBigIntStats;
|
13394
|
+
(
|
13395
|
+
path: PathLikeFs,
|
13396
|
+
options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }
|
13397
|
+
): IStats | IBigIntStats;
|
13398
|
+
(
|
13399
|
+
path: PathLikeFs,
|
13400
|
+
options?: StatSyncOptions
|
13401
|
+
): undefined | IStats | IBigIntStats;
|
13402
|
+
}
|
13403
|
+
declare interface StatSyncOptions {
|
13404
|
+
bigint?: boolean;
|
13405
|
+
throwIfNoEntry?: boolean;
|
13406
|
+
}
|
13407
|
+
declare interface StatTypes {
|
13408
|
+
(
|
13409
|
+
path: PathLikeTypes,
|
13410
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
13411
|
+
): void;
|
13412
|
+
(
|
13413
|
+
path: PathLikeTypes,
|
13414
|
+
options: undefined | (StatOptions & { bigint?: false }),
|
13415
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
|
13416
|
+
): void;
|
13417
|
+
(
|
13418
|
+
path: PathLikeTypes,
|
13419
|
+
options: StatOptions & { bigint: true },
|
13420
|
+
callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
|
13421
|
+
): void;
|
13422
|
+
(
|
13423
|
+
path: PathLikeTypes,
|
13424
|
+
options: undefined | StatOptions,
|
13425
|
+
callback: (
|
13426
|
+
arg0: null | NodeJS.ErrnoException,
|
13427
|
+
arg1?: IStats | IBigIntStats
|
13428
|
+
) => void
|
13429
|
+
): void;
|
13430
|
+
}
|
12316
13431
|
type Statement =
|
12317
13432
|
| FunctionDeclaration
|
12318
13433
|
| VariableDeclaration
|
@@ -12394,8 +13509,8 @@ declare class Stats {
|
|
12394
13509
|
constructor(compilation: Compilation);
|
12395
13510
|
compilation: Compilation;
|
12396
13511
|
get hash(): string;
|
12397
|
-
get startTime():
|
12398
|
-
get endTime():
|
13512
|
+
get startTime(): number;
|
13513
|
+
get endTime(): number;
|
12399
13514
|
hasWarnings(): boolean;
|
12400
13515
|
hasErrors(): boolean;
|
12401
13516
|
toJson(options?: string | boolean | StatsOptions): StatsCompilation;
|
@@ -13029,9 +14144,15 @@ declare interface TrustedTypes {
|
|
13029
14144
|
policyName?: string;
|
13030
14145
|
}
|
13031
14146
|
declare const UNDEFINED_MARKER: unique symbol;
|
14147
|
+
|
14148
|
+
/**
|
14149
|
+
* `URL` class is a global reference for `require('url').URL`
|
14150
|
+
* https://nodejs.org/api/url.html#the-whatwg-url-api
|
14151
|
+
*/
|
14152
|
+
declare interface URL_url extends URL {}
|
13032
14153
|
declare interface UnsafeCacheData {
|
13033
14154
|
factoryMeta?: FactoryMeta;
|
13034
|
-
resolveOptions?:
|
14155
|
+
resolveOptions?: ResolveOptions;
|
13035
14156
|
}
|
13036
14157
|
declare interface UpdateHashContextDependency {
|
13037
14158
|
chunkGraph: ChunkGraph;
|
@@ -13048,151 +14169,6 @@ declare interface UpdateHashContextGenerator {
|
|
13048
14169
|
runtimeTemplate?: RuntimeTemplate;
|
13049
14170
|
}
|
13050
14171
|
type UsageStateType = 0 | 1 | 2 | 3 | 4;
|
13051
|
-
declare interface UserResolveOptions {
|
13052
|
-
/**
|
13053
|
-
* A list of module alias configurations or an object which maps key to value
|
13054
|
-
*/
|
13055
|
-
alias?: AliasOption[] | AliasOptions;
|
13056
|
-
|
13057
|
-
/**
|
13058
|
-
* A list of module alias configurations or an object which maps key to value, applied only after modules option
|
13059
|
-
*/
|
13060
|
-
fallback?: AliasOption[] | AliasOptions;
|
13061
|
-
|
13062
|
-
/**
|
13063
|
-
* An object which maps extension to extension aliases
|
13064
|
-
*/
|
13065
|
-
extensionAlias?: ExtensionAliasOptions;
|
13066
|
-
|
13067
|
-
/**
|
13068
|
-
* A list of alias fields in description files
|
13069
|
-
*/
|
13070
|
-
aliasFields?: (string | string[])[];
|
13071
|
-
|
13072
|
-
/**
|
13073
|
-
* A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
|
13074
|
-
*/
|
13075
|
-
cachePredicate?: (arg0: ResolveRequest) => boolean;
|
13076
|
-
|
13077
|
-
/**
|
13078
|
-
* Whether or not the unsafeCache should include request context as part of the cache key.
|
13079
|
-
*/
|
13080
|
-
cacheWithContext?: boolean;
|
13081
|
-
|
13082
|
-
/**
|
13083
|
-
* A list of description files to read from
|
13084
|
-
*/
|
13085
|
-
descriptionFiles?: string[];
|
13086
|
-
|
13087
|
-
/**
|
13088
|
-
* A list of exports field condition names.
|
13089
|
-
*/
|
13090
|
-
conditionNames?: string[];
|
13091
|
-
|
13092
|
-
/**
|
13093
|
-
* Enforce that a extension from extensions must be used
|
13094
|
-
*/
|
13095
|
-
enforceExtension?: boolean;
|
13096
|
-
|
13097
|
-
/**
|
13098
|
-
* A list of exports fields in description files
|
13099
|
-
*/
|
13100
|
-
exportsFields?: (string | string[])[];
|
13101
|
-
|
13102
|
-
/**
|
13103
|
-
* A list of imports fields in description files
|
13104
|
-
*/
|
13105
|
-
importsFields?: (string | string[])[];
|
13106
|
-
|
13107
|
-
/**
|
13108
|
-
* A list of extensions which should be tried for files
|
13109
|
-
*/
|
13110
|
-
extensions?: string[];
|
13111
|
-
|
13112
|
-
/**
|
13113
|
-
* The file system which should be used
|
13114
|
-
*/
|
13115
|
-
fileSystem: FileSystem;
|
13116
|
-
|
13117
|
-
/**
|
13118
|
-
* Use this cache object to unsafely cache the successful requests
|
13119
|
-
*/
|
13120
|
-
unsafeCache?: boolean | object;
|
13121
|
-
|
13122
|
-
/**
|
13123
|
-
* Resolve symlinks to their symlinked location
|
13124
|
-
*/
|
13125
|
-
symlinks?: boolean;
|
13126
|
-
|
13127
|
-
/**
|
13128
|
-
* A prepared Resolver to which the plugins are attached
|
13129
|
-
*/
|
13130
|
-
resolver?: Resolver;
|
13131
|
-
|
13132
|
-
/**
|
13133
|
-
* A list of directories to resolve modules from, can be absolute path or folder name
|
13134
|
-
*/
|
13135
|
-
modules?: string | string[];
|
13136
|
-
|
13137
|
-
/**
|
13138
|
-
* A list of main fields in description files
|
13139
|
-
*/
|
13140
|
-
mainFields?: (
|
13141
|
-
| string
|
13142
|
-
| string[]
|
13143
|
-
| { name: string | string[]; forceRelative: boolean }
|
13144
|
-
)[];
|
13145
|
-
|
13146
|
-
/**
|
13147
|
-
* A list of main files in directories
|
13148
|
-
*/
|
13149
|
-
mainFiles?: string[];
|
13150
|
-
|
13151
|
-
/**
|
13152
|
-
* A list of additional resolve plugins which should be applied
|
13153
|
-
*/
|
13154
|
-
plugins?: Plugin[];
|
13155
|
-
|
13156
|
-
/**
|
13157
|
-
* A PnP API that should be used - null is "never", undefined is "auto"
|
13158
|
-
*/
|
13159
|
-
pnpApi?: null | PnpApiImpl;
|
13160
|
-
|
13161
|
-
/**
|
13162
|
-
* A list of root paths
|
13163
|
-
*/
|
13164
|
-
roots?: string[];
|
13165
|
-
|
13166
|
-
/**
|
13167
|
-
* The request is already fully specified and no extensions or directories are resolved for it
|
13168
|
-
*/
|
13169
|
-
fullySpecified?: boolean;
|
13170
|
-
|
13171
|
-
/**
|
13172
|
-
* Resolve to a context instead of a file
|
13173
|
-
*/
|
13174
|
-
resolveToContext?: boolean;
|
13175
|
-
|
13176
|
-
/**
|
13177
|
-
* A list of resolve restrictions
|
13178
|
-
*/
|
13179
|
-
restrictions?: (string | RegExp)[];
|
13180
|
-
|
13181
|
-
/**
|
13182
|
-
* Use only the sync constraints of the file system calls
|
13183
|
-
*/
|
13184
|
-
useSyncFileSystemCalls?: boolean;
|
13185
|
-
|
13186
|
-
/**
|
13187
|
-
* Prefer to resolve module requests as relative requests before falling back to modules
|
13188
|
-
*/
|
13189
|
-
preferRelative?: boolean;
|
13190
|
-
|
13191
|
-
/**
|
13192
|
-
* Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
|
13193
|
-
*/
|
13194
|
-
preferAbsolute?: boolean;
|
13195
|
-
}
|
13196
14172
|
declare abstract class VariableInfo {
|
13197
14173
|
declaredScope: ScopeInfo;
|
13198
14174
|
freeName?: string | true;
|
@@ -13215,7 +14191,7 @@ declare interface WatchFileSystem {
|
|
13215
14191
|
startTime: number,
|
13216
14192
|
options: WatchOptions,
|
13217
14193
|
callback: (
|
13218
|
-
arg0:
|
14194
|
+
arg0: null | Error,
|
13219
14195
|
arg1: Map<string, FileSystemInfoEntry | "ignore">,
|
13220
14196
|
arg2: Map<string, FileSystemInfoEntry | "ignore">,
|
13221
14197
|
arg3: Set<string>,
|
@@ -13374,7 +14350,7 @@ declare abstract class Watching {
|
|
13374
14350
|
declare abstract class WeakTupleMap<T extends any[], V> {
|
13375
14351
|
set(...args: [T, ...V[]]): void;
|
13376
14352
|
has(...args: T): boolean;
|
13377
|
-
get(...args: T): V;
|
14353
|
+
get(...args: T): undefined | V;
|
13378
14354
|
provide(...args: [T, ...(() => V)[]]): V;
|
13379
14355
|
delete(...args: T): void;
|
13380
14356
|
clear(): void;
|
@@ -13463,13 +14439,13 @@ declare abstract class WebpackLogger {
|
|
13463
14439
|
group(...args: any[]): void;
|
13464
14440
|
groupCollapsed(...args: any[]): void;
|
13465
14441
|
groupEnd(...args: any[]): void;
|
13466
|
-
profile(label?:
|
13467
|
-
profileEnd(label?:
|
13468
|
-
time(label
|
13469
|
-
timeLog(label?:
|
13470
|
-
timeEnd(label?:
|
13471
|
-
timeAggregate(label?:
|
13472
|
-
timeAggregateEnd(label?:
|
14442
|
+
profile(label?: string): void;
|
14443
|
+
profileEnd(label?: string): void;
|
14444
|
+
time(label: string): void;
|
14445
|
+
timeLog(label?: string): void;
|
14446
|
+
timeEnd(label?: string): void;
|
14447
|
+
timeAggregate(label?: string): void;
|
14448
|
+
timeAggregateEnd(label?: string): void;
|
13473
14449
|
}
|
13474
14450
|
declare class WebpackOptionsApply extends OptionsApply {
|
13475
14451
|
constructor();
|
@@ -13653,12 +14629,12 @@ declare interface WebpackOptionsNormalized {
|
|
13653
14629
|
/**
|
13654
14630
|
* Options for the resolver.
|
13655
14631
|
*/
|
13656
|
-
resolve:
|
14632
|
+
resolve: ResolveOptions;
|
13657
14633
|
|
13658
14634
|
/**
|
13659
14635
|
* Options for the resolver when resolving loaders.
|
13660
14636
|
*/
|
13661
|
-
resolveLoader:
|
14637
|
+
resolveLoader: ResolveOptions;
|
13662
14638
|
|
13663
14639
|
/**
|
13664
14640
|
* Options affecting how file system snapshots are created and validated.
|
@@ -13708,9 +14684,88 @@ declare interface WithOptions {
|
|
13708
14684
|
arg0: Partial<ResolveOptionsWithDependencyType>
|
13709
14685
|
) => ResolverWithOptions;
|
13710
14686
|
}
|
14687
|
+
declare interface WriteFile {
|
14688
|
+
(
|
14689
|
+
file: PathOrFileDescriptorFs,
|
14690
|
+
data:
|
14691
|
+
| string
|
14692
|
+
| Uint8Array
|
14693
|
+
| Uint8ClampedArray
|
14694
|
+
| Uint16Array
|
14695
|
+
| Uint32Array
|
14696
|
+
| Int8Array
|
14697
|
+
| Int16Array
|
14698
|
+
| Int32Array
|
14699
|
+
| BigUint64Array
|
14700
|
+
| BigInt64Array
|
14701
|
+
| Float32Array
|
14702
|
+
| Float64Array
|
14703
|
+
| DataView,
|
14704
|
+
options: WriteFileOptions,
|
14705
|
+
callback: (arg0: null | NodeJS.ErrnoException) => void
|
14706
|
+
): void;
|
14707
|
+
(
|
14708
|
+
file: PathOrFileDescriptorFs,
|
14709
|
+
data:
|
14710
|
+
| string
|
14711
|
+
| Uint8Array
|
14712
|
+
| Uint8ClampedArray
|
14713
|
+
| Uint16Array
|
14714
|
+
| Uint32Array
|
14715
|
+
| Int8Array
|
14716
|
+
| Int16Array
|
14717
|
+
| Int32Array
|
14718
|
+
| BigUint64Array
|
14719
|
+
| BigInt64Array
|
14720
|
+
| Float32Array
|
14721
|
+
| Float64Array
|
14722
|
+
| DataView,
|
14723
|
+
callback: (arg0: null | NodeJS.ErrnoException) => void
|
14724
|
+
): void;
|
14725
|
+
}
|
14726
|
+
type WriteFileOptions =
|
14727
|
+
| null
|
14728
|
+
| "ascii"
|
14729
|
+
| "utf8"
|
14730
|
+
| "utf-8"
|
14731
|
+
| "utf16le"
|
14732
|
+
| "utf-16le"
|
14733
|
+
| "ucs2"
|
14734
|
+
| "ucs-2"
|
14735
|
+
| "latin1"
|
14736
|
+
| "binary"
|
14737
|
+
| "base64"
|
14738
|
+
| "base64url"
|
14739
|
+
| "hex"
|
14740
|
+
| (ObjectEncodingOptions &
|
14741
|
+
Abortable & { mode?: string | number; flag?: string; flush?: boolean });
|
13711
14742
|
declare interface WriteOnlySet<T> {
|
13712
14743
|
add: (item: T) => void;
|
13713
14744
|
}
|
14745
|
+
|
14746
|
+
declare interface WriteStreamOptions {
|
14747
|
+
flags?: string;
|
14748
|
+
encoding?:
|
14749
|
+
| "ascii"
|
14750
|
+
| "utf8"
|
14751
|
+
| "utf-8"
|
14752
|
+
| "utf16le"
|
14753
|
+
| "utf-16le"
|
14754
|
+
| "ucs2"
|
14755
|
+
| "ucs-2"
|
14756
|
+
| "latin1"
|
14757
|
+
| "binary"
|
14758
|
+
| "base64"
|
14759
|
+
| "base64url"
|
14760
|
+
| "hex";
|
14761
|
+
fd?: any;
|
14762
|
+
mode?: number;
|
14763
|
+
autoClose?: boolean;
|
14764
|
+
emitClose?: boolean;
|
14765
|
+
start?: number;
|
14766
|
+
signal?: null | AbortSignal;
|
14767
|
+
fs?: null | CreateWriteStreamFSImplementation;
|
14768
|
+
}
|
13714
14769
|
type __TypeWebpackOptions = (data: object) =>
|
13715
14770
|
| string
|
13716
14771
|
| {
|
@@ -13769,18 +14824,18 @@ type __Type_2 =
|
|
13769
14824
|
| __Type_2[]);
|
13770
14825
|
declare function exports(
|
13771
14826
|
options: Configuration,
|
13772
|
-
callback?:
|
14827
|
+
callback?: CallbackWebpack<Stats>
|
13773
14828
|
): Compiler;
|
13774
14829
|
declare function exports(
|
13775
14830
|
options: ReadonlyArray<Configuration> & MultiCompilerOptions,
|
13776
|
-
callback?:
|
14831
|
+
callback?: CallbackWebpack<MultiStats>
|
13777
14832
|
): MultiCompiler;
|
13778
14833
|
declare namespace exports {
|
13779
14834
|
export const webpack: {
|
13780
|
-
(options: Configuration, callback?:
|
14835
|
+
(options: Configuration, callback?: CallbackWebpack<Stats>): Compiler;
|
13781
14836
|
(
|
13782
14837
|
options: ReadonlyArray<Configuration> & MultiCompilerOptions,
|
13783
|
-
callback?:
|
14838
|
+
callback?: CallbackWebpack<MultiStats>
|
13784
14839
|
): MultiCompiler;
|
13785
14840
|
};
|
13786
14841
|
export const validate: (options?: any) => void;
|
@@ -14174,7 +15229,7 @@ declare namespace exports {
|
|
14174
15229
|
export let compareRuntime: (a: RuntimeSpec, b: RuntimeSpec) => 0 | 1 | -1;
|
14175
15230
|
export let mergeRuntime: (a: RuntimeSpec, b: RuntimeSpec) => RuntimeSpec;
|
14176
15231
|
export let deepMergeRuntime: (
|
14177
|
-
runtimes: RuntimeSpec[],
|
15232
|
+
runtimes: undefined | RuntimeSpec[],
|
14178
15233
|
runtime: RuntimeSpec
|
14179
15234
|
) => RuntimeSpec;
|
14180
15235
|
export let mergeRuntimeCondition: (
|
@@ -14328,7 +15383,7 @@ declare namespace exports {
|
|
14328
15383
|
LibraryOptions,
|
14329
15384
|
MemoryCacheOptions,
|
14330
15385
|
ModuleOptions,
|
14331
|
-
|
15386
|
+
ResolveOptions,
|
14332
15387
|
RuleSetCondition,
|
14333
15388
|
RuleSetConditionAbsolute,
|
14334
15389
|
RuleSetRule,
|