update dev dependencies

fix bug with optional types in typings
This commit is contained in:
Tobias Koppers 2020-11-26 10:48:16 +01:00
parent cbcd459d19
commit 30b7137064
4 changed files with 899 additions and 904 deletions

View File

@ -38,8 +38,8 @@
"devDependencies": {
"@babel/core": "^7.11.1",
"@babel/preset-react": "^7.10.4",
"@types/jest": "^25.2.3",
"@types/node": "^13.13.15",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.10",
"babel-loader": "^8.1.0",
"benchmark": "^2.1.4",
"bundle-loader": "^0.5.6",
@ -63,9 +63,9 @@
"husky": "^4.2.5",
"is-ci": "^2.0.0",
"istanbul": "^0.4.5",
"jest": "^25.1.0",
"jest-diff": "^25.1.0",
"jest-junit": "^11.1.0",
"jest": "^26.6.3",
"jest-diff": "^26.6.2",
"jest-junit": "^12.0.0",
"json-loader": "^0.5.7",
"json5": "^2.1.3",
"less": "^3.12.2",
@ -78,7 +78,7 @@
"mini-css-extract-plugin": "^1.0.0",
"mini-svg-data-uri": "^1.2.3",
"open-cli": "^6.0.1",
"prettier": "^2.0.5",
"prettier": "^2.2.0",
"pretty-format": "^26.3.0",
"pug": "^3.0.0",
"pug-loader": "^2.4.0",
@ -90,9 +90,9 @@
"simple-git": "^2.17.0",
"strip-ansi": "^6.0.0",
"style-loader": "^1.1.4",
"terser": "^4.8.0",
"terser": "^5.5.0",
"toml": "^3.0.0",
"tooling": "webpack/tooling#v1.8.1",
"tooling": "webpack/tooling#v1.10.0",
"ts-loader": "^8.0.2",
"typescript": "^3.9.7",
"url-loader": "^4.1.0",
@ -100,7 +100,7 @@
"webassembly-feature": "1.3.0",
"xxhashjs": "^0.2.2",
"yamljs": "^0.3.0",
"yarn-deduplicate": "^2.1.1"
"yarn-deduplicate": "^3.1.0"
},
"engines": {
"node": ">=10.13.0"

View File

@ -1095,9 +1095,9 @@ asset <CLR=32,BOLD>main.js</CLR> 54 bytes <CLR=32,BOLD>[emitted]</CLR> (name: ma
<CLR=31,BOLD>DEBUG</CLR> <CLR=BOLD>LOG from ./node_modules/custom-loader/index.js ./node_modules/custom-loader/index.js!./index.js</CLR>
<e> <CLR=31,BOLD>An error</CLR>
| at Object.module.exports (Xdir/logging/node_modules/custom-loader/index.js:5:9)
| at Object.<anonymous>.module.exports (Xdir/logging/node_modules/custom-loader/index.js:5:9)
<w> <CLR=33,BOLD>A warning</CLR>
| at Object.module.exports (Xdir/logging/node_modules/custom-loader/index.js:6:9)
| at Object.<anonymous>.module.exports (Xdir/logging/node_modules/custom-loader/index.js:6:9)
<-> <CLR=36,BOLD>Unimportant</CLR>
<i> <CLR=32,BOLD>Info message</CLR>
<CLR=BOLD>Just log</CLR>
@ -1106,7 +1106,7 @@ asset <CLR=32,BOLD>main.js</CLR> 54 bytes <CLR=32,BOLD>[emitted]</CLR> (name: ma
<-> <CLR=36,BOLD>Nested</CLR>
<CLR=BOLD>Log inside collapsed group</CLR>
Trace
| at Object.module.exports (Xdir/logging/node_modules/custom-loader/index.js:15:9)
| at Object.<anonymous>.module.exports (Xdir/logging/node_modules/custom-loader/index.js:15:9)
<t> <CLR=35,BOLD>Measure: X ms</CLR>
-------
<CLR=BOLD>After clear</CLR>
@ -2228,12 +2228,12 @@ LOG from webpack.FileSystemInfo
exports[`StatsTestCases should print correct stats for real-content-hash 1`] = `
"a-normal:
assets by path *.js 2.99 KiB
asset e840f17fae83d26b8752-e840f1.js 2.6 KiB [emitted] [immutable] [minimized] (name: runtime~main)
asset b91fe81d9da1269a285f-b91fe8.js 2.6 KiB [emitted] [immutable] [minimized] (name: runtime~main)
asset 3cc8faad16137711c07e-3cc8fa.js 210 bytes [emitted] [immutable] [minimized] (name: main)
asset b6f77787a670e97d47b5-b6f777.js 193 bytes [emitted] [immutable] [minimized] (name: lazy)
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: file.png] (auxiliary name: lazy)
asset 7382fad5b015914e0811.jpg 5.89 KiB [emitted] [immutable] [from: file.jpg] (auxiliary name: main)
Entrypoint main 2.8 KiB (5.89 KiB) = e840f17fae83d26b8752-e840f1.js 2.6 KiB 3cc8faad16137711c07e-3cc8fa.js 210 bytes 1 auxiliary asset
Entrypoint main 2.8 KiB (5.89 KiB) = b91fe81d9da1269a285f-b91fe8.js 2.6 KiB 3cc8faad16137711c07e-3cc8fa.js 210 bytes 1 auxiliary asset
runtime modules 7.36 KiB 8 modules
orphan modules 23 bytes [orphan] 1 module
cacheable modules 340 bytes (javascript) 20.4 KiB (asset)
@ -2247,12 +2247,12 @@ exports[`StatsTestCases should print correct stats for real-content-hash 1`] = `
b-normal:
assets by path *.js 2.99 KiB
asset de036140a684abb46a68-de0361.js 2.6 KiB [emitted] [immutable] [minimized] (name: runtime~main)
asset 92a0a394f8459d57eed5-92a0a3.js 2.6 KiB [emitted] [immutable] [minimized] (name: runtime~main)
asset 3cc8faad16137711c07e-3cc8fa.js 210 bytes [emitted] [immutable] [minimized] (name: main)
asset b6f77787a670e97d47b5-b6f777.js 193 bytes [emitted] [immutable] [minimized] (name: lazy)
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: file.png] (auxiliary name: lazy)
asset 7382fad5b015914e0811.jpg 5.89 KiB [emitted] [immutable] [from: file.jpg] (auxiliary name: main)
Entrypoint main 2.8 KiB (5.89 KiB) = de036140a684abb46a68-de0361.js 2.6 KiB 3cc8faad16137711c07e-3cc8fa.js 210 bytes 1 auxiliary asset
Entrypoint main 2.8 KiB (5.89 KiB) = 92a0a394f8459d57eed5-92a0a3.js 2.6 KiB 3cc8faad16137711c07e-3cc8fa.js 210 bytes 1 auxiliary asset
runtime modules 7.36 KiB 8 modules
orphan modules 19 bytes [orphan] 1 module
cacheable modules 295 bytes (javascript) 20.4 KiB (asset)
@ -2266,15 +2266,15 @@ b-normal:
a-source-map:
assets by path *.js 3.16 KiB
asset 34a1f137ab6013192ef7-34a1f1.js 2.65 KiB [emitted] [immutable] [minimized] (name: runtime~main)
sourceMap 34a1f137ab6013192ef7-34a1f1.js.map 14.3 KiB [emitted] [dev] (auxiliary name: runtime~main)
asset 1faadf70e8b4376ef06a-1faadf.js 2.65 KiB [emitted] [immutable] [minimized] (name: runtime~main)
sourceMap 1faadf70e8b4376ef06a-1faadf.js.map 14.3 KiB [emitted] [dev] (auxiliary name: runtime~main)
asset b8bfcec62cdd15c9a840-b8bfce.js 266 bytes [emitted] [immutable] [minimized] (name: main)
sourceMap b8bfcec62cdd15c9a840-b8bfce.js.map 366 bytes [emitted] [dev] (auxiliary name: main)
asset c7c0f8bb2e61b59a89f5-c7c0f8.js 249 bytes [emitted] [immutable] [minimized] (name: lazy)
sourceMap c7c0f8bb2e61b59a89f5-c7c0f8.js.map 331 bytes [emitted] [dev] (auxiliary name: lazy)
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: file.png] (auxiliary name: lazy)
asset 7382fad5b015914e0811.jpg 5.89 KiB [emitted] [immutable] [from: file.jpg] (auxiliary name: main)
Entrypoint main 2.91 KiB (20.5 KiB) = 34a1f137ab6013192ef7-34a1f1.js 2.65 KiB b8bfcec62cdd15c9a840-b8bfce.js 266 bytes 3 auxiliary assets
Entrypoint main 2.91 KiB (20.5 KiB) = 1faadf70e8b4376ef06a-1faadf.js 2.65 KiB b8bfcec62cdd15c9a840-b8bfce.js 266 bytes 3 auxiliary assets
runtime modules 7.36 KiB 8 modules
orphan modules 23 bytes [orphan] 1 module
cacheable modules 340 bytes (javascript) 20.4 KiB (asset)
@ -2288,15 +2288,15 @@ a-source-map:
b-source-map:
assets by path *.js 3.16 KiB
asset 6d482476dfc44d9f4352-6d4824.js 2.65 KiB [emitted] [immutable] [minimized] (name: runtime~main)
sourceMap 6d482476dfc44d9f4352-6d4824.js.map 14.3 KiB [emitted] [dev] (auxiliary name: runtime~main)
asset df1717060760bf22714c-df1717.js 2.65 KiB [emitted] [immutable] [minimized] (name: runtime~main)
sourceMap df1717060760bf22714c-df1717.js.map 14.3 KiB [emitted] [dev] (auxiliary name: runtime~main)
asset b8bfcec62cdd15c9a840-b8bfce.js 266 bytes [emitted] [immutable] [minimized] (name: main)
sourceMap b8bfcec62cdd15c9a840-b8bfce.js.map 323 bytes [emitted] [dev] (auxiliary name: main)
asset c7c0f8bb2e61b59a89f5-c7c0f8.js 249 bytes [emitted] [immutable] [minimized] (name: lazy)
sourceMap c7c0f8bb2e61b59a89f5-c7c0f8.js.map 327 bytes [emitted] [dev] (auxiliary name: lazy)
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: file.png] (auxiliary name: lazy)
asset 7382fad5b015914e0811.jpg 5.89 KiB [emitted] [immutable] [from: file.jpg] (auxiliary name: main)
Entrypoint main 2.91 KiB (20.5 KiB) = 6d482476dfc44d9f4352-6d4824.js 2.65 KiB b8bfcec62cdd15c9a840-b8bfce.js 266 bytes 3 auxiliary assets
Entrypoint main 2.91 KiB (20.5 KiB) = df1717060760bf22714c-df1717.js 2.65 KiB b8bfcec62cdd15c9a840-b8bfce.js 266 bytes 3 auxiliary assets
runtime modules 7.36 KiB 8 modules
orphan modules 19 bytes [orphan] 1 module
cacheable modules 295 bytes (javascript) 20.4 KiB (asset)

