webpack 5.79.0 → 5.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/README.md +3 -0
- package/lib/NormalModuleFactory.js +11 -1
- package/lib/WarnCaseSensitiveModulesPlugin.js +12 -0
- package/lib/asset/AssetGenerator.js +11 -3
- package/lib/css/CssParser.js +109 -14
- package/lib/css/walkCssTokens.js +129 -74
- package/lib/dependencies/CssUrlDependency.js +30 -18
- package/lib/dependencies/ImportMetaPlugin.js +56 -26
- package/lib/dependencies/ImportParserPlugin.js +17 -1
- package/lib/ids/OccurrenceModuleIdsPlugin.js +1 -1
- package/lib/javascript/JavascriptParser.js +13 -3
- package/lib/schemes/DataUriPlugin.js +12 -3
- package/lib/stats/DefaultStatsFactoryPlugin.js +98 -25
- package/lib/stats/DefaultStatsPresetPlugin.js +9 -0
- package/lib/stats/DefaultStatsPrinterPlugin.js +4 -0
- package/package.json +16 -18
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +8 -0
- package/types.d.ts +53 -17
@@ -4713,6 +4713,10 @@
|
|
4713
4713
|
"description": "Add errors count.",
|
4714
4714
|
"type": "boolean"
|
4715
4715
|
},
|
4716
|
+
"errorsSpace": {
|
4717
|
+
"description": "Space to display errors (value is in number of lines).",
|
4718
|
+
"type": "number"
|
4719
|
+
},
|
4716
4720
|
"exclude": {
|
4717
4721
|
"description": "Please use excludeModules instead.",
|
4718
4722
|
"cli": {
|
@@ -4945,6 +4949,10 @@
|
|
4945
4949
|
"$ref": "#/definitions/WarningFilterTypes"
|
4946
4950
|
}
|
4947
4951
|
]
|
4952
|
+
},
|
4953
|
+
"warningsSpace": {
|
4954
|
+
"description": "Space to display warnings (value is in number of lines).",
|
4955
|
+
"type": "number"
|
4948
4956
|
}
|
4949
4957
|
}
|
4950
4958
|
},
|
package/types.d.ts
CHANGED
@@ -4191,17 +4191,31 @@ declare interface FileSystem {
|
|
4191
4191
|
arg2: FileSystemCallback<string | Buffer>
|
4192
4192
|
): void;
|
4193
4193
|
};
|
4194
|
-
readdir:
|
4195
|
-
|
4196
|
-
|
4197
|
-
|
4198
|
-
|
4199
|
-
|
4200
|
-
|
4201
|
-
|
4202
|
-
|
4203
|
-
|
4204
|
-
|
4194
|
+
readdir: (
|
4195
|
+
arg0: string,
|
4196
|
+
arg1?:
|
4197
|
+
| null
|
4198
|
+
| "ascii"
|
4199
|
+
| "utf8"
|
4200
|
+
| "utf16le"
|
4201
|
+
| "ucs2"
|
4202
|
+
| "latin1"
|
4203
|
+
| "binary"
|
4204
|
+
| ((
|
4205
|
+
arg0?: null | NodeJS.ErrnoException,
|
4206
|
+
arg1?: any[] | (string | Buffer)[]
|
4207
|
+
) => void)
|
4208
|
+
| ReaddirOptions
|
4209
|
+
| "utf-8"
|
4210
|
+
| "ucs-2"
|
4211
|
+
| "base64"
|
4212
|
+
| "hex"
|
4213
|
+
| "buffer",
|
4214
|
+
arg2?: (
|
4215
|
+
arg0?: null | NodeJS.ErrnoException,
|
4216
|
+
arg1?: any[] | (string | Buffer)[]
|
4217
|
+
) => void
|
4218
|
+
) => void;
|
4205
4219
|
readJson?: {
|
4206
4220
|
(arg0: string, arg1: FileSystemCallback<object>): void;
|
4207
4221
|
(arg0: string, arg1: object, arg2: FileSystemCallback<object>): void;
|
@@ -4234,11 +4248,6 @@ declare interface FileSystem {
|
|
4234
4248
|
declare interface FileSystemCallback<T> {
|
4235
4249
|
(err?: null | (PossibleFileSystemError & Error), result?: T): any;
|
4236
4250
|
}
|
4237
|
-
declare interface FileSystemDirent {
|
4238
|
-
name: string | Buffer;
|
4239
|
-
isDirectory: () => boolean;
|
4240
|
-
isFile: () => boolean;
|
4241
|
-
}
|
4242
4251
|
declare abstract class FileSystemInfo {
|
4243
4252
|
fs: InputFileSystem;
|
4244
4253
|
logger?: WebpackLogger;
|
@@ -4590,7 +4599,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
4590
4599
|
/**
|
4591
4600
|
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
4592
4601
|
*/
|
4593
|
-
hashDigest?: "latin1" | "
|
4602
|
+
hashDigest?: "latin1" | "base64" | "hex";
|
4594
4603
|
|
4595
4604
|
/**
|
4596
4605
|
* The prefix length of the hash digest to use, defaults to 4.
|
@@ -6589,6 +6598,7 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
|
|
6589
6598
|
data?: object;
|
6590
6599
|
pitchExecuted: boolean;
|
6591
6600
|
normalExecuted: boolean;
|
6601
|
+
type?: "module" | "commonjs";
|
6592
6602
|
}[];
|
6593
6603
|
|
6594
6604
|
/**
|
@@ -9410,6 +9420,22 @@ declare class ReadFileCompileWasmPlugin {
|
|
9410
9420
|
*/
|
9411
9421
|
apply(compiler: Compiler): void;
|
9412
9422
|
}
|
9423
|
+
declare interface ReaddirOptions {
|
9424
|
+
encoding?:
|
9425
|
+
| null
|
9426
|
+
| "ascii"
|
9427
|
+
| "utf8"
|
9428
|
+
| "utf16le"
|
9429
|
+
| "ucs2"
|
9430
|
+
| "latin1"
|
9431
|
+
| "binary"
|
9432
|
+
| "utf-8"
|
9433
|
+
| "ucs-2"
|
9434
|
+
| "base64"
|
9435
|
+
| "hex"
|
9436
|
+
| "buffer";
|
9437
|
+
withFileTypes?: boolean;
|
9438
|
+
}
|
9413
9439
|
declare class RealContentHashPlugin {
|
9414
9440
|
constructor(__0: { hashFunction: any; hashDigest: any });
|
9415
9441
|
|
@@ -11591,6 +11617,11 @@ declare interface StatsOptions {
|
|
11591
11617
|
*/
|
11592
11618
|
errorsCount?: boolean;
|
11593
11619
|
|
11620
|
+
/**
|
11621
|
+
* Space to display errors (value is in number of lines).
|
11622
|
+
*/
|
11623
|
+
errorsSpace?: number;
|
11624
|
+
|
11594
11625
|
/**
|
11595
11626
|
* Please use excludeModules instead.
|
11596
11627
|
*/
|
@@ -11851,6 +11882,11 @@ declare interface StatsOptions {
|
|
11851
11882
|
| RegExp
|
11852
11883
|
| WarningFilterItemTypes[]
|
11853
11884
|
| ((warning: StatsError, value: string) => boolean);
|
11885
|
+
|
11886
|
+
/**
|
11887
|
+
* Space to display warnings (value is in number of lines).
|
11888
|
+
*/
|
11889
|
+
warningsSpace?: number;
|
11854
11890
|
}
|
11855
11891
|
declare abstract class StatsPrinter {
|
11856
11892
|
hooks: Readonly<{
|