webpack 5.90.3 → 5.91.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 (174) hide show
  1. package/README.md +5 -5
  2. package/bin/webpack.js +5 -1
  3. package/lib/APIPlugin.js +8 -4
  4. package/lib/AutomaticPrefetchPlugin.js +1 -1
  5. package/lib/BannerPlugin.js +3 -1
  6. package/lib/Cache.js +7 -1
  7. package/lib/CacheFacade.js +3 -3
  8. package/lib/ChunkGraph.js +32 -18
  9. package/lib/ChunkGroup.js +14 -14
  10. package/lib/CleanPlugin.js +7 -5
  11. package/lib/Compilation.js +262 -93
  12. package/lib/Compiler.js +199 -83
  13. package/lib/ConditionalInitFragment.js +4 -5
  14. package/lib/ContextModule.js +2 -0
  15. package/lib/ContextModuleFactory.js +4 -2
  16. package/lib/ContextReplacementPlugin.js +3 -2
  17. package/lib/DefinePlugin.js +4 -2
  18. package/lib/Dependency.js +4 -2
  19. package/lib/DependencyTemplate.js +7 -2
  20. package/lib/DllModule.js +1 -0
  21. package/lib/DllReferencePlugin.js +6 -2
  22. package/lib/EntryOptionPlugin.js +4 -1
  23. package/lib/EntryPlugin.js +6 -1
  24. package/lib/Entrypoint.js +1 -1
  25. package/lib/ExportsInfo.js +1 -4
  26. package/lib/ExternalModule.js +118 -24
  27. package/lib/ExternalModuleFactoryPlugin.js +37 -2
  28. package/lib/FileSystemInfo.js +1 -1
  29. package/lib/Generator.js +2 -1
  30. package/lib/HookWebpackError.js +2 -2
  31. package/lib/InitFragment.js +5 -3
  32. package/lib/LibManifestPlugin.js +15 -7
  33. package/lib/Module.js +30 -2
  34. package/lib/ModuleFilenameHelpers.js +1 -1
  35. package/lib/ModuleGraph.js +56 -27
  36. package/lib/ModuleGraphConnection.js +2 -1
  37. package/lib/MultiCompiler.js +26 -8
  38. package/lib/NodeStuffPlugin.js +14 -3
  39. package/lib/NormalModule.js +3 -1
  40. package/lib/NormalModuleFactory.js +1 -1
  41. package/lib/NormalModuleReplacementPlugin.js +5 -1
  42. package/lib/ProvidePlugin.js +3 -1
  43. package/lib/RawModule.js +2 -1
  44. package/lib/ResolverFactory.js +3 -1
  45. package/lib/RuntimeModule.js +4 -4
  46. package/lib/RuntimePlugin.js +1 -0
  47. package/lib/RuntimeTemplate.js +102 -34
  48. package/lib/SourceMapDevToolPlugin.js +4 -1
  49. package/lib/Stats.js +10 -3
  50. package/lib/TemplatedPathPlugin.js +32 -6
  51. package/lib/Watching.js +67 -60
  52. package/lib/WebpackError.js +6 -6
  53. package/lib/WebpackOptionsApply.js +18 -5
  54. package/lib/asset/RawDataUrlModule.js +3 -1
  55. package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
  56. package/lib/buildChunkGraph.js +117 -64
  57. package/lib/cache/IdleFileCachePlugin.js +8 -3
  58. package/lib/cache/MemoryCachePlugin.js +1 -1
  59. package/lib/cache/MemoryWithGcCachePlugin.js +6 -2
  60. package/lib/cache/PackFileCacheStrategy.js +49 -16
  61. package/lib/cache/ResolverCachePlugin.js +14 -6
  62. package/lib/cache/getLazyHashedEtag.js +1 -1
  63. package/lib/config/defaults.js +24 -1
  64. package/lib/config/normalization.js +3 -1
  65. package/lib/container/ContainerEntryDependency.js +2 -1
  66. package/lib/container/ContainerEntryModule.js +3 -1
  67. package/lib/container/ContainerPlugin.js +14 -10
  68. package/lib/container/FallbackModule.js +1 -1
  69. package/lib/container/RemoteRuntimeModule.js +12 -3
  70. package/lib/css/CssExportsGenerator.js +34 -17
  71. package/lib/css/CssGenerator.js +20 -2
  72. package/lib/css/CssLoadingRuntimeModule.js +212 -96
  73. package/lib/css/CssModulesPlugin.js +47 -13
  74. package/lib/debug/ProfilingPlugin.js +27 -2
  75. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +9 -5
  76. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +4 -1
  77. package/lib/dependencies/CommonJsDependencyHelpers.js +2 -1
  78. package/lib/dependencies/CommonJsExportRequireDependency.js +33 -18
  79. package/lib/dependencies/CommonJsExportsDependency.js +13 -5
  80. package/lib/dependencies/CommonJsExportsParserPlugin.js +20 -15
  81. package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -2
  82. package/lib/dependencies/ContextDependencyHelpers.js +49 -29
  83. package/lib/dependencies/ContextElementDependency.js +8 -1
  84. package/lib/dependencies/CssLocalIdentifierDependency.js +63 -8
  85. package/lib/dependencies/CssUrlDependency.js +5 -3
  86. package/lib/dependencies/ExportsInfoDependency.js +4 -3
  87. package/lib/dependencies/ExternalModuleInitFragment.js +5 -3
  88. package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +4 -4
  89. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +43 -23
  90. package/lib/dependencies/HarmonyExportHeaderDependency.js +1 -1
  91. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +73 -32
  92. package/lib/dependencies/HarmonyExportInitFragment.js +10 -2
  93. package/lib/dependencies/HarmonyImportDependency.js +28 -12
  94. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +44 -16
  95. package/lib/dependencies/HarmonyImportSideEffectDependency.js +7 -6
  96. package/lib/dependencies/HarmonyImportSpecifierDependency.js +6 -5
  97. package/lib/dependencies/ImportDependency.js +9 -2
  98. package/lib/dependencies/ImportEagerDependency.js +4 -2
  99. package/lib/dependencies/ImportMetaContextDependency.js +7 -0
  100. package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +25 -14
  101. package/lib/dependencies/ImportParserPlugin.js +12 -4
  102. package/lib/dependencies/ImportWeakDependency.js +4 -2
  103. package/lib/dependencies/LoaderDependency.js +2 -1
  104. package/lib/dependencies/LoaderImportDependency.js +2 -1
  105. package/lib/dependencies/ModuleDependency.js +4 -5
  106. package/lib/dependencies/PureExpressionDependency.js +4 -1
  107. package/lib/dependencies/RequireContextPlugin.js +1 -1
  108. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +26 -14
  109. package/lib/dependencies/RequireEnsureDependency.js +1 -1
  110. package/lib/dependencies/URLDependency.js +7 -4
  111. package/lib/dependencies/WorkerPlugin.js +2 -1
  112. package/lib/dependencies/getFunctionExpression.js +3 -1
  113. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +2 -1
  114. package/lib/javascript/BasicEvaluatedExpression.js +2 -2
  115. package/lib/javascript/ChunkHelpers.js +2 -2
  116. package/lib/javascript/JavascriptParser.js +169 -57
  117. package/lib/javascript/JavascriptParserHelpers.js +1 -1
  118. package/lib/javascript/StartupHelpers.js +22 -5
  119. package/lib/logging/Logger.js +27 -2
  120. package/lib/logging/createConsoleLogger.js +11 -7
  121. package/lib/node/NodeEnvironmentPlugin.js +13 -7
  122. package/lib/node/NodeWatchFileSystem.js +37 -26
  123. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +2 -1
  124. package/lib/node/RequireChunkLoadingRuntimeModule.js +2 -1
  125. package/lib/node/nodeConsole.js +24 -1
  126. package/lib/optimize/AggressiveSplittingPlugin.js +1 -0
  127. package/lib/optimize/ConcatenatedModule.js +138 -54
  128. package/lib/optimize/EnsureChunkConditionsPlugin.js +1 -1
  129. package/lib/optimize/InnerGraph.js +7 -2
  130. package/lib/optimize/InnerGraphPlugin.js +36 -13
  131. package/lib/optimize/ModuleConcatenationPlugin.js +12 -2
  132. package/lib/optimize/RemoveParentModulesPlugin.js +1 -0
  133. package/lib/optimize/RuntimeChunkPlugin.js +6 -1
  134. package/lib/optimize/SideEffectsFlagPlugin.js +46 -15
  135. package/lib/optimize/SplitChunksPlugin.js +2 -2
  136. package/lib/performance/SizeLimitsPlugin.js +11 -0
  137. package/lib/rules/ObjectMatcherRulePlugin.js +4 -0
  138. package/lib/runtime/EnsureChunkRuntimeModule.js +2 -1
  139. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +2 -1
  140. package/lib/serialization/FileMiddleware.js +1 -0
  141. package/lib/serialization/ObjectMiddleware.js +2 -0
  142. package/lib/serialization/Serializer.js +19 -0
  143. package/lib/sharing/ConsumeSharedModule.js +1 -1
  144. package/lib/sharing/ConsumeSharedPlugin.js +17 -3
  145. package/lib/sharing/ConsumeSharedRuntimeModule.js +9 -2
  146. package/lib/sharing/ProvideSharedPlugin.js +12 -5
  147. package/lib/sharing/resolveMatchedConfigs.js +2 -2
  148. package/lib/sharing/utils.js +13 -6
  149. package/lib/util/StackedCacheMap.js +26 -0
  150. package/lib/util/WeakTupleMap.js +57 -13
  151. package/lib/util/cleverMerge.js +24 -11
  152. package/lib/util/comparators.js +34 -14
  153. package/lib/util/conventions.js +129 -0
  154. package/lib/util/fs.js +379 -65
  155. package/lib/util/hash/BatchedHash.js +3 -0
  156. package/lib/util/hash/xxhash64.js +2 -2
  157. package/lib/util/runtime.js +1 -1
  158. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +4 -2
  159. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +15 -6
  160. package/lib/wasm-sync/WebAssemblyGenerator.js +27 -6
  161. package/lib/wasm-sync/WebAssemblyParser.js +7 -4
  162. package/lib/web/JsonpChunkLoadingRuntimeModule.js +2 -1
  163. package/lib/webpack.js +7 -3
  164. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +2 -1
  165. package/package.json +25 -26
  166. package/schemas/WebpackOptions.check.js +1 -1
  167. package/schemas/WebpackOptions.json +69 -8
  168. package/schemas/plugins/BannerPlugin.check.js +1 -1
  169. package/schemas/plugins/BannerPlugin.json +5 -1
  170. package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +1 -1
  171. package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
  172. package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +1 -1
  173. package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +1 -1
  174. package/types.d.ts +1668 -613