256
types.d.ts vendored
View File

@ -271,7 +271,7 @@ declare interface AssetInfo {
}
type AssetModuleFilename =
| string
| ((pathData: PathData, assetInfo: AssetInfo) => string);
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
declare abstract class AsyncDependenciesBlock extends DependenciesBlock {
groupOptions: {
preloadOrder?: number;
@ -296,10 +296,10 @@ declare abstract class AsyncDependenciesBlock extends DependenciesBlock {
declare abstract class AsyncQueue<T, K, R> {
hooks: {
beforeAdd: AsyncSeriesHook<[T]>;
added: SyncHook<[T], void>;
added: SyncHook<[T]>;
beforeStart: AsyncSeriesHook<[T]>;
started: SyncHook<[T], void>;
result: SyncHook<[T, Error, R], void>;
started: SyncHook<[T]>;
result: SyncHook<[T, Error, R]>;
};
add(item: T, callback: CallbackFunction<R>): void;
invalidate(item: T): void;
@ -507,7 +507,7 @@ declare class Cache {
>;
store: AsyncParallelHook<[string, Etag, any]>;
storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>;
beginIdle: SyncHook<[], void>;
beginIdle: SyncHook<[]>;
endIdle: AsyncParallelHook<[]>;
shutdown: AsyncParallelHook<[]>;
};
@ -684,7 +684,7 @@ declare class Chunk {
}
type ChunkFilename =
| string
| ((pathData: PathData, assetInfo: AssetInfo) => string);
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
declare class ChunkGraph {
constructor(moduleGraph: ModuleGraph);
moduleGraph: ModuleGraph;
@ -1096,11 +1096,11 @@ declare class Compilation {
*/
constructor(compiler: Compiler);
hooks: Readonly<{
buildModule: SyncHook<[Module], void>;
rebuildModule: SyncHook<[Module], void>;
failedModule: SyncHook<[Module, WebpackError], void>;
succeedModule: SyncHook<[Module], void>;
stillValidModule: SyncHook<[Module], void>;
buildModule: SyncHook<[Module]>;
rebuildModule: SyncHook<[Module]>;
failedModule: SyncHook<[Module, WebpackError]>;
succeedModule: SyncHook<[Module]>;
stillValidModule: SyncHook<[Module]>;
addEntry: SyncHook<
[
Dependency,
@ -1113,8 +1113,7 @@ declare class Compilation {
| "runtime"
| "wasmLoading"
>
],
void
]
>;
failedEntry: SyncHook<
[
@ -1129,8 +1128,7 @@ declare class Compilation {
| "wasmLoading"
>,
Error
],
void
]
>;
succeedEntry: SyncHook<
[
@ -1145,8 +1143,7 @@ declare class Compilation {
| "wasmLoading"
>,
Module
],
void
]
>;
dependencyReferencedExports: SyncWaterfallHook<
[
@ -1157,64 +1154,61 @@ declare class Compilation {
>;
finishModules: AsyncSeriesHook<[Iterable<Module>]>;
finishRebuildingModule: AsyncSeriesHook<[Module]>;
unseal: SyncHook<[], void>;
seal: SyncHook<[], void>;
beforeChunks: SyncHook<[], void>;
afterChunks: SyncHook<[Iterable<Chunk>], void>;
unseal: SyncHook<[]>;
seal: SyncHook<[]>;
beforeChunks: SyncHook<[]>;
afterChunks: SyncHook<[Iterable<Chunk>]>;
optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeDependencies: SyncHook<[Iterable<Module>], void>;
optimize: SyncHook<[], void>;
afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
optimize: SyncHook<[]>;
optimizeModules: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeModules: SyncHook<[Iterable<Module>], void>;
afterOptimizeModules: SyncHook<[Iterable<Module>]>;
optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>;
afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]], void>;
afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>], void>;
afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
optimizeChunkModules: AsyncSeriesBailHook<
[Iterable<Chunk>, Iterable<Module>],
any
>;
afterOptimizeChunkModules: SyncHook<
[Iterable<Chunk>, Iterable<Module>],
void
>;
afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
shouldRecord: SyncBailHook<[], boolean>;
additionalChunkRuntimeRequirements: SyncHook<[Chunk, Set<string>], void>;
additionalChunkRuntimeRequirements: SyncHook<[Chunk, Set<string>]>;
runtimeRequirementInChunk: HookMap<SyncBailHook<[Chunk, Set<string>], any>>;
additionalModuleRuntimeRequirements: SyncHook<[Module, Set<string>], void>;
additionalModuleRuntimeRequirements: SyncHook<[Module, Set<string>]>;
runtimeRequirementInModule: HookMap<
SyncBailHook<[Module, Set<string>], any>
>;
additionalTreeRuntimeRequirements: SyncHook<[Chunk, Set<string>], void>;
additionalTreeRuntimeRequirements: SyncHook<[Chunk, Set<string>]>;
runtimeRequirementInTree: HookMap<SyncBailHook<[Chunk, Set<string>], any>>;
runtimeModule: SyncHook<[RuntimeModule, Chunk], void>;
reviveModules: SyncHook<[Iterable<Module>, any], void>;
beforeModuleIds: SyncHook<[Iterable<Module>], void>;
moduleIds: SyncHook<[Iterable<Module>], void>;
optimizeModuleIds: SyncHook<[Iterable<Module>], void>;
afterOptimizeModuleIds: SyncHook<[Iterable<Module>], void>;
reviveChunks: SyncHook<[Iterable<Chunk>, any], void>;
beforeChunkIds: SyncHook<[Iterable<Chunk>], void>;
chunkIds: SyncHook<[Iterable<Chunk>], void>;
optimizeChunkIds: SyncHook<[Iterable<Chunk>], void>;
afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>], void>;
recordModules: SyncHook<[Iterable<Module>, any], void>;
recordChunks: SyncHook<[Iterable<Chunk>, any], void>;
optimizeCodeGeneration: SyncHook<[Iterable<Module>], void>;
beforeModuleHash: SyncHook<[], void>;
afterModuleHash: SyncHook<[], void>;
beforeCodeGeneration: SyncHook<[], void>;
afterCodeGeneration: SyncHook<[], void>;
beforeRuntimeRequirements: SyncHook<[], void>;
afterRuntimeRequirements: SyncHook<[], void>;
beforeHash: SyncHook<[], void>;
contentHash: SyncHook<[Chunk], void>;
afterHash: SyncHook<[], void>;
recordHash: SyncHook<[any], void>;
record: SyncHook<[Compilation, any], void>;
beforeModuleAssets: SyncHook<[], void>;
runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
reviveModules: SyncHook<[Iterable<Module>, any]>;
beforeModuleIds: SyncHook<[Iterable<Module>]>;
moduleIds: SyncHook<[Iterable<Module>]>;
optimizeModuleIds: SyncHook<[Iterable<Module>]>;
afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
reviveChunks: SyncHook<[Iterable<Chunk>, any]>;
beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
chunkIds: SyncHook<[Iterable<Chunk>]>;
optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
recordModules: SyncHook<[Iterable<Module>, any]>;
recordChunks: SyncHook<[Iterable<Chunk>, any]>;
optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
beforeModuleHash: SyncHook<[]>;
afterModuleHash: SyncHook<[]>;
beforeCodeGeneration: SyncHook<[]>;
afterCodeGeneration: SyncHook<[]>;
beforeRuntimeRequirements: SyncHook<[]>;
afterRuntimeRequirements: SyncHook<[]>;
beforeHash: SyncHook<[]>;
contentHash: SyncHook<[Chunk]>;
afterHash: SyncHook<[]>;
recordHash: SyncHook<[any]>;
record: SyncHook<[Compilation, any]>;
beforeModuleAssets: SyncHook<[]>;
shouldGenerateChunkAssets: SyncBailHook<[], boolean>;
beforeChunkAssets: SyncHook<[], void>;
beforeChunkAssets: SyncHook<[]>;
additionalChunkAssets: Pick<
AsyncSeriesHook<[Set<Chunk>]>,
"tap" | "tapAsync" | "tapPromise" | "name"
@ -1236,9 +1230,9 @@ declare class Compilation {
> &
FakeHookMarker;
optimizeAssets: AsyncSeriesHook<[Record<string, Source>]>;
afterOptimizeAssets: SyncHook<[Record<string, Source>], void>;
afterOptimizeAssets: SyncHook<[Record<string, Source>]>;
processAssets: AsyncSeriesHook<[Record<string, Source>]>;
afterProcessAssets: SyncHook<[Record<string, Source>], void>;
afterProcessAssets: SyncHook<[Record<string, Source>]>;
needAdditionalSeal: SyncBailHook<[], boolean>;
afterSeal: AsyncSeriesHook<[]>;
renderManifest: SyncWaterfallHook<
@ -1247,21 +1241,21 @@ declare class Compilation {
RenderManifestOptions
]
>;
fullHash: SyncHook<[Hash], void>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext], void>;
moduleAsset: SyncHook<[Module, string], void>;
chunkAsset: SyncHook<[Chunk, string], void>;
fullHash: SyncHook<[Hash]>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
moduleAsset: SyncHook<[Module, string]>;
chunkAsset: SyncHook<[Chunk, string]>;
assetPath: SyncWaterfallHook<[string, any, AssetInfo]>;
needAdditionalPass: SyncBailHook<[], boolean>;
childCompiler: SyncHook<[Compiler, string, number], void>;
childCompiler: SyncHook<[Compiler, string, number]>;
log: SyncBailHook<[string, LogEntry], true>;
processWarnings: SyncWaterfallHook<[WebpackError[]]>;
processErrors: SyncWaterfallHook<[WebpackError[]]>;
statsPreset: HookMap<SyncHook<[any, any], void>>;
statsNormalize: SyncHook<[any, any], void>;
statsFactory: SyncHook<[StatsFactory, any], void>;
statsPrinter: SyncHook<[StatsPrinter, any], void>;
readonly normalModuleLoader: SyncHook<[any, NormalModule], void>;
statsPreset: HookMap<SyncHook<[any, any]>>;
statsNormalize: SyncHook<[any, any]>;
statsFactory: SyncHook<[StatsFactory, any]>;
statsPrinter: SyncHook<[StatsPrinter, any]>;
readonly normalModuleLoader: SyncHook<[any, NormalModule]>;
}>;
name: string;
startTime: any;
@ -1597,7 +1591,7 @@ declare interface CompilationHooksJavascriptModulesPlugin {
renderMain: SyncWaterfallHook<[Source, RenderContextObject]>;
render: SyncWaterfallHook<[Source, RenderContextObject]>;
renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext]>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext], void>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
useSourceMap: SyncBailHook<[Chunk, RenderContextObject], boolean>;
}
declare interface CompilationParams {
@ -1607,34 +1601,34 @@ declare interface CompilationParams {
declare class Compiler {
constructor(context: string);
hooks: Readonly<{
initialize: SyncHook<[], void>;
initialize: SyncHook<[]>;
shouldEmit: SyncBailHook<[Compilation], boolean>;
done: AsyncSeriesHook<[Stats]>;
afterDone: SyncHook<[Stats], void>;
afterDone: SyncHook<[Stats]>;
additionalPass: AsyncSeriesHook<[]>;
beforeRun: AsyncSeriesHook<[Compiler]>;
run: AsyncSeriesHook<[Compiler]>;
emit: AsyncSeriesHook<[Compilation]>;
assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>;
afterEmit: AsyncSeriesHook<[Compilation]>;
thisCompilation: SyncHook<[Compilation, CompilationParams], void>;
compilation: SyncHook<[Compilation, CompilationParams], void>;
normalModuleFactory: SyncHook<[NormalModuleFactory], void>;
contextModuleFactory: SyncHook<[ContextModuleFactory], void>;
thisCompilation: SyncHook<[Compilation, CompilationParams]>;
compilation: SyncHook<[Compilation, CompilationParams]>;
normalModuleFactory: SyncHook<[NormalModuleFactory]>;
contextModuleFactory: SyncHook<[ContextModuleFactory]>;
beforeCompile: AsyncSeriesHook<[CompilationParams]>;
compile: SyncHook<[CompilationParams], void>;
compile: SyncHook<[CompilationParams]>;
make: AsyncParallelHook<[Compilation]>;
finishMake: AsyncParallelHook<[Compilation]>;
afterCompile: AsyncSeriesHook<[Compilation]>;
watchRun: AsyncSeriesHook<[Compiler]>;
failed: SyncHook<[Error], void>;
invalid: SyncHook<[string, number], void>;
watchClose: SyncHook<[], void>;
failed: SyncHook<[Error]>;
invalid: SyncHook<[string, number]>;
watchClose: SyncHook<[]>;
infrastructureLog: SyncBailHook<[string, string, any[]], true>;
environment: SyncHook<[], void>;
afterEnvironment: SyncHook<[], void>;
afterPlugins: SyncHook<[Compiler], void>;
afterResolvers: SyncHook<[Compiler], void>;
environment: SyncHook<[]>;
afterEnvironment: SyncHook<[]>;
afterPlugins: SyncHook<[Compiler]>;
afterResolvers: SyncHook<[Compiler]>;
entryOption: SyncBailHook<[string, EntryNormalized], boolean>;
}>;
webpack: typeof exports;
@ -2194,8 +2188,20 @@ declare class DefinePlugin {
/**
* Create a new define plugin
*/
constructor(definitions: Record<string, RecursiveArrayOrRecord>);
definitions: Record<string, RecursiveArrayOrRecord>;
constructor(
definitions: Record<
string,
RecursiveArrayOrRecord<
string | number | bigint | boolean | Function | RegExp | RuntimeValue
>
>
);
definitions: Record<
string,
RecursiveArrayOrRecord<
string | number | bigint | boolean | Function | RegExp | RuntimeValue
>
>;
/**
* Apply the plugin
@ -3213,7 +3219,7 @@ type ExternalItem =
| { [index: string]: string | boolean | string[] | { [index: string]: any } }
| ((
data: { context: string; request: string },
callback: (err: Error, result: string) => void
callback: (err?: Error, result?: string) => void
) => void);
declare class ExternalModule extends Module {
constructor(request?: any, type?: any, userRequest?: any);
@ -3237,7 +3243,7 @@ type Externals =
| { [index: string]: string | boolean | string[] | { [index: string]: any } }
| ((
data: { context: string; request: string },
callback: (err: Error, result: string) => void
callback: (err?: Error, result?: string) => void
) => void);
declare class ExternalsPlugin {
constructor(type: string, externals: Externals);
@ -3444,7 +3450,7 @@ declare interface FileSystem {
};
}
declare interface FileSystemCallback<T> {
(err: PossibleFileSystemError & Error, result: T): any;
(err?: PossibleFileSystemError & Error, result?: T): any;
}
declare interface FileSystemDirent {
name: string | Buffer;
@ -3526,7 +3532,9 @@ declare interface FileSystemStats {
isDirectory: () => boolean;
isFile: () => boolean;
}
type Filename = string | ((pathData: PathData, assetInfo: AssetInfo) => string);
type Filename =
| string
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
type FilterItemTypes = string | RegExp | ((value: string) => boolean);
type FilterTypes =
| string
@ -3659,7 +3667,7 @@ declare interface HashedModuleIdsPluginOptions {
/**
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
*/
hashDigest?: "hex" | "latin1" | "base64";
hashDigest?: "base64" | "latin1" | "hex";
/**
* The prefix length of the hash digest to use, defaults to 4.
@ -5314,10 +5322,10 @@ declare abstract class ModuleTemplate {
declare class MultiCompiler {
constructor(compilers: Compiler[] | Record<string, Compiler>);
hooks: Readonly<{
done: SyncHook<[MultiStats], void>;
invalid: MultiHook<SyncHook<[string, number], void>>;
done: SyncHook<[MultiStats]>;
invalid: MultiHook<SyncHook<[string, number]>>;
run: MultiHook<AsyncSeriesHook<[Compiler]>>;
watchClose: SyncHook<[], void>;
watchClose: SyncHook<[]>;
watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
infrastructureLog: MultiHook<SyncBailHook<[string, string, any[]], true>>;
}>;
@ -5626,8 +5634,8 @@ declare class NormalModule extends Module {
static deserialize(context?: any): NormalModule;
}
declare interface NormalModuleCompilationHooks {
loader: SyncHook<[any, NormalModule], void>;
beforeLoaders: SyncHook<[LoaderItem[], NormalModule, any], void>;
loader: SyncHook<[any, NormalModule]>;
beforeLoaders: SyncHook<[LoaderItem[], NormalModule, any]>;
readResourceForScheme: HookMap<
AsyncSeriesBailHook<[string, NormalModule], string | Buffer>
>;
@ -5656,9 +5664,9 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
createModule: AsyncSeriesBailHook<[any, ResolveData], any>;
module: SyncWaterfallHook<[Module, any, ResolveData]>;
createParser: HookMap<SyncBailHook<any, any>>;
parser: HookMap<SyncHook<any, void>>;
parser: HookMap<SyncHook<any>>;
createGenerator: HookMap<SyncBailHook<any, any>>;
generator: HookMap<SyncHook<any, void>>;
generator: HookMap<SyncHook<any>>;
}>;
resolverFactory: ResolverFactory;
ruleSet: RuleSet;
@ -5914,7 +5922,7 @@ declare interface OptimizationSplitChunksCacheGroup {
/**
* Sets the template for the filename for created chunks.
*/
filename?: string | ((pathData: PathData, assetInfo: AssetInfo) => string);
filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
/**
* Sets the hint for chunk id.
@ -6057,7 +6065,7 @@ declare interface OptimizationSplitChunksOptions {
/**
* Sets the template for the filename for created chunks.
*/
filename?: string | ((pathData: PathData, assetInfo: AssetInfo) => string);
filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
/**
* Prevents exposing path info when creating names for parts splitted by maxSize.
@ -6862,13 +6870,13 @@ declare interface ProvidesObject {
}
type PublicPath =
| string
| ((pathData: PathData, assetInfo: AssetInfo) => string);
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
declare interface RawChunkGroupOptions {
preloadOrder?: number;
prefetchOrder?: number;
}
declare class RawSource extends Source {
constructor(source: string | Buffer, convertToString: boolean);
constructor(source: string | Buffer, convertToString?: boolean);
isBuffer(): boolean;
}
declare class ReadFileCompileWasmPlugin {
@ -6885,16 +6893,10 @@ declare interface RealDependencyLocation {
end?: SourcePosition;
index?: number;
}
type RecursiveArrayOrRecord =
| string
| number
| bigint
| boolean
| Function
| RegExp
| RuntimeValue
| { [index: string]: RecursiveArrayOrRecord }
| RecursiveArrayOrRecord[];
type RecursiveArrayOrRecord<T> =
| { [index: string]: RecursiveArrayOrRecord<T> }
| RecursiveArrayOrRecord<T>[]
| T;
declare interface ReferencedExport {
/**
* name of the referenced export
@ -7045,9 +7047,9 @@ declare interface RenderManifestOptions {
chunkGraph: ChunkGraph;
}
declare class ReplaceSource extends Source {
constructor(source: Source, name: string);
replace(start: number, end: number, newValue: string, name: string): void;
insert(pos: number, newValue: string, name: string): void;
constructor(source: Source, name?: string);
replace(start: number, end: number, newValue: string, name?: string): void;
insert(pos: number, newValue: string, name?: string): void;
getName(): string;
original(): string;
getReplacements(): {
@ -7376,10 +7378,9 @@ declare abstract class Resolver {
[
AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest>,
ResolveRequest
],
void
]
>;
noResolve: SyncHook<[ResolveRequest, Error], void>;
noResolve: SyncHook<[ResolveRequest, Error]>;
resolve: AsyncSeriesBailHook<
[ResolveRequest, ResolveContext],
ResolveRequest
@ -7402,7 +7403,7 @@ declare abstract class Resolver {
path: string,
request: string,
resolveContext: ResolveContext,
callback: (arg0: Error, arg1: DevTool, arg2: ResolveRequest) => void
callback: (arg0: Error, arg1?: DevTool, arg2?: ResolveRequest) => void
): void;
doResolve(
hook?: any,
@ -7651,8 +7652,7 @@ declare abstract class ResolverFactory {
dependencyType?: string;
resolveToContext?: boolean;
}
],
void
]
>
>;
}>;
@ -8695,8 +8695,8 @@ declare abstract class SortableSet<T> extends Set<T> {
declare class Source {
constructor();
size(): number;
map(options: MapOptions): Object;
sourceAndMap(options: MapOptions): { source: string | Buffer; map: Object };
map(options?: MapOptions): Object;
sourceAndMap(options?: MapOptions): { source: string | Buffer; map: Object };
updateHash(hash: Hash): void;
source(): string | Buffer;
buffer(): Buffer;
@ -8799,8 +8799,8 @@ declare class SourceMapSource extends Source {
source: string | Buffer,
name: string,
sourceMap: string | Object | Buffer,
originalSource: string | Buffer,
innerSourceMap: string | Object | Buffer
originalSource?: string | Buffer,
innerSourceMap?: string | Object | Buffer
);
getArgsAsBuffers(): [Buffer, string, Buffer, Buffer, Buffer];
}

1503
yarn.lock

File diff suppressed because it is too large Load Diff