webpack 5.72.1 → 5.73.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.

@@ -1580,6 +1580,43 @@
1580
1580
  "description": "Enable/disable parsing of magic comments in CommonJs syntax.",
1581
1581
  "type": "boolean"
1582
1582
  },
1583
+ "createRequire": {
1584
+ "description": "Enable/disable parsing \"import { createRequire } from \"module\"\" and evaluating createRequire().",
1585
+ "anyOf": [
1586
+ {
1587
+ "type": "boolean"
1588
+ },
1589
+ {
1590
+ "type": "string"
1591
+ }
1592
+ ]
1593
+ },
1594
+ "dynamicImportMode": {
1595
+ "description": "Specifies global mode for dynamic import.",
1596
+ "enum": ["eager", "weak", "lazy", "lazy-once"]
1597
+ },
1598
+ "dynamicImportPrefetch": {
1599
+ "description": "Specifies global prefetch for dynamic import.",
1600
+ "anyOf": [
1601
+ {
1602
+ "type": "number"
1603
+ },
1604
+ {
1605
+ "type": "boolean"
1606
+ }
1607
+ ]
1608
+ },
1609
+ "dynamicImportPreload": {
1610
+ "description": "Specifies global preload for dynamic import.",
1611
+ "anyOf": [
1612
+ {
1613
+ "type": "number"
1614
+ },
1615
+ {
1616
+ "type": "boolean"
1617
+ }
1618
+ ]
1619
+ },
1583
1620
  "exportsPresence": {
1584
1621
  "description": "Specifies the behavior of invalid export names in \"import ... from ...\" and \"export ... from ...\".",
1585
1622
  "enum": ["error", "warn", "auto", false]
package/types.d.ts CHANGED
@@ -2503,11 +2503,11 @@ declare interface ContextHash {
2503
2503
  }
2504
2504
  type ContextMode =
2505
2505
  | "weak"
2506
- | "sync"
2507
2506
  | "eager"
2508
- | "async-weak"
2509
2507
  | "lazy"
2510
- | "lazy-once";
2508
+ | "lazy-once"
2509
+ | "sync"
2510
+ | "async-weak";
2511
2511
  declare abstract class ContextModuleFactory extends ModuleFactory {
2512
2512
  hooks: Readonly<{
2513
2513
  beforeResolve: AsyncSeriesWaterfallHook<[any]>;
@@ -4902,6 +4902,15 @@ declare class JavascriptParser extends Parser {
4902
4902
  undefined | null | BasicEvaluatedExpression
4903
4903
  >
4904
4904
  >;
4905
+ evaluateNewExpression: HookMap<
4906
+ SyncBailHook<[NewExpression], undefined | null | BasicEvaluatedExpression>
4907
+ >;
4908
+ evaluateCallExpression: HookMap<
4909
+ SyncBailHook<
4910
+ [CallExpression],
4911
+ undefined | null | BasicEvaluatedExpression
4912
+ >
4913
+ >;
4905
4914
  evaluateCallExpressionMember: HookMap<
4906
4915
  SyncBailHook<
4907
4916
  [CallExpression, undefined | BasicEvaluatedExpression],
@@ -5410,6 +5419,7 @@ declare class JavascriptParser extends Parser {
5410
5419
  isVariableDefined(name?: any): boolean;
5411
5420
  getVariableInfo(name: string): ExportedVariableInfo;
5412
5421
  setVariable(name: string, variableInfo: ExportedVariableInfo): void;
5422
+ evaluatedVariable(tagInfo?: any): VariableInfo;
5413
5423
  parseCommentOptions(
5414
5424
  range?: any
5415
5425
  ): { options: null; errors: null } | { options: object; errors: unknown[] };
@@ -5490,6 +5500,26 @@ declare interface JavascriptParserOptions {
5490
5500
  */
5491
5501
  commonjsMagicComments?: boolean;
5492
5502
 
5503
+ /**
5504
+ * Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
5505
+ */
5506
+ createRequire?: string | boolean;
5507
+
5508
+ /**
5509
+ * Specifies global mode for dynamic import.
5510
+ */
5511
+ dynamicImportMode?: "weak" | "eager" | "lazy" | "lazy-once";
5512
+
5513
+ /**
5514
+ * Specifies global prefetch for dynamic import.
5515
+ */
5516
+ dynamicImportPrefetch?: number | boolean;
5517
+
5518
+ /**
5519
+ * Specifies global preload for dynamic import.
5520
+ */
5521
+ dynamicImportPreload?: number | boolean;
5522
+
5493
5523
  /**
5494
5524
  * Specifies the behavior of invalid export names in "import ... from ..." and "export ... from ...".
5495
5525
  */
@@ -13063,6 +13093,7 @@ declare namespace exports {
13063
13093
  Asset,
13064
13094
  AssetInfo,
13065
13095
  EntryOptions,
13096
+ PathData,
13066
13097
  AssetEmittedInfo,
13067
13098
  MultiStats,
13068
13099
  ParserState,