@@ -364,8 +364,14 @@
364
364
  "type": "object",
365
365
  "additionalProperties": false,
366
366
  "properties": {
367
+ "exportsConvention": {
368
+ "$ref": "#/definitions/CssGeneratorExportsConvention"
369
+ },
367
370
  "exportsOnly": {
368
371
  "$ref": "#/definitions/CssGeneratorExportsOnly"
372
+ },
373
+ "localIdentName": {
374
+ "$ref": "#/definitions/CssGeneratorLocalIdentName"
369
375
  }
370
376
  }
371
377
  },
@@ -395,15 +401,40 @@
395
401
  }
396
402
  ]
397
403
  },
404
+ "CssGeneratorExportsConvention": {
405
+ "description": "Specifies the convention of exported names.",
406
+ "anyOf": [
407
+ {
408
+ "enum": [
409
+ "as-is",
410
+ "camel-case",
411
+ "camel-case-only",
412
+ "dashes",
413
+ "dashes-only"
414
+ ]
415
+ },
416
+ {
417
+ "instanceof": "Function",
418
+ "tsType": "((name: string) => string)"
419
+ }
420
+ ]
421
+ },
398
422
  "CssGeneratorExportsOnly": {
399
423
  "description": "Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.",
400
424
  "type": "boolean"
401
425
  },
