webpack 5.69.1 → 5.72.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.

Files changed (84) hide show
  1. package/hot/poll.js +1 -1
  2. package/hot/signal.js +1 -1
  3. package/lib/BannerPlugin.js +12 -4
  4. package/lib/Chunk.js +1 -1
  5. package/lib/ChunkGraph.js +93 -6
  6. package/lib/ChunkGroup.js +1 -1
  7. package/lib/CleanPlugin.js +64 -18
  8. package/lib/Compilation.js +51 -25
  9. package/lib/Compiler.js +16 -3
  10. package/lib/ConstPlugin.js +2 -2
  11. package/lib/ContextModule.js +121 -34
  12. package/lib/ContextModuleFactory.js +65 -25
  13. package/lib/DelegatedModuleFactoryPlugin.js +1 -1
  14. package/lib/Dependency.js +7 -0
  15. package/lib/EntryOptionPlugin.js +1 -0
  16. package/lib/ErrorHelpers.js +2 -2
  17. package/lib/ExportsInfo.js +1 -1
  18. package/lib/ExternalModuleFactoryPlugin.js +4 -4
  19. package/lib/FileSystemInfo.js +8 -0
  20. package/lib/Generator.js +1 -0
  21. package/lib/LoaderOptionsPlugin.js +1 -1
  22. package/lib/Module.js +3 -0
  23. package/lib/ModuleFilenameHelpers.js +3 -3
  24. package/lib/ModuleHashingError.js +29 -0
  25. package/lib/NodeStuffPlugin.js +10 -0
  26. package/lib/NormalModule.js +26 -20
  27. package/lib/NormalModuleFactory.js +17 -10
  28. package/lib/ProgressPlugin.js +3 -4
  29. package/lib/RuntimePlugin.js +18 -0
  30. package/lib/RuntimeTemplate.js +1 -0
  31. package/lib/WebpackOptionsApply.js +2 -0
  32. package/lib/asset/AssetGenerator.js +155 -40
  33. package/lib/asset/AssetParser.js +1 -0
  34. package/lib/asset/AssetSourceGenerator.js +31 -6
  35. package/lib/asset/AssetSourceParser.js +1 -0
  36. package/lib/cache/PackFileCacheStrategy.js +8 -4
  37. package/lib/cache/ResolverCachePlugin.js +89 -28
  38. package/lib/config/browserslistTargetHandler.js +3 -5
  39. package/lib/config/defaults.js +9 -1
  40. package/lib/config/normalization.js +1 -0
  41. package/lib/container/RemoteRuntimeModule.js +8 -7
  42. package/lib/dependencies/CommonJsExportsParserPlugin.js +1 -2
  43. package/lib/dependencies/ContextDependencyHelpers.js +3 -3
  44. package/lib/dependencies/ContextElementDependency.js +33 -1
  45. package/lib/dependencies/HarmonyAcceptImportDependency.js +5 -3
  46. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +95 -0
  47. package/lib/dependencies/HarmonyExportInitFragment.js +4 -1
  48. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +127 -43
  49. package/lib/dependencies/HarmonyImportSpecifierDependency.js +22 -8
  50. package/lib/dependencies/HarmonyModulesPlugin.js +10 -0
  51. package/lib/dependencies/ImportContextDependency.js +0 -2
  52. package/lib/dependencies/ImportMetaContextDependency.js +35 -0
  53. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +252 -0
  54. package/lib/dependencies/ImportMetaContextPlugin.js +59 -0
  55. package/lib/dependencies/LoaderPlugin.js +2 -0
  56. package/lib/dependencies/RequireContextDependency.js +0 -16
  57. package/lib/esm/ModuleChunkLoadingPlugin.js +3 -1
  58. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +24 -8
  59. package/lib/hmr/HotModuleReplacement.runtime.js +29 -14
  60. package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +4 -3
  61. package/lib/ids/HashedModuleIdsPlugin.js +2 -2
  62. package/lib/ids/IdHelpers.js +1 -1
  63. package/lib/javascript/BasicEvaluatedExpression.js +5 -2
  64. package/lib/javascript/JavascriptParser.js +66 -40
  65. package/lib/library/UmdLibraryPlugin.js +5 -3
  66. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +22 -7
  67. package/lib/node/RequireChunkLoadingRuntimeModule.js +22 -7
  68. package/lib/optimize/ConcatenatedModule.js +2 -1
  69. package/lib/optimize/ModuleConcatenationPlugin.js +20 -1
  70. package/lib/runtime/BaseUriRuntimeModule.js +31 -0
  71. package/lib/schemes/HttpUriPlugin.js +44 -3
  72. package/lib/stats/DefaultStatsFactoryPlugin.js +1 -1
  73. package/lib/util/internalSerializables.js +4 -0
  74. package/lib/web/JsonpChunkLoadingRuntimeModule.js +17 -6
  75. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +30 -20
  76. package/module.d.ts +15 -0
  77. package/package.json +2 -2
  78. package/schemas/WebpackOptions.check.js +1 -1
  79. package/schemas/WebpackOptions.json +17 -1
  80. package/schemas/plugins/BannerPlugin.check.js +1 -1
  81. package/schemas/plugins/BannerPlugin.json +4 -0
  82. package/schemas/plugins/schemes/HttpUriPlugin.check.js +1 -1
  83. package/schemas/plugins/schemes/HttpUriPlugin.json +4 -0
  84. package/types.d.ts +202 -84
@@ -70,7 +70,7 @@
70
70
  ]
71
71
  },
72
72
  "AssetGeneratorDataUrlFunction": {
73
- "description": "Function that executes for module and should return an DataUrl string.",
73
+ "description": "Function that executes for module and should return an DataUrl string. It can have a string as 'ident' property which contributes to the module hash.",
74
74
  "instanceof": "Function",
75
75
  "tsType": "((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => string)"
76
76
  },
