webpack 5.78.0 → 5.79.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/lib/CompatibilityPlugin.js +27 -10
- package/lib/Compiler.js +7 -4
- package/lib/DefinePlugin.js +18 -6
- package/lib/LibManifestPlugin.js +2 -1
- package/lib/NormalModuleReplacementPlugin.js +1 -1
- package/lib/css/CssLoadingRuntimeModule.js +1 -1
- package/lib/css/CssParser.js +6 -6
- package/lib/css/walkCssTokens.js +6 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +4 -0
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +28 -3
- package/lib/index.js +5 -0
- package/lib/javascript/JavascriptParser.js +88 -0
- package/lib/stats/DefaultStatsPrinterPlugin.js +14 -0
- package/lib/util/hash/md4.js +2 -2
- package/lib/util/hash/xxhash64.js +1 -1
- package/lib/webpack.js +1 -1
- package/package.json +41 -36
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/plugins/ProgressPlugin.check.js +1 -1
- package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
- package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
- package/schemas/plugins/sharing/SharePlugin.check.js +1 -1
- package/types.d.ts +142 -122
package/types.d.ts
CHANGED
@@ -82,7 +82,11 @@ import {
|
|
82
82
|
WithStatement,
|
83
83
|
YieldExpression
|
84
84
|
} from "estree";
|
85
|
-
import {
|
85
|
+
import {
|
86
|
+
IncomingMessage,
|
87
|
+
ServerOptions as ServerOptionsImport,
|
88
|
+
ServerResponse
|
89
|
+
} from "http";
|
86
90
|
import { ListenOptions, Server } from "net";
|
87
91
|
import { validate as validateFunction } from "schema-utils";
|
88
92
|
import { default as ValidationError } from "schema-utils/declarations/ValidationError";
|
@@ -3825,32 +3829,32 @@ declare interface ExposesObject {
|
|
3825
3829
|
}
|
3826
3830
|
type Expression =
|
3827
3831
|
| UnaryExpression
|
3828
|
-
| ThisExpression
|
3829
3832
|
| ArrayExpression
|
3830
|
-
| ObjectExpression
|
3831
|
-
| FunctionExpression
|
3832
3833
|
| ArrowFunctionExpression
|
3833
|
-
|
|
3834
|
+
| AssignmentExpression
|
3835
|
+
| AwaitExpression
|
3836
|
+
| BinaryExpression
|
3837
|
+
| SimpleCallExpression
|
3838
|
+
| NewExpression
|
3839
|
+
| ChainExpression
|
3840
|
+
| ClassExpression
|
3841
|
+
| ConditionalExpression
|
3842
|
+
| FunctionExpression
|
3843
|
+
| Identifier
|
3844
|
+
| ImportExpression
|
3834
3845
|
| SimpleLiteral
|
3835
3846
|
| RegExpLiteral
|
3836
3847
|
| BigIntLiteral
|
3837
|
-
| UpdateExpression
|
3838
|
-
| BinaryExpression
|
3839
|
-
| AssignmentExpression
|
3840
3848
|
| LogicalExpression
|
3841
3849
|
| MemberExpression
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
| NewExpression
|
3850
|
+
| MetaProperty
|
3851
|
+
| ObjectExpression
|
3845
3852
|
| SequenceExpression
|
3846
|
-
| TemplateLiteral
|
3847
3853
|
| TaggedTemplateExpression
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
| ImportExpression
|
3853
|
-
| ChainExpression;
|
3854
|
+
| TemplateLiteral
|
3855
|
+
| ThisExpression
|
3856
|
+
| UpdateExpression
|
3857
|
+
| YieldExpression;
|
3854
3858
|
declare interface ExpressionExpressionInfo {
|
3855
3859
|
type: "expression";
|
3856
3860
|
rootInfo: string | VariableInfo;
|
@@ -4946,13 +4950,13 @@ declare class JavascriptParser extends Parser {
|
|
4946
4950
|
>;
|
4947
4951
|
evaluateIdentifier: HookMap<
|
4948
4952
|
SyncBailHook<
|
4949
|
-
[
|
4953
|
+
[Identifier | MemberExpression | MetaProperty | ThisExpression],
|
4950
4954
|
undefined | null | BasicEvaluatedExpression
|
4951
4955
|
>
|
4952
4956
|
>;
|
4953
4957
|
evaluateDefinedIdentifier: HookMap<
|
4954
4958
|
SyncBailHook<
|
4955
|
-
[
|
4959
|
+
[Identifier | MemberExpression | ThisExpression],
|
4956
4960
|
undefined | null | BasicEvaluatedExpression
|
4957
4961
|
>
|
4958
4962
|
>;
|
@@ -4976,32 +4980,32 @@ declare class JavascriptParser extends Parser {
|
|
4976
4980
|
[
|
4977
4981
|
(
|
4978
4982
|
| UnaryExpression
|
4979
|
-
| ThisExpression
|
4980
4983
|
| ArrayExpression
|
4981
|
-
| ObjectExpression
|
4982
|
-
| FunctionExpression
|
4983
4984
|
| ArrowFunctionExpression
|
4984
|
-
|
|
4985
|
+
| AssignmentExpression
|
4986
|
+
| AwaitExpression
|
4987
|
+
| BinaryExpression
|
4988
|
+
| SimpleCallExpression
|
4989
|
+
| NewExpression
|
4990
|
+
| ChainExpression
|
4991
|
+
| ClassExpression
|
4992
|
+
| ConditionalExpression
|
4993
|
+
| FunctionExpression
|
4994
|
+
| Identifier
|
4995
|
+
| ImportExpression
|
4985
4996
|
| SimpleLiteral
|
4986
4997
|
| RegExpLiteral
|
4987
4998
|
| BigIntLiteral
|
4988
|
-
| UpdateExpression
|
4989
|
-
| BinaryExpression
|
4990
|
-
| AssignmentExpression
|
4991
4999
|
| LogicalExpression
|
4992
5000
|
| MemberExpression
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
| NewExpression
|
5001
|
+
| MetaProperty
|
5002
|
+
| ObjectExpression
|
4996
5003
|
| SequenceExpression
|
4997
|
-
| TemplateLiteral
|
4998
5004
|
| TaggedTemplateExpression
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
| ImportExpression
|
5004
|
-
| ChainExpression
|
5005
|
+
| TemplateLiteral
|
5006
|
+
| ThisExpression
|
5007
|
+
| UpdateExpression
|
5008
|
+
| YieldExpression
|
5005
5009
|
| FunctionDeclaration
|
5006
5010
|
| VariableDeclaration
|
5007
5011
|
| ClassDeclaration
|
@@ -5223,32 +5227,32 @@ declare class JavascriptParser extends Parser {
|
|
5223
5227
|
semicolons: any;
|
5224
5228
|
statementPath: (
|
5225
5229
|
| UnaryExpression
|
5226
|
-
| ThisExpression
|
5227
5230
|
| ArrayExpression
|
5228
|
-
| ObjectExpression
|
5229
|
-
| FunctionExpression
|
5230
5231
|
| ArrowFunctionExpression
|
5231
|
-
|
|
5232
|
+
| AssignmentExpression
|
5233
|
+
| AwaitExpression
|
5234
|
+
| BinaryExpression
|
5235
|
+
| SimpleCallExpression
|
5236
|
+
| NewExpression
|
5237
|
+
| ChainExpression
|
5238
|
+
| ClassExpression
|
5239
|
+
| ConditionalExpression
|
5240
|
+
| FunctionExpression
|
5241
|
+
| Identifier
|
5242
|
+
| ImportExpression
|
5232
5243
|
| SimpleLiteral
|
5233
5244
|
| RegExpLiteral
|
5234
5245
|
| BigIntLiteral
|
5235
|
-
| UpdateExpression
|
5236
|
-
| BinaryExpression
|
5237
|
-
| AssignmentExpression
|
5238
5246
|
| LogicalExpression
|
5239
5247
|
| MemberExpression
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
| NewExpression
|
5248
|
+
| MetaProperty
|
5249
|
+
| ObjectExpression
|
5243
5250
|
| SequenceExpression
|
5244
|
-
| TemplateLiteral
|
5245
5251
|
| TaggedTemplateExpression
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
| ImportExpression
|
5251
|
-
| ChainExpression
|
5252
|
+
| TemplateLiteral
|
5253
|
+
| ThisExpression
|
5254
|
+
| UpdateExpression
|
5255
|
+
| YieldExpression
|
5252
5256
|
| FunctionDeclaration
|
5253
5257
|
| VariableDeclaration
|
5254
5258
|
| ClassDeclaration
|
@@ -5273,7 +5277,11 @@ declare class JavascriptParser extends Parser {
|
|
5273
5277
|
| ForOfStatement
|
5274
5278
|
)[];
|
5275
5279
|
prevStatement: any;
|
5280
|
+
destructuringAssignmentProperties: WeakMap<Expression, Set<string>>;
|
5276
5281
|
currentTagData: any;
|
5282
|
+
destructuringAssignmentPropertiesFor(
|
5283
|
+
node: Expression
|
5284
|
+
): undefined | Set<string>;
|
5277
5285
|
getRenameIdentifier(expr?: any): undefined | string | VariableInfoInterface;
|
5278
5286
|
walkClass(classy: ClassExpression | ClassDeclaration): void;
|
5279
5287
|
preWalkStatements(statements?: any): void;
|
@@ -5317,6 +5325,8 @@ declare class JavascriptParser extends Parser {
|
|
5317
5325
|
walkForOfStatement(statement?: any): void;
|
5318
5326
|
preWalkFunctionDeclaration(statement?: any): void;
|
5319
5327
|
walkFunctionDeclaration(statement?: any): void;
|
5328
|
+
blockPreWalkExpressionStatement(statement?: any): void;
|
5329
|
+
preWalkAssignmentExpression(expression?: any): void;
|
5320
5330
|
blockPreWalkImportDeclaration(statement?: any): void;
|
5321
5331
|
enterDeclaration(declaration?: any, onIdent?: any): void;
|
5322
5332
|
blockPreWalkExportNamedDeclaration(statement?: any): void;
|
@@ -5326,6 +5336,7 @@ declare class JavascriptParser extends Parser {
|
|
5326
5336
|
blockPreWalkExportAllDeclaration(statement?: any): void;
|
5327
5337
|
preWalkVariableDeclaration(statement?: any): void;
|
5328
5338
|
blockPreWalkVariableDeclaration(statement?: any): void;
|
5339
|
+
preWalkVariableDeclarator(declarator?: any): void;
|
5329
5340
|
walkVariableDeclaration(statement?: any): void;
|
5330
5341
|
blockPreWalkClassDeclaration(statement?: any): void;
|
5331
5342
|
walkClassDeclaration(statement?: any): void;
|
@@ -5430,32 +5441,32 @@ declare class JavascriptParser extends Parser {
|
|
5430
5441
|
| undefined
|
5431
5442
|
| null
|
5432
5443
|
| UnaryExpression
|
5433
|
-
| ThisExpression
|
5434
5444
|
| ArrayExpression
|
5435
|
-
| ObjectExpression
|
5436
|
-
| FunctionExpression
|
5437
5445
|
| ArrowFunctionExpression
|
5438
|
-
|
|
5446
|
+
| AssignmentExpression
|
5447
|
+
| AwaitExpression
|
5448
|
+
| BinaryExpression
|
5449
|
+
| SimpleCallExpression
|
5450
|
+
| NewExpression
|
5451
|
+
| ChainExpression
|
5452
|
+
| ClassExpression
|
5453
|
+
| ConditionalExpression
|
5454
|
+
| FunctionExpression
|
5455
|
+
| Identifier
|
5456
|
+
| ImportExpression
|
5439
5457
|
| SimpleLiteral
|
5440
5458
|
| RegExpLiteral
|
5441
5459
|
| BigIntLiteral
|
5442
|
-
| UpdateExpression
|
5443
|
-
| BinaryExpression
|
5444
|
-
| AssignmentExpression
|
5445
5460
|
| LogicalExpression
|
5446
5461
|
| MemberExpression
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
| NewExpression
|
5462
|
+
| MetaProperty
|
5463
|
+
| ObjectExpression
|
5450
5464
|
| SequenceExpression
|
5451
|
-
| TemplateLiteral
|
5452
5465
|
| TaggedTemplateExpression
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
| ImportExpression
|
5458
|
-
| ChainExpression
|
5466
|
+
| TemplateLiteral
|
5467
|
+
| ThisExpression
|
5468
|
+
| UpdateExpression
|
5469
|
+
| YieldExpression
|
5459
5470
|
| FunctionDeclaration
|
5460
5471
|
| VariableDeclaration
|
5461
5472
|
| ClassDeclaration
|
@@ -5481,32 +5492,32 @@ declare class JavascriptParser extends Parser {
|
|
5481
5492
|
members: string[];
|
5482
5493
|
object:
|
5483
5494
|
| UnaryExpression
|
5484
|
-
| ThisExpression
|
5485
5495
|
| ArrayExpression
|
5486
|
-
| ObjectExpression
|
5487
|
-
| FunctionExpression
|
5488
5496
|
| ArrowFunctionExpression
|
5489
|
-
|
|
5497
|
+
| AssignmentExpression
|
5498
|
+
| AwaitExpression
|
5499
|
+
| BinaryExpression
|
5500
|
+
| SimpleCallExpression
|
5501
|
+
| NewExpression
|
5502
|
+
| ChainExpression
|
5503
|
+
| ClassExpression
|
5504
|
+
| ConditionalExpression
|
5505
|
+
| FunctionExpression
|
5506
|
+
| Identifier
|
5507
|
+
| ImportExpression
|
5490
5508
|
| SimpleLiteral
|
5491
5509
|
| RegExpLiteral
|
5492
5510
|
| BigIntLiteral
|
5493
|
-
| UpdateExpression
|
5494
|
-
| BinaryExpression
|
5495
|
-
| AssignmentExpression
|
5496
5511
|
| LogicalExpression
|
5497
5512
|
| MemberExpression
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
| NewExpression
|
5513
|
+
| MetaProperty
|
5514
|
+
| ObjectExpression
|
5501
5515
|
| SequenceExpression
|
5502
|
-
| TemplateLiteral
|
5503
5516
|
| TaggedTemplateExpression
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
| ImportExpression
|
5509
|
-
| ChainExpression
|
5517
|
+
| TemplateLiteral
|
5518
|
+
| ThisExpression
|
5519
|
+
| UpdateExpression
|
5520
|
+
| YieldExpression
|
5510
5521
|
| Super;
|
5511
5522
|
membersOptionals: boolean[];
|
5512
5523
|
};
|
@@ -6133,7 +6144,10 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
6133
6144
|
/**
|
6134
6145
|
* Specifies how to create the server handling the EventSource requests.
|
6135
6146
|
*/
|
6136
|
-
server?:
|
6147
|
+
server?:
|
6148
|
+
| ServerOptionsImport<typeof IncomingMessage>
|
6149
|
+
| ServerOptionsHttps<typeof IncomingMessage, typeof ServerResponse>
|
6150
|
+
| (() => typeof Server);
|
6137
6151
|
}
|
6138
6152
|
|
6139
6153
|
/**
|
@@ -7546,32 +7560,32 @@ declare class NodeEnvironmentPlugin {
|
|
7546
7560
|
}
|
7547
7561
|
type NodeEstreeIndex =
|
7548
7562
|
| UnaryExpression
|
7549
|
-
| ThisExpression
|
7550
7563
|
| ArrayExpression
|
7551
|
-
| ObjectExpression
|
7552
|
-
| FunctionExpression
|
7553
7564
|
| ArrowFunctionExpression
|
7554
|
-
|
|
7565
|
+
| AssignmentExpression
|
7566
|
+
| AwaitExpression
|
7567
|
+
| BinaryExpression
|
7568
|
+
| SimpleCallExpression
|
7569
|
+
| NewExpression
|
7570
|
+
| ChainExpression
|
7571
|
+
| ClassExpression
|
7572
|
+
| ConditionalExpression
|
7573
|
+
| FunctionExpression
|
7574
|
+
| Identifier
|
7575
|
+
| ImportExpression
|
7555
7576
|
| SimpleLiteral
|
7556
7577
|
| RegExpLiteral
|
7557
7578
|
| BigIntLiteral
|
7558
|
-
| UpdateExpression
|
7559
|
-
| BinaryExpression
|
7560
|
-
| AssignmentExpression
|
7561
7579
|
| LogicalExpression
|
7562
7580
|
| MemberExpression
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
| NewExpression
|
7581
|
+
| MetaProperty
|
7582
|
+
| ObjectExpression
|
7566
7583
|
| SequenceExpression
|
7567
|
-
| TemplateLiteral
|
7568
7584
|
| TaggedTemplateExpression
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
| ImportExpression
|
7574
|
-
| ChainExpression
|
7585
|
+
| TemplateLiteral
|
7586
|
+
| ThisExpression
|
7587
|
+
| UpdateExpression
|
7588
|
+
| YieldExpression
|
7575
7589
|
| FunctionDeclaration
|
7576
7590
|
| VariableDeclaration
|
7577
7591
|
| ClassDeclaration
|
@@ -7603,22 +7617,22 @@ type NodeEstreeIndex =
|
|
7603
7617
|
| PropertyDefinition
|
7604
7618
|
| VariableDeclarator
|
7605
7619
|
| Program
|
7606
|
-
| SwitchCase
|
7607
|
-
| CatchClause
|
7608
|
-
| Property
|
7609
7620
|
| AssignmentProperty
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
| SpreadElement
|
7613
|
-
| ObjectPattern
|
7614
|
-
| ArrayPattern
|
7615
|
-
| RestElement
|
7616
|
-
| AssignmentPattern
|
7621
|
+
| Property
|
7622
|
+
| CatchClause
|
7617
7623
|
| ClassBody
|
7618
7624
|
| ImportSpecifier
|
7619
7625
|
| ImportDefaultSpecifier
|
7620
7626
|
| ImportNamespaceSpecifier
|
7621
|
-
| ExportSpecifier
|
7627
|
+
| ExportSpecifier
|
7628
|
+
| ObjectPattern
|
7629
|
+
| ArrayPattern
|
7630
|
+
| RestElement
|
7631
|
+
| AssignmentPattern
|
7632
|
+
| SpreadElement
|
7633
|
+
| Super
|
7634
|
+
| SwitchCase
|
7635
|
+
| TemplateElement;
|
7622
7636
|
|
7623
7637
|
/**
|
7624
7638
|
* Options object for node compatibility features.
|
@@ -7912,10 +7926,10 @@ declare class NormalModuleReplacementPlugin {
|
|
7912
7926
|
*/
|
7913
7927
|
constructor(
|
7914
7928
|
resourceRegExp: RegExp,
|
7915
|
-
newResource: string | ((arg0
|
7929
|
+
newResource: string | ((arg0: ResolveData) => void)
|
7916
7930
|
);
|
7917
7931
|
resourceRegExp: RegExp;
|
7918
|
-
newResource: string | ((arg0
|
7932
|
+
newResource: string | ((arg0: ResolveData) => void);
|
7919
7933
|
|
7920
7934
|
/**
|
7921
7935
|
* Apply the plugin
|
@@ -10888,9 +10902,10 @@ declare abstract class Serializer {
|
|
10888
10902
|
serialize(obj?: any, context?: any): any;
|
10889
10903
|
deserialize(value?: any, context?: any): any;
|
10890
10904
|
}
|
10891
|
-
type ServerOptionsHttps
|
10892
|
-
|
10893
|
-
|
10905
|
+
type ServerOptionsHttps<
|
10906
|
+
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
10907
|
+
Response extends typeof ServerResponse = typeof ServerResponse
|
10908
|
+
> = SecureContextOptions & TlsOptions & ServerOptionsImport<Request, Response>;
|
10894
10909
|
declare class SharePlugin {
|
10895
10910
|
constructor(options: SharePluginOptions);
|
10896
10911
|
|
@@ -13182,6 +13197,11 @@ declare namespace exports {
|
|
13182
13197
|
Entry,
|
13183
13198
|
EntryNormalized,
|
13184
13199
|
EntryObject,
|
13200
|
+
ExternalItemFunctionData,
|
13201
|
+
ExternalItemObjectKnown,
|
13202
|
+
ExternalItemObjectUnknown,
|
13203
|
+
ExternalItemValue,
|
13204
|
+
Externals,
|
13185
13205
|
FileCacheOptions,
|
13186
13206
|
LibraryOptions,
|
13187
13207
|
ModuleOptions,
|