webpack 5.90.2 → 5.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of webpack might be problematic. Click here for more details.

Files changed (182) hide show
  1. package/README.md +5 -5
  2. package/bin/webpack.js +5 -1
  3. package/lib/APIPlugin.js +8 -4
  4. package/lib/AutomaticPrefetchPlugin.js +1 -1
  5. package/lib/BannerPlugin.js +3 -1
  6. package/lib/Cache.js +7 -1
  7. package/lib/CacheFacade.js +3 -3
  8. package/lib/ChunkGraph.js +32 -18
  9. package/lib/ChunkGroup.js +14 -14
  10. package/lib/CleanPlugin.js +7 -5
  11. package/lib/Compilation.js +263 -94
  12. package/lib/Compiler.js +199 -83
  13. package/lib/ConditionalInitFragment.js +4 -5
  14. package/lib/ContextModule.js +4 -1
  15. package/lib/ContextModuleFactory.js +4 -2
  16. package/lib/ContextReplacementPlugin.js +3 -2
  17. package/lib/CssModule.js +0 -3
  18. package/lib/DefinePlugin.js +4 -2
  19. package/lib/DelegatedModule.js +2 -1
  20. package/lib/Dependency.js +4 -2
  21. package/lib/DependencyTemplate.js +7 -2
  22. package/lib/DllModule.js +3 -1
  23. package/lib/DllReferencePlugin.js +6 -2
  24. package/lib/EntryOptionPlugin.js +4 -1
  25. package/lib/EntryPlugin.js +6 -1
  26. package/lib/Entrypoint.js +1 -1
  27. package/lib/ExportsInfo.js +1 -4
  28. package/lib/ExternalModule.js +120 -25
  29. package/lib/ExternalModuleFactoryPlugin.js +37 -2
  30. package/lib/FileSystemInfo.js +1 -1
  31. package/lib/Generator.js +2 -1
  32. package/lib/HookWebpackError.js +2 -2
  33. package/lib/InitFragment.js +5 -3
  34. package/lib/LibManifestPlugin.js +15 -7
  35. package/lib/Module.js +54 -5
  36. package/lib/ModuleFilenameHelpers.js +1 -1
  37. package/lib/ModuleGraph.js +56 -27
  38. package/lib/ModuleGraphConnection.js +2 -1
  39. package/lib/MultiCompiler.js +61 -17
  40. package/lib/NodeStuffPlugin.js +14 -3
  41. package/lib/NormalModule.js +239 -86
  42. package/lib/NormalModuleFactory.js +163 -32
  43. package/lib/NormalModuleReplacementPlugin.js +5 -1
  44. package/lib/ProvidePlugin.js +3 -1
  45. package/lib/RawModule.js +4 -2
  46. package/lib/ResolverFactory.js +5 -1
  47. package/lib/RuntimeModule.js +6 -5
  48. package/lib/RuntimePlugin.js +1 -0
  49. package/lib/RuntimeTemplate.js +102 -34
  50. package/lib/SourceMapDevToolPlugin.js +4 -1
  51. package/lib/Stats.js +12 -5
  52. package/lib/TemplatedPathPlugin.js +32 -6
  53. package/lib/Watching.js +67 -60
  54. package/lib/WebpackError.js +6 -6
  55. package/lib/WebpackOptionsApply.js +18 -5
  56. package/lib/asset/RawDataUrlModule.js +5 -2
  57. package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
  58. package/lib/buildChunkGraph.js +220 -392
  59. package/lib/cache/IdleFileCachePlugin.js +8 -3
  60. package/lib/cache/MemoryCachePlugin.js +1 -1
  61. package/lib/cache/MemoryWithGcCachePlugin.js +6 -2
  62. package/lib/cache/PackFileCacheStrategy.js +49 -16
  63. package/lib/cache/ResolverCachePlugin.js +14 -6
  64. package/lib/cache/getLazyHashedEtag.js +1 -1
  65. package/lib/config/defaults.js +24 -1
  66. package/lib/config/normalization.js +3 -1
  67. package/lib/container/ContainerEntryDependency.js +2 -1
  68. package/lib/container/ContainerEntryModule.js +5 -2
  69. package/lib/container/ContainerPlugin.js +14 -10
  70. package/lib/container/FallbackModule.js +3 -2
  71. package/lib/container/RemoteModule.js +2 -1
  72. package/lib/container/RemoteRuntimeModule.js +12 -3
  73. package/lib/css/CssExportsGenerator.js +34 -17
  74. package/lib/css/CssGenerator.js +20 -2
  75. package/lib/css/CssLoadingRuntimeModule.js +212 -96
  76. package/lib/css/CssModulesPlugin.js +47 -13
  77. package/lib/debug/ProfilingPlugin.js +27 -2
  78. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +9 -5
  79. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +4 -1
  80. package/lib/dependencies/CommonJsDependencyHelpers.js +2 -1
  81. package/lib/dependencies/CommonJsExportRequireDependency.js +33 -18
  82. package/lib/dependencies/CommonJsExportsDependency.js +13 -5
  83. package/lib/dependencies/CommonJsExportsParserPlugin.js +20 -15
  84. package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -2
  85. package/lib/dependencies/ContextDependencyHelpers.js +49 -29
  86. package/lib/dependencies/ContextElementDependency.js +8 -1
  87. package/lib/dependencies/CssLocalIdentifierDependency.js +63 -8
  88. package/lib/dependencies/CssUrlDependency.js +5 -3
  89. package/lib/dependencies/ExportsInfoDependency.js +4 -3
  90. package/lib/dependencies/ExternalModuleInitFragment.js +5 -3
  91. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +4 -4
  92. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +43 -23
  93. package/lib/dependencies/HarmonyExportHeaderDependency.js +1 -1
  94. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +73 -32
  95. package/lib/dependencies/HarmonyExportInitFragment.js +10 -2
  96. package/lib/dependencies/HarmonyImportDependency.js +28 -12
  97. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +44 -16
  98. package/lib/dependencies/HarmonyImportSideEffectDependency.js +7 -6
  99. package/lib/dependencies/HarmonyImportSpecifierDependency.js +21 -10
  100. package/lib/dependencies/ImportDependency.js +9 -2
  101. package/lib/dependencies/ImportEagerDependency.js +4 -2
  102. package/lib/dependencies/ImportMetaContextDependency.js +7 -0
  103. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +25 -14
  104. package/lib/dependencies/ImportParserPlugin.js +12 -4
  105. package/lib/dependencies/ImportWeakDependency.js +4 -2
  106. package/lib/dependencies/LoaderDependency.js +2 -1
  107. package/lib/dependencies/LoaderImportDependency.js +2 -1
  108. package/lib/dependencies/ModuleDependency.js +4 -5
  109. package/lib/dependencies/PureExpressionDependency.js +4 -1
  110. package/lib/dependencies/RequireContextPlugin.js +1 -1
  111. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +26 -14
  112. package/lib/dependencies/RequireEnsureDependency.js +1 -1
  113. package/lib/dependencies/URLDependency.js +7 -4
  114. package/lib/dependencies/WorkerDependency.js +1 -1
  115. package/lib/dependencies/WorkerPlugin.js +6 -5
  116. package/lib/dependencies/getFunctionExpression.js +3 -1
  117. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +2 -1
  118. package/lib/hmr/LazyCompilationPlugin.js +2 -1
  119. package/lib/javascript/BasicEvaluatedExpression.js +2 -2
  120. package/lib/javascript/ChunkHelpers.js +2 -2
  121. package/lib/javascript/JavascriptParser.js +169 -57
  122. package/lib/javascript/JavascriptParserHelpers.js +1 -1
  123. package/lib/javascript/StartupHelpers.js +22 -5
  124. package/lib/logging/Logger.js +27 -2
  125. package/lib/logging/createConsoleLogger.js +11 -7
  126. package/lib/node/NodeEnvironmentPlugin.js +13 -7
  127. package/lib/node/NodeWatchFileSystem.js +37 -26
  128. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +2 -1
  129. package/lib/node/RequireChunkLoadingRuntimeModule.js +2 -1
  130. package/lib/node/nodeConsole.js +24 -1
  131. package/lib/optimize/AggressiveSplittingPlugin.js +1 -0
  132. package/lib/optimize/ConcatenatedModule.js +140 -55
  133. package/lib/optimize/EnsureChunkConditionsPlugin.js +1 -1
  134. package/lib/optimize/InnerGraph.js +7 -2
  135. package/lib/optimize/InnerGraphPlugin.js +36 -13
  136. package/lib/optimize/ModuleConcatenationPlugin.js +12 -2
  137. package/lib/optimize/RemoveParentModulesPlugin.js +1 -0
  138. package/lib/optimize/RuntimeChunkPlugin.js +6 -1
  139. package/lib/optimize/SideEffectsFlagPlugin.js +46 -15
  140. package/lib/optimize/SplitChunksPlugin.js +2 -2
  141. package/lib/performance/SizeLimitsPlugin.js +11 -0
  142. package/lib/rules/ObjectMatcherRulePlugin.js +4 -0
  143. package/lib/runtime/EnsureChunkRuntimeModule.js +2 -1
  144. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +2 -1
  145. package/lib/serialization/FileMiddleware.js +1 -0
  146. package/lib/serialization/ObjectMiddleware.js +2 -0
  147. package/lib/serialization/Serializer.js +19 -0
  148. package/lib/sharing/ConsumeSharedModule.js +3 -2
  149. package/lib/sharing/ConsumeSharedPlugin.js +17 -3
  150. package/lib/sharing/ConsumeSharedRuntimeModule.js +9 -2
  151. package/lib/sharing/ProvideSharedModule.js +2 -1
  152. package/lib/sharing/ProvideSharedPlugin.js +12 -5
  153. package/lib/sharing/resolveMatchedConfigs.js +2 -2
  154. package/lib/sharing/utils.js +13 -6
  155. package/lib/util/StackedCacheMap.js +26 -0
  156. package/lib/util/WeakTupleMap.js +57 -13
  157. package/lib/util/cleverMerge.js +24 -11
  158. package/lib/util/comparators.js +34 -14
  159. package/lib/util/conventions.js +129 -0
  160. package/lib/util/fs.js +379 -65
  161. package/lib/util/hash/BatchedHash.js +3 -0
  162. package/lib/util/hash/xxhash64.js +2 -2
  163. package/lib/util/memoize.js +2 -0
  164. package/lib/util/runtime.js +1 -1
  165. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +4 -2
  166. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +15 -6
  167. package/lib/wasm-sync/WebAssemblyGenerator.js +27 -6
  168. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +2 -1
  169. package/lib/wasm-sync/WebAssemblyParser.js +7 -4
  170. package/lib/web/JsonpChunkLoadingRuntimeModule.js +2 -1
  171. package/lib/webpack.js +11 -5
  172. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +2 -1
  173. package/package.json +25 -26
  174. package/schemas/WebpackOptions.check.js +1 -1
  175. package/schemas/WebpackOptions.json +69 -8
  176. package/schemas/plugins/BannerPlugin.check.js +1 -1
  177. package/schemas/plugins/BannerPlugin.json +5 -1
  178. package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +1 -1
  179. package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
  180. package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +1 -1
  181. package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +1 -1
  182. package/types.d.ts +1772 -673
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
- declare interface Assertions {
241
- [index: string]: any;
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: string; chunk: Chunk; filename: string }) => string;
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: string; chunk: Chunk; filename: string }) => string);
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: string; chunk: Chunk; filename: string }) => string);
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?: JsonObject;
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: undefined | null | BasicEvaluatedExpression,
687
- postfix: undefined | null | BasicEvaluatedExpression,
688
- innerExpressions: BasicEvaluatedExpression[]
710
+ prefix?: null | BasicEvaluatedExpression,
711
+ postfix?: null | BasicEvaluatedExpression,
712
+ innerExpressions?: BasicEvaluatedExpression[]
689
713
  ): BasicEvaluatedExpression;
690
714
 
691
715
  /**
@@ -817,9 +841,21 @@ declare abstract class BasicEvaluatedExpression {
817
841
  | TemplateElement
818
842
  ): BasicEvaluatedExpression;
819
843
  }
820
- declare interface BuildInfo {
821
- [index: string]: any;
822
- }
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" };
858
+ type BuildInfo = KnownBuildInfo & Record<string, any>;
823
859
  type BuildMeta = KnownBuildMeta & Record<string, any>;
824
860
  declare abstract class ByTypeGenerator extends Generator {
825
861
  map: Record<string, Generator>;
@@ -845,13 +881,13 @@ declare class Cache {
845
881
  get<T>(
846
882
  identifier: string,
847
883
  etag: null | Etag,
848
- callback: CallbackCache<T>
884
+ callback: CallbackCacheCache<T>
849
885
  ): void;
850
886
  store<T>(
851
887
  identifier: string,
852
888
  etag: null | Etag,
853
889
  data: T,
854
- callback: CallbackCache<void>
890
+ callback: CallbackCacheCache<void>
855
891
  ): void;
856
892
 
857
893
  /**
@@ -859,11 +895,11 @@ declare class Cache {
859
895
  */
