webpack 5.64.4 → 5.65.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.

@@ -680,6 +680,14 @@
680
680
  "module": {
681
681
  "description": "The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').",
682
682
  "type": "boolean"
683
+ },
684
+ "optionalChaining": {
685
+ "description": "The environment supports optional chaining ('obj?.a' or 'obj?.()').",
686
+ "type": "boolean"
687
+ },
688
+ "templateLiteral": {
689
+ "description": "The environment supports template literals.",
690
+ "type": "boolean"
683
691
  }
684
692
  }
685
693
  },
package/types.d.ts CHANGED
@@ -2141,7 +2141,7 @@ declare interface Configuration {
2141
2141
  /**
2142
2142
  * Enable production optimizations or development hints.
2143
2143
  */
2144
- mode?: "development" | "production" | "none";
2144
+ mode?: "none" | "development" | "production";
2145
2145
 
2146
2146
  /**
2147
2147
  * Options affecting the normal modules (`NormalModuleFactory`).
@@ -2226,15 +2226,15 @@ declare interface Configuration {
2226
2226
  */
2227
2227
  stats?:
2228
2228
  | boolean
2229
+ | StatsOptions
2229
2230
  | "none"
2231
+ | "verbose"
2230
2232
  | "summary"
2231
2233
  | "errors-only"
2232
2234
  | "errors-warnings"
2233
2235
  | "minimal"
2234
2236
  | "normal"
2235
- | "detailed"
2236
- | "verbose"
2237
- | StatsOptions;
2237
+ | "detailed";
2238
2238
 
2239
2239
  /**
2240
2240
  * Environment to build for. An array of environments to build for all of them when possible.
@@ -3246,6 +3246,16 @@ declare interface Environment {
3246
3246
  * The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
3247
3247
  */
3248
3248
  module?: boolean;
3249
+
3250
+ /**
3251
+ * The environment supports optional chaining ('obj?.a' or 'obj?.()').
3252
+ */
3253
+ optionalChaining?: boolean;
3254
+
3255
+ /**
3256
+ * The environment supports template literals.
3257
+ */
3258
+ templateLiteral?: boolean;
3249
3259
  }