426
+ "CssGeneratorLocalIdentName": {
427
+ "description": "Configure the generated local ident name.",
428
+ "type": "string"
429
+ },
402
430
  "CssGeneratorOptions": {
403
431
  "description": "Generator options for css modules.",
404
432
  "type": "object",
405
433
  "additionalProperties": false,
406
434
  "properties": {
435
+ "exportsConvention": {
436
+ "$ref": "#/definitions/CssGeneratorExportsConvention"
437
+ },
407
438
  "exportsOnly": {
408
439
  "$ref": "#/definitions/CssGeneratorExportsOnly"
409
440
  }
@@ -414,8 +445,14 @@
414
445
  "type": "object",
415
446
  "additionalProperties": false,
416
447
  "properties": {
448
+ "exportsConvention": {
449
+ "$ref": "#/definitions/CssGeneratorExportsConvention"
450
+ },
417
451
  "exportsOnly": {
418
452
  "$ref": "#/definitions/CssGeneratorExportsOnly"
453
+ },
454
+ "localIdentName": {
455
+ "$ref": "#/definitions/CssGeneratorLocalIdentName"
419
456
  }
420
457
  }
421
458
  },
@@ -429,13 +466,23 @@
429
466
  }
430
467
  }
431
468
  },
469
+ "CssHeadDataCompression": {
470
+ "description": "Compress the data in the head tag of CSS files.",
471
+ "type": "boolean"
472
+ },
432
473
  "CssModuleGeneratorOptions": {
433
474
  "description": "Generator options for css/module modules.",
434
475
  "type": "object",
435
476
  "additionalProperties": false,
436
477
  "properties": {
478
+ "exportsConvention": {
479
+ "$ref": "#/definitions/CssGeneratorExportsConvention"
480
+ },
437
481
  "exportsOnly": {
438
482
  "$ref": "#/definitions/CssGeneratorExportsOnly"
483
+ },
484
+ "localIdentName": {
485
+ "$ref": "#/definitions/CssGeneratorLocalIdentName"
439
486
  }
440
487
  }
441
488
  },
