webpack 5.102.0 → 5.102.1
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.
- package/lib/ChunkGraph.js +2 -2
- package/lib/CodeGenerationResults.js +1 -1
- package/lib/Compilation.js +5 -11
- package/lib/ContextModule.js +3 -1
- package/lib/DefinePlugin.js +1 -1
- package/lib/DependencyTemplates.js +1 -1
- package/lib/FileSystemInfo.js +9 -12
- package/lib/ModuleFilenameHelpers.js +1 -1
- package/lib/NormalModule.js +1 -1
- package/lib/NormalModuleFactory.js +75 -4
- package/lib/RuntimeTemplate.js +10 -1
- package/lib/SourceMapDevToolPlugin.js +6 -8
- package/lib/asset/AssetBytesGenerator.js +1 -0
- package/lib/asset/AssetGenerator.js +2 -3
- package/lib/cache/getLazyHashedEtag.js +1 -1
- package/lib/config/browserslistTargetHandler.js +77 -76
- package/lib/config/defaults.js +7 -2
- package/lib/config/target.js +1 -1
- package/lib/css/CssModulesPlugin.js +2 -6
- package/lib/css/walkCssTokens.js +1 -1
- package/lib/dependencies/ContextElementDependency.js +2 -2
- package/lib/dependencies/CssLocalIdentifierDependency.js +1 -3
- package/lib/dependencies/HarmonyImportDependency.js +5 -2
- package/lib/dependencies/ImportContextDependency.js +13 -0
- package/lib/dependencies/ImportDependency.js +2 -2
- package/lib/dependencies/ImportMetaPlugin.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +1 -3
- package/lib/ids/HashedModuleIdsPlugin.js +5 -7
- package/lib/ids/IdHelpers.js +1 -1
- package/lib/javascript/JavascriptModulesPlugin.js +2 -3
- package/lib/javascript/JavascriptParser.js +1 -1
- package/lib/library/SystemLibraryPlugin.js +15 -5
- package/lib/optimize/RealContentHashPlugin.js +5 -3
- package/lib/serialization/FileMiddleware.js +1 -1
- package/lib/serialization/ObjectMiddleware.js +1 -1
- package/lib/stats/DefaultStatsFactoryPlugin.js +1 -1
- package/lib/util/Hash.js +35 -5
- package/lib/util/create-schema-validation.js +1 -1
- package/lib/util/createHash.js +85 -15
- package/lib/util/hash/BatchedHash.js +47 -8
- package/lib/util/hash/wasm-hash.js +53 -13
- package/lib/wasm-async/AsyncWebAssemblyParser.js +0 -9
- package/lib/wasm-sync/WebAssemblyParser.js +0 -9
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +1 -1
- package/package.json +18 -18
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +16 -3
- package/schemas/plugins/ids/HashedModuleIdsPlugin.check.d.ts +7 -0
- package/schemas/plugins/ids/HashedModuleIdsPlugin.check.js +6 -0
- package/schemas/plugins/{HashedModuleIdsPlugin.json → ids/HashedModuleIdsPlugin.json} +15 -2
- package/types.d.ts +590 -196
- package/schemas/plugins/HashedModuleIdsPlugin.check.d.ts +0 -7
- package/schemas/plugins/HashedModuleIdsPlugin.check.js +0 -6
|
@@ -1568,8 +1568,21 @@
|
|
|
1568
1568
|
"minLength": 1
|
|
1569
1569
|
},
|
|
1570
1570
|
"HashDigest": {
|
|
1571
|
-
"description": "Digest
|
|
1572
|
-
"
|
|
1571
|
+
"description": "Digest types used for the hash.",
|
|
1572
|
+
"enum": [
|
|
1573
|
+
"base64",
|
|
1574
|
+
"base64url",
|
|
1575
|
+
"hex",
|
|
1576
|
+
"binary",
|
|
1577
|
+
"utf8",
|
|
1578
|
+
"utf-8",
|
|
1579
|
+
"utf16le",
|
|
1580
|
+
"utf-16le",
|
|
1581
|
+
"latin1",
|
|
1582
|
+
"ascii",
|
|
1583
|
+
"ucs2",
|
|
1584
|
+
"ucs-2"
|
|
1585
|
+
]
|
|
1573
1586
|
},
|
|
1574
1587
|
"HashDigestLength": {
|
|
1575
1588
|
"description": "Number of chars which are used for the hash.",
|
|
@@ -1786,7 +1799,7 @@
|
|
|
1786
1799
|
"JavascriptParserOptions": {
|
|
1787
1800
|
"description": "Parser options for javascript modules.",
|
|
1788
1801
|
"type": "object",
|
|
1789
|
-
"additionalProperties":
|
|
1802
|
+
"additionalProperties": false,
|
|
1790
1803
|
"properties": {
|
|
1791
1804
|
"amd": {
|
|
1792
1805
|
"$ref": "#/definitions/Amd"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file was automatically generated.
|
|
3
|
+
* DO NOT MODIFY BY HAND.
|
|
4
|
+
* Run `yarn fix:special` to update
|
|
5
|
+
*/
|
|
6
|
+
declare const check: (options: import("../../../declarations/plugins/ids/HashedModuleIdsPlugin").HashedModuleIdsPluginOptions) => boolean;
|
|
7
|
+
export = check;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file was automatically generated.
|
|
3
|
+
* DO NOT MODIFY BY HAND.
|
|
4
|
+
* Run `yarn fix:special` to update
|
|
5
|
+
*/
|
|
6
|
+
const t=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;function e(s,{instancePath:r="",parentData:n,parentDataProperty:a,rootData:i=s}={}){let o=null,l=0;if(0===l){if(!s||"object"!=typeof s||Array.isArray(s))return e.errors=[{params:{type:"object"}}],!1;{const r=l;for(const t in s)if("context"!==t&&"hashDigest"!==t&&"hashDigestLength"!==t&&"hashFunction"!==t)return e.errors=[{params:{additionalProperty:t}}],!1;if(r===l){if(void 0!==s.context){let r=s.context;const n=l;if(l===n){if("string"!=typeof r)return e.errors=[{params:{type:"string"}}],!1;if(r.includes("!")||!0!==t.test(r))return e.errors=[{params:{}}],!1}var u=n===l}else u=!0;if(u){if(void 0!==s.hashDigest){let t=s.hashDigest;const r=l;if("base64"!==t&&"base64url"!==t&&"hex"!==t&&"binary"!==t&&"utf8"!==t&&"utf-8"!==t&&"utf16le"!==t&&"utf-16le"!==t&&"latin1"!==t&&"ascii"!==t&&"ucs2"!==t&&"ucs-2"!==t)return e.errors=[{params:{}}],!1;u=r===l}else u=!0;if(u){if(void 0!==s.hashDigestLength){let t=s.hashDigestLength;const r=l;if(l===r){if("number"!=typeof t)return e.errors=[{params:{type:"number"}}],!1;if(t<1||isNaN(t))return e.errors=[{params:{comparison:">=",limit:1}}],!1}u=r===l}else u=!0;if(u)if(void 0!==s.hashFunction){let t=s.hashFunction;const r=l,n=l;let a=!1,i=null;const c=l,p=l;let h=!1;const m=l;if(l===m)if("string"==typeof t){if(t.length<1){const t={params:{}};null===o?o=[t]:o.push(t),l++}}else{const t={params:{type:"string"}};null===o?o=[t]:o.push(t),l++}var f=m===l;if(h=h||f,!h){const e=l;if(!(t instanceof Function)){const t={params:{}};null===o?o=[t]:o.push(t),l++}f=e===l,h=h||f}if(h)l=p,null!==o&&(p?o.length=p:o=null);else{const t={params:{}};null===o?o=[t]:o.push(t),l++}if(c===l&&(a=!0,i=0),!a){const t={params:{passingSchemas:i}};return null===o?o=[t]:o.push(t),l++,e.errors=o,!1}l=n,null!==o&&(n?o.length=n:o=null),u=r===l}else u=!0}}}}}return e.errors=o,0===l}module.exports=e,module.exports.default=e;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"instanceof": "Function",
|
|
12
|
-
"tsType": "typeof import('
|
|
12
|
+
"tsType": "typeof import('../../../lib/util/Hash')"
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
}
|
|
@@ -25,7 +25,20 @@
|
|
|
25
25
|
},
|
|
26
26
|
"hashDigest": {
|
|
27
27
|
"description": "The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.",
|
|
28
|
-
"enum": [
|
|
28
|
+
"enum": [
|
|
29
|
+
"base64",
|
|
30
|
+
"base64url",
|
|
31
|
+
"hex",
|
|
32
|
+
"binary",
|
|
33
|
+
"utf8",
|
|
34
|
+
"utf-8",
|
|
35
|
+
"utf16le",
|
|
36
|
+
"utf-16le",
|
|
37
|
+
"latin1",
|
|
38
|
+
"ascii",
|
|
39
|
+
"ucs2",
|
|
40
|
+
"ucs-2"
|
|
41
|
+
]
|
|
29
42
|
},
|
|
30
43
|
"hashDigestLength": {
|
|
31
44
|
"description": "The prefix length of the hash digest to use, defaults to 4.",
|