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": { "devDependencies": {
"@babel/core": "^7.11.1", "@babel/core": "^7.11.1",
"@babel/preset-react": "^7.10.4", "@babel/preset-react": "^7.10.4",
"@types/jest": "^25.2.3", "@types/jest": "^26.0.15",
"@types/node": "^13.13.15", "@types/node": "^14.14.10",
"babel-loader": "^8.1.0", "babel-loader": "^8.1.0",
"benchmark": "^2.1.4", "benchmark": "^2.1.4",
"bundle-loader": "^0.5.6", "bundle-loader": "^0.5.6",
@ -63,9 +63,9 @@
"husky": "^4.2.5", "husky": "^4.2.5",
"is-ci": "^2.0.0", "is-ci": "^2.0.0",
"istanbul": "^0.4.5", "istanbul": "^0.4.5",
"jest": "^25.1.0", "jest": "^26.6.3",
"jest-diff": "^25.1.0", "jest-diff": "^26.6.2",
"jest-junit": "^11.1.0", "jest-junit": "^12.0.0",
"json-loader": "^0.5.7", "json-loader": "^0.5.7",
"json5": "^2.1.3", "json5": "^2.1.3",
"less": "^3.12.2", "less": "^3.12.2",
@ -78,7 +78,7 @@
"mini-css-extract-plugin": "^1.0.0", "mini-css-extract-plugin": "^1.0.0",
"mini-svg-data-uri": "^1.2.3", "mini-svg-data-uri": "^1.2.3",
"open-cli": "^6.0.1", "open-cli": "^6.0.1",
"prettier": "^2.0.5", "prettier": "^2.2.0",
"pretty-format": "^26.3.0", "pretty-format": "^26.3.0",
"pug": "^3.0.0", "pug": "^3.0.0",
"pug-loader": "^2.4.0", "pug-loader": "^2.4.0",
@ -90,9 +90,9 @@
"simple-git": "^2.17.0", "simple-git": "^2.17.0",
"strip-ansi": "^6.0.0", "strip-ansi": "^6.0.0",
"style-loader": "^1.1.4", "style-loader": "^1.1.4",
"terser": "^4.8.0", "terser": "^5.5.0",
"toml": "^3.0.0", "toml": "^3.0.0",
"tooling": "webpack/tooling#v1.8.1", "tooling": "webpack/tooling#v1.10.0",
"ts-loader": "^8.0.2", "ts-loader": "^8.0.2",
"typescript": "^3.9.7", "typescript": "^3.9.7",
"url-loader": "^4.1.0", "url-loader": "^4.1.0",
@ -100,7 +100,7 @@
"webassembly-feature": "1.3.0", "webassembly-feature": "1.3.0",
"xxhashjs": "^0.2.2", "xxhashjs": "^0.2.2",
"yamljs": "^0.3.0", "yamljs": "^0.3.0",
"yarn-deduplicate": "^2.1.1" "yarn-deduplicate": "^3.1.0"
}, },
"engines": { "engines": {
"node": ">=10.13.0" "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> <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> <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> <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> <-> <CLR=36,BOLD>Unimportant</CLR>
<i> <CLR=32,BOLD>Info message</CLR> <i> <CLR=32,BOLD>Info message</CLR>
<CLR=BOLD>Just log</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=36,BOLD>Nested</CLR>
<CLR=BOLD>Log inside collapsed group</CLR> <CLR=BOLD>Log inside collapsed group</CLR>
Trace 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> <t> <CLR=35,BOLD>Measure: X ms</CLR>
------- -------
<CLR=BOLD>After clear</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`] = ` exports[`StatsTestCases should print correct stats for real-content-hash 1`] = `
"a-normal: "a-normal:
assets by path *.js 2.99 KiB 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 3cc8faad16137711c07e-3cc8fa.js 210 bytes [emitted] [immutable] [minimized] (name: main)
asset b6f77787a670e97d47b5-b6f777.js 193 bytes [emitted] [immutable] [minimized] (name: lazy) 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 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) 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 runtime modules 7.36 KiB 8 modules
orphan modules 23 bytes [orphan] 1 module orphan modules 23 bytes [orphan] 1 module
cacheable modules 340 bytes (javascript) 20.4 KiB (asset) 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: b-normal:
assets by path *.js 2.99 KiB 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 3cc8faad16137711c07e-3cc8fa.js 210 bytes [emitted] [immutable] [minimized] (name: main)
asset b6f77787a670e97d47b5-b6f777.js 193 bytes [emitted] [immutable] [minimized] (name: lazy) 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 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) 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 runtime modules 7.36 KiB 8 modules
orphan modules 19 bytes [orphan] 1 module orphan modules 19 bytes [orphan] 1 module
cacheable modules 295 bytes (javascript) 20.4 KiB (asset) cacheable modules 295 bytes (javascript) 20.4 KiB (asset)
@ -2266,15 +2266,15 @@ b-normal:
a-source-map: a-source-map:
assets by path *.js 3.16 KiB assets by path *.js 3.16 KiB
asset 34a1f137ab6013192ef7-34a1f1.js 2.65 KiB [emitted] [immutable] [minimized] (name: runtime~main) asset 1faadf70e8b4376ef06a-1faadf.js 2.65 KiB [emitted] [immutable] [minimized] (name: runtime~main)
sourceMap 34a1f137ab6013192ef7-34a1f1.js.map 14.3 KiB [emitted] [dev] (auxiliary 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) asset b8bfcec62cdd15c9a840-b8bfce.js 266 bytes [emitted] [immutable] [minimized] (name: main)
sourceMap b8bfcec62cdd15c9a840-b8bfce.js.map 366 bytes [emitted] [dev] (auxiliary 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) asset c7c0f8bb2e61b59a89f5-c7c0f8.js 249 bytes [emitted] [immutable] [minimized] (name: lazy)
sourceMap c7c0f8bb2e61b59a89f5-c7c0f8.js.map 331 bytes [emitted] [dev] (auxiliary 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 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) 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 runtime modules 7.36 KiB 8 modules
orphan modules 23 bytes [orphan] 1 module orphan modules 23 bytes [orphan] 1 module
cacheable modules 340 bytes (javascript) 20.4 KiB (asset) cacheable modules 340 bytes (javascript) 20.4 KiB (asset)
@ -2288,15 +2288,15 @@ a-source-map:
b-source-map: b-source-map:
assets by path *.js 3.16 KiB assets by path *.js 3.16 KiB
asset 6d482476dfc44d9f4352-6d4824.js 2.65 KiB [emitted] [immutable] [minimized] (name: runtime~main) asset df1717060760bf22714c-df1717.js 2.65 KiB [emitted] [immutable] [minimized] (name: runtime~main)
sourceMap 6d482476dfc44d9f4352-6d4824.js.map 14.3 KiB [emitted] [dev] (auxiliary 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) asset b8bfcec62cdd15c9a840-b8bfce.js 266 bytes [emitted] [immutable] [minimized] (name: main)
sourceMap b8bfcec62cdd15c9a840-b8bfce.js.map 323 bytes [emitted] [dev] (auxiliary 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) asset c7c0f8bb2e61b59a89f5-c7c0f8.js 249 bytes [emitted] [immutable] [minimized] (name: lazy)
sourceMap c7c0f8bb2e61b59a89f5-c7c0f8.js.map 327 bytes [emitted] [dev] (auxiliary 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 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) 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 runtime modules 7.36 KiB 8 modules
orphan modules 19 bytes [orphan] 1 module orphan modules 19 bytes [orphan] 1 module
cacheable modules 295 bytes (javascript) 20.4 KiB (asset) 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 = type AssetModuleFilename =
| string | string
| ((pathData: PathData, assetInfo: AssetInfo) => string); | ((pathData: PathData, assetInfo?: AssetInfo) => string);
declare abstract class AsyncDependenciesBlock extends DependenciesBlock { declare abstract class AsyncDependenciesBlock extends DependenciesBlock {
groupOptions: { groupOptions: {
preloadOrder?: number; preloadOrder?: number;
@ -296,10 +296,10 @@ declare abstract class AsyncDependenciesBlock extends DependenciesBlock {
declare abstract class AsyncQueue<T, K, R> { declare abstract class AsyncQueue<T, K, R> {
hooks: { hooks: {
beforeAdd: AsyncSeriesHook<[T]>; beforeAdd: AsyncSeriesHook<[T]>;
added: SyncHook<[T], void>; added: SyncHook<[T]>;
beforeStart: AsyncSeriesHook<[T]>; beforeStart: AsyncSeriesHook<[T]>;
started: SyncHook<[T], void>; started: SyncHook<[T]>;
result: SyncHook<[T, Error, R], void>; result: SyncHook<[T, Error, R]>;
}; };
add(item: T, callback: CallbackFunction<R>): void; add(item: T, callback: CallbackFunction<R>): void;
invalidate(item: T): void; invalidate(item: T): void;
@ -507,7 +507,7 @@ declare class Cache {
>; >;
store: AsyncParallelHook<[string, Etag, any]>; store: AsyncParallelHook<[string, Etag, any]>;
storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>; storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>;
beginIdle: SyncHook<[], void>; beginIdle: SyncHook<[]>;
endIdle: AsyncParallelHook<[]>; endIdle: AsyncParallelHook<[]>;
shutdown: AsyncParallelHook<[]>; shutdown: AsyncParallelHook<[]>;
}; };
@ -684,7 +684,7 @@ declare class Chunk {
} }
type ChunkFilename = type ChunkFilename =
| string | string
| ((pathData: PathData, assetInfo: AssetInfo) => string); | ((pathData: PathData, assetInfo?: AssetInfo) => string);
declare class ChunkGraph { declare class ChunkGraph {
constructor(moduleGraph: ModuleGraph); constructor(moduleGraph: ModuleGraph);
moduleGraph: ModuleGraph; moduleGraph: ModuleGraph;
@ -1096,11 +1096,11 @@ declare class Compilation {
*/ */
constructor(compiler: Compiler); constructor(compiler: Compiler);
hooks: Readonly<{ hooks: Readonly<{
buildModule: SyncHook<[Module], void>; buildModule: SyncHook<[Module]>;
rebuildModule: SyncHook<[Module], void>; rebuildModule: SyncHook<[Module]>;
failedModule: SyncHook<[Module, WebpackError], void>; failedModule: SyncHook<[Module, WebpackError]>;
succeedModule: SyncHook<[Module], void>; succeedModule: SyncHook<[Module]>;
stillValidModule: SyncHook<[Module], void>; stillValidModule: SyncHook<[Module]>;
addEntry: SyncHook< addEntry: SyncHook<
[ [
Dependency, Dependency,
@ -1113,8 +1113,7 @@ declare class Compilation {
| "runtime" | "runtime"
| "wasmLoading" | "wasmLoading"
> >
], ]
void
>; >;
failedEntry: SyncHook< failedEntry: SyncHook<
[ [
@ -1129,8 +1128,7 @@ declare class Compilation {
| "wasmLoading" | "wasmLoading"
>, >,
Error Error
], ]
void
>; >;
succeedEntry: SyncHook< succeedEntry: SyncHook<
[ [
@ -1145,8 +1143,7 @@ declare class Compilation {
| "wasmLoading" | "wasmLoading"
>, >,
Module Module
], ]
void
>; >;
dependencyReferencedExports: SyncWaterfallHook< dependencyReferencedExports: SyncWaterfallHook<
[ [
@ -1157,64 +1154,61 @@ declare class Compilation {
>; >;
finishModules: AsyncSeriesHook<[Iterable<Module>]>; finishModules: AsyncSeriesHook<[Iterable<Module>]>;
finishRebuildingModule: AsyncSeriesHook<[Module]>; finishRebuildingModule: AsyncSeriesHook<[Module]>;
unseal: SyncHook<[], void>; unseal: SyncHook<[]>;
seal: SyncHook<[], void>; seal: SyncHook<[]>;
beforeChunks: SyncHook<[], void>; beforeChunks: SyncHook<[]>;
afterChunks: SyncHook<[Iterable<Chunk>], void>; afterChunks: SyncHook<[Iterable<Chunk>]>;
optimizeDependencies: SyncBailHook<[Iterable<Module>], any>; optimizeDependencies: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeDependencies: SyncHook<[Iterable<Module>], void>; afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
optimize: SyncHook<[], void>; optimize: SyncHook<[]>;
optimizeModules: SyncBailHook<[Iterable<Module>], any>; optimizeModules: SyncBailHook<[Iterable<Module>], any>;
afterOptimizeModules: SyncHook<[Iterable<Module>], void>; afterOptimizeModules: SyncHook<[Iterable<Module>]>;
optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>; optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>;
afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]], void>; afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>; optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>], void>; afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
optimizeChunkModules: AsyncSeriesBailHook< optimizeChunkModules: AsyncSeriesBailHook<
[Iterable<Chunk>, Iterable<Module>], [Iterable<Chunk>, Iterable<Module>],
any any
>; >;
afterOptimizeChunkModules: SyncHook< afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
[Iterable<Chunk>, Iterable<Module>],
void
>;
shouldRecord: SyncBailHook<[], boolean>; shouldRecord: SyncBailHook<[], boolean>;
additionalChunkRuntimeRequirements: SyncHook<[Chunk, Set<string>], void>; additionalChunkRuntimeRequirements: SyncHook<[Chunk, Set<string>]>;
runtimeRequirementInChunk: HookMap<SyncBailHook<[Chunk, Set<string>], any>>; runtimeRequirementInChunk: HookMap<SyncBailHook<[Chunk, Set<string>], any>>;
additionalModuleRuntimeRequirements: SyncHook<[Module, Set<string>], void>; additionalModuleRuntimeRequirements: SyncHook<[Module, Set<string>]>;
runtimeRequirementInModule: HookMap< runtimeRequirementInModule: HookMap<
SyncBailHook<[Module, Set<string>], any> SyncBailHook<[Module, Set<string>], any>
>; >;
additionalTreeRuntimeRequirements: SyncHook<[Chunk, Set<string>], void>; additionalTreeRuntimeRequirements: SyncHook<[Chunk, Set<string>]>;
runtimeRequirementInTree: HookMap<SyncBailHook<[Chunk, Set<string>], any>>; runtimeRequirementInTree: HookMap<SyncBailHook<[Chunk, Set<string>], any>>;
runtimeModule: SyncHook<[RuntimeModule, Chunk], void>; runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
reviveModules: SyncHook<[Iterable<Module>, any], void>; reviveModules: SyncHook<[Iterable<Module>, any]>;
beforeModuleIds: SyncHook<[Iterable<Module>], void>; beforeModuleIds: SyncHook<[Iterable<Module>]>;
moduleIds: SyncHook<[Iterable<Module>], void>; moduleIds: SyncHook<[Iterable<Module>]>;
optimizeModuleIds: SyncHook<[Iterable<Module>], void>; optimizeModuleIds: SyncHook<[Iterable<Module>]>;
afterOptimizeModuleIds: SyncHook<[Iterable<Module>], void>; afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
reviveChunks: SyncHook<[Iterable<Chunk>, any], void>; reviveChunks: SyncHook<[Iterable<Chunk>, any]>;
beforeChunkIds: SyncHook<[Iterable<Chunk>], void>; beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
chunkIds: SyncHook<[Iterable<Chunk>], void>; chunkIds: SyncHook<[Iterable<Chunk>]>;
optimizeChunkIds: SyncHook<[Iterable<Chunk>], void>; optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>], void>; afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
recordModules: SyncHook<[Iterable<Module>, any], void>; recordModules: SyncHook<[Iterable<Module>, any]>;
recordChunks: SyncHook<[Iterable<Chunk>, any], void>; recordChunks: SyncHook<[Iterable<Chunk>, any]>;
optimizeCodeGeneration: SyncHook<[Iterable<Module>], void>; optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
beforeModuleHash: SyncHook<[], void>; beforeModuleHash: SyncHook<[]>;
afterModuleHash: SyncHook<[], void>; afterModuleHash: SyncHook<[]>;
beforeCodeGeneration: SyncHook<[], void>; beforeCodeGeneration: SyncHook<[]>;
afterCodeGeneration: SyncHook<[], void>; afterCodeGeneration: SyncHook<[]>;
beforeRuntimeRequirements: SyncHook<[], void>; beforeRuntimeRequirements: SyncHook<[]>;
afterRuntimeRequirements: SyncHook<[], void>; afterRuntimeRequirements: SyncHook<[]>;
beforeHash: SyncHook<[], void>; beforeHash: SyncHook<[]>;
contentHash: SyncHook<[Chunk], void>; contentHash: SyncHook<[Chunk]>;
afterHash: SyncHook<[], void>; afterHash: SyncHook<[]>;
recordHash: SyncHook<[any], void>; recordHash: SyncHook<[any]>;
record: SyncHook<[Compilation, any], void>; record: SyncHook<[Compilation, any]>;
beforeModuleAssets: SyncHook<[], void>; beforeModuleAssets: SyncHook<[]>;
shouldGenerateChunkAssets: SyncBailHook<[], boolean>; shouldGenerateChunkAssets: SyncBailHook<[], boolean>;
beforeChunkAssets: SyncHook<[], void>; beforeChunkAssets: SyncHook<[]>;
additionalChunkAssets: Pick< additionalChunkAssets: Pick<
AsyncSeriesHook<[Set<Chunk>]>, AsyncSeriesHook<[Set<Chunk>]>,
"tap" | "tapAsync" | "tapPromise" | "name" "tap" | "tapAsync" | "tapPromise" | "name"
@ -1236,9 +1230,9 @@ declare class Compilation {
> & > &
FakeHookMarker; FakeHookMarker;
optimizeAssets: AsyncSeriesHook<[Record<string, Source>]>; optimizeAssets: AsyncSeriesHook<[Record<string, Source>]>;
afterOptimizeAssets: SyncHook<[Record<string, Source>], void>; afterOptimizeAssets: SyncHook<[Record<string, Source>]>;
processAssets: AsyncSeriesHook<[Record<string, Source>]>; processAssets: AsyncSeriesHook<[Record<string, Source>]>;
afterProcessAssets: SyncHook<[Record<string, Source>], void>; afterProcessAssets: SyncHook<[Record<string, Source>]>;
needAdditionalSeal: SyncBailHook<[], boolean>; needAdditionalSeal: SyncBailHook<[], boolean>;
afterSeal: AsyncSeriesHook<[]>; afterSeal: AsyncSeriesHook<[]>;
renderManifest: SyncWaterfallHook< renderManifest: SyncWaterfallHook<
@ -1247,21 +1241,21 @@ declare class Compilation {
RenderManifestOptions RenderManifestOptions
] ]
>; >;
fullHash: SyncHook<[Hash], void>; fullHash: SyncHook<[Hash]>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext], void>; chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
moduleAsset: SyncHook<[Module, string], void>; moduleAsset: SyncHook<[Module, string]>;
chunkAsset: SyncHook<[Chunk, string], void>; chunkAsset: SyncHook<[Chunk, string]>;
assetPath: SyncWaterfallHook<[string, any, AssetInfo]>; assetPath: SyncWaterfallHook<[string, any, AssetInfo]>;
needAdditionalPass: SyncBailHook<[], boolean>; needAdditionalPass: SyncBailHook<[], boolean>;
childCompiler: SyncHook<[Compiler, string, number], void>; childCompiler: SyncHook<[Compiler, string, number]>;
log: SyncBailHook<[string, LogEntry], true>; log: SyncBailHook<[string, LogEntry], true>;
processWarnings: SyncWaterfallHook<[WebpackError[]]>; processWarnings: SyncWaterfallHook<[WebpackError[]]>;
processErrors: SyncWaterfallHook<[WebpackError[]]>; processErrors: SyncWaterfallHook<[WebpackError[]]>;
statsPreset: HookMap<SyncHook<[any, any], void>>; statsPreset: HookMap<SyncHook<[any, any]>>;
statsNormalize: SyncHook<[any, any], void>; statsNormalize: SyncHook<[any, any]>;
statsFactory: SyncHook<[StatsFactory, any], void>; statsFactory: SyncHook<[StatsFactory, any]>;
statsPrinter: SyncHook<[StatsPrinter, any], void>; statsPrinter: SyncHook<[StatsPrinter, any]>;
readonly normalModuleLoader: SyncHook<[any, NormalModule], void>; readonly normalModuleLoader: SyncHook<[any, NormalModule]>;
}>; }>;
name: string; name: string;
startTime: any; startTime: any;
@ -1597,7 +1591,7 @@ declare interface CompilationHooksJavascriptModulesPlugin {
renderMain: SyncWaterfallHook<[Source, RenderContextObject]>; renderMain: SyncWaterfallHook<[Source, RenderContextObject]>;
render: SyncWaterfallHook<[Source, RenderContextObject]>; render: SyncWaterfallHook<[Source, RenderContextObject]>;
renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext]>; renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext]>;
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext], void>; chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
useSourceMap: SyncBailHook<[Chunk, RenderContextObject], boolean>; useSourceMap: SyncBailHook<[Chunk, RenderContextObject], boolean>;
} }
declare interface CompilationParams { declare interface CompilationParams {
@ -1607,34 +1601,34 @@ declare interface CompilationParams {
declare class Compiler { declare class Compiler {
constructor(context: string); constructor(context: string);
hooks: Readonly<{ hooks: Readonly<{
initialize: SyncHook<[], void>; initialize: SyncHook<[]>;
shouldEmit: SyncBailHook<[Compilation], boolean>; shouldEmit: SyncBailHook<[Compilation], boolean>;
done: AsyncSeriesHook<[Stats]>; done: AsyncSeriesHook<[Stats]>;
afterDone: SyncHook<[Stats], void>; afterDone: SyncHook<[Stats]>;
additionalPass: AsyncSeriesHook<[]>; additionalPass: AsyncSeriesHook<[]>;
beforeRun: AsyncSeriesHook<[Compiler]>; beforeRun: AsyncSeriesHook<[Compiler]>;
run: AsyncSeriesHook<[Compiler]>; run: AsyncSeriesHook<[Compiler]>;
emit: AsyncSeriesHook<[Compilation]>; emit: AsyncSeriesHook<[Compilation]>;
assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>; assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>;
afterEmit: AsyncSeriesHook<[Compilation]>; afterEmit: AsyncSeriesHook<[Compilation]>;
thisCompilation: SyncHook<[Compilation, CompilationParams], void>; thisCompilation: SyncHook<[Compilation, CompilationParams]>;
compilation: SyncHook<[Compilation, CompilationParams], void>; compilation: SyncHook<[Compilation, CompilationParams]>;
normalModuleFactory: SyncHook<[NormalModuleFactory], void>; normalModuleFactory: SyncHook<[NormalModuleFactory]>;
contextModuleFactory: SyncHook<[ContextModuleFactory], void>; contextModuleFactory: SyncHook<[ContextModuleFactory]>;
beforeCompile: AsyncSeriesHook<[CompilationParams]>; beforeCompile: AsyncSeriesHook<[CompilationParams]>;
compile: SyncHook<[CompilationParams], void>; compile: SyncHook<[CompilationParams]>;
make: AsyncParallelHook<[Compilation]>; make: AsyncParallelHook<[Compilation]>;
finishMake: AsyncParallelHook<[Compilation]>; finishMake: AsyncParallelHook<[Compilation]>;
afterCompile: AsyncSeriesHook<[Compilation]>; afterCompile: AsyncSeriesHook<[Compilation]>;
watchRun: AsyncSeriesHook<[Compiler]>; watchRun: AsyncSeriesHook<[Compiler]>;
failed: SyncHook<[Error], void>; failed: SyncHook<[Error]>;
invalid: SyncHook<[string, number], void>; invalid: SyncHook<[string, number]>;
watchClose: SyncHook<[], void>; watchClose: SyncHook<[]>;
infrastructureLog: SyncBailHook<[string, string, any[]], true>; infrastructureLog: SyncBailHook<[string, string, any[]], true>;
environment: SyncHook<[], void>; environment: SyncHook<[]>;
afterEnvironment: SyncHook<[], void>; afterEnvironment: SyncHook<[]>;
afterPlugins: SyncHook<[Compiler], void>; afterPlugins: SyncHook<[Compiler]>;
afterResolvers: SyncHook<[Compiler], void>; afterResolvers: SyncHook<[Compiler]>;
entryOption: SyncBailHook<[string, EntryNormalized], boolean>; entryOption: SyncBailHook<[string, EntryNormalized], boolean>;
}>; }>;
webpack: typeof exports; webpack: typeof exports;
@ -2194,8 +2188,20 @@ declare class DefinePlugin {
/** /**
* Create a new define plugin * Create a new define plugin
*/ */
constructor(definitions: Record<string, RecursiveArrayOrRecord>); constructor(
definitions: Record<string, RecursiveArrayOrRecord>; 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 * Apply the plugin
@ -3213,7 +3219,7 @@ type ExternalItem =
| { [index: string]: string | boolean | string[] | { [index: string]: any } } | { [index: string]: string | boolean | string[] | { [index: string]: any } }
| (( | ((
data: { context: string; request: string }, data: { context: string; request: string },
callback: (err: Error, result: string) => void callback: (err?: Error, result?: string) => void
) => void); ) => void);
declare class ExternalModule extends Module { declare class ExternalModule extends Module {
constructor(request?: any, type?: any, userRequest?: any); constructor(request?: any, type?: any, userRequest?: any);
@ -3237,7 +3243,7 @@ type Externals =
| { [index: string]: string | boolean | string[] | { [index: string]: any } } | { [index: string]: string | boolean | string[] | { [index: string]: any } }
| (( | ((
data: { context: string; request: string }, data: { context: string; request: string },
callback: (err: Error, result: string) => void callback: (err?: Error, result?: string) => void
) => void); ) => void);
declare class ExternalsPlugin { declare class ExternalsPlugin {
constructor(type: string, externals: Externals); constructor(type: string, externals: Externals);
@ -3444,7 +3450,7 @@ declare interface FileSystem {
}; };
} }
declare interface FileSystemCallback<T> { declare interface FileSystemCallback<T> {
(err: PossibleFileSystemError & Error, result: T): any; (err?: PossibleFileSystemError & Error, result?: T): any;
} }
declare interface FileSystemDirent { declare interface FileSystemDirent {
name: string | Buffer; name: string | Buffer;
@ -3526,7 +3532,9 @@ declare interface FileSystemStats {
isDirectory: () => boolean; isDirectory: () => boolean;
isFile: () => 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 FilterItemTypes = string | RegExp | ((value: string) => boolean);
type FilterTypes = type FilterTypes =
| string | 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. * 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. * The prefix length of the hash digest to use, defaults to 4.
@ -5314,10 +5322,10 @@ declare abstract class ModuleTemplate {
declare class MultiCompiler { declare class MultiCompiler {
constructor(compilers: Compiler[] | Record<string, Compiler>); constructor(compilers: Compiler[] | Record<string, Compiler>);
hooks: Readonly<{ hooks: Readonly<{
done: SyncHook<[MultiStats], void>; done: SyncHook<[MultiStats]>;
invalid: MultiHook<SyncHook<[string, number], void>>; invalid: MultiHook<SyncHook<[string, number]>>;
run: MultiHook<AsyncSeriesHook<[Compiler]>>; run: MultiHook<AsyncSeriesHook<[Compiler]>>;
watchClose: SyncHook<[], void>; watchClose: SyncHook<[]>;
watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>; watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
infrastructureLog: MultiHook<SyncBailHook<[string, string, any[]], true>>; infrastructureLog: MultiHook<SyncBailHook<[string, string, any[]], true>>;
}>; }>;
@ -5626,8 +5634,8 @@ declare class NormalModule extends Module {
static deserialize(context?: any): NormalModule; static deserialize(context?: any): NormalModule;
} }
declare interface NormalModuleCompilationHooks { declare interface NormalModuleCompilationHooks {
loader: SyncHook<[any, NormalModule], void>; loader: SyncHook<[any, NormalModule]>;
beforeLoaders: SyncHook<[LoaderItem[], NormalModule, any], void>; beforeLoaders: SyncHook<[LoaderItem[], NormalModule, any]>;
readResourceForScheme: HookMap< readResourceForScheme: HookMap<
AsyncSeriesBailHook<[string, NormalModule], string | Buffer> AsyncSeriesBailHook<[string, NormalModule], string | Buffer>
>; >;
@ -5656,9 +5664,9 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
createModule: AsyncSeriesBailHook<[any, ResolveData], any>; createModule: AsyncSeriesBailHook<[any, ResolveData], any>;
module: SyncWaterfallHook<[Module, any, ResolveData]>; module: SyncWaterfallHook<[Module, any, ResolveData]>;
createParser: HookMap<SyncBailHook<any, any>>; createParser: HookMap<SyncBailHook<any, any>>;
parser: HookMap<SyncHook<any, void>>; parser: HookMap<SyncHook<any>>;
createGenerator: HookMap<SyncBailHook<any, any>>; createGenerator: HookMap<SyncBailHook<any, any>>;
generator: HookMap<SyncHook<any, void>>; generator: HookMap<SyncHook<any>>;
}>; }>;
resolverFactory: ResolverFactory; resolverFactory: ResolverFactory;
ruleSet: RuleSet; ruleSet: RuleSet;
@ -5914,7 +5922,7 @@ declare interface OptimizationSplitChunksCacheGroup {
/** /**
* Sets the template for the filename for created chunks. * 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. * Sets the hint for chunk id.
@ -6057,7 +6065,7 @@ declare interface OptimizationSplitChunksOptions {
/** /**
* Sets the template for the filename for created chunks. * 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. * Prevents exposing path info when creating names for parts splitted by maxSize.
@ -6862,13 +6870,13 @@ declare interface ProvidesObject {
} }
type PublicPath = type PublicPath =
| string | string
| ((pathData: PathData, assetInfo: AssetInfo) => string); | ((pathData: PathData, assetInfo?: AssetInfo) => string);
declare interface RawChunkGroupOptions { declare interface RawChunkGroupOptions {
preloadOrder?: number; preloadOrder?: number;
prefetchOrder?: number; prefetchOrder?: number;
} }
declare class RawSource extends Source { declare class RawSource extends Source {
constructor(source: string | Buffer, convertToString: boolean); constructor(source: string | Buffer, convertToString?: boolean);
isBuffer(): boolean; isBuffer(): boolean;
} }
declare class ReadFileCompileWasmPlugin { declare class ReadFileCompileWasmPlugin {
@ -6885,16 +6893,10 @@ declare interface RealDependencyLocation {
end?: SourcePosition; end?: SourcePosition;
index?: number; index?: number;
} }
type RecursiveArrayOrRecord = type RecursiveArrayOrRecord<T> =
| string | { [index: string]: RecursiveArrayOrRecord<T> }
| number | RecursiveArrayOrRecord<T>[]
| bigint | T;
| boolean
| Function
| RegExp
| RuntimeValue
| { [index: string]: RecursiveArrayOrRecord }
| RecursiveArrayOrRecord[];
declare interface ReferencedExport { declare interface ReferencedExport {
/** /**
* name of the referenced export * name of the referenced export
@ -7045,9 +7047,9 @@ declare interface RenderManifestOptions {
chunkGraph: ChunkGraph; chunkGraph: ChunkGraph;
} }
declare class ReplaceSource extends Source { declare class ReplaceSource extends Source {
constructor(source: Source, name: string); constructor(source: Source, name?: string);
replace(start: number, end: number, newValue: string, name: string): void; replace(start: number, end: number, newValue: string, name?: string): void;
insert(pos: number, newValue: string, name: string): void; insert(pos: number, newValue: string, name?: string): void;
getName(): string; getName(): string;
original(): string; original(): string;
getReplacements(): { getReplacements(): {
@ -7376,10 +7378,9 @@ declare abstract class Resolver {
[ [
AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest>, AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest>,
ResolveRequest ResolveRequest
], ]
void
>; >;
noResolve: SyncHook<[ResolveRequest, Error], void>; noResolve: SyncHook<[ResolveRequest, Error]>;
resolve: AsyncSeriesBailHook< resolve: AsyncSeriesBailHook<
[ResolveRequest, ResolveContext], [ResolveRequest, ResolveContext],
ResolveRequest ResolveRequest
@ -7402,7 +7403,7 @@ declare abstract class Resolver {
path: string, path: string,
request: string, request: string,
resolveContext: ResolveContext, resolveContext: ResolveContext,
callback: (arg0: Error, arg1: DevTool, arg2: ResolveRequest) => void callback: (arg0: Error, arg1?: DevTool, arg2?: ResolveRequest) => void
): void; ): void;
doResolve( doResolve(
hook?: any, hook?: any,
@ -7651,8 +7652,7 @@ declare abstract class ResolverFactory {
dependencyType?: string; dependencyType?: string;
resolveToContext?: boolean; resolveToContext?: boolean;
} }
], ]
void
> >
>; >;
}>; }>;
@ -8695,8 +8695,8 @@ declare abstract class SortableSet<T> extends Set<T> {
declare class Source { declare class Source {
constructor(); constructor();
size(): number; size(): number;
map(options: MapOptions): Object; map(options?: MapOptions): Object;
sourceAndMap(options: MapOptions): { source: string | Buffer; map: Object }; sourceAndMap(options?: MapOptions): { source: string | Buffer; map: Object };
updateHash(hash: Hash): void; updateHash(hash: Hash): void;
source(): string | Buffer; source(): string | Buffer;
buffer(): Buffer; buffer(): Buffer;
@ -8799,8 +8799,8 @@ declare class SourceMapSource extends Source {
source: string | Buffer, source: string | Buffer,
name: string, name: string,
sourceMap: string | Object | Buffer, sourceMap: string | Object | Buffer,
originalSource: string | Buffer, originalSource?: string | Buffer,
innerSourceMap: string | Object | Buffer innerSourceMap?: string | Object | Buffer
); );
getArgsAsBuffers(): [Buffer, string, Buffer, Buffer, Buffer]; getArgsAsBuffers(): [Buffer, string, Buffer, Buffer, Buffer];
} }

1503
yarn.lock

File diff suppressed because it is too large Load Diff