@@ -3248,6 +3295,9 @@
3248
3295
  "cssFilename": {
3249
3296
  "$ref": "#/definitions/CssFilename"
3250
3297
  },
3298
+ "cssHeadDataCompression": {
3299
+ "$ref": "#/definitions/CssHeadDataCompression"
3300
+ },
3251
3301
  "devtoolFallbackModuleFilenameTemplate": {
3252
3302
  "$ref": "#/definitions/DevtoolFallbackModuleFilenameTemplate"
3253
3303
  },
@@ -3454,6 +3504,9 @@
3454
3504
  "cssFilename": {
3455
3505
  "$ref": "#/definitions/CssFilename"
3456
3506
  },
3507
+ "cssHeadDataCompression": {
3508
+ "$ref": "#/definitions/CssHeadDataCompression"
3509
+ },
3457
3510
  "devtoolFallbackModuleFilenameTemplate": {
3458
3511
  "$ref": "#/definitions/DevtoolFallbackModuleFilenameTemplate"
3459
3512
  },
@@ -4101,16 +4154,24 @@
4101
4154
  },
4102
4155
  "ResolvePluginInstance": {
4103
4156
  "description": "Plugin instance.",
4104
- "type": "object",
4105
- "additionalProperties": true,
4106
- "properties": {
4107
- "apply": {
4108
- "description": "The run point of the plugin, required method.",
4157
+ "anyOf": [
4158
+ {
4159
+ "type": "object",
4160
+ "additionalProperties": true,
4161
+ "properties": {
4162
+ "apply": {
4163
+ "description": "The run point of the plugin, required method.",
4164
+ "instanceof": "Function",
4165
+ "tsType": "(arg0: import('enhanced-resolve').Resolver) => void"
4166
+ }
4167
+ },
4168
+ "required": ["apply"]
4169
+ },
4170
+ {
4109
4171
  "instanceof": "Function",
4110
- "tsType": "(resolver: import('enhanced-resolve').Resolver) => void"
4172
+ "tsType": "((this: import('enhanced-resolve').Resolver, arg1: import('enhanced-resolve').Resolver) => void)"
4111
4173
  }
4112
- },
4113
- "required": ["apply"]
4174
+ ]
4114
4175
  },
4115
4176
  "RuleSetCondition": {
4116
4177
  "description": "A condition matcher.",
@@ -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: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;
6
+ "use strict";function n(t,{instancePath:e="",parentData:s,parentDataProperty:l,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 e=0;e<n;e++){let n=t[e];const s=o,l=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=l,null!==r&&(l?r.length=l: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,e=o;let s=!1;const l=o;if(!(t instanceof RegExp)){const n={params:{}};null===r?r=[n]:r.push(n),o++}var h=l===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=e,null!==r&&(e?r.length=e: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(e,{instancePath:s="",parentData:l,parentDataProperty:a,rootData:r=e}={}){let o=null,u=0;const i=u;let p=!1;const c=u;if(u===c)if("string"==typeof e){if(e.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(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.banner&&(t="banner")){const n={params:{missingProperty:t}};null===o?o=[n]:o.push(n),u++}else{const t=u;for(const n in e)if("banner"!==n&&"entryOnly"!==n&&"exclude"!==n&&"footer"!==n&&"include"!==n&&"raw"!==n&&"stage"!==n&&"test"!==n){const t={params:{additionalProperty:n}};null===o?o=[t]:o.push(t),u++;break}if(t===u){if(void 0!==e.banner){let n=e.banner;const t=u,s=u;let l=!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(l=l||h,!l){const t=u;if(!(n instanceof Function)){const n={params:{}};null===o?o=[n]:o.push(n),u++}h=t===u,l=l||h}if(l)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!==e.entryOnly){const n=u;if("boolean"!=typeof e.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!==e.exclude){const t=u,l=u;let a=!1,i=null;const p=u;if(n(e.exclude,{instancePath:s+"/exclude",parentData:e,parentDataProperty:"exclude",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=l,null!==o&&(l?o.length=l: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!==e.footer){const n=u;if("boolean"!=typeof e.footer){const n={params:{type:"boolean"}};null===o?o=[n]:o.push(n),u++}m=n===u}else m=!0;if(m){if(void 0!==e.include){const t=u,l=u;let a=!1,i=null;const p=u;if(n(e.include,{instancePath:s+"/include",parentData:e,parentDataProperty:"include",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=l,null!==o&&(l?o.length=l: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!==e.raw){const n=u;if("boolean"!=typeof e.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!==e.stage){const n=u;if("number"!=typeof e.stage){const n={params:{type:"number"}};null===o?o=[n]:o.push(n),u++}m=n===u}else m=!0;if(m)if(void 0!==e.test){const t=u,l=u;let a=!1,i=null;const p=u;if(n(e.test,{instancePath:s+"/test",parentData:e,parentDataProperty:"test",rootData:r})||(o=null===o?n.errors:o.concat(n.errors),u=o.length),p===u&&(a=!0,i=0),a)u=l,null!==o&&(l?o.length=l: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(!(e 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;
@@ -3,7 +3,7 @@
3
3
  "BannerFunction": {
4
4
  "description": "The banner as function, it will be wrapped in a comment.",
5
5
  "instanceof": "Function",
6
- "tsType": "(data: { hash: string, chunk: import('../../lib/Chunk'), filename: string }) => string"
6
+ "tsType": "(data: { hash?: string, chunk: import('../../lib/Chunk'), filename: string }) => string"
7
7
  },
8
8
  "Rule": {
9
9
  "description": "Filtering rule as regex or string.",
@@ -89,6 +89,10 @@
89
89
  "description": "If true, banner will not be wrapped in a comment.",
90
90
  "type": "boolean"
91
91
  },
92
+ "stage": {
93
+ "description": "Specifies the banner.",
94
+ "type": "number"
95
+ },
92
96
  "test": {
93
97
  "description": "Include all modules that pass test assertion.",
94
98
  "oneOf": [
@@ -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 r(t,{instancePath:a="",parentData:e,parentDataProperty:o,rootData:n=t}={}){if(!t||"object"!=typeof t||Array.isArray(t))return r.errors=[{params:{type:"object"}}],!1;{const a=0;for(const a in t)if("exportsOnly"!==a)return r.errors=[{params:{additionalProperty:a}}],!1;if(0===a&&void 0!==t.exportsOnly&&"boolean"!=typeof t.exportsOnly)return r.errors=[{params:{type:"boolean"}}],!1}return r.errors=null,!0}function t(a,{instancePath:e="",parentData:o,parentDataProperty:n,rootData:s=a}={}){let p=null,l=0;return r(a,{instancePath:e,parentData:o,parentDataProperty:n,rootData:s})||(p=null===p?r.errors:p.concat(r.errors),l=p.length),t.errors=p,0===l}module.exports=t,module.exports.default=t;
6
+ "use strict";function t(r,{instancePath:e="",parentData:n,parentDataProperty:o,rootData:a=r}={}){let s=null,l=0;if(0===l){if(!r||"object"!=typeof r||Array.isArray(r))return t.errors=[{params:{type:"object"}}],!1;{const e=l;for(const e in r)if("exportsConvention"!==e&&"exportsOnly"!==e&&"localIdentName"!==e)return t.errors=[{params:{additionalProperty:e}}],!1;if(e===l){if(void 0!==r.exportsConvention){let e=r.exportsConvention;const n=l,o=l;let a=!1;const c=l;if("as-is"!==e&&"camel-case"!==e&&"camel-case-only"!==e&&"dashes"!==e&&"dashes-only"!==e){const t={params:{}};null===s?s=[t]:s.push(t),l++}var i=c===l;if(a=a||i,!a){const t=l;if(!(e instanceof Function)){const t={params:{}};null===s?s=[t]:s.push(t),l++}i=t===l,a=a||i}if(!a){const r={params:{}};return null===s?s=[r]:s.push(r),l++,t.errors=s,!1}l=o,null!==s&&(o?s.length=o:s=null);var p=n===l}else p=!0;if(p){if(void 0!==r.exportsOnly){const e=l;if("boolean"!=typeof r.exportsOnly)return t.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p)if(void 0!==r.localIdentName){const e=l;if("string"!=typeof r.localIdentName)return t.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0}}}}return t.errors=s,0===l}function r(e,{instancePath:n="",parentData:o,parentDataProperty:a,rootData:s=e}={}){let l=null,i=0;return t(e,{instancePath:n,parentData:o,parentDataProperty:a,rootData:s})||(l=null===l?t.errors:l.concat(t.errors),i=l.length),r.errors=l,0===i}module.exports=r,module.exports.default=r;
@@ -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 r(t,{instancePath:a="",parentData:e,parentDataProperty:o,rootData:n=t}={}){if(!t||"object"!=typeof t||Array.isArray(t))return r.errors=[{params:{type:"object"}}],!1;{const a=0;for(const a in t)if("exportsOnly"!==a)return r.errors=[{params:{additionalProperty:a}}],!1;if(0===a&&void 0!==t.exportsOnly&&"boolean"!=typeof t.exportsOnly)return r.errors=[{params:{type:"boolean"}}],!1}return r.errors=null,!0}function t(a,{instancePath:e="",parentData:o,parentDataProperty:n,rootData:s=a}={}){let p=null,l=0;return r(a,{instancePath:e,parentData:o,parentDataProperty:n,rootData:s})||(p=null===p?r.errors:p.concat(r.errors),l=p.length),t.errors=p,0===l}module.exports=t,module.exports.default=t;
6
+ "use strict";function r(t,{instancePath:e="",parentData:n,parentDataProperty:o,rootData:a=t}={}){let s=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return r.errors=[{params:{type:"object"}}],!1;{const e=l;for(const e in t)if("exportsConvention"!==e&&"exportsOnly"!==e)return r.errors=[{params:{additionalProperty:e}}],!1;if(e===l){if(void 0!==t.exportsConvention){let e=t.exportsConvention;const n=l,o=l;let a=!1;const c=l;if("as-is"!==e&&"camel-case"!==e&&"camel-case-only"!==e&&"dashes"!==e&&"dashes-only"!==e){const r={params:{}};null===s?s=[r]:s.push(r),l++}var p=c===l;if(a=a||p,!a){const r=l;if(!(e instanceof Function)){const r={params:{}};null===s?s=[r]:s.push(r),l++}p=r===l,a=a||p}if(!a){const t={params:{}};return null===s?s=[t]:s.push(t),l++,r.errors=s,!1}l=o,null!==s&&(o?s.length=o:s=null);var i=n===l}else i=!0;if(i)if(void 0!==t.exportsOnly){const e=l;if("boolean"!=typeof t.exportsOnly)return r.errors=[{params:{type:"boolean"}}],!1;i=e===l}else i=!0}}}return r.errors=s,0===l}function t(e,{instancePath:n="",parentData:o,parentDataProperty:a,rootData:s=e}={}){let l=null,p=0;return r(e,{instancePath:n,parentData:o,parentDataProperty:a,rootData:s})||(l=null===l?r.errors:l.concat(r.errors),p=l.length),t.errors=l,0===p}module.exports=t,module.exports.default=t;
@@ -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 r(t,{instancePath:a="",parentData:e,parentDataProperty:o,rootData:n=t}={}){if(!t||"object"!=typeof t||Array.isArray(t))return r.errors=[{params:{type:"object"}}],!1;{const a=0;for(const a in t)if("exportsOnly"!==a)return r.errors=[{params:{additionalProperty:a}}],!1;if(0===a&&void 0!==t.exportsOnly&&"boolean"!=typeof t.exportsOnly)return r.errors=[{params:{type:"boolean"}}],!1}return r.errors=null,!0}function t(a,{instancePath:e="",parentData:o,parentDataProperty:n,rootData:s=a}={}){let p=null,l=0;return r(a,{instancePath:e,parentData:o,parentDataProperty:n,rootData:s})||(p=null===p?r.errors:p.concat(r.errors),l=p.length),t.errors=p,0===l}module.exports=t,module.exports.default=t;
6
+ "use strict";function t(r,{instancePath:e="",parentData:n,parentDataProperty:o,rootData:a=r}={}){let s=null,l=0;if(0===l){if(!r||"object"!=typeof r||Array.isArray(r))return t.errors=[{params:{type:"object"}}],!1;{const e=l;for(const e in r)if("exportsConvention"!==e&&"exportsOnly"!==e&&"localIdentName"!==e)return t.errors=[{params:{additionalProperty:e}}],!1;if(e===l){if(void 0!==r.exportsConvention){let e=r.exportsConvention;const n=l,o=l;let a=!1;const c=l;if("as-is"!==e&&"camel-case"!==e&&"camel-case-only"!==e&&"dashes"!==e&&"dashes-only"!==e){const t={params:{}};null===s?s=[t]:s.push(t),l++}var i=c===l;if(a=a||i,!a){const t=l;if(!(e instanceof Function)){const t={params:{}};null===s?s=[t]:s.push(t),l++}i=t===l,a=a||i}if(!a){const r={params:{}};return null===s?s=[r]:s.push(r),l++,t.errors=s,!1}l=o,null!==s&&(o?s.length=o:s=null);var p=n===l}else p=!0;if(p){if(void 0!==r.exportsOnly){const e=l;if("boolean"!=typeof r.exportsOnly)return t.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p)if(void 0!==r.localIdentName){const e=l;if("string"!=typeof r.localIdentName)return t.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0}}}}return t.errors=s,0===l}function r(e,{instancePath:n="",parentData:o,parentDataProperty:a,rootData:s=e}={}){let l=null,i=0;return t(e,{instancePath:n,parentData:o,parentDataProperty:a,rootData:s})||(l=null===l?t.errors:l.concat(t.errors),i=l.length),r.errors=l,0===i}module.exports=r,module.exports.default=r;
@@ -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 r(t,{instancePath:a="",parentData:e,parentDataProperty:o,rootData:n=t}={}){if(!t||"object"!=typeof t||Array.isArray(t))return r.errors=[{params:{type:"object"}}],!1;{const a=0;for(const a in t)if("exportsOnly"!==a)return r.errors=[{params:{additionalProperty:a}}],!1;if(0===a&&void 0!==t.exportsOnly&&"boolean"!=typeof t.exportsOnly)return r.errors=[{params:{type:"boolean"}}],!1}return r.errors=null,!0}function t(a,{instancePath:e="",parentData:o,parentDataProperty:n,rootData:s=a}={}){let p=null,l=0;return r(a,{instancePath:e,parentData:o,parentDataProperty:n,rootData:s})||(p=null===p?r.errors:p.concat(r.errors),l=p.length),t.errors=p,0===l}module.exports=t,module.exports.default=t;
6
+ "use strict";function t(r,{instancePath:e="",parentData:n,parentDataProperty:o,rootData:a=r}={}){let s=null,l=0;if(0===l){if(!r||"object"!=typeof r||Array.isArray(r))return t.errors=[{params:{type:"object"}}],!1;{const e=l;for(const e in r)if("exportsConvention"!==e&&"exportsOnly"!==e&&"localIdentName"!==e)return t.errors=[{params:{additionalProperty:e}}],!1;if(e===l){if(void 0!==r.exportsConvention){let e=r.exportsConvention;const n=l,o=l;let a=!1;const c=l;if("as-is"!==e&&"camel-case"!==e&&"camel-case-only"!==e&&"dashes"!==e&&"dashes-only"!==e){const t={params:{}};null===s?s=[t]:s.push(t),l++}var i=c===l;if(a=a||i,!a){const t=l;if(!(e instanceof Function)){const t={params:{}};null===s?s=[t]:s.push(t),l++}i=t===l,a=a||i}if(!a){const r={params:{}};return null===s?s=[r]:s.push(r),l++,t.errors=s,!1}l=o,null!==s&&(o?s.length=o:s=null);var p=n===l}else p=!0;if(p){if(void 0!==r.exportsOnly){const e=l;if("boolean"!=typeof r.exportsOnly)return t.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p)if(void 0!==r.localIdentName){const e=l;if("string"!=typeof r.localIdentName)return t.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0}}}}return t.errors=s,0===l}function r(e,{instancePath:n="",parentData:o,parentDataProperty:a,rootData:s=e}={}){let l=null,i=0;return t(e,{instancePath:n,parentData:o,parentDataProperty:a,rootData:s})||(l=null===l?t.errors:l.concat(t.errors),i=l.length),r.errors=l,0===i}module.exports=r,module.exports.default=r;