860
896
  storeBuildDependencies(
861
897
  dependencies: Iterable<string>,
862
- callback: CallbackCache<void>
898
+ callback: CallbackCacheCache<void>
863
899
  ): void;
864
900
  beginIdle(): void;
865
- endIdle(callback: CallbackCache<void>): void;
866
- shutdown(callback: CallbackCache<void>): void;
901
+ endIdle(callback: CallbackCacheCache<void>): void;
902
+ shutdown(callback: CallbackCacheCache<void>): void;
867
903
  static STAGE_MEMORY: number;
868
904
  static STAGE_DEFAULT: number;
869
905
  static STAGE_DISK: number;
@@ -877,14 +913,14 @@ declare abstract class CacheFacade {
877
913
  get<T>(
878
914
  identifier: string,
879
915
  etag: null | Etag,
880
- callback: CallbackCache<T>
916
+ callback: CallbackCacheCacheFacade<T>
881
917
  ): void;
882
918
  getPromise<T>(identifier: string, etag: null | Etag): Promise<T>;
883
919
  store<T>(
884
920
  identifier: string,
885
921
  etag: null | Etag,
886
922
  data: T,
887
- callback: CallbackCache<void>
923
+ callback: CallbackCacheCacheFacade<void>
888
924
  ): void;
889
925
  storePromise<T>(
890
926
  identifier: string,
@@ -955,17 +991,26 @@ declare interface CallExpressionInfo {
955
991
  declare interface CallbackAsyncQueue<T> {
956
992
  (err?: null | WebpackError, result?: T): any;
957
993
  }
958
- declare interface CallbackCache<T> {
959
- (err?: null | WebpackError, result?: T): void;
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;
960
999
  }
961
- declare interface CallbackFunction<T> {
1000
+ declare interface CallbackFunction_1<T> {
1001
+ (err: null | Error, result?: T): any;
1002
+ }
1003
+ declare interface CallbackFunction_2<T> {
962
1004
  (err?: null | Error, result?: T): any;
963
1005
  }
964
1006
  declare interface CallbackNormalErrorCache<T> {
965
1007
  (err?: null | Error, result?: T): void;
966
1008
  }
1009
+ declare interface CallbackNormalModuleFactory<T> {
1010
+ (err?: null | Error, stats?: T): void;
1011
+ }
967
1012
  declare interface CallbackWebpack<T> {
968
- (err?: Error, stats?: T): void;
1013
+ (err: null | Error, stats?: T): void;
969
1014
  }
970
1015
  type Cell<T> = undefined | T;
971
1016
  declare class Chunk {
@@ -1159,7 +1204,7 @@ declare class ChunkGraph {
1159
1204
  getChunkEntryModulesWithChunkGroupIterable(
1160
1205
  chunk: Chunk
1161
1206
  ): Iterable<[Module, undefined | Entrypoint]>;
1162
- getBlockChunkGroup(depBlock: AsyncDependenciesBlock): ChunkGroup;
1207
+ getBlockChunkGroup(depBlock: AsyncDependenciesBlock): undefined | ChunkGroup;
1163
1208
  connectBlockAndChunkGroup(
1164
1209
  depBlock: AsyncDependenciesBlock,
1165
1210
  chunkGroup: ChunkGroup
@@ -1259,7 +1304,7 @@ declare abstract class ChunkGroup {
1259
1304
  * add a chunk into ChunkGroup. Is pushed on or prepended
1260
1305
  */
1261
1306
  pushChunk(chunk: Chunk): boolean;
1262
- replaceChunk(oldChunk: Chunk, newChunk: Chunk): boolean;
1307
+ replaceChunk(oldChunk: Chunk, newChunk: Chunk): undefined | boolean;
1263
1308
  removeChunk(chunk: Chunk): boolean;
1264
1309
  isInitial(): boolean;
1265
1310
  addChild(group: ChunkGroup): boolean;
@@ -1536,7 +1581,7 @@ declare interface CodeGenerationContext {
1536
1581
  /**
1537
1582
  * code generation results of other modules (need to have a codeGenerationDependency to use that)
1538
1583
  */
1539
- codeGenerationResults: CodeGenerationResults;
1584
+ codeGenerationResults?: CodeGenerationResults;
1540
1585
 
1541
1586
  /**
1542
1587
  * the compilation
@@ -1669,13 +1714,16 @@ declare class Compilation {
1669
1714
  optimize: SyncHook<[]>;
1670
1715
  optimizeModules: SyncBailHook<[Iterable<Module>], any>;
1671
1716
  afterOptimizeModules: SyncHook<[Iterable<Module>]>;
1672
- optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>;
1717
+ optimizeChunks: SyncBailHook<
1718
+ [Iterable<Chunk>, ChunkGroup[]],
1719
+ boolean | void
1720
+ >;
1673
1721
  afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
1674
1722
  optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
1675
1723
  afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
1676
1724
  optimizeChunkModules: AsyncSeriesBailHook<
1677
1725
  [Iterable<Chunk>, Iterable<Module>],
1678
- any
1726
+ void
1679
1727
  >;
1680
1728
  afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
1681
1729
  shouldRecord: SyncBailHook<[], undefined | boolean>;
@@ -1683,7 +1731,7 @@ declare class Compilation {
1683
1731
  [Chunk, Set<string>, RuntimeRequirementsContext]
1684
1732
  >;
1685
1733
  runtimeRequirementInChunk: HookMap<
1686
- SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any>
1734
+ SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], void>
1687
1735
  >;
1688
1736
  additionalModuleRuntimeRequirements: SyncHook<
1689
1737
  [Module, Set<string>, RuntimeRequirementsContext]
@@ -1757,7 +1805,7 @@ declare class Compilation {
1757
1805
  >;
1758
1806
  afterProcessAssets: SyncHook<[CompilationAssets]>;
1759
1807
  processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
1760
- needAdditionalSeal: SyncBailHook<[], boolean>;
1808
+ needAdditionalSeal: SyncBailHook<[], undefined | boolean>;
1761
1809
  afterSeal: AsyncSeriesHook<[]>;
1762
1810
  renderManifest: SyncWaterfallHook<
1763
1811
  [RenderManifestEntry[], RenderManifestOptions]
@@ -1783,8 +1831,8 @@ declare class Compilation {
1783
1831
  get normalModuleLoader(): SyncHook<[object, NormalModule]>;
1784
1832
  }>;
1785
1833
  name?: string;
1786
- startTime: any;
1787
- endTime: any;
1834
+ startTime?: number;
1835
+ endTime?: number;
1788
1836
  compiler: Compiler;
1789
1837
  resolverFactory: ResolverFactory;
1790
1838
  inputFileSystem: InputFileSystem;
@@ -1801,7 +1849,7 @@ declare class Compilation {
1801
1849
  mainTemplate: MainTemplate;
1802
1850
  chunkTemplate: ChunkTemplate;
1803
1851
  runtimeTemplate: RuntimeTemplate;
1804
- moduleTemplates: { javascript: ModuleTemplate };
1852
+ moduleTemplates: ModuleTemplates;
1805
1853
  moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
1806
1854
  moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
1807
1855
  moduleGraph: ModuleGraph;
@@ -1855,14 +1903,14 @@ declare class Compilation {
1855
1903
  contextDependencies: LazySet<string>;
1856
1904
  missingDependencies: LazySet<string>;
1857
1905
  buildDependencies: LazySet<string>;
1858
- compilationDependencies: { add: (item?: any) => LazySet<string> };
1906
+ compilationDependencies: { add: (item: string) => LazySet<string> };
1859
1907
  getStats(): Stats;
1860
1908
  createStatsOptions(
1861
- optionsOrPreset?: string | StatsOptions,
1909
+ optionsOrPreset?: string | boolean | StatsOptions,
1862
1910
  context?: CreateStatsOptionsContext
1863
1911
  ): NormalizedStatsOptions;
1864
- createStatsFactory(options?: any): StatsFactory;
1865
- createStatsPrinter(options?: any): StatsPrinter;
1912
+ createStatsFactory(options: NormalizedStatsOptions): StatsFactory;
1913
+ createStatsPrinter(options: NormalizedStatsOptions): StatsPrinter;
1866
1914
  getCache(name: string): CacheFacade;
1867
1915
  getLogger(name: string | (() => string)): WebpackLogger;
1868
1916
  addModule(
@@ -1934,14 +1982,14 @@ declare class Compilation {
1934
1982
  module: Module,
1935
1983
  callback: (err?: null | WebpackError, result?: Module) => void
1936
1984
  ): void;
1937
- finish(callback?: any): void;
1985
+ finish(callback: (err?: null | WebpackError) => void): void;
1938
1986
  unseal(): void;
1939
1987
  seal(callback: (err?: null | WebpackError) => void): void;
1940
1988
  reportDependencyErrorsAndWarnings(
1941
1989
  module: Module,
1942
1990
  blocks: DependenciesBlock[]
1943
1991
  ): boolean;
1944
- codeGeneration(callback?: any): void;
1992
+ codeGeneration(callback: (err?: null | WebpackError) => void): void;
1945
1993
  processRuntimeRequirements(__0?: {
1946
1994
  /**
1947
1995
  * the chunk graph
@@ -2021,7 +2069,7 @@ declare class Compilation {
2021
2069
  newSourceOrFunction: Source | ((arg0: Source) => Source),
2022
2070
  assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
2023
2071
  ): void;
2024
- renameAsset(file?: any, newFile?: any): void;
2072
+ renameAsset(file: string, newFile: string): void;
2025
2073
  deleteAsset(file: string): void;
2026
2074
  getAssets(): Readonly<Asset>[];
2027
2075
  getAsset(name: string): undefined | Readonly<Asset>;
@@ -2240,13 +2288,13 @@ declare class Compiler {
2240
2288
  root: Compiler;
2241
2289
  outputPath: string;
2242
2290
  watching?: Watching;
2243
- outputFileSystem: OutputFileSystem;
2244
- intermediateFileSystem: IntermediateFileSystem;
2245
- inputFileSystem: InputFileSystem;
2246
- watchFileSystem: WatchFileSystem;
2291
+ outputFileSystem: null | OutputFileSystem;
2292
+ intermediateFileSystem: null | IntermediateFileSystem;
2293
+ inputFileSystem: null | InputFileSystem;
2294
+ watchFileSystem: null | WatchFileSystem;
2247
2295
  recordsInputPath: null | string;
2248
2296
  recordsOutputPath: null | string;
2249
- records: object;
2297
+ records: Record<string, any>;
2250
2298
  managedPaths: Set<string | RegExp>;
2251
2299
  unmanagedPaths: Set<string | RegExp>;
2252
2300
  immutablePaths: Set<string | RegExp>;
@@ -2259,7 +2307,7 @@ declare class Compiler {
2259
2307
  >;
2260
2308
  fsStartTime?: number;
2261
2309
  resolverFactory: ResolverFactory;
2262
- infrastructureLogger: any;
2310
+ infrastructureLogger?: (arg0: string, arg1: LogTypeEnum, arg2: any[]) => void;
2263
2311
  options: WebpackOptionsNormalized;
2264
2312
  context: string;
2265
2313
  requestShortener: RequestShortener;
@@ -2267,8 +2315,8 @@ declare class Compiler {
2267
2315
  moduleMemCaches?: Map<
2268
2316
  Module,
2269
2317
  {
2270
- buildInfo: object;
2271
- references: WeakMap<Dependency, Module>;
2318
+ buildInfo: BuildInfo;
2319
+ references?: WeakMap<Dependency, Module>;
2272
2320
  memCache: WeakTupleMap<any, any>;
2273
2321
  }
2274
2322
  >;
@@ -2278,19 +2326,22 @@ declare class Compiler {
2278
2326
  watchMode: boolean;
2279
2327
  getCache(name: string): CacheFacade;
2280
2328
  getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
2281
- watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching;
2282
- run(callback: CallbackFunction<Stats>): void;
2329
+ watch(watchOptions: WatchOptions, handler: RunCallback<Stats>): Watching;
2330
+ run(callback: RunCallback<Stats>): void;
2283
2331
  runAsChild(
2284
2332
  callback: (
2285
- err?: null | Error,
2333
+ err: null | Error,
2286
2334
  entries?: Chunk[],
2287
2335
  compilation?: Compilation
2288
2336
  ) => any
2289
2337
  ): void;
2290
2338
  purgeInputFileSystem(): void;
2291
- emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void;
2292
- emitRecords(callback: CallbackFunction<void>): void;
2293
- readRecords(callback: CallbackFunction<void>): void;
2339
+ emitAssets(
2340
+ compilation: Compilation,
2341
+ callback: CallbackFunction_2<void>
2342
+ ): void;
2343
+ emitRecords(callback: CallbackFunction_2<void>): void;
2344
+ readRecords(callback: CallbackFunction_2<void>): void;
2294
2345
  createChildCompiler(
2295
2346
  compilation: Compilation,
2296
2347
  compilerName: string,
@@ -2299,7 +2350,7 @@ declare class Compiler {
2299
2350
  plugins?: WebpackPluginInstance[]
2300
2351
  ): Compiler;
2301
2352
  isChild(): boolean;
2302
- createCompilation(params?: any): Compilation;
2353
+ createCompilation(params: CompilationParams): Compilation;
2303
2354
  newCompilation(params: CompilationParams): Compilation;
2304
2355
  createNormalModuleFactory(): NormalModuleFactory;
2305
2356
  createContextModuleFactory(): ContextModuleFactory;
@@ -2307,8 +2358,8 @@ declare class Compiler {
2307
2358
  normalModuleFactory: NormalModuleFactory;
2308
2359
  contextModuleFactory: ContextModuleFactory;
2309
2360
  };
2310
- compile(callback: CallbackFunction<Compilation>): void;
2311
- close(callback: CallbackFunction<void>): void;
2361
+ compile(callback: RunCallback<Compilation>): void;
2362
+ close(callback: RunCallback<void>): void;
2312
2363
  }
2313
2364
  declare class ConcatSource extends Source {
2314
2365
  constructor(...args: (string | Source)[]);
@@ -2572,12 +2623,12 @@ declare interface Configuration {
2572
2623
  /**
2573
2624
  * Options for the resolver.
2574
2625
  */
2575
- resolve?: ResolveOptionsWebpackOptions;
2626
+ resolve?: ResolveOptions;
2576
2627
 
2577
2628
  /**
2578
2629
  * Options for the resolver when resolving loaders.
2579
2630
  */
2580
- resolveLoader?: ResolveOptionsWebpackOptions;
2631
+ resolveLoader?: ResolveOptions;
2581
2632
 
2582
2633
  /**
2583
2634
  * Options affecting how file system snapshots are created and validated.
@@ -2854,6 +2905,7 @@ declare interface ContextModuleOptions {
2854
2905
  */
2855
2906
  referencedExports?: null | string[][];
2856
2907
  layer?: string;
2908
+ attributes?: Attributes;
2857
2909
  resource: string | false | string[];
2858
2910
  resourceQuery?: string;
2859
2911
  resourceFragment?: string;
@@ -2887,15 +2939,35 @@ declare interface ContextTimestampAndHash {
2887
2939
  }
2888
2940
  type CreateStatsOptionsContext = KnownCreateStatsOptionsContext &
2889
2941
  Record<string, any>;
2942
+ type CreateWriteStreamFSImplementation = FSImplementation & {
2943
+ write: (...args: any[]) => any;
2944
+ close?: (...args: any[]) => any;
2945
+ };
2890
2946
 
2891
2947
  /**
2892
2948
  * Generator options for css/auto modules.
2893
2949
  */
2894
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
+
2895
2962
  /**
2896
2963
  * Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
2897
2964
  */
2898
2965
  exportsOnly?: boolean;
2966
+
2967
+ /**
2968
+ * Configure the generated local ident name.
2969
+ */
2970
+ localIdentName?: string;
2899
2971
  }
2900
2972
 
2901
2973
  /**
@@ -2912,6 +2984,17 @@ declare interface CssAutoParserOptions {
2912
2984
  * Generator options for css modules.
2913
2985
  */
2914
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
+
2915
2998
  /**
2916
2999
  * Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
2917
3000
  */
@@ -2922,10 +3005,26 @@ declare interface CssGeneratorOptions {
2922
3005
  * Generator options for css/global modules.
2923
3006
  */
2924
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
+
2925
3019
  /**
2926
3020
  * Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
2927
3021
  */
2928
3022
  exportsOnly?: boolean;
3023
+
3024
+ /**
3025
+ * Configure the generated local ident name.
3026
+ */
3027
+ localIdentName?: string;
2929
3028
  }
2930
3029
 
2931
3030
  /**
@@ -2937,15 +3036,36 @@ declare interface CssGlobalParserOptions {
2937
3036
  */
2938
3037
  namedExports?: boolean;
2939
3038
  }
3039
+ declare interface CssImportDependencyMeta {
3040
+ layer?: string;
3041
+ supports?: string;
3042
+ media?: string;
3043
+ }
2940
3044
 
2941
3045
  /**
2942
3046
  * Generator options for css/module modules.
2943
3047
  */
2944
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
+
2945
3060
  /**
2946
3061
  * Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
2947
3062
  */
2948
3063
  exportsOnly?: boolean;
3064
+
3065
+ /**
3066
+ * Configure the generated local ident name.
3067
+ */
3068
+ localIdentName?: string;
2949
3069
  }
2950
3070
 
2951
3071
  /**
@@ -3241,6 +3361,17 @@ declare interface DeterministicModuleIdsPluginOptions {
3241
3361
  */
3242
3362
  failOnConflict?: boolean;
3243
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
+ }
3244
3375
  declare class DllPlugin {
3245
3376
  constructor(options: DllPluginOptions);
3246
3377
  options: {
@@ -3520,6 +3651,22 @@ declare class EnableWasmLoadingPlugin {
3520
3651
  static setEnabled(compiler: Compiler, type: string): void;
3521
3652
  static checkEnabled(compiler: Compiler, type: string): void;
3522
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;
3523
3670
  type Entry =
3524
3671
  | string
3525
3672
  | (() => string | EntryObject | string[] | Promise<EntryStatic>)
@@ -4139,7 +4286,7 @@ declare abstract class ExportsInfo {
4139
4286
  isEquallyUsed(runtimeA: RuntimeSpec, runtimeB: RuntimeSpec): boolean;
4140
4287
  getUsed(name: string | string[], runtime: RuntimeSpec): UsageStateType;
4141
4288
  getUsedName(
4142
- name: string | string[],
4289
+ name: undefined | string | string[],
4143
4290
  runtime: RuntimeSpec
4144
4291
  ): string | false | string[];
4145
4292
  updateHash(hash: Hash, runtime: RuntimeSpec): void;
@@ -4294,7 +4441,7 @@ declare interface ExternalItemFunctionData {
4294
4441
  * Get a resolve function with the current resolver options.
4295
4442
  */
4296
4443
  getResolve?: (
4297
- options?: ResolveOptionsWebpackOptions
4444
+ options?: ResolveOptions
4298
4445
  ) =>
4299
4446
  | ((
4300
4447
  context: string,
@@ -4331,15 +4478,21 @@ type ExternalItemValue = string | boolean | string[] | { [index: string]: any };
4331
4478
  declare class ExternalModule extends Module {
4332
4479
  constructor(
4333
4480
  request: string | string[] | Record<string, string | string[]>,
4334
- type: any,
4335
- userRequest: string
4481
+ type: string,
4482
+ userRequest: string,
4483
+ dependencyMeta?: ImportDependencyMeta | CssImportDependencyMeta
4336
4484
  );
4337
4485
  request: string | string[] | Record<string, string | string[]>;
4338
4486
  externalType: string;
4339
4487
  userRequest: string;
4488
+ dependencyMeta?: ImportDependencyMeta | CssImportDependencyMeta;
4489
+
4490
+ /**
4491
+ * restore unsafe cache data
4492
+ */
4340
4493
  restoreFromUnsafeCache(
4341
- unsafeCacheData?: any,
4342
- normalModuleFactory?: any
4494
+ unsafeCacheData: object,
4495
+ normalModuleFactory: NormalModuleFactory
4343
4496
  ): void;
4344
4497
  }
4345
4498
  declare interface ExternalModuleInfo {
@@ -4436,6 +4589,10 @@ type ExternalsType =
4436
4589
  | "promise"
4437
4590
  | "script"
4438
4591
  | "node-commonjs";
4592
+ declare interface FSImplementation {
4593
+ open?: (...args: any[]) => any;
4594
+ close?: (...args: any[]) => any;
4595
+ }
4439
4596
  declare interface FactorizeModuleOptions {
4440
4597
  currentProfile: ModuleProfile;
4441
4598
  factory: ModuleFactory;
@@ -4590,71 +4747,19 @@ declare interface FileCacheOptions {
4590
4747
  version?: string;
4591
4748
  }
4592
4749
  declare interface FileSystem {
4593
- readFile: {
4594
- (arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
4595
- (
4596
- arg0: string,
4597
- arg1: object,
4598
- arg2: FileSystemCallback<string | Buffer>
4599
- ): void;
4600
- };
4601
- readdir: (
4602
- arg0: string,
4603
- arg1?:
4604
- | null
4605
- | "ascii"
4606
- | "utf8"
4607
- | "utf16le"
4608
- | "ucs2"
4609
- | "latin1"
4610
- | "binary"
4611
- | ((
4612
- arg0?: null | NodeJS.ErrnoException,
4613
- arg1?: (string | Buffer)[] | Dirent[]
4614
- ) => void)
4615
- | ReaddirOptions
4616
- | "utf-8"
4617
- | "ucs-2"
4618
- | "base64"
4619
- | "base64url"
4620
- | "hex"
4621
- | "buffer",
4622
- arg2?: (
4623
- arg0?: null | NodeJS.ErrnoException,
4624
- 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
4625
4757
  ) => void
4626
4758
  ) => void;
4627
- readJson?: {
4628
- (arg0: string, arg1: FileSystemCallback<object>): void;
4629
- (arg0: string, arg1: object, arg2: FileSystemCallback<object>): void;
4630
- };
4631
- readlink: {
4632
- (arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
4633
- (
4634
- arg0: string,
4635
- arg1: object,
4636
- arg2: FileSystemCallback<string | Buffer>
4637
- ): void;
4638
- };
4639
- lstat?: {
4640
- (arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
4641
- (
4642
- arg0: string,
4643
- arg1: object,
4644
- arg2: FileSystemCallback<string | Buffer>
4645
- ): void;
4646
- };
4647
- stat: {
4648
- (arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
4649
- (
4650
- arg0: string,
4651
- arg1: object,
4652
- arg2: FileSystemCallback<string | Buffer>
4653
- ): void;
4654
- };
4655
- }
4656
- declare interface FileSystemCallback<T> {
4657
- (err?: null | (PossibleFileSystemError & Error), result?: T): any;
4759
+ readlink: ReadlinkTypes;
4760
+ lstat?: LStatTypes;
4761
+ stat: StatTypes;
4762
+ realpath?: RealPathTypes;
4658
4763
  }
4659
4764
  declare abstract class FileSystemInfo {
4660
4765
  fs: InputFileSystem;
@@ -4749,10 +4854,6 @@ declare interface FileSystemInfoEntry {
4749
4854
  safeTime: number;
4750
4855
  timestamp?: number;
4751
4856
  }
4752
- declare interface FileSystemStats {
4753
- isDirectory: () => boolean;
4754
- isFile: () => boolean;
4755
- }
4756
4857
  type FilterItemTypes = string | RegExp | ((value: string) => boolean);
4757
4858
  declare interface GenerateContext {
4758
4859
  /**
@@ -4822,6 +4923,9 @@ declare class Generator {
4822
4923
  updateHash(hash: Hash, __1: UpdateHashContextGenerator): void;
4823
4924
  static byType(map: Record<string, Generator>): ByTypeGenerator;
4824
4925
  }
4926
+ declare interface GeneratorOptions {
4927
+ [index: string]: any;
4928
+ }
4825
4929
  type GeneratorOptionsByModuleType = GeneratorOptionsByModuleTypeKnown &
4826
4930
  GeneratorOptionsByModuleTypeUnknown;
4827
4931
 
@@ -4965,7 +5069,7 @@ declare interface HandleModuleCreationOptions {
4965
5069
  checkCycle?: boolean;
4966
5070
  }
4967
5071
  declare class HarmonyImportDependency extends ModuleDependency {
4968
- constructor(request: string, sourceOrder: number, assertions?: Assertions);
5072
+ constructor(request: string, sourceOrder: number, attributes?: Attributes);
4969
5073
  sourceOrder: number;
4970
5074
  getImportVar(moduleGraph: ModuleGraph): string;
4971
5075
  getImportStatement(
@@ -4983,7 +5087,7 @@ declare class HarmonyImportDependency extends ModuleDependency {
4983
5087
  WARN: 1;
4984
5088
  AUTO: 2;
4985
5089
  ERROR: 3;
4986
- fromUserOption(str?: any): 0 | 1 | 2 | 3;
5090
+ fromUserOption(str: string | false): 0 | 1 | 2 | 3;
4987
5091
  };
4988
5092
  static NO_EXPORTS_REFERENCED: string[][];
4989
5093
  static EXPORTS_OBJECT_REFERENCED: string[][];
@@ -5106,7 +5210,13 @@ declare class HttpUriPlugin {
5106
5210
  */
5107
5211
  apply(compiler: Compiler): void;
5108
5212
  }
5109
- declare interface IDirent {
5213
+ type IBigIntStats = IStatsBase<bigint> & {
5214
+ atimeNs: bigint;
5215
+ mtimeNs: bigint;
5216
+ ctimeNs: bigint;
5217
+ birthtimeNs: bigint;
5218
+ };
5219
+ declare interface IStats {
5110
5220
  isFile: () => boolean;
5111
5221
  isDirectory: () => boolean;
5112
5222
  isBlockDevice: () => boolean;
@@ -5114,9 +5224,26 @@ declare interface IDirent {
5114
5224
  isSymbolicLink: () => boolean;
5115
5225
  isFIFO: () => boolean;
5116
5226
  isSocket: () => boolean;
5117
- name: string | Buffer;
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;
5118
5245
  }
5119
- declare interface IStats {
5246
+ declare interface IStatsBase<T> {
5120
5247
  isFile: () => boolean;
5121
5248
  isDirectory: () => boolean;
5122
5249
  isBlockDevice: () => boolean;
@@ -5124,20 +5251,20 @@ declare interface IStats {
5124
5251
  isSymbolicLink: () => boolean;
5125
5252
  isFIFO: () => boolean;
5126
5253
  isSocket: () => boolean;
5127
- dev: number | bigint;
5128
- ino: number | bigint;
5129
- mode: number | bigint;
5130
- nlink: number | bigint;
5131
- uid: number | bigint;
5132
- gid: number | bigint;
5133
- rdev: number | bigint;
5134
- size: number | bigint;
5135
- blksize: number | bigint;
5136
- blocks: number | bigint;
5137
- atimeMs: number | bigint;
5138
- mtimeMs: number | bigint;
5139
- ctimeMs: number | bigint;
5140
- birthtimeMs: number | bigint;
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;
5141
5268
  atime: Date;
5142
5269
  mtime: Date;
5143
5270
  ctime: Date;
@@ -5175,6 +5302,9 @@ type IgnorePluginOptions =
5175
5302
  */
5176
5303
  checkResource: (resource: string, context: string) => boolean;
5177
5304
  };
5305
+ declare interface ImportDependencyMeta {
5306
+ attributes?: Attributes;
5307
+ }
5178
5308
  declare interface ImportModuleOptions {
5179
5309
  /**
5180
5310
  * the target layer
@@ -5239,50 +5369,39 @@ declare interface InfrastructureLogging {
5239
5369
  stream?: NodeJS.WritableStream;
5240
5370
  }
5241
5371
  declare abstract class InitFragment<GenerateContext> {
5242
- content: string | Source;
5372
+ content?: string | Source;
5243
5373
  stage: number;
5244
5374
  position: number;
5245
5375
  key?: string;
5246
5376
  endContent?: string | Source;
5247
- getContent(context: GenerateContext): string | Source;
5377
+ getContent(context: GenerateContext): undefined | string | Source;
5248
5378
  getEndContent(context: GenerateContext): undefined | string | Source;
5249
5379
  serialize(context: ObjectSerializerContext): void;
5250
5380
  deserialize(context: ObjectDeserializerContext): void;
5251
5381
  merge: any;
5252
5382
  }
5253
5383
  declare interface InputFileSystem {
5254
- readFile: (
5255
- arg0: string,
5256
- arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
5257
- ) => void;
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;
5258
5396
  readJson?: (
5259
- arg0: string,
5260
- arg1: (arg0?: null | Error | NodeJS.ErrnoException, arg1?: any) => void
5261
- ) => void;
5262
- readlink: (
5263
- arg0: string,
5264
- arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
5265
- ) => void;
5266
- readdir: (
5267
- arg0: string,
5397
+ arg0: PathOrFileDescriptorFs,
5268
5398
  arg1: (
5269
- arg0?: null | NodeJS.ErrnoException,
5270
- arg1?: (string | Buffer)[] | IDirent[]
5399
+ arg0: null | Error | NodeJS.ErrnoException,
5400
+ arg1?: JsonObjectFs
5271
5401
  ) => void
5272
5402
  ) => void;
5273
- stat: (
5274
- arg0: string,
5275
- arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
5276
- ) => void;
5277
- lstat?: (
5278
- arg0: string,
5279
- arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
5280
- ) => void;
5281
- realpath?: (
5282
- arg0: string,
5283
- arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
5284
- ) => void;
5285
- purge?: (arg0?: string) => void;
5403
+ readJsonSync?: (arg0: PathOrFileDescriptorFs) => JsonObjectFs;
5404
+ purge?: (arg0?: string | string[] | Set<string>) => void;
5286
5405
  join?: (arg0: string, arg1: string) => string;
5287
5406
  relative?: (arg0: string, arg1: string) => string;
5288
5407
  dirname?: (arg0: string) => string;
@@ -5291,36 +5410,41 @@ type IntermediateFileSystem = InputFileSystem &
5291
5410
  OutputFileSystem &
5292
5411
  IntermediateFileSystemExtras;
5293
5412
  declare interface IntermediateFileSystemExtras {
5294
- mkdirSync: (arg0: string) => void;
5295
- createWriteStream: (arg0: string) => NodeJS.WritableStream;
5296
- open: (
5297
- arg0: string,
5298
- arg1: string,
5299
- arg2: (arg0?: null | NodeJS.ErrnoException, arg1?: number) => void
5300
- ) => void;
5301
- read: (
5302
- arg0: number,
5303
- arg1: Buffer,
5304
- arg2: number,
5305
- arg3: number,
5306
- arg4: number,
5307
- arg5: (arg0?: null | NodeJS.ErrnoException, arg1?: number) => void
5308
- ) => void;
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>;
5309
5433
  close: (
5310
5434
  arg0: number,
5311
- arg1: (arg0?: null | NodeJS.ErrnoException) => void
5435
+ arg1: (arg0: null | NodeJS.ErrnoException) => void
5312
5436
  ) => void;
5313
5437
  rename: (
5314
- arg0: string,
5315
- arg1: string,
5316
- arg2: (arg0?: null | NodeJS.ErrnoException) => void
5438
+ arg0: PathLikeFs,
5439
+ arg1: PathLikeFs,
5440
+ arg2: (arg0: null | NodeJS.ErrnoException) => void
5317
5441
  ) => void;
5318
5442
  }
5319
5443
  type InternalCell<T> = T | typeof TOMBSTONE | typeof UNDEFINED_MARKER;
5320
5444
  declare abstract class ItemCacheFacade {
5321
- get<T>(callback: CallbackCache<T>): void;
5445
+ get<T>(callback: CallbackCacheCacheFacade<T>): void;
5322
5446
  getPromise<T>(): Promise<T>;
5323
- store<T>(data: T, callback: CallbackCache<void>): void;
5447
+ store<T>(data: T, callback: CallbackCacheCacheFacade<void>): void;
5324
5448
  storePromise<T>(data: T): Promise<void>;
5325
5449
  provide<T>(
5326
5450
  computer: (arg0: CallbackNormalErrorCache<T>) => void,
@@ -5411,7 +5535,7 @@ declare class JavascriptParser extends Parser {
5411
5535
  >;
5412
5536
  evaluateCallExpressionMember: HookMap<
5413
5537
  SyncBailHook<
5414
- [CallExpression, undefined | BasicEvaluatedExpression],
5538
+ [CallExpression, BasicEvaluatedExpression],
5415
5539
  undefined | null | BasicEvaluatedExpression
5416
5540
  >
5417
5541
  >;
@@ -5576,7 +5700,7 @@ declare class JavascriptParser extends Parser {
5576
5700
  boolean | void
5577
5701
  >;
5578
5702
  export: SyncBailHook<
5579
- [ExportNamedDeclaration | ExportAllDeclaration],
5703
+ [ExportNamedDeclaration | ExportDefaultDeclaration],
5580
5704
  boolean | void
5581
5705
  >;
5582
5706
  exportImport: SyncBailHook<
@@ -5584,16 +5708,27 @@ declare class JavascriptParser extends Parser {
5584
5708
  boolean | void
5585
5709
  >;
5586
5710
  exportDeclaration: SyncBailHook<
5587
- [ExportNamedDeclaration | ExportAllDeclaration, Declaration],
5711
+ [
5712
+ (
5713
+ | ExportNamedDeclaration
5714
+ | ExportDefaultDeclaration
5715
+ | ExportAllDeclaration
5716
+ ),
5717
+ Declaration
5718
+ ],
5588
5719
  boolean | void
5589
5720
  >;
5590
5721
  exportExpression: SyncBailHook<
5591
- [ExportDefaultDeclaration, Declaration],
5722
+ [ExportDefaultDeclaration, FunctionDeclaration | ClassDeclaration],
5592
5723
  boolean | void
5593
5724
  >;
5594
5725
  exportSpecifier: SyncBailHook<
5595
5726
  [
5596
- ExportNamedDeclaration | ExportAllDeclaration,
5727
+ (
5728
+ | ExportNamedDeclaration
5729
+ | ExportDefaultDeclaration
5730
+ | ExportAllDeclaration
5731
+ ),
5597
5732
  string,
5598
5733
  string,
5599
5734
  undefined | number
@@ -5628,7 +5763,39 @@ declare class JavascriptParser extends Parser {
5628
5763
  >;
5629
5764
  typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
5630
5765
  importCall: SyncBailHook<[ImportExpression], boolean | void>;
5631
- topLevelAwait: SyncBailHook<[Expression], boolean | void>;
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
+ >;
5632
5799
  call: HookMap<SyncBailHook<[CallExpression], boolean | void>>;
5633
5800
  callMemberChain: HookMap<
5634
5801
  SyncBailHook<
@@ -5972,19 +6139,19 @@ declare class JavascriptParser extends Parser {
5972
6139
  walkForStatement(statement: ForStatement): void;
5973
6140
  preWalkForInStatement(statement: ForInStatement): void;
5974
6141
  walkForInStatement(statement: ForInStatement): void;
5975
- preWalkForOfStatement(statement?: any): void;
6142
+ preWalkForOfStatement(statement: ForOfStatement): void;
5976
6143
  walkForOfStatement(statement: ForOfStatement): void;
5977
6144
  preWalkFunctionDeclaration(statement: FunctionDeclaration): void;
5978
6145
  walkFunctionDeclaration(statement: FunctionDeclaration): void;
5979
6146
  blockPreWalkExpressionStatement(statement: ExpressionStatement): void;
5980
6147
  preWalkAssignmentExpression(expression: AssignmentExpression): void;
5981
- blockPreWalkImportDeclaration(statement?: any): void;
6148
+ blockPreWalkImportDeclaration(statement: ImportDeclaration): void;
5982
6149
  enterDeclaration(declaration: Declaration, onIdent?: any): void;
5983
- blockPreWalkExportNamedDeclaration(statement?: any): void;
6150
+ blockPreWalkExportNamedDeclaration(statement: ExportNamedDeclaration): void;
5984
6151
  walkExportNamedDeclaration(statement: ExportNamedDeclaration): void;
5985
6152
  blockPreWalkExportDefaultDeclaration(statement?: any): void;
5986
- walkExportDefaultDeclaration(statement?: any): void;
5987
- blockPreWalkExportAllDeclaration(statement?: any): void;
6153
+ walkExportDefaultDeclaration(statement: ExportDefaultDeclaration): void;
6154
+ blockPreWalkExportAllDeclaration(statement: ExportAllDeclaration): void;
5988
6155
  preWalkVariableDeclaration(statement: VariableDeclaration): void;
5989
6156
  blockPreWalkVariableDeclaration(statement: VariableDeclaration): void;
5990
6157
  preWalkVariableDeclarator(declarator: VariableDeclarator): void;
@@ -5997,7 +6164,7 @@ declare class JavascriptParser extends Parser {
5997
6164
  walkCatchClause(catchClause: CatchClause): void;
5998
6165
  walkPattern(pattern: Pattern): void;
5999
6166
  walkAssignmentPattern(pattern: AssignmentPattern): void;
6000
- walkObjectPattern(pattern?: any): void;
6167
+ walkObjectPattern(pattern: ObjectPattern): void;
6001
6168
  walkArrayPattern(pattern: ArrayPattern): void;
6002
6169
  walkRestElement(pattern: RestElement): void;
6003
6170
  walkExpressions(
@@ -6058,7 +6225,7 @@ declare class JavascriptParser extends Parser {
6058
6225
  walkClassExpression(expression: ClassExpression): void;
6059
6226
  walkChainExpression(expression: ChainExpression): void;
6060
6227
  walkImportExpression(expression: ImportExpression): void;
6061
- walkCallExpression(expression?: any): void;
6228
+ walkCallExpression(expression: CallExpression): void;
6062
6229
  walkMemberExpression(expression: MemberExpression): void;
6063
6230
  walkMemberExpressionWithExpressionName(
6064
6231
  expression: any,
@@ -6149,6 +6316,7 @@ declare class JavascriptParser extends Parser {
6149
6316
  ): void;
6150
6317
  enterPatterns(
6151
6318
  patterns: (
6319
+ | string
6152
6320
  | Identifier
6153
6321
  | MemberExpression
6154
6322
  | ObjectPattern
@@ -6177,7 +6345,7 @@ declare class JavascriptParser extends Parser {
6177
6345
  enterAssignmentPattern(pattern: AssignmentPattern, onIdent?: any): void;
6178
6346
  evaluateExpression(expression?: any): BasicEvaluatedExpression;
6179
6347
  parseString(expression: Expression): string;
6180
- parseCalculatedString(expression?: any): any;
6348
+ parseCalculatedString(expression: Expression): any;
6181
6349
  evaluate(source: string): BasicEvaluatedExpression;
6182
6350
  isPure(
6183
6351
  expr:
@@ -6475,19 +6643,42 @@ declare interface JavascriptParserOptions {
6475
6643
  */
6476
6644
  wrappedContextRegExp?: RegExp;
6477
6645
  }
6478
- type JsonObject = { [index: string]: JsonValue } & {
6646
+ type JsonObjectFs = { [index: string]: JsonValueFs } & {
6479
6647
  [index: string]:
6480
6648
  | undefined
6481
6649
  | null
6482
6650
  | string
6483
6651
  | number
6484
6652
  | boolean
6485
- | JsonObject
6486
- | JsonValue[];
6653
+ | JsonObjectFs
6654
+ | JsonValueFs[];
6487
6655
  };
6488
- type JsonValue = null | string | number | boolean | JsonObject | JsonValue[];
6656
+ type JsonObjectTypes = { [index: string]: JsonValueTypes } & {
6657
+ [index: string]:
6658
+ | undefined
6659
+ | null
6660
+ | string
6661
+ | number
6662
+ | boolean
6663
+ | JsonObjectTypes
6664
+ | JsonValueTypes[];
6665
+ };
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[];
6489
6680
  declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
6490
- constructor(runtimeRequirements: Set<string>);
6681
+ constructor(runtimeRequirements: ReadonlySet<string>);
6491
6682
  static getCompilationHooks(
6492
6683
  compilation: Compilation
6493
6684
  ): JsonpCompilationPluginHooks;
@@ -6588,6 +6779,19 @@ declare interface KnownAssetInfo {
6588
6779
  */
6589
6780
  related?: Record<string, string | string[]>;
6590
6781
  }
6782
+ declare interface KnownBuildInfo {
6783
+ cacheable?: boolean;
6784
+ parsed?: boolean;
6785
+ fileDependencies?: LazySet<string>;
6786
+ contextDependencies?: LazySet<string>;
6787
+ missingDependencies?: LazySet<string>;
6788
+ buildDependencies?: LazySet<string>;
6789
+ valueDependencies?: Map<string, string | Set<string>>;
6790
+ hash?: any;
6791
+ assets?: Record<string, Source>;
6792
+ assetsInfo?: Map<string, undefined | AssetInfo>;
6793
+ snapshot?: null | Snapshot;
6794
+ }
6591
6795
  declare interface KnownBuildMeta {
6592
6796
  moduleArgument?: string;
6593
6797
  exportsArgument?: string;
@@ -6899,6 +7103,75 @@ declare interface KnownStatsProfile {
6899
7103
  factory: number;
6900
7104
  dependencies: number;
6901
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
+ }
6902
7175
 
6903
7176
  /**
6904
7177
  * Options for the default backend.
@@ -7452,6 +7725,21 @@ declare interface LogEntry {
7452
7725
  time: number;
7453
7726
  trace?: string[];
7454
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";
7455
7743
  declare const MEASURE_END_OPERATION: unique symbol;
7456
7744
  declare const MEASURE_START_OPERATION: unique symbol;
7457
7745
  declare interface MainRenderContext {
@@ -7535,6 +7823,10 @@ declare abstract class MainTemplate {
7535
7823
  get requireFn(): "__webpack_require__";
7536
7824
  get outputOptions(): Output;
7537
7825
  }
7826
+ declare interface MakeDirectoryOptions {
7827
+ recursive?: boolean;
7828
+ mode?: string | number;
7829
+ }
7538
7830
  declare interface MapOptions {
7539
7831
  columns?: boolean;
7540
7832
  module?: boolean;
@@ -7598,6 +7890,50 @@ declare interface MinChunkSizePluginOptions {
7598
7890
  */
7599
7891
  minChunkSize: number;
7600
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
+ }
7601
7937
  declare class Module extends DependenciesBlock {
7602
7938
  constructor(type: string, context?: null | string, layer?: null | string);
7603
7939
  type: string;
@@ -7605,7 +7941,7 @@ declare class Module extends DependenciesBlock {
7605
7941
  layer: null | string;
7606
7942
  needId: boolean;
7607
7943
  debugId: number;
7608
- resolveOptions?: ResolveOptionsWebpackOptions;
7944
+ resolveOptions?: ResolveOptions;
7609
7945
  factoryMeta?: FactoryMeta;
7610
7946
  useSourceMap: boolean;
7611
7947
  useSimpleSourceMap: boolean;
@@ -7616,11 +7952,11 @@ declare class Module extends DependenciesBlock {
7616
7952
  id: string | number;
7617
7953
  get hash(): string;
7618
7954
  get renderedHash(): string;
7619
- profile: null | ModuleProfile;
7955
+ profile?: ModuleProfile;
7620
7956
  index: null | number;
7621
7957
  index2: null | number;
7622
7958
  depth: null | number;
7623
- issuer: null | Module;
7959
+ issuer?: null | Module;
7624
7960
  get usedExports(): null | boolean | SortableSet<string>;
7625
7961
  get optimizationBailout(): (
7626
7962
  | string
@@ -7717,7 +8053,7 @@ declare class Module extends DependenciesBlock {
7717
8053
  * Module should be unsafe cached. Get data that's needed for that.
7718
8054
  * This data will be passed to restoreFromUnsafeCache later.
7719
8055
  */
7720
- getUnsafeCacheData(): object;
8056
+ getUnsafeCacheData(): UnsafeCacheData;
7721
8057
 
7722
8058
  /**
7723
8059
  * Assuming this module is in the cache. Remove internal references to allow freeing some memory.
@@ -7750,7 +8086,7 @@ declare class ModuleDependency extends Dependency {
7750
8086
  request: string;
7751
8087
  userRequest: string;
7752
8088
  range: any;
7753
- assertions?: Record<string, any>;
8089
+ assertions?: Attributes;
7754
8090
  static Template: typeof DependencyTemplate;
7755
8091
  static NO_EXPORTS_REFERENCED: string[][];
7756
8092
  static EXPORTS_OBJECT_REFERENCED: string[][];
@@ -7764,7 +8100,7 @@ declare abstract class ModuleFactory {
7764
8100
  }
7765
8101
  declare interface ModuleFactoryCreateData {
7766
8102
  contextInfo: ModuleFactoryCreateDataContextInfo;
7767
- resolveOptions?: ResolveOptionsWebpackOptions;
8103
+ resolveOptions?: ResolveOptions;
7768
8104
  context: string;
7769
8105
  dependencies: Dependency[];
7770
8106
  }
@@ -7878,11 +8214,11 @@ declare class ModuleGraph {
7878
8214
  module: Module,
7879
8215
  indexInBlock?: number
7880
8216
  ): void;
7881
- getParentModule(dependency: Dependency): Module;
7882
- getParentBlock(dependency: Dependency): DependenciesBlock;
8217
+ getParentModule(dependency: Dependency): undefined | Module;
8218
+ getParentBlock(dependency: Dependency): undefined | DependenciesBlock;
7883
8219
  getParentBlockIndex(dependency: Dependency): number;
7884
8220
  setResolvedModule(
7885
- originModule: Module,
8221
+ originModule: null | Module,
7886
8222
  dependency: Dependency,
7887
8223
  module: Module
7888
8224
  ): void;
@@ -7912,13 +8248,13 @@ declare class ModuleGraph {
7912
8248
  getOutgoingConnections(module: Module): Iterable<ModuleGraphConnection>;
7913
8249
  getIncomingConnectionsByOriginModule(
7914
8250
  module: Module
7915
- ): Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
8251
+ ): Map<undefined | null | Module, ReadonlyArray<ModuleGraphConnection>>;
7916
8252
  getOutgoingConnectionsByModule(
7917
8253
  module: Module
7918
8254
  ): undefined | Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
7919
- getProfile(module: Module): null | ModuleProfile;
7920
- setProfile(module: Module, profile: null | ModuleProfile): void;
7921
- 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;
7922
8258
  setIssuer(module: Module, issuer: null | Module): void;
7923
8259
  setIssuerIfUnset(module: Module, issuer: null | Module): void;
7924
8260
  getOptimizationBailout(
@@ -7979,6 +8315,7 @@ declare class ModuleGraphConnection {
7979
8315
  explanation?: string,
7980
8316
  weak?: boolean,
7981
8317
  condition?:
8318
+ | null
7982
8319
  | false
7983
8320
  | ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState)
7984
8321
  );
@@ -8233,7 +8570,7 @@ declare interface ModuleSettings {
8233
8570
  /**
8234
8571
  * Options for the resolver.
8235
8572
  */
8236
- resolve?: ResolveOptionsWebpackOptions;
8573
+ resolve?: ResolveOptions;
8237
8574
 
8238
8575
  /**
8239
8576
  * Options for parsing.
@@ -8261,6 +8598,9 @@ declare abstract class ModuleTemplate {
8261
8598
  }>;
8262
8599
  get runtimeTemplate(): any;
8263
8600
  }
8601
+ declare interface ModuleTemplates {
8602
+ javascript: ModuleTemplate;
8603
+ }
8264
8604
  declare class MultiCompiler {
8265
8605
  constructor(
8266
8606
  compilers: Compiler[] | Record<string, Compiler>,
@@ -8283,21 +8623,21 @@ declare class MultiCompiler {
8283
8623
  outputFileSystem: OutputFileSystem;
8284
8624
  watchFileSystem: WatchFileSystem;
8285
8625
  intermediateFileSystem: IntermediateFileSystem;
8286
- getInfrastructureLogger(name?: any): WebpackLogger;
8626
+ getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
8287
8627
  setDependencies(compiler: Compiler, dependencies: string[]): void;
8288
- validateDependencies(callback: CallbackFunction<MultiStats>): boolean;
8628
+ validateDependencies(callback: CallbackFunction_1<MultiStats>): boolean;
8289
8629
  runWithDependencies(
8290
8630
  compilers: Compiler[],
8291
- fn: (compiler: Compiler, callback: CallbackFunction<MultiStats>) => any,
8292
- callback: CallbackFunction<MultiStats>
8631
+ fn: (compiler: Compiler, callback: CallbackFunction_1<MultiStats>) => any,
8632
+ callback: CallbackFunction_1<MultiStats>
8293
8633
  ): void;
8294
8634
  watch(
8295
8635
  watchOptions: WatchOptions | WatchOptions[],
8296
- handler: CallbackFunction<MultiStats>
8636
+ handler: CallbackFunction_1<MultiStats>
8297
8637
  ): MultiWatching;
8298
- run(callback: CallbackFunction<MultiStats>): void;
8638
+ run(callback: CallbackFunction_1<MultiStats>): void;
8299
8639
  purgeInputFileSystem(): void;
8300
- close(callback: CallbackFunction<void>): void;
8640
+ close(callback: CallbackFunction_1<void>): void;
8301
8641
  }
8302
8642
  declare interface MultiCompilerOptions {
8303
8643
  /**
@@ -8316,10 +8656,10 @@ declare abstract class MultiStats {
8316
8656
  declare abstract class MultiWatching {
8317
8657
  watchings: Watching[];
8318
8658
  compiler: MultiCompiler;
8319
- invalidate(callback?: CallbackFunction<void>): void;
8659
+ invalidate(callback?: CallbackFunction_2<void>): void;
8320
8660
  suspend(): void;
8321
8661
  resume(): void;
8322
- close(callback: CallbackFunction<void>): void;
8662
+ close(callback: CallbackFunction_2<void>): void;
8323
8663
  }
8324
8664
  declare class NamedChunkIdsPlugin {
8325
8665
  constructor(options?: NamedChunkIdsPluginOptions);
@@ -8454,36 +8794,40 @@ declare class NormalModule extends Module {
8454
8794
  userRequest: string;
8455
8795
  rawRequest: string;
8456
8796
  binary: boolean;
8457
- parser: Parser;
8458
- parserOptions?: Record<string, any>;
8459
- generator: Generator;
8460
- generatorOptions?: Record<string, any>;
8797
+ parser?: Parser;
8798
+ parserOptions?: ParserOptions;
8799
+ generator?: Generator;
8800
+ generatorOptions?: GeneratorOptions;
8461
8801
  resource: string;
8462
8802
  resourceResolveData?: Record<string, any>;
8463
8803
  matchResource?: string;
8464
8804
  loaders: LoaderItem[];
8465
- error?: null | WebpackError;
8805
+ error: null | WebpackError;
8806
+
8807
+ /**
8808
+ * restore unsafe cache data
8809
+ */
8466
8810
  restoreFromUnsafeCache(
8467
- unsafeCacheData?: any,
8468
- normalModuleFactory?: any
8811
+ unsafeCacheData: NormalModuleUnsafeCacheData,
8812
+ normalModuleFactory: NormalModuleFactory
8469
8813
  ): void;
8470
8814
  createSourceForAsset(
8471
8815
  context: string,
8472
8816
  name: string,
8473
- content: string,
8474
- sourceMap?: any,
8817
+ content: string | Buffer,
8818
+ sourceMap?: string | SourceMap,
8475
8819
  associatedObjectForCache?: Object
8476
8820
  ): Source;
8477
- getCurrentLoader(loaderContext?: any, index?: any): null | LoaderItem;
8821
+ getCurrentLoader(loaderContext?: any, index?: number): null | LoaderItem;
8478
8822
  createSource(
8479
8823
  context: string,
8480
8824
  content: string | Buffer,
8481
- sourceMap?: any,
8825
+ sourceMap?: string | SourceMapSource,
8482
8826
  associatedObjectForCache?: Object
8483
8827
  ): Source;
8484
8828
  markModuleAsErrored(error: WebpackError): void;
8485
- applyNoParseRule(rule?: any, content?: any): any;
8486
- shouldPreventParsing(noParseRule?: any, request?: any): any;
8829
+ applyNoParseRule(rule: any, content: string): boolean;
8830
+ shouldPreventParsing(noParseRule: any, request: string): boolean;
8487
8831
  static getCompilationHooks(
8488
8832
  compilation: Compilation
8489
8833
  ): NormalModuleCompilationHooks;
@@ -8559,7 +8903,7 @@ declare interface NormalModuleCreateData {
8559
8903
  /**
8560
8904
  * the options of the parser used
8561
8905
  */
8562
- parserOptions?: Record<string, any>;
8906
+ parserOptions?: ParserOptions;
8563
8907
 
8564
8908
  /**
8565
8909
  * the generator used
@@ -8569,12 +8913,12 @@ declare interface NormalModuleCreateData {
8569
8913
  /**
8570
8914
  * the options of the generator used
8571
8915
  */
8572
- generatorOptions?: Record<string, any>;
8916
+ generatorOptions?: GeneratorOptions;
8573
8917
 
8574
8918
  /**
8575
8919
  * options used for resolving requests from this module
8576
8920
  */
8577
- resolveOptions?: ResolveOptionsWebpackOptions;
8921
+ resolveOptions?: ResolveOptions;
8578
8922
  }
8579
8923
  declare abstract class NormalModuleFactory extends ModuleFactory {
8580
8924
  hooks: Readonly<{
@@ -8585,7 +8929,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
8585
8929
  resolveInScheme: HookMap<
8586
8930
  AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
8587
8931
  >;
8588
- factorize: AsyncSeriesBailHook<[ResolveData], Module>;
8932
+ factorize: AsyncSeriesBailHook<[ResolveData], undefined | Module>;
8589
8933
  beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
8590
8934
  afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
8591
8935
  createModule: AsyncSeriesBailHook<
@@ -8603,45 +8947,52 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
8603
8947
  ],
8604
8948
  Module
8605
8949
  >;
8606
- createParser: HookMap<SyncBailHook<any, any>>;
8607
- parser: HookMap<SyncHook<any>>;
8608
- createGenerator: HookMap<SyncBailHook<any, any>>;
8609
- generator: HookMap<SyncHook<any>>;
8610
- createModuleClass: HookMap<SyncBailHook<any, any>>;
8950
+ createParser: HookMap<SyncBailHook<[ParserOptions], Parser>>;
8951
+ parser: HookMap<SyncBailHook<[any, ParserOptions], void>>;
8952
+ createGenerator: HookMap<SyncBailHook<[GeneratorOptions], Generator>>;
8953
+ generator: HookMap<SyncBailHook<[any, GeneratorOptions], void>>;
8954
+ createModuleClass: HookMap<SyncBailHook<[any, ResolveData], Module>>;
8611
8955
  }>;
8612
8956
  resolverFactory: ResolverFactory;
8613
8957
  ruleSet: RuleSet;
8614
8958
  context: string;
8615
8959
  fs: InputFileSystem;
8616
- parserCache: Map<string, WeakMap<Object, any>>;
8960
+ parserCache: Map<string, WeakMap<Object, Parser>>;
8617
8961
  generatorCache: Map<string, WeakMap<Object, Generator>>;
8618
8962
  cleanupForCache(): void;
8619
8963
  resolveResource(
8620
- contextInfo?: any,
8621
- context?: any,
8622
- unresolvedResource?: any,
8623
- resolver?: any,
8624
- resolveContext?: any,
8625
- callback?: any
8964
+ contextInfo: ModuleFactoryCreateDataContextInfo,
8965
+ context: string,
8966
+ unresolvedResource: string,
8967
+ resolver: ResolverWithOptions,
8968
+ resolveContext: ResolveContext,
8969
+ callback: (
8970
+ err: null | Error,
8971
+ res?: string | false,
8972
+ req?: ResolveRequest
8973
+ ) => void
8626
8974
  ): void;
8627
8975
  resolveRequestArray(
8628
- contextInfo?: any,
8629
- context?: any,
8630
- array?: any,
8631
- resolver?: any,
8632
- resolveContext?: any,
8633
- callback?: any
8634
- ): any;
8635
- getParser(type?: any, parserOptions?: object): any;
8636
- createParser(type: string, parserOptions?: { [index: string]: any }): Parser;
8637
- getGenerator(type?: any, generatorOptions?: object): undefined | Generator;
8638
- createGenerator(type?: any, generatorOptions?: object): any;
8639
- getResolver(type?: any, resolveOptions?: any): ResolverWithOptions;
8640
- }
8641
-
8642
- /**
8643
- * These properties are added by the NormalModule
8644
- */
8976
+ contextInfo: ModuleFactoryCreateDataContextInfo,
8977
+ context: string,
8978
+ array: LoaderItem[],
8979
+ resolver: ResolverWithOptions,
8980
+ resolveContext: ResolveContext,
8981
+ callback: CallbackNormalModuleFactory<LoaderItem[]>
8982
+ ): void;
8983
+ getParser(type: string, parserOptions?: ParserOptions): Parser;
8984
+ createParser(type: string, parserOptions?: ParserOptions): Parser;
8985
+ getGenerator(type: string, generatorOptions?: GeneratorOptions): Generator;
8986
+ createGenerator(type: string, generatorOptions?: GeneratorOptions): Generator;
8987
+ getResolver(
8988
+ type: string,
8989
+ resolveOptions?: ResolveOptionsWithDependencyType
8990
+ ): ResolverWithOptions;
8991
+ }
8992
+
8993
+ /**
8994
+ * These properties are added by the NormalModule
8995
+ */
8645
8996
  declare interface NormalModuleLoaderContext<OptionsType> {
8646
8997
  version: number;
8647
8998
  getOptions(): OptionsType;
@@ -8680,7 +9031,7 @@ declare interface NormalModuleLoaderContext<OptionsType> {
8680
9031
  utils: {
8681
9032
  absolutify: (context: string, request: string) => string;
8682
9033
  contextify: (context: string, request: string) => string;
8683
- createHash: (algorithm?: string) => Hash;
9034
+ createHash: (algorithm?: string | typeof Hash) => Hash;
8684
9035
  };
8685
9036
  rootContext: string;
8686
9037
  fs: InputFileSystem;
@@ -8707,6 +9058,12 @@ declare class NormalModuleReplacementPlugin {
8707
9058
  */
8708
9059
  apply(compiler: Compiler): void;
8709
9060
  }
9061
+ type NormalModuleUnsafeCacheData = UnsafeCacheData & {
9062
+ parser?: Parser;
9063
+ parserOptions?: ParserOptions;
9064
+ generator?: Generator;
9065
+ generatorOptions?: GeneratorOptions;
9066
+ };
8710
9067
  type NormalizedStatsOptions = KnownNormalizedStatsOptions &
8711
9068
  Omit<
8712
9069
  StatsOptions,
@@ -8764,12 +9121,30 @@ declare interface ObjectDeserializerContext {
8764
9121
  read: () => any;
8765
9122
  setCircularReference: (arg0?: any) => void;
8766
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
+ }
8767
9140
  declare interface ObjectSerializer {
8768
9141
  serialize: (arg0: any, arg1: ObjectSerializerContext) => void;
8769
9142
  deserialize: (arg0: ObjectDeserializerContext) => any;
8770
9143
  }
8771
9144
  declare interface ObjectSerializerContext {
8772
9145
  write: (arg0?: any) => void;
9146
+ writeLazy?: (arg0?: any) => void;
9147
+ writeSeparate?: (arg0: any, arg1?: object) => () => any;
8773
9148
  setCircularReference: (arg0?: any) => void;
8774
9149
  }
8775
9150
  declare class OccurrenceChunkIdsPlugin {
@@ -8802,6 +9177,23 @@ declare interface OccurrenceModuleIdsPluginOptions {
8802
9177
  */
8803
9178
  prioritiseInitial?: boolean;
8804
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
+ }
8805
9197
 
8806
9198
  /**
8807
9199
  * Enables/Disables integrated optimizations.
@@ -9297,6 +9689,11 @@ declare interface Output {
9297
9689
  | string
9298
9690
  | ((pathData: PathData, assetInfo?: AssetInfo) => string);
9299
9691
 
9692
+ /**
9693
+ * Compress the data in the head tag of CSS files.
9694
+ */
9695
+ cssHeadDataCompression?: boolean;
9696
+
9300
9697
  /**
9301
9698
  * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
9302
9699
  */
@@ -9498,42 +9895,17 @@ declare interface Output {
9498
9895
  workerWasmLoading?: string | false;
9499
9896
  }
9500
9897
  declare interface OutputFileSystem {
9501
- writeFile: (
9502
- arg0: string,
9503
- arg1: string | Buffer,
9504
- arg2: (arg0?: null | NodeJS.ErrnoException) => void
9505
- ) => void;
9506
- mkdir: (
9507
- arg0: string,
9508
- arg1: (arg0?: null | NodeJS.ErrnoException) => void
9509
- ) => void;
9510
- readdir?: (
9511
- arg0: string,
9512
- arg1: (
9513
- arg0?: null | NodeJS.ErrnoException,
9514
- arg1?: (string | Buffer)[] | IDirent[]
9515
- ) => void
9516
- ) => void;
9517
- rmdir?: (
9518
- arg0: string,
9519
- arg1: (arg0?: null | NodeJS.ErrnoException) => void
9520
- ) => void;
9898
+ writeFile: WriteFile;
9899
+ mkdir: Mkdir;
9900
+ readdir?: ReaddirFs;
9901
+ rmdir?: Rmdir;
9521
9902
  unlink?: (
9522
- arg0: string,
9523
- arg1: (arg0?: null | NodeJS.ErrnoException) => void
9524
- ) => void;
9525
- stat: (
9526
- arg0: string,
9527
- arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
9528
- ) => void;
9529
- lstat?: (
9530
- arg0: string,
9531
- arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: IStats) => void
9532
- ) => void;
9533
- readFile: (
9534
- arg0: string,
9535
- arg1: (arg0?: null | NodeJS.ErrnoException, arg1?: string | Buffer) => void
9903
+ arg0: PathLikeFs,
9904
+ arg1: (arg0: null | NodeJS.ErrnoException) => void
9536
9905
  ) => void;
9906
+ stat: StatFs;
9907
+ lstat?: LStatFs;
9908
+ readFile: ReadFileFs;
9537
9909
  join?: (arg0: string, arg1: string) => string;
9538
9910
  relative?: (arg0: string, arg1: string) => string;
9539
9911
  dirname?: (arg0: string) => string;
@@ -9616,6 +9988,11 @@ declare interface OutputNormalized {
9616
9988
  | string
9617
9989
  | ((pathData: PathData, assetInfo?: AssetInfo) => string);
9618
9990
 
9991
+ /**
9992
+ * Compress the data in the head tag of CSS files.
9993
+ */
9994
+ cssHeadDataCompression?: boolean;
9995
+
9619
9996
  /**
9620
9997
  * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
9621
9998
  */
@@ -9820,6 +10197,9 @@ declare class Parser {
9820
10197
  state: ParserState
9821
10198
  ): ParserState;
9822
10199
  }
10200
+ declare interface ParserOptions {
10201
+ [index: string]: any;
10202
+ }
9823
10203
  type ParserOptionsByModuleType = ParserOptionsByModuleTypeKnown &
9824
10204
  ParserOptionsByModuleTypeUnknown;
9825
10205
 
@@ -9918,6 +10298,10 @@ declare interface PathData {
9918
10298
  noChunkHash?: boolean;
9919
10299
  url?: string;
9920
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;
9921
10305
  type Pattern =
9922
10306
  | Identifier
9923
10307
  | MemberExpression
@@ -9973,14 +10357,12 @@ type Plugin =
9973
10357
  | 0
9974
10358
  | { apply: (arg0: Resolver) => void }
9975
10359
  | ((this: Resolver, arg1: Resolver) => void);
9976
- declare interface PnpApiImpl {
9977
- resolveToUnqualified: (arg0: string, arg1: string, arg2: object) => string;
9978
- }
9979
- declare interface PossibleFileSystemError {
9980
- code?: string;
9981
- errno?: number;
9982
- path?: string;
9983
- syscall?: string;
10360
+ declare interface PnpApi {
10361
+ resolveToUnqualified: (
10362
+ arg0: string,
10363
+ arg1: string,
10364
+ arg2: object
10365
+ ) => null | string;
9984
10366
  }
9985
10367
  declare class PrefetchPlugin {
9986
10368
  constructor(context: string, request?: string);
@@ -10230,6 +10612,43 @@ declare interface RawSourceMap {
10230
10612
  mappings: string;
10231
10613
  file: string;
10232
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
+ }
10233
10652
  declare class ReadFileCompileWasmPlugin {
10234
10653
  constructor(options?: ReadFileCompileWasmPluginOptions);
10235
10654
  options: ReadFileCompileWasmPluginOptions;
@@ -10245,95 +10664,571 @@ declare interface ReadFileCompileWasmPluginOptions {
10245
10664
  */
10246
10665
  mangleImports?: boolean;
10247
10666
  }
10248
- declare interface ReaddirOptions {
10249
- encoding?:
10250
- | null
10251
- | "ascii"
10252
- | "utf8"
10253
- | "utf16le"
10254
- | "ucs2"
10255
- | "latin1"
10256
- | "binary"
10257
- | "utf-8"
10258
- | "ucs-2"
10259
- | "base64"
10260
- | "base64url"
10261
- | "hex"
10262
- | "buffer";
10263
- withFileTypes?: boolean;
10264
- }
10265
- declare class RealContentHashPlugin {
10266
- constructor(__0: {
10267
- /**
10268
- * the hash function to use
10269
- */
10270
- hashFunction: string | typeof Hash;
10271
- /**
10272
- * the hash digest to use
10273
- */
10274
- hashDigest: string;
10275
- });
10276
-
10277
- /**
10278
- * Apply the plugin
10279
- */
10280
- apply(compiler: Compiler): void;
10281
- static getCompilationHooks(
10282
- compilation: Compilation
10283
- ): CompilationHooksRealContentHashPlugin;
10284
- }
10285
- declare interface RealDependencyLocation {
10286
- start: SourcePosition;
10287
- end?: SourcePosition;
10288
- index?: number;
10289
- }
10290
- type RecursiveArrayOrRecord<T> =
10291
- | { [index: string]: RecursiveArrayOrRecord<T> }
10292
- | RecursiveArrayOrRecord<T>[]
10293
- | T;
10294
- declare interface ReferencedExport {
10295
- /**
10296
- * name of the referenced export
10297
- */
10298
- name: string[];
10299
-
10300
- /**
10301
- * when false, referenced export can not be mangled, defaults to true
10302
- */
10303
- canMangle?: boolean;
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;
10304
10721
  }
10305
- type Remotes = (string | RemotesObject)[] | RemotesObject;
10306
-
10307
- /**
10308
- * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.
10309
- */
10310
- declare interface RemotesConfig {
10311
- /**
10312
- * Container locations from which modules should be resolved and loaded at runtime.
10313
- */
10314
- external: string | string[];
10315
-
10316
- /**
10317
- * The name of the share scope shared with this remote.
10318
- */
10319
- shareScope?: string;
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;
10320
10762
  }
10321
-
10322
- /**
10323
- * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.
10324
- */
10325
- declare interface RemotesObject {
10326
- [index: string]: string | RemotesConfig | string[];
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;
10327
10817
  }
10328
- declare interface RenderBootstrapContext {
10329
- /**
10330
- * the chunk
10331
- */
10332
- chunk: Chunk;
10333
-
10334
- /**
10335
- * results of code generation
10336
- */
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;
10901
+ }
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
11226
+ */
11227
+ chunk: Chunk;
11228
+
11229
+ /**
11230
+ * results of code generation
11231
+ */
10337
11232
  codeGenerationResults: CodeGenerationResults;
10338
11233
 
10339
11234
  /**
@@ -10484,10 +11379,6 @@ declare interface ResolveBuildDependenciesResult {
10484
11379
  missing: Set<string>;
10485
11380
  };
10486
11381
  }
10487
-
10488
- /**
10489
- * Resolve context
10490
- */
10491
11382
  declare interface ResolveContext {
10492
11383
  contextDependencies?: WriteOnlySet<string>;
10493
11384
 
@@ -10518,7 +11409,7 @@ declare interface ResolveContext {
10518
11409
  }
10519
11410
  declare interface ResolveData {
10520
11411
  contextInfo: ModuleFactoryCreateDataContextInfo;
10521
- resolveOptions?: ResolveOptionsWebpackOptions;
11412
+ resolveOptions?: ResolveOptions;
10522
11413
  context: string;
10523
11414
  request: string;
10524
11415
  assertions?: Record<string, any>;
@@ -10534,44 +11425,11 @@ declare interface ResolveData {
10534
11425
  */
10535
11426
  cacheable: boolean;
10536
11427
  }
10537
- declare interface ResolveOptionsTypes {
10538
- alias: AliasOption[];
10539
- fallback: AliasOption[];
10540
- aliasFields: Set<string | string[]>;
10541
- extensionAlias: ExtensionAliasOption[];
10542
- cachePredicate: (arg0: ResolveRequest) => boolean;
10543
- cacheWithContext: boolean;
10544
-
10545
- /**
10546
- * A list of exports field condition names.
10547
- */
10548
- conditionNames: Set<string>;
10549
- descriptionFiles: string[];
10550
- enforceExtension: boolean;
10551
- exportsFields: Set<string | string[]>;
10552
- importsFields: Set<string | string[]>;
10553
- extensions: Set<string>;
10554
- fileSystem: FileSystem;
10555
- unsafeCache: false | object;
10556
- symlinks: boolean;
10557
- resolver?: Resolver;
10558
- modules: (string | string[])[];
10559
- mainFields: { name: string[]; forceRelative: boolean }[];
10560
- mainFiles: Set<string>;
10561
- plugins: Plugin[];
10562
- pnpApi: null | PnpApiImpl;
10563
- roots: Set<string>;
10564
- fullySpecified: boolean;
10565
- resolveToContext: boolean;
10566
- restrictions: Set<string | RegExp>;
10567
- preferRelative: boolean;
10568
- preferAbsolute: boolean;
10569
- }
10570
11428
 
10571
11429
  /**
10572
11430
  * Options object for resolving requests.
10573
11431
  */
10574
- declare interface ResolveOptionsWebpackOptions {
11432
+ declare interface ResolveOptions {
10575
11433
  /**
10576
11434
  * Redirect module requests.
10577
11435
  */
@@ -10600,7 +11458,7 @@ declare interface ResolveOptionsWebpackOptions {
10600
11458
  /**
10601
11459
  * Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
10602
11460
  */
10603
- byDependency?: { [index: string]: ResolveOptionsWebpackOptions };
11461
+ byDependency?: { [index: string]: ResolveOptions };
10604
11462
 
10605
11463
  /**
10606
11464
  * Enable caching of successfully resolved requests (cache entries are revalidated).
@@ -10706,7 +11564,14 @@ declare interface ResolveOptionsWebpackOptions {
10706
11564
  | false
10707
11565
  | ""
10708
11566
  | 0
10709
- | ResolvePluginInstance
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)
10710
11575
  | "..."
10711
11576
  )[];
10712
11577
 
@@ -10733,39 +11598,214 @@ declare interface ResolveOptionsWebpackOptions {
10733
11598
  /**
10734
11599
  * A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
10735
11600
  */
10736
- roots?: string[];
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
11773
+ */
11774
+ resolveToContext?: boolean;
11775
+
11776
+ /**
11777
+ * A list of resolve restrictions
11778
+ */
11779
+ restrictions?: (string | RegExp)[];
10737
11780
 
10738
11781
  /**
10739
- * Enable resolving symlinks to the original location.
11782
+ * Use only the sync constraints of the file system calls
10740
11783
  */
10741
- symlinks?: boolean;
11784
+ useSyncFileSystemCalls?: boolean;
10742
11785
 
10743
11786
  /**
10744
- * Enable caching of successfully resolved requests (cache entries are not revalidated).
11787
+ * Prefer to resolve module requests as relative requests before falling back to modules
10745
11788
  */
10746
- unsafeCache?: boolean | { [index: string]: any };
11789
+ preferRelative?: boolean;
10747
11790
 
10748
11791
  /**
10749
- * Use synchronous filesystem calls for the resolver.
11792
+ * Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
10750
11793
  */
10751
- useSyncFileSystemCalls?: boolean;
11794
+ preferAbsolute?: boolean;
10752
11795
  }
10753
- type ResolveOptionsWithDependencyType = ResolveOptionsWebpackOptions & {
11796
+ type ResolveOptionsWithDependencyType = ResolveOptions & {
10754
11797
  dependencyType?: string;
10755
11798
  resolveToContext?: boolean;
10756
11799
  };
10757
-
10758
- /**
10759
- * Plugin instance.
10760
- */
10761
- declare interface ResolvePluginInstance {
10762
- [index: string]: any;
10763
-
10764
- /**
10765
- * The run point of the plugin, required method.
10766
- */
10767
- apply: (resolver: Resolver) => void;
10768
- }
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);
10769
11809
  type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>;
10770
11810
  declare interface ResolvedContextFileSystemInfoEntry {
10771
11811
  safeTime: number;
@@ -10778,7 +11818,7 @@ declare interface ResolvedContextTimestampAndHash {
10778
11818
  }
10779
11819
  declare abstract class Resolver {
10780
11820
  fileSystem: FileSystem;
10781
- options: ResolveOptionsTypes;
11821
+ options: ResolveOptionsResolverFactoryObject1;
10782
11822
  hooks: KnownHooks;
10783
11823
  ensureHook(
10784
11824
  name:
@@ -10841,7 +11881,13 @@ declare abstract class ResolverFactory {
10841
11881
  SyncWaterfallHook<[ResolveOptionsWithDependencyType]>
10842
11882
  >;
10843
11883
  resolver: HookMap<
10844
- SyncHook<[Resolver, UserResolveOptions, ResolveOptionsWithDependencyType]>
11884
+ SyncHook<
11885
+ [
11886
+ Resolver,
11887
+ ResolveOptionsResolverFactoryObject2,
11888
+ ResolveOptionsWithDependencyType
11889
+ ]
11890
+ >
10845
11891
  >;
10846
11892
  }>;
10847
11893
  cache: Map<string, ResolverCache>;
@@ -10854,12 +11900,28 @@ type ResolverWithOptions = Resolver & WithOptions;
10854
11900
 
10855
11901
  declare interface ResourceDataWithData {
10856
11902
  resource: string;
10857
- path: string;
10858
- query: string;
10859
- fragment: string;
11903
+ path?: string;
11904
+ query?: string;
11905
+ fragment?: string;
10860
11906
  context?: string;
10861
11907
  data: Record<string, any>;
10862
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
+ }
10863
11925
  type Rule = string | RegExp;
10864
11926
  declare interface RuleSet {
10865
11927
  /**
@@ -11073,7 +12135,7 @@ declare interface RuleSetRule {
11073
12135
  /**
11074
12136
  * Options for the resolver.
11075
12137
  */
11076
- resolve?: ResolveOptionsWebpackOptions;
12138
+ resolve?: ResolveOptions;
11077
12139
 
11078
12140
  /**
11079
12141
  * Match the resource path of the module.
@@ -11287,9 +12349,16 @@ type RuleSetUseItem =
11287
12349
  options?: string | { [index: string]: any };
11288
12350
  }
11289
12351
  | __TypeWebpackOptions;
12352
+ declare interface RunCallback<T> {
12353
+ (err: null | Error, result?: T): any;
12354
+ }
11290
12355
  declare class RuntimeChunkPlugin {
11291
- constructor(options?: any);
11292
- options: any;
12356
+ constructor(options: { name?: (entrypoint: { name: string }) => string });
12357
+ options: {
12358
+ name:
12359
+ | ((entrypoint: { name: string }) => string)
12360
+ | ((entrypoint: Entrypoint) => string);
12361
+ };
11293
12362
 
11294
12363
  /**
11295
12364
  * Apply the plugin
@@ -11380,15 +12449,15 @@ declare abstract class RuntimeTemplate {
11380
12449
  supportsDynamicImport(): undefined | boolean;
11381
12450
  supportsEcmaScriptModuleSyntax(): undefined | boolean;
11382
12451
  supportTemplateLiteral(): undefined | boolean;
11383
- returningFunction(returnValue?: any, args?: string): string;
11384
- basicFunction(args?: any, body?: any): string;
12452
+ returningFunction(returnValue: string, args?: string): string;
12453
+ basicFunction(args: string, body: string | string[]): string;
11385
12454
  concatenation(...args: (string | { expr: string })[]): string;
11386
- expressionFunction(expression?: any, args?: string): string;
11387
- emptyFunction(): "x => {}" | "function() {}";
11388
- destructureArray(items?: any, value?: any): string;
11389
- destructureObject(items?: any, value?: any): string;
11390
- iife(args?: any, body?: any): string;
11391
- forEach(variable?: any, array?: any, body?: any): string;
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;
11392
12461
 
11393
12462
  /**
11394
12463
  * Add a comment
@@ -11457,7 +12526,7 @@ declare abstract class RuntimeTemplate {
11457
12526
  /**
11458
12527
  * the request that should be printed as comment
11459
12528
  */
11460
- request: string;
12529
+ request?: string;
11461
12530
  /**
11462
12531
  * expression to use as id expression
11463
12532
  */
@@ -11479,7 +12548,7 @@ declare abstract class RuntimeTemplate {
11479
12548
  /**
11480
12549
  * the request that should be printed as comment
11481
12550
  */
11482
- request: string;
12551
+ request?: string;
11483
12552
  /**
11484
12553
  * if the dependency is weak (will create a nice error message)
11485
12554
  */
@@ -11497,7 +12566,7 @@ declare abstract class RuntimeTemplate {
11497
12566
  /**
11498
12567
  * the request that should be printed as comment
11499
12568
  */
11500
- request: string;
12569
+ request?: string;
11501
12570
  /**
11502
12571
  * if the dependency is weak (will create a nice error message)
11503
12572
  */
@@ -11699,7 +12768,7 @@ declare abstract class RuntimeTemplate {
11699
12768
  /**
11700
12769
  * the async block
11701
12770
  */
11702
- block: AsyncDependenciesBlock;
12771
+ block?: AsyncDependenciesBlock;
11703
12772
  /**
11704
12773
  * the message
11705
12774
  */
@@ -11816,14 +12885,24 @@ declare interface ScopeInfo {
11816
12885
  isAsmJs: boolean;
11817
12886
  }
11818
12887
  declare interface Selector<A, B> {
11819
- (input: A): B;
12888
+ (input: A): undefined | null | B;
11820
12889
  }
11821
12890
  declare abstract class Serializer {
11822
- serializeMiddlewares: any;
11823
- deserializeMiddlewares: any;
12891
+ serializeMiddlewares: SerializerMiddleware<any, any>[];
12892
+ deserializeMiddlewares: SerializerMiddleware<any, any>[];
11824
12893
  context: any;
11825
- serialize(obj?: any, context?: any): any;
11826
- 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>;
11827
12906
  }
11828
12907
  type ServerOptionsHttps<
11829
12908
  Request extends typeof IncomingMessage = typeof IncomingMessage,
@@ -12273,6 +13352,82 @@ declare abstract class StackedMap<K, V> {
12273
13352
  createChild(): StackedMap<K, V>;
12274
13353
  }
12275
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
+ }
12276
13431
  type Statement =
12277
13432
  | FunctionDeclaration
12278
13433
  | VariableDeclaration
@@ -12354,12 +13509,12 @@ declare class Stats {
12354
13509
  constructor(compilation: Compilation);
12355
13510
  compilation: Compilation;
12356
13511
  get hash(): string;
12357
- get startTime(): any;
12358
- get endTime(): any;
13512
+ get startTime(): number;
13513
+ get endTime(): number;
12359
13514
  hasWarnings(): boolean;
12360
13515
  hasErrors(): boolean;
12361
- toJson(options?: string | StatsOptions): StatsCompilation;
12362
- toString(options?: string | StatsOptions): string;
13516
+ toJson(options?: string | boolean | StatsOptions): StatsCompilation;
13517
+ toString(options?: string | boolean | StatsOptions): string;
12363
13518
  }
12364
13519
  type StatsAsset = KnownStatsAsset & Record<string, any>;
12365
13520
  type StatsChunk = KnownStatsChunk & Record<string, any>;
@@ -12989,6 +14144,16 @@ declare interface TrustedTypes {
12989
14144
  policyName?: string;
12990
14145
  }
12991
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 {}
14153
+ declare interface UnsafeCacheData {
14154
+ factoryMeta?: FactoryMeta;
14155
+ resolveOptions?: ResolveOptions;
14156
+ }
12992
14157
  declare interface UpdateHashContextDependency {
12993
14158
  chunkGraph: ChunkGraph;
12994
14159
  runtime: RuntimeSpec;
@@ -13004,151 +14169,6 @@ declare interface UpdateHashContextGenerator {
13004
14169
  runtimeTemplate?: RuntimeTemplate;
13005
14170
  }
13006
14171
  type UsageStateType = 0 | 1 | 2 | 3 | 4;
13007
- declare interface UserResolveOptions {
13008
- /**
13009
- * A list of module alias configurations or an object which maps key to value
13010
- */
13011
- alias?: AliasOption[] | AliasOptions;
13012
-
13013
- /**
13014
- * A list of module alias configurations or an object which maps key to value, applied only after modules option
13015
- */
13016
- fallback?: AliasOption[] | AliasOptions;
13017
-
13018
- /**
13019
- * An object which maps extension to extension aliases
13020
- */
13021
- extensionAlias?: ExtensionAliasOptions;
13022
-
13023
- /**
13024
- * A list of alias fields in description files
13025
- */
13026
- aliasFields?: (string | string[])[];
13027
-
13028
- /**
13029
- * A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
13030
- */
13031
- cachePredicate?: (arg0: ResolveRequest) => boolean;
13032
-
13033
- /**
13034
- * Whether or not the unsafeCache should include request context as part of the cache key.
13035
- */
13036
- cacheWithContext?: boolean;
13037
-
13038
- /**
13039
- * A list of description files to read from
13040
- */
13041
- descriptionFiles?: string[];
13042
-
13043
- /**
13044
- * A list of exports field condition names.
13045
- */
13046
- conditionNames?: string[];
13047
-
13048
- /**
13049
- * Enforce that a extension from extensions must be used
13050
- */
13051
- enforceExtension?: boolean;
13052
-
13053
- /**
13054
- * A list of exports fields in description files
13055
- */
13056
- exportsFields?: (string | string[])[];
13057
-
13058
- /**
13059
- * A list of imports fields in description files
13060
- */
13061
- importsFields?: (string | string[])[];
13062
-
13063
- /**
13064
- * A list of extensions which should be tried for files
13065
- */
13066
- extensions?: string[];
13067
-
13068
- /**
13069
- * The file system which should be used
13070
- */
13071
- fileSystem: FileSystem;
13072
-
13073
- /**
13074
- * Use this cache object to unsafely cache the successful requests
13075
- */
13076
- unsafeCache?: boolean | object;
13077
-
13078
- /**
13079
- * Resolve symlinks to their symlinked location
13080
- */
13081
- symlinks?: boolean;
13082
-
13083
- /**
13084
- * A prepared Resolver to which the plugins are attached
13085
- */
13086
- resolver?: Resolver;
13087
-
13088
- /**
13089
- * A list of directories to resolve modules from, can be absolute path or folder name
13090
- */
13091
- modules?: string | string[];
13092
-
13093
- /**
13094
- * A list of main fields in description files
13095
- */
13096
- mainFields?: (
13097
- | string
13098
- | string[]
13099
- | { name: string | string[]; forceRelative: boolean }
13100
- )[];
13101
-
13102
- /**
13103
- * A list of main files in directories
13104
- */
13105
- mainFiles?: string[];
13106
-
13107
- /**
13108
- * A list of additional resolve plugins which should be applied
13109
- */
13110
- plugins?: Plugin[];
13111
-
13112
- /**
13113
- * A PnP API that should be used - null is "never", undefined is "auto"
13114
- */
13115
- pnpApi?: null | PnpApiImpl;
13116
-
13117
- /**
13118
- * A list of root paths
13119
- */
13120
- roots?: string[];
13121
-
13122
- /**
13123
- * The request is already fully specified and no extensions or directories are resolved for it
13124
- */
13125
- fullySpecified?: boolean;
13126
-
13127
- /**
13128
- * Resolve to a context instead of a file
13129
- */
13130
- resolveToContext?: boolean;
13131
-
13132
- /**
13133
- * A list of resolve restrictions
13134
- */
13135
- restrictions?: (string | RegExp)[];
13136
-
13137
- /**
13138
- * Use only the sync constraints of the file system calls
13139
- */
13140
- useSyncFileSystemCalls?: boolean;
13141
-
13142
- /**
13143
- * Prefer to resolve module requests as relative requests before falling back to modules
13144
- */
13145
- preferRelative?: boolean;
13146
-
13147
- /**
13148
- * Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
13149
- */
13150
- preferAbsolute?: boolean;
13151
- }
13152
14172
  declare abstract class VariableInfo {
13153
14173
  declaredScope: ScopeInfo;
13154
14174
  freeName?: string | true;
@@ -13171,7 +14191,7 @@ declare interface WatchFileSystem {
13171
14191
  startTime: number,
13172
14192
  options: WatchOptions,
13173
14193
  callback: (
13174
- arg0: undefined | Error,
14194
+ arg0: null | Error,
13175
14195
  arg1: Map<string, FileSystemInfoEntry | "ignore">,
13176
14196
  arg2: Map<string, FileSystemInfoEntry | "ignore">,
13177
14197
  arg3: Set<string>,
@@ -13285,8 +14305,8 @@ declare interface WatcherInfo {
13285
14305
  declare abstract class Watching {
13286
14306
  startTime: null | number;
13287
14307
  invalid: boolean;
13288
- handler: CallbackFunction<Stats>;
13289
- callbacks: CallbackFunction<void>[];
14308
+ handler: CallbackFunction_1<Stats>;
14309
+ callbacks: CallbackFunction_1<void>[];
13290
14310
  closed: boolean;
13291
14311
  suspended: boolean;
13292
14312
  blocked: boolean;
@@ -13322,15 +14342,15 @@ declare abstract class Watching {
13322
14342
  dirs: Iterable<string>,
13323
14343
  missing: Iterable<string>
13324
14344
  ): void;
13325
- invalidate(callback?: CallbackFunction<void>): void;
14345
+ invalidate(callback?: CallbackFunction_1<void>): void;
13326
14346
  suspend(): void;
13327
14347
  resume(): void;
13328
- close(callback: CallbackFunction<void>): void;
14348
+ close(callback: CallbackFunction_1<void>): void;
13329
14349
  }
13330
14350
  declare abstract class WeakTupleMap<T extends any[], V> {
13331
14351
  set(...args: [T, ...V[]]): void;
13332
14352
  has(...args: T): boolean;
13333
- get(...args: T): V;
14353
+ get(...args: T): undefined | V;
13334
14354
  provide(...args: [T, ...(() => V)[]]): V;
13335
14355
  delete(...args: T): void;
13336
14356
  clear(): void;
@@ -13419,13 +14439,13 @@ declare abstract class WebpackLogger {
13419
14439
  group(...args: any[]): void;
13420
14440
  groupCollapsed(...args: any[]): void;
13421
14441
  groupEnd(...args: any[]): void;
13422
- profile(label?: any): void;
13423
- profileEnd(label?: any): void;
13424
- time(label?: any): void;
13425
- timeLog(label?: any): void;
13426
- timeEnd(label?: any): void;
13427
- timeAggregate(label?: any): void;
13428
- timeAggregateEnd(label?: any): void;
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;
13429
14449
  }
13430
14450
  declare class WebpackOptionsApply extends OptionsApply {
13431
14451
  constructor();
@@ -13609,12 +14629,12 @@ declare interface WebpackOptionsNormalized {
13609
14629
  /**
13610
14630
  * Options for the resolver.
13611
14631
  */
13612
- resolve: ResolveOptionsWebpackOptions;
14632
+ resolve: ResolveOptions;
13613
14633
 
13614
14634
  /**
13615
14635
  * Options for the resolver when resolving loaders.
13616
14636
  */
13617
- resolveLoader: ResolveOptionsWebpackOptions;
14637
+ resolveLoader: ResolveOptions;
13618
14638
 
13619
14639
  /**
13620
14640
  * Options affecting how file system snapshots are created and validated.
@@ -13664,9 +14684,88 @@ declare interface WithOptions {
13664
14684
  arg0: Partial<ResolveOptionsWithDependencyType>
13665
14685
  ) => ResolverWithOptions;
13666
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 });
13667
14742
  declare interface WriteOnlySet<T> {
13668
14743
  add: (item: T) => void;
13669
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
+ }
13670
14769
  type __TypeWebpackOptions = (data: object) =>
13671
14770
  | string
13672
14771
  | {
@@ -14130,7 +15229,7 @@ declare namespace exports {
14130
15229
  export let compareRuntime: (a: RuntimeSpec, b: RuntimeSpec) => 0 | 1 | -1;
14131
15230
  export let mergeRuntime: (a: RuntimeSpec, b: RuntimeSpec) => RuntimeSpec;
14132
15231
  export let deepMergeRuntime: (
14133
- runtimes: RuntimeSpec[],
15232
+ runtimes: undefined | RuntimeSpec[],
14134
15233
  runtime: RuntimeSpec
14135
15234
  ) => RuntimeSpec;
14136
15235
  export let mergeRuntimeCondition: (
@@ -14284,7 +15383,7 @@ declare namespace exports {
14284
15383
  LibraryOptions,
14285
15384
  MemoryCacheOptions,
14286
15385
  ModuleOptions,
14287
- ResolveOptionsWebpackOptions as ResolveOptions,
15386
+ ResolveOptions,
14288
15387
  RuleSetCondition,
14289
15388
  RuleSetConditionAbsolute,
14290
15389
  RuleSetRule,