@@ -496,6 +496,10 @@
496
496
  "description": "Enable/disable creating async chunks that are loaded on demand.",
497
497
  "type": "boolean"
498
498
  },
499
+ "baseUri": {
500
+ "description": "Base uri for this entry.",
501
+ "type": "string"
502
+ },
499
503
  "chunkLoading": {
500
504
  "$ref": "#/definitions/ChunkLoading"
501
505
  },
@@ -553,6 +557,10 @@
553
557
  "description": "Enable/disable creating async chunks that are loaded on demand.",
554
558
  "type": "boolean"
555
559
  },
560
+ "baseUri": {
561
+ "description": "Base uri for this entry.",
562
+ "type": "string"
563
+ },
556
564
  "chunkLoading": {
557
565
  "$ref": "#/definitions/ChunkLoading"
558
566
  },
@@ -1417,6 +1425,10 @@
1417
1425
  "type": "string",
1418
1426
  "absolutePath": true
1419
1427
  },
1428
+ "proxy": {
1429
+ "description": "Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.",
1430
+ "type": "string"
1431
+ },
1420
1432
  "upgrade": {
1421
1433
  "description": "When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.",
1422
1434
  "type": "boolean"
@@ -1612,6 +1624,10 @@
1612
1624
  "description": "Enable/disable evaluating import.meta.",
1613
1625
  "type": "boolean"
1614
1626
  },
1627
+ "importMetaContext": {
1628
+ "description": "Enable/disable evaluating import.meta.webpackContext.",
1629
+ "type": "boolean"
1630
+ },
1615
1631
  "node": {
1616
1632
  "$ref": "#/definitions/Node"
1617
1633
  },
@@ -3,4 +3,4 @@
3
3
  * DO NOT MODIFY BY HAND.
4
4
  * Run `yarn special-lint-fix` to update
5
5
  */