3250
3260
  declare class EnvironmentPlugin {
3251
3261
  constructor(...keys: any[]);
@@ -4547,7 +4557,7 @@ declare interface InfrastructureLogging {
4547
4557
  /**
4548
4558
  * Log level.
4549
4559
  */
4550
- level?: "none" | "verbose" | "error" | "warn" | "info" | "log";
4560
+ level?: "none" | "error" | "warn" | "info" | "log" | "verbose";
4551
4561
 
4552
4562
  /**
4553
4563
  * Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
@@ -4693,7 +4703,7 @@ declare class JavascriptModulesPlugin {
4693
4703
  static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
4694
4704
  }
4695
4705
  declare class JavascriptParser extends Parser {
4696
- constructor(sourceType?: "module" | "script" | "auto");
4706
+ constructor(sourceType?: "module" | "auto" | "script");
4697
4707
  hooks: Readonly<{
4698
4708
  evaluateTypeof: HookMap<
4699
4709
  SyncBailHook<
@@ -4963,7 +4973,7 @@ declare class JavascriptParser extends Parser {
4963
4973
  program: SyncBailHook<[Program, Comment[]], boolean | void>;
4964
4974
  finish: SyncBailHook<[Program, Comment[]], boolean | void>;
4965
4975
  }>;
4966
- sourceType: "module" | "script" | "auto";
4976
+ sourceType: "module" | "auto" | "script";
4967
4977
  scope: ScopeInfo;
4968
4978
  state: ParserState;
4969
4979
  comments: any;
@@ -5303,7 +5313,7 @@ declare interface JavascriptParserOptions {
5303
5313
  /**
5304
5314
  * Specifies the behavior of invalid export names in "import ... from ..." and "export ... from ...".
5305
5315
  */
5306
- exportsPresence?: false | "error" | "warn" | "auto";
5316
+ exportsPresence?: false | "auto" | "error" | "warn";
5307
5317
 
5308
5318
  /**
5309
5319
  * Enable warnings for full dynamic dependencies.
@@ -5338,7 +5348,7 @@ declare interface JavascriptParserOptions {
5338
5348
  /**
5339
5349
  * Specifies the behavior of invalid export names in "import ... from ...".
5340
5350
  */
5341
- importExportsPresence?: false | "error" | "warn" | "auto";
5351
+ importExportsPresence?: false | "auto" | "error" | "warn";
5342
5352
 
5343
5353
  /**
5344
5354
  * Include polyfills or mocks for various node stuff.
@@ -5348,7 +5358,7 @@ declare interface JavascriptParserOptions {
5348
5358
  /**
5349
5359
  * Specifies the behavior of invalid export names in "export ... from ...". This might be useful to disable during the migration from "export ... from ..." to "export type ... from ..." when reexporting types in TypeScript.
5350
5360
  */
5351
- reexportExportsPresence?: false | "error" | "warn" | "auto";
5361
+ reexportExportsPresence?: false | "auto" | "error" | "warn";
5352
5362
 
5353
5363
  /**
5354
5364
  * Enable/disable parsing of require.context syntax.
@@ -5585,7 +5595,7 @@ declare interface KnownNormalizedStatsOptions {
5585
5595
  modulesSpace: number;
5586
5596
  chunkModulesSpace: number;
5587
5597
  nestedModulesSpace: number;
5588
- logging: false | "none" | "verbose" | "error" | "warn" | "info" | "log";
5598
+ logging: false | "none" | "error" | "warn" | "info" | "log" | "verbose";
5589
5599
  loggingDebug: ((value: string) => boolean)[];
5590
5600
  loggingTrace: boolean;
5591
5601
  }
@@ -7543,7 +7553,7 @@ declare interface NormalModuleLoaderContext<OptionsType> {
7543
7553
  rootContext: string;
7544
7554
  fs: InputFileSystem;
7545
7555
  sourceMap?: boolean;
7546
- mode: "development" | "production" | "none";
7556
+ mode: "none" | "development" | "production";
7547
7557
  webpack?: boolean;
7548
7558
  _module?: NormalModule;
7549
7559
  _compilation?: Compilation;
@@ -9400,7 +9410,7 @@ declare interface ResolveOptionsWebpackOptions {
9400
9410
  /**
9401
9411
  * Plugins for the resolver.
9402
9412
  */
9403
- plugins?: ("..." | ResolvePluginInstance)[];
9413
+ plugins?: (ResolvePluginInstance | "...")[];
9404
9414
 
9405
9415
  /**
9406
9416
  * Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
@@ -10012,18 +10022,21 @@ declare abstract class RuntimeTemplate {
10012
10022
  compilation: Compilation;
10013
10023
  outputOptions: OutputNormalized;
10014
10024
  requestShortener: RequestShortener;
10025
+ globalObject: string;
10015
10026
  isIIFE(): undefined | boolean;
10016
10027
  isModule(): undefined | boolean;
10017
10028
  supportsConst(): undefined | boolean;
10018
10029
  supportsArrowFunction(): undefined | boolean;
10030
+ supportsOptionalChaining(): undefined | boolean;
10019
10031
  supportsForOf(): undefined | boolean;
10020
10032
  supportsDestructuring(): undefined | boolean;
10021
10033
  supportsBigIntLiteral(): undefined | boolean;
10022
10034
  supportsDynamicImport(): undefined | boolean;
10023
10035
  supportsEcmaScriptModuleSyntax(): undefined | boolean;
10024
- supportTemplateLiteral(): boolean;
10036
+ supportTemplateLiteral(): undefined | boolean;
10025
10037
  returningFunction(returnValue?: any, args?: string): string;
10026
10038
  basicFunction(args?: any, body?: any): string;
10039
+ concatenation(...args: (string | { expr: string })[]): string;
10027
10040
  expressionFunction(expression?: any, args?: string): string;
10028
10041
  emptyFunction(): "x => {}" | "function() {}";
10029
10042
  destructureArray(items?: any, value?: any): string;
@@ -11239,7 +11252,7 @@ declare interface StatsOptions {
11239
11252
  /**
11240
11253
  * Add logging output.
11241
11254
  */
11242
- logging?: boolean | "none" | "verbose" | "error" | "warn" | "info" | "log";
11255
+ logging?: boolean | "none" | "error" | "warn" | "info" | "log" | "verbose";
11243
11256
 
11244
11257
  /**
11245
11258
  * Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
@@ -11408,15 +11421,15 @@ type StatsPrinterContext = KnownStatsPrinterContext & Record<string, any>;
11408
11421
  type StatsProfile = KnownStatsProfile & Record<string, any>;
11409
11422
  type StatsValue =
11410
11423
  | boolean
11424
+ | StatsOptions
11411
11425
  | "none"
11426
+ | "verbose"
11412
11427
  | "summary"
11413
11428
  | "errors-only"
11414
11429
  | "errors-warnings"
11415
11430
  | "minimal"
11416
11431
  | "normal"
11417
- | "detailed"
11418
- | "verbose"
11419
- | StatsOptions;
11432
+ | "detailed";
11420
11433
  declare interface SyntheticDependencyLocation {
11421
11434
  name: string;
11422
11435
  index?: number;
@@ -12026,7 +12039,7 @@ declare interface WebpackOptionsNormalized {
12026
12039
  /**
12027
12040
  * Enable production optimizations or development hints.
12028
12041
  */
12029
- mode?: "development" | "production" | "none";
12042
+ mode?: "none" | "development" | "production";
12030
12043
 
12031
12044
  /**
12032
12045
  * Options affecting the normal modules (`NormalModuleFactory`).
@@ -12698,6 +12711,7 @@ declare namespace exports {
12698
12711
  RuleSetRule,
12699
12712
  RuleSetUse,
12700
12713
  RuleSetUseItem,
12714
+ StatsOptions,
12701
12715
  Configuration,
12702
12716
  WebpackOptionsNormalized,
12703
12717
  WebpackPluginInstance,
@@ -12705,6 +12719,8 @@ declare namespace exports {
12705
12719
  AssetInfo,
12706
12720
  MultiStats,
12707
12721
  ParserState,
12722
+ ResolvePluginInstance,
12723
+ Resolver,
12708
12724
  Watching,
12709
12725
  StatsAsset,
12710
12726
  StatsChunk,