6
- "use strict";function n(t,{instancePath:l="",parentData:s,parentDataProperty:e,rootData:a=t}={}){let r=null,o=0;const u=o;let i=!1;const p=o;if(o===p)if(Array.isArray(t)){const n=t.length;for(let l=0;l<n;l++){let n=t[l];const s=o,e=o;let a=!1,u=null;const i=o,p=o;let f=!1;const h=o;if(!(n instanceof RegExp)){const n={params:{}};null===r?r=[n]:r.push(n),o++}var c=h===o;if(f=f||c,!f){const t=o;if(o===t)if("string"==typeof n){if(n.length<1){const n={params:{}};null===r?r=[n]:r.push(n),o++}}else{const n={params:{type:"string"}};null===r?r=[n]:r.push(n),o++}c=t===o,f=f||c}if(f)o=p,null!==r&&(p?r.length=p:r=null);else{const n={params:{}};null===r?r=[n]:r.push(n),o++}if(i===o&&(a=!0,u=0),a)o=e,null!==r&&(e?r.length=e:r=null);else{const n={params:{passingSchemas:u}};null===r?r=[n]:r.push(n),o++}if(s!==o)break}}else{const n={params:{type:"array"}};null===r?r=[n]:r.push(n),o++}var f=p===o;if(i=i||f,!i){const n=o,l=o;let s=!1;const e=o;if(!(t instanceof RegExp)){const n={params:{}};null===r?r=[n]:r.push(n),o++}var h=e===o;if(s=s||h,!s){const n=o;if(o===n)if("string"==typeof t){if(t.length<1){const n={params:{}};null===r?r=[n]:r.push(n),o++}}else{const n={params:{type:"string"}};null===r?r=[n]:r.push(n),o++}h=n===o,s=s||h}if(s)o=l,null!==r&&(l?r.length=l:r=null);else{const n={params:{}};null===r?r=[n]:r.push(n),o++}f=n===o,i=i||f}if(!i){const t={params:{}};return null===r?r=[t]:r.push(t),o++,n.errors=r,!1}return o=u,null!==r&&(u?r.length=u:r=null),n.errors=r,0===o}function t(l,{instancePath:s="",parentData:e,parentDataProperty:a,rootData:r=l}={}){let o=null,u=0;const i=u;let p=!1;const c=u;if(u===c)if("string"==typeof l){if(l.length<1){const n={params:{}};null===o?o=[n]:o.push(n),u++}}else{const n={params:{type:"string"}};null===o?o=[n]:o.push(n),u++}var f=c===u;if(p=p||f,!p){const t=u;if(u===t)if(l&&"object"==typeof l&&!Array.isArray(l)){let t;if(void 0===l.banner&&(t="banner")){const n={params:{missingProperty:t}};null===o?o=[n]:o.push(n),u++}else{const t=u;for(const n in l)if("banner"!==n&&"entryOnly"!==n&&"exclude"!==n&&"include"!==n&&"raw"!==n&&"test"!==n){const t={params:{additionalProperty:n}};null===o?o=[t]:o.push(t),u++;break}if(t===u){if(void 0!==l.banner){let n=l.banner;const t=u,s=u;let e=!1;const a=u;if("string"!=typeof n){const n={params:{type:"string"}};null===o?o=[n]:o.push(n),u++}var h=a===u;if(e=e||h,!e){const t=u;if(!(n instanceof Function)){const n={params:{}};null===o?o=[n]:o.push(n),u++}h=t===u,e=e||h}if(e)u=s,null!==o&&(s?o.length=s:o=null);else{const n={params:{}};null===o?o=[n]:o.push(n),u++}var m=t===u}else m=!0;if(m){if(void 0!==l.entryOnly){const n=u;if("boolean"!=typeof l.entryOnly){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}m=n===u}else m=!0;if(m){if(void 0!==l.exclude){const t=u,e=u;let a=!1,i=null;const p=u;if(n(l.exclude,{instancePath:s+"/exclude",parentData:l,parentDataProperty:"exclude",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=e,null!==o&&(e?o.length=e:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}m=t===u}else m=!0;if(m){if(void 0!==l.include){const t=u,e=u;let a=!1,i=null;const p=u;if(n(l.include,{instancePath:s+"/include",parentData:l,parentDataProperty:"include",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=e,null!==o&&(e?o.length=e:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}m=t===u}else m=!0;if(m){if(void 0!==l.raw){const n=u;if("boolean"!=typeof l.raw){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}m=n===u}else m=!0;if(m)if(void 0!==l.test){const t=u,e=u;let a=!1,i=null;const p=u;if(n(l.test,{instancePath:s+"/test",parentData:l,parentDataProperty:"test",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=e,null!==o&&(e?o.length=e:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}m=t===u}else m=!0}}}}}}}else{const n={params:{type:"object"}};null===o?o=[n]:o.push(n),u++}if(f=t===u,p=p||f,!p){const n=u;if(!(l instanceof Function)){const n={params:{}};null===o?o=[n]:o.push(n),u++}f=n===u,p=p||f}}if(!p){const n={params:{}};return null===o?o=[n]:o.push(n),u++,t.errors=o,!1}return u=i,null!==o&&(i?o.length=i:o=null),t.errors=o,0===u}module.exports=t,module.exports.default=t;
6
+ "use strict";function n(t,{instancePath:l="",parentData:e,parentDataProperty:s,rootData:a=t}={}){let r=null,o=0;const u=o;let i=!1;const p=o;if(o===p)if(Array.isArray(t)){const n=t.length;for(let l=0;l<n;l++){let n=t[l];const e=o,s=o;let a=!1,u=null;const i=o,p=o;let f=!1;const h=o;if(!(n instanceof RegExp)){const n={params:{}};null===r?r=[n]:r.push(n),o++}var c=h===o;if(f=f||c,!f){const t=o;if(o===t)if("string"==typeof n){if(n.length<1){const n={params:{}};null===r?r=[n]:r.push(n),o++}}else{const n={params:{type:"string"}};null===r?r=[n]:r.push(n),o++}c=t===o,f=f||c}if(f)o=p,null!==r&&(p?r.length=p:r=null);else{const n={params:{}};null===r?r=[n]:r.push(n),o++}if(i===o&&(a=!0,u=0),a)o=s,null!==r&&(s?r.length=s:r=null);else{const n={params:{passingSchemas:u}};null===r?r=[n]:r.push(n),o++}if(e!==o)break}}else{const n={params:{type:"array"}};null===r?r=[n]:r.push(n),o++}var f=p===o;if(i=i||f,!i){const n=o,l=o;let e=!1;const s=o;if(!(t instanceof RegExp)){const n={params:{}};null===r?r=[n]:r.push(n),o++}var h=s===o;if(e=e||h,!e){const n=o;if(o===n)if("string"==typeof t){if(t.length<1){const n={params:{}};null===r?r=[n]:r.push(n),o++}}else{const n={params:{type:"string"}};null===r?r=[n]:r.push(n),o++}h=n===o,e=e||h}if(e)o=l,null!==r&&(l?r.length=l:r=null);else{const n={params:{}};null===r?r=[n]:r.push(n),o++}f=n===o,i=i||f}if(!i){const t={params:{}};return null===r?r=[t]:r.push(t),o++,n.errors=r,!1}return o=u,null!==r&&(u?r.length=u:r=null),n.errors=r,0===o}function t(l,{instancePath:e="",parentData:s,parentDataProperty:a,rootData:r=l}={}){let o=null,u=0;const i=u;let p=!1;const c=u;if(u===c)if("string"==typeof l){if(l.length<1){const n={params:{}};null===o?o=[n]:o.push(n),u++}}else{const n={params:{type:"string"}};null===o?o=[n]:o.push(n),u++}var f=c===u;if(p=p||f,!p){const t=u;if(u===t)if(l&&"object"==typeof l&&!Array.isArray(l)){let t;if(void 0===l.banner&&(t="banner")){const n={params:{missingProperty:t}};null===o?o=[n]:o.push(n),u++}else{const t=u;for(const n in l)if("banner"!==n&&"entryOnly"!==n&&"exclude"!==n&&"footer"!==n&&"include"!==n&&"raw"!==n&&"test"!==n){const t={params:{additionalProperty:n}};null===o?o=[t]:o.push(t),u++;break}if(t===u){if(void 0!==l.banner){let n=l.banner;const t=u,e=u;let s=!1;const a=u;if("string"!=typeof n){const n={params:{type:"string"}};null===o?o=[n]:o.push(n),u++}var h=a===u;if(s=s||h,!s){const t=u;if(!(n instanceof Function)){const n={params:{}};null===o?o=[n]:o.push(n),u++}h=t===u,s=s||h}if(s)u=e,null!==o&&(e?o.length=e:o=null);else{const n={params:{}};null===o?o=[n]:o.push(n),u++}var y=t===u}else y=!0;if(y){if(void 0!==l.entryOnly){const n=u;if("boolean"!=typeof l.entryOnly){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}y=n===u}else y=!0;if(y){if(void 0!==l.exclude){const t=u,s=u;let a=!1,i=null;const p=u;if(n(l.exclude,{instancePath:e+"/exclude",parentData:l,parentDataProperty:"exclude",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=s,null!==o&&(s?o.length=s:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}y=t===u}else y=!0;if(y){if(void 0!==l.footer){const n=u;if("boolean"!=typeof l.footer){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}y=n===u}else y=!0;if(y){if(void 0!==l.include){const t=u,s=u;let a=!1,i=null;const p=u;if(n(l.include,{instancePath:e+"/include",parentData:l,parentDataProperty:"include",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=s,null!==o&&(s?o.length=s:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}y=t===u}else y=!0;if(y){if(void 0!==l.raw){const n=u;if("boolean"!=typeof l.raw){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}y=n===u}else y=!0;if(y)if(void 0!==l.test){const t=u,s=u;let a=!1,i=null;const p=u;if(n(l.test,{instancePath:e+"/test",parentData:l,parentDataProperty:"test",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=s,null!==o&&(s?o.length=s:o=null);else{const n={params:{passingSchemas:i}};null===o?o=[n]:o.push(n),u++}y=t===u}else y=!0}}}}}}}}else{const n={params:{type:"object"}};null===o?o=[n]:o.push(n),u++}if(f=t===u,p=p||f,!p){const n=u;if(!(l instanceof Function)){const n={params:{}};null===o?o=[n]:o.push(n),u++}f=n===u,p=p||f}}if(!p){const n={params:{}};return null===o?o=[n]:o.push(n),u++,t.errors=o,!1}return u=i,null!==o&&(i?o.length=i:o=null),t.errors=o,0===u}module.exports=t,module.exports.default=t;
@@ -73,6 +73,10 @@
73
73
  }
74
74
  ]
75
75
  },
76
+ "footer": {
77
+ "description": "If true, banner will be placed at the end of the output.",
78
+ "type": "boolean"
79
+ },
76
80
  "include": {
77
81
  "description": "Include all modules matching any of these conditions.",
78
82
  "oneOf": [
@@ -3,4 +3,4 @@
3
3
  * DO NOT MODIFY BY HAND.
4
4
  * Run `yarn special-lint-fix` to update
5
5
  */
6
- const r=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=n,module.exports.default=n;const t=new RegExp("^https?://","u");function e(n,{instancePath:o="",parentData:s,parentDataProperty:a,rootData:l=n}={}){let i=null,p=0;if(0===p){if(!n||"object"!=typeof n||Array.isArray(n))return e.errors=[{params:{type:"object"}}],!1;{let o;if(void 0===n.allowedUris&&(o="allowedUris"))return e.errors=[{params:{missingProperty:o}}],!1;{const o=p;for(const r in n)if("allowedUris"!==r&&"cacheLocation"!==r&&"frozen"!==r&&"lockfileLocation"!==r&&"upgrade"!==r)return e.errors=[{params:{additionalProperty:r}}],!1;if(o===p){if(void 0!==n.allowedUris){let r=n.allowedUris;const o=p;if(p==p){if(!Array.isArray(r))return e.errors=[{params:{type:"array"}}],!1;{const n=r.length;for(let o=0;o<n;o++){let n=r[o];const s=p,a=p;let l=!1;const f=p;if(!(n instanceof RegExp)){const r={params:{}};null===i?i=[r]:i.push(r),p++}var c=f===p;if(l=l||c,!l){const r=p;if(p===r)if("string"==typeof n){if(!t.test(n)){const r={params:{pattern:"^https?://"}};null===i?i=[r]:i.push(r),p++}}else{const r={params:{type:"string"}};null===i?i=[r]:i.push(r),p++}if(c=r===p,l=l||c,!l){const r=p;if(!(n instanceof Function)){const r={params:{}};null===i?i=[r]:i.push(r),p++}c=r===p,l=l||c}}if(!l){const r={params:{}};return null===i?i=[r]:i.push(r),p++,e.errors=i,!1}if(p=a,null!==i&&(a?i.length=a:i=null),s!==p)break}}}var f=o===p}else f=!0;if(f){if(void 0!==n.cacheLocation){let t=n.cacheLocation;const o=p,s=p;let a=!1;const l=p;if(!1!==t){const r={params:{}};null===i?i=[r]:i.push(r),p++}var u=l===p;if(a=a||u,!a){const e=p;if(p===e)if("string"==typeof t){if(t.includes("!")||!0!==r.test(t)){const r={params:{}};null===i?i=[r]:i.push(r),p++}}else{const r={params:{type:"string"}};null===i?i=[r]:i.push(r),p++}u=e===p,a=a||u}if(!a){const r={params:{}};return null===i?i=[r]:i.push(r),p++,e.errors=i,!1}p=s,null!==i&&(s?i.length=s:i=null),f=o===p}else f=!0;if(f){if(void 0!==n.frozen){const r=p;if("boolean"!=typeof n.frozen)return e.errors=[{params:{type:"boolean"}}],!1;f=r===p}else f=!0;if(f){if(void 0!==n.lockfileLocation){let t=n.lockfileLocation;const o=p;if(p===o){if("string"!=typeof t)return e.errors=[{params:{type:"string"}}],!1;if(t.includes("!")||!0!==r.test(t))return e.errors=[{params:{}}],!1}f=o===p}else f=!0;if(f)if(void 0!==n.upgrade){const r=p;if("boolean"!=typeof n.upgrade)return e.errors=[{params:{type:"boolean"}}],!1;f=r===p}else f=!0}}}}}}}return e.errors=i,0===p}function n(r,{instancePath:t="",parentData:o,parentDataProperty:s,rootData:a=r}={}){let l=null,i=0;const p=i;let c=!1,f=null;const u=i;if(e(r,{instancePath:t,parentData:o,parentDataProperty:s,rootData:a})||(l=null===l?e.errors:l.concat(e.errors),i=l.length),u===i&&(c=!0,f=0),!c){const r={params:{passingSchemas:f}};return null===l?l=[r]:l.push(r),i++,n.errors=l,!1}return i=p,null!==l&&(p?l.length=p:l=null),n.errors=l,0===i}
6
+ const r=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=n,module.exports.default=n;const t=new RegExp("^https?://","u");function e(n,{instancePath:o="",parentData:s,parentDataProperty:a,rootData:l=n}={}){let i=null,p=0;if(0===p){if(!n||"object"!=typeof n||Array.isArray(n))return e.errors=[{params:{type:"object"}}],!1;{let o;if(void 0===n.allowedUris&&(o="allowedUris"))return e.errors=[{params:{missingProperty:o}}],!1;{const o=p;for(const r in n)if("allowedUris"!==r&&"cacheLocation"!==r&&"frozen"!==r&&"lockfileLocation"!==r&&"proxy"!==r&&"upgrade"!==r)return e.errors=[{params:{additionalProperty:r}}],!1;if(o===p){if(void 0!==n.allowedUris){let r=n.allowedUris;const o=p;if(p==p){if(!Array.isArray(r))return e.errors=[{params:{type:"array"}}],!1;{const n=r.length;for(let o=0;o<n;o++){let n=r[o];const s=p,a=p;let l=!1;const c=p;if(!(n instanceof RegExp)){const r={params:{}};null===i?i=[r]:i.push(r),p++}var f=c===p;if(l=l||f,!l){const r=p;if(p===r)if("string"==typeof n){if(!t.test(n)){const r={params:{pattern:"^https?://"}};null===i?i=[r]:i.push(r),p++}}else{const r={params:{type:"string"}};null===i?i=[r]:i.push(r),p++}if(f=r===p,l=l||f,!l){const r=p;if(!(n instanceof Function)){const r={params:{}};null===i?i=[r]:i.push(r),p++}f=r===p,l=l||f}}if(!l){const r={params:{}};return null===i?i=[r]:i.push(r),p++,e.errors=i,!1}if(p=a,null!==i&&(a?i.length=a:i=null),s!==p)break}}}var c=o===p}else c=!0;if(c){if(void 0!==n.cacheLocation){let t=n.cacheLocation;const o=p,s=p;let a=!1;const l=p;if(!1!==t){const r={params:{}};null===i?i=[r]:i.push(r),p++}var u=l===p;if(a=a||u,!a){const e=p;if(p===e)if("string"==typeof t){if(t.includes("!")||!0!==r.test(t)){const r={params:{}};null===i?i=[r]:i.push(r),p++}}else{const r={params:{type:"string"}};null===i?i=[r]:i.push(r),p++}u=e===p,a=a||u}if(!a){const r={params:{}};return null===i?i=[r]:i.push(r),p++,e.errors=i,!1}p=s,null!==i&&(s?i.length=s:i=null),c=o===p}else c=!0;if(c){if(void 0!==n.frozen){const r=p;if("boolean"!=typeof n.frozen)return e.errors=[{params:{type:"boolean"}}],!1;c=r===p}else c=!0;if(c){if(void 0!==n.lockfileLocation){let t=n.lockfileLocation;const o=p;if(p===o){if("string"!=typeof t)return e.errors=[{params:{type:"string"}}],!1;if(t.includes("!")||!0!==r.test(t))return e.errors=[{params:{}}],!1}c=o===p}else c=!0;if(c){if(void 0!==n.proxy){const r=p;if("string"!=typeof n.proxy)return e.errors=[{params:{type:"string"}}],!1;c=r===p}else c=!0;if(c)if(void 0!==n.upgrade){const r=p;if("boolean"!=typeof n.upgrade)return e.errors=[{params:{type:"boolean"}}],!1;c=r===p}else c=!0}}}}}}}}return e.errors=i,0===p}function n(r,{instancePath:t="",parentData:o,parentDataProperty:s,rootData:a=r}={}){let l=null,i=0;const p=i;let f=!1,c=null;const u=i;if(e(r,{instancePath:t,parentData:o,parentDataProperty:s,rootData:a})||(l=null===l?e.errors:l.concat(e.errors),i=l.length),u===i&&(f=!0,c=0),!f){const r={params:{passingSchemas:c}};return null===l?l=[r]:l.push(r),i++,n.errors=l,!1}return i=p,null!==l&&(p?l.length=p:l=null),n.errors=l,0===i}
@@ -29,6 +29,10 @@
29
29
  "type": "string",
30
30
  "absolutePath": true
31
31
  },
32
+ "proxy": {
33
+ "description": "Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.",
34
+ "type": "string"
35
+ },
32
36
  "upgrade": {
33
37
  "description": "When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.",
34
38
  "type": "boolean"
package/types.d.ts CHANGED
@@ -430,6 +430,11 @@ declare interface BannerPluginOptions {
430
430
  */
431
431
  exclude?: string | RegExp | Rule[];
432
432
 
433
+ /**
434
+ * If true, banner will be placed at the end of the output.
435
+ */
436
+ footer?: boolean;
437
+
433
438
  /**
434
439
  * Include all modules matching any of these conditions.
435
440
  */
@@ -474,9 +479,10 @@ declare abstract class BasicEvaluatedExpression {
474
479
  prefix?: BasicEvaluatedExpression;
475
480
  postfix?: BasicEvaluatedExpression;
476
481
  wrappedInnerExpressions: any;
477
- identifier?: string;
482
+ identifier?: string | VariableInfoInterface;
478
483
  rootInfo: VariableInfoInterface;
479
484
  getMembers: () => string[];
485
+ getMembersOptionals: () => boolean[];
480
486
  expression: NodeEstreeIndex;
481
487
  isUnknown(): boolean;
482
488
  isNull(): boolean;
@@ -528,7 +534,8 @@ declare abstract class BasicEvaluatedExpression {
528
534
  setIdentifier(
529
535
  identifier?: any,
530
536
  rootInfo?: any,
531
- getMembers?: any
537
+ getMembers?: any,
538
+ getMembersOptionals?: any
532
539
  ): BasicEvaluatedExpression;
533
540
  setWrapped(
534
541
  prefix?: any,
@@ -681,6 +688,7 @@ declare interface CallExpressionInfo {
681
688
  getCalleeMembers: () => string[];
682
689
  name: string;
683
690
  getMembers: () => string[];
691
+ getMembersOptionals: () => boolean[];
684
692
  }
685
693
  declare interface CallbackAsyncQueue<T> {
686
694
  (err?: null | WebpackError, result?: T): any;
@@ -809,6 +817,13 @@ declare class ChunkGraph {
809
817
  chunk: Chunk,
810
818
  sourceType: string
811
819
  ): undefined | Iterable<Module>;
820
+ setChunkModuleSourceTypes(
821
+ chunk: Chunk,
822
+ module: Module,
823
+ sourceTypes: Set<string>
824
+ ): void;
825
+ getChunkModuleSourceTypes(chunk: Chunk, module: Module): Set<string>;
826
+ getModuleSourceTypes(module: Module): Set<string>;
812
827
  getOrderedChunkModulesIterable(
813
828
  chunk: Chunk,
814
829
  comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
@@ -1239,6 +1254,16 @@ declare interface CodeGenerationContext {
1239
1254
  * code generation results of other modules (need to have a codeGenerationDependency to use that)
1240
1255
  */
1241
1256
  codeGenerationResults: CodeGenerationResults;
1257
+
1258
+ /**
1259
+ * the compilation
1260
+ */
1261
+ compilation?: Compilation;
1262
+
1263
+ /**
1264
+ * source types
1265
+ */
1266
+ sourceTypes?: ReadonlySet<string>;
1242
1267
  }
1243
1268
  declare interface CodeGenerationResult {
1244
1269
  /**
@@ -2454,7 +2479,7 @@ declare interface ContainerReferencePluginOptions {
2454
2479
  shareScope?: string;
2455
2480
  }
2456
2481
  declare abstract class ContextElementDependency extends ModuleDependency {
2457
- referencedExports: any;
2482
+ referencedExports?: string[][];
2458
2483
  }
2459
2484
  declare class ContextExclusionPlugin {
2460
2485
  constructor(negativeMatcher: RegExp);
@@ -2526,7 +2551,7 @@ declare interface ContextModuleOptions {
2526
2551
  * exports referenced from modules (won't be mangled)
2527
2552
  */
2528
2553
  referencedExports?: string[][];
2529
- resource: string;
2554
+ resource: string | false | string[];
2530
2555
  resourceQuery?: string;
2531
2556
  resourceFragment?: string;
2532
2557
  resolveOptions: any;
@@ -2637,6 +2662,7 @@ declare class Dependency {
2637
2662
  endLine?: any,
2638
2663
  endColumn?: any
2639
2664
  ): void;
2665
+ getContext(): undefined | string;
2640
2666
  getResourceIdentifier(): null | string;
2641
2667
  couldAffectReferencingModule(): boolean | typeof TRANSITIVE;
2642
2668
 
@@ -3139,6 +3165,11 @@ declare interface EntryDescription {
3139
3165
  */
3140
3166
  asyncChunks?: boolean;
3141
3167
 
3168
+ /**
3169
+ * Base uri for this entry.
3170
+ */
3171
+ baseUri?: string;
3172
+
3142
3173
  /**
3143
3174
  * The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
3144
3175
  */
@@ -3194,6 +3225,11 @@ declare interface EntryDescriptionNormalized {
3194
3225
  */
3195
3226
  asyncChunks?: boolean;
3196
3227
 
3228
+ /**
3229
+ * Base uri for this entry.
3230
+ */
3231
+ baseUri?: string;
3232
+
3197
3233
  /**
3198
3234
  * The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
3199
3235
  */
@@ -3809,6 +3845,7 @@ declare interface ExpressionExpressionInfo {
3809
3845
  rootInfo: string | VariableInfo;
3810
3846
  name: string;
3811
3847
  getMembers: () => string[];
3848
+ getMembersOptionals: () => boolean[];
3812
3849
  }
3813
3850
  type ExternalItem =
3814
3851
  | string
@@ -4553,6 +4590,11 @@ declare interface HttpUriOptions {
4553
4590
  */
4554
4591
  lockfileLocation?: string;
4555
4592
 
4593
+ /**
4594
+ * Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.
4595
+ */
4596
+ proxy?: string;
4597
+
4556
4598
  /**
4557
4599
  * When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.
4558
4600
  */
@@ -4645,6 +4687,11 @@ declare interface ImportModuleOptions {
4645
4687
  * the target public path
4646
4688
  */
4647
4689
  publicPath?: string;
4690
+
4691
+ /**
4692
+ * target base uri
4693
+ */
4694
+ baseUri?: string;
4648
4695
  }
4649
4696
  type ImportSource =
4650
4697
  | undefined
@@ -5077,7 +5124,7 @@ declare class JavascriptParser extends Parser {
5077
5124
  topLevelAwait: SyncBailHook<[Expression], boolean | void>;
5078
5125
  call: HookMap<SyncBailHook<[Expression], boolean | void>>;
5079
5126
  callMemberChain: HookMap<
5080
- SyncBailHook<[CallExpression, string[]], boolean | void>
5127
+ SyncBailHook<[CallExpression, string[], boolean[]], boolean | void>
5081
5128
  >;
5082
5129
  memberChainOfCallMemberChain: HookMap<
5083
5130
  SyncBailHook<
@@ -5093,9 +5140,10 @@ declare class JavascriptParser extends Parser {
5093
5140
  >;
5094
5141
  optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
5095
5142
  new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
5143
+ binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
5096
5144
  expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
5097
5145
  expressionMemberChain: HookMap<
5098
- SyncBailHook<[Expression, string[]], boolean | void>
5146
+ SyncBailHook<[Expression, string[], boolean[]], boolean | void>
5099
5147
  >;
5100
5148
  unhandledExpressionMemberChain: HookMap<
5101
5149
  SyncBailHook<[Expression, string[]], boolean | void>
@@ -5163,7 +5211,7 @@ declare class JavascriptParser extends Parser {
5163
5211
  )[];
5164
5212
  prevStatement: any;
5165
5213
  currentTagData: any;
5166
- getRenameIdentifier(expr?: any): undefined | string;
5214
+ getRenameIdentifier(expr?: any): undefined | string | VariableInfoInterface;
5167
5215
  walkClass(classy: ClassExpression | ClassDeclaration): void;
5168
5216
  preWalkStatements(statements?: any): void;
5169
5217
  blockPreWalkStatements(statements?: any): void;
@@ -5310,12 +5358,10 @@ declare class JavascriptParser extends Parser {
5310
5358
  enterArrayPattern(pattern?: any, onIdent?: any): void;
5311
5359
  enterRestElement(pattern?: any, onIdent?: any): void;
5312
5360
  enterAssignmentPattern(pattern?: any, onIdent?: any): void;
5313
- evaluateExpression(
5314
- expression: Expression
5315
- ): undefined | BasicEvaluatedExpression;
5361
+ evaluateExpression(expression: Expression): BasicEvaluatedExpression;
5316
5362
  parseString(expression?: any): any;
5317
5363
  parseCalculatedString(expression?: any): any;
5318
- evaluate(source?: any): undefined | BasicEvaluatedExpression;
5364
+ evaluate(source: string): BasicEvaluatedExpression;
5319
5365
  isPure(
5320
5366
  expr:
5321
5367
  | undefined
@@ -5398,6 +5444,7 @@ declare class JavascriptParser extends Parser {
5398
5444
  | ImportExpression
5399
5445
  | ChainExpression
5400
5446
  | Super;
5447
+ membersOptionals: boolean[];
5401
5448
  };
5402
5449
  getFreeInfoFromVariable(varName: string): {
5403
5450
  name: string;
@@ -5488,6 +5535,11 @@ declare interface JavascriptParserOptions {
5488
5535
  */
5489
5536
  importMeta?: boolean;
5490
5537
 
5538
+ /**
5539
+ * Enable/disable evaluating import.meta.webpackContext.
5540
+ */
5541
+ importMetaContext?: boolean;
5542
+
5491
5543
  /**
5492
5544
  * Include polyfills or mocks for various node stuff.
5493
5545
  */
@@ -7236,6 +7288,37 @@ declare interface ModuleReferenceOptions {
7236
7288
  */
7237
7289
  asiSafe?: boolean;
7238
7290
  }
7291
+ declare interface ModuleSettings {
7292
+ /**
7293
+ * Specifies the layer in which the module should be placed in.
7294
+ */
7295
+ layer?: string;
7296
+
7297
+ /**
7298
+ * Module type to use for the module.
7299
+ */
7300
+ type?: string;
7301
+
7302
+ /**
7303
+ * Options for the resolver.
7304
+ */
7305
+ resolve?: ResolveOptionsWebpackOptions;
7306
+
7307
+ /**
7308
+ * Options for parsing.
7309
+ */
7310
+ parser?: { [index: string]: any };
7311
+
7312
+ /**
7313
+ * The options for the module generator.
7314
+ */
7315
+ generator?: { [index: string]: any };
7316
+
7317
+ /**
7318
+ * Flags a module as with or without side effects.
7319
+ */
7320
+ sideEffects?: boolean;
7321
+ }
7239
7322
  declare abstract class ModuleTemplate {
7240
7323
  type: string;
7241
7324
  hooks: Readonly<{
@@ -7425,11 +7508,11 @@ type NodeEstreeIndex =
7425
7508
  | PropertyDefinition
7426
7509
  | VariableDeclarator
7427
7510
  | Program
7428
- | Super
7429
7511
  | SwitchCase
7430
7512
  | CatchClause
7431
7513
  | Property
7432
7514
  | AssignmentProperty
7515
+ | Super
7433
7516
  | TemplateElement
7434
7517
  | SpreadElement
7435
7518
  | ObjectPattern
@@ -7487,76 +7570,15 @@ declare class NodeTemplatePlugin {
7487
7570
  }
7488
7571
  type NodeWebpackOptions = false | NodeOptions;
7489
7572
  declare class NormalModule extends Module {
7490
- constructor(__0: {
7491
- /**
7492
- * an optional layer in which the module is
7493
- */
7494
- layer?: string;
7495
- /**
7496
- * module type
7497
- */
7498
- type: string;
7499
- /**
7500
- * request string
7501
- */
7502
- request: string;
7503
- /**
7504
- * request intended by user (without loaders from config)
7505
- */
7506
- userRequest: string;
7507
- /**
7508
- * request without resolving
7509
- */
7510
- rawRequest: string;
7511
- /**
7512
- * list of loaders
7513
- */
7514
- loaders: LoaderItem[];
7515
- /**
7516
- * path + query of the real resource
7517
- */
7518
- resource: string;
7519
- /**
7520
- * resource resolve data
7521
- */
7522
- resourceResolveData?: Record<string, any>;
7523
- /**
7524
- * context directory for resolving
7525
- */
7526
- context: string;
7527
- /**
7528
- * path + query of the matched resource (virtual)
7529
- */
7530
- matchResource?: string;
7531
- /**
7532
- * the parser used
7533
- */
7534
- parser: Parser;
7535
- /**
7536
- * the options of the parser used
7537
- */
7538
- parserOptions: object;
7539
- /**
7540
- * the generator used
7541
- */
7542
- generator: Generator;
7543
- /**
7544
- * the options of the generator used
7545
- */
7546
- generatorOptions: object;
7547
- /**
7548
- * options used for resolving requests from this module
7549
- */
7550
- resolveOptions: Object;
7551
- });
7573
+ constructor(__0: NormalModuleCreateData);
7552
7574
  request: string;
7553
7575
  userRequest: string;
7554
7576
  rawRequest: string;
7555
7577
  binary: boolean;
7556
7578
  parser: Parser;
7557
- parserOptions: object;
7579
+ parserOptions?: Record<string, any>;
7558
7580
  generator: Generator;
7559
- generatorOptions: object;
7581
+ generatorOptions?: Record<string, any>;
7560
7582
  resource: string;
7561
7583
  resourceResolveData?: Record<string, any>;
7562
7584
  matchResource?: string;
@@ -7599,20 +7621,109 @@ declare interface NormalModuleCompilationHooks {
7599
7621
  readResource: HookMap<AsyncSeriesBailHook<[object], string | Buffer>>;
7600
7622
  needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
7601
7623
  }
7624
+ declare interface NormalModuleCreateData {
7625
+ /**
7626
+ * an optional layer in which the module is
7627
+ */
7628
+ layer?: string;
7629
+
7630
+ /**
7631
+ * module type
7632
+ */
7633
+ type: string;
7634
+
7635
+ /**
7636
+ * request string
7637
+ */
7638
+ request: string;
7639
+
7640
+ /**
7641
+ * request intended by user (without loaders from config)
7642
+ */
7643
+ userRequest: string;
7644
+
7645
+ /**
7646
+ * request without resolving
7647
+ */
7648
+ rawRequest: string;
7649
+
7650
+ /**
7651
+ * list of loaders
7652
+ */
7653
+ loaders: LoaderItem[];
7654
+
7655
+ /**
7656
+ * path + query of the real resource
7657
+ */
7658
+ resource: string;
7659
+
7660
+ /**
7661
+ * resource resolve data
7662
+ */
7663
+ resourceResolveData?: Record<string, any>;
7664
+
7665
+ /**
7666
+ * context directory for resolving
7667
+ */
7668
+ context: string;
7669
+
7670
+ /**
7671
+ * path + query of the matched resource (virtual)
7672
+ */
7673
+ matchResource?: string;
7674
+
7675
+ /**
7676
+ * the parser used
7677
+ */
7678
+ parser: Parser;
7679
+
7680
+ /**
7681
+ * the options of the parser used
7682
+ */
7683
+ parserOptions?: Record<string, any>;
7684
+
7685
+ /**
7686
+ * the generator used
7687
+ */
7688
+ generator: Generator;
7689
+
7690
+ /**
7691
+ * the options of the generator used
7692
+ */
7693
+ generatorOptions?: Record<string, any>;
7694
+
7695
+ /**
7696
+ * options used for resolving requests from this module
7697
+ */
7698
+ resolveOptions?: ResolveOptionsWebpackOptions;
7699
+ }
7602
7700
  declare abstract class NormalModuleFactory extends ModuleFactory {
7603
7701
  hooks: Readonly<{
7604
- resolve: AsyncSeriesBailHook<[ResolveData], any>;
7702
+ resolve: AsyncSeriesBailHook<[ResolveData], false | void | Module>;
7605
7703
  resolveForScheme: HookMap<
7606
7704
  AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
7607
7705
  >;
7608
7706
  resolveInScheme: HookMap<
7609
7707
  AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
7610
7708
  >;
7611
- factorize: AsyncSeriesBailHook<[ResolveData], any>;
7612
- beforeResolve: AsyncSeriesBailHook<[ResolveData], any>;
7613
- afterResolve: AsyncSeriesBailHook<[ResolveData], any>;
7614
- createModule: AsyncSeriesBailHook<[Object, ResolveData], any>;
7615
- module: SyncWaterfallHook<[Module, Object, ResolveData], any>;
7709
+ factorize: AsyncSeriesBailHook<[ResolveData], Module>;
7710
+ beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
7711
+ afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
7712
+ createModule: AsyncSeriesBailHook<
7713
+ [
7714
+ Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
7715
+ ResolveData
7716
+ ],
7717
+ void | Module
7718
+ >;
7719
+ module: SyncWaterfallHook<
7720
+ [
7721
+ Module,
7722
+ Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
7723
+ ResolveData
7724
+ ],
7725
+ Module
7726
+ >;
7616
7727
  createParser: HookMap<SyncBailHook<any, any>>;
7617
7728
  parser: HookMap<SyncHook<any>>;
7618
7729
  createGenerator: HookMap<SyncBailHook<any, any>>;
@@ -9405,6 +9516,11 @@ declare interface ResolveContext {
9405
9516
  * log function
9406
9517
  */
9407
9518
  log?: (arg0: string) => void;
9519
+
9520
+ /**
9521
+ * yield result, if provided plugins can return several results
9522
+ */
9523
+ yield?: (arg0: ResolveRequest) => void;
9408
9524
  }
9409
9525
  declare interface ResolveData {
9410
9526
  contextInfo: ModuleFactoryCreateDataContextInfo;
@@ -9414,7 +9530,7 @@ declare interface ResolveData {
9414
9530
  assertions?: Record<string, any>;
9415
9531
  dependencies: ModuleDependency[];
9416
9532
  dependencyType: string;
9417
- createData: Object;
9533
+ createData: Partial<NormalModuleCreateData & { settings: ModuleSettings }>;
9418
9534
  fileDependencies: LazySet<string>;
9419
9535
  missingDependencies: LazySet<string>;
9420
9536
  contextDependencies: LazySet<string>;
@@ -10197,6 +10313,7 @@ declare abstract class RuntimeTemplate {
10197
10313
  outputOptions: OutputNormalized;
10198
10314
  requestShortener: RequestShortener;
10199
10315
  globalObject: string;
10316
+ contentHashReplacement: string;
10200
10317
  isIIFE(): undefined | boolean;
10201
10318
  isModule(): undefined | boolean;
10202
10319
  supportsConst(): undefined | boolean;
@@ -11723,6 +11840,7 @@ declare interface UpdateHashContextGenerator {
11723
11840
  module: NormalModule;
11724
11841
  chunkGraph: ChunkGraph;
11725
11842
  runtime: RuntimeSpec;
11843
+ runtimeTemplate?: RuntimeTemplate;
11726
11844
  }
11727
11845
  type UsageStateType = 0 | 1 | 2 | 3 | 4;
11728
11846
  declare interface UserResolveOptions {
@@ -11851,7 +11969,7 @@ declare interface UserResolveOptions {
11851
11969
  restrictions?: (string | RegExp)[];
11852
11970
 
11853
11971
  /**
11854
- * Use only the sync constiants of the file system calls
11972
+ * Use only the sync constraints of the file system calls
11855
11973
  */
11856
11974
  useSyncFileSystemCalls?: boolean;
11857
11975