webpack 5.97.1 → 5.98.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.
- package/README.md +341 -392
- package/lib/Compilation.js +17 -15
- package/lib/Module.js +4 -4
- package/lib/ModuleFilenameHelpers.js +8 -26
- package/lib/asset/AssetModulesPlugin.js +2 -2
- package/lib/config/defaults.js +12 -3
- package/lib/css/CssLoadingRuntimeModule.js +5 -2
- package/lib/css/CssModulesPlugin.js +11 -4
- package/lib/dependencies/CommonJsImportsParserPlugin.js +30 -0
- package/lib/dependencies/CssLocalIdentifierDependency.js +1 -1
- package/lib/dependencies/JsonExportsDependency.js +32 -26
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +3 -2
- package/lib/javascript/JavascriptModulesPlugin.js +3 -3
- package/lib/json/JsonModulesPlugin.js +0 -1
- package/lib/json/JsonParser.js +3 -1
- package/lib/optimize/SplitChunksPlugin.js +3 -0
- package/lib/runtime/AutoPublicPathRuntimeModule.js +1 -1
- package/lib/stats/DefaultStatsFactoryPlugin.js +1 -1
- package/lib/util/semver.js +18 -8
- package/lib/validateSchema.js +4 -7
- package/lib/wasm/EnableWasmLoadingPlugin.js +2 -2
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +2 -2
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +2 -2
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +4 -2
- package/package.json +15 -16
- package/schemas/plugins/JsonModulesPluginParser.check.js +1 -1
- package/schemas/plugins/JsonModulesPluginParser.json +4 -0
- package/types.d.ts +42 -40
@@ -80,7 +80,8 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
80
80
|
chunkLoadingGlobal,
|
81
81
|
hotUpdateGlobal,
|
82
82
|
crossOriginLoading,
|
83
|
-
scriptType
|
83
|
+
scriptType,
|
84
|
+
charset
|
84
85
|
}
|
85
86
|
} = compilation;
|
86
87
|
const globalObject = runtimeTemplate.globalObject;
|
@@ -229,6 +230,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
229
230
|
linkPrefetch.call(
|
230
231
|
Template.asString([
|
231
232
|
"var link = document.createElement('link');",
|
233
|
+
charset ? "link.charset = 'utf-8';" : "",
|
232
234
|
crossOriginLoading
|
233
235
|
? `link.crossOrigin = ${JSON.stringify(
|
234
236
|
crossOriginLoading
|
@@ -268,7 +270,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
|
|
268
270
|
scriptType && scriptType !== "module"
|
269
271
|
? `link.type = ${JSON.stringify(scriptType)};`
|
270
272
|
: "",
|
271
|
-
"link.charset = 'utf-8';",
|
273
|
+
charset ? "link.charset = 'utf-8';" : "",
|
272
274
|
`if (${RuntimeGlobals.scriptNonce}) {`,
|
273
275
|
Template.indent(
|
274
276
|
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.98.0",
|
4
4
|
"author": "Tobias Koppers @sokra",
|
5
5
|
"description": "Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
6
6
|
"license": "MIT",
|
@@ -23,9 +23,9 @@
|
|
23
23
|
"loader-runner": "^4.2.0",
|
24
24
|
"mime-types": "^2.1.27",
|
25
25
|
"neo-async": "^2.6.2",
|
26
|
-
"schema-utils": "^3.
|
26
|
+
"schema-utils": "^4.3.0",
|
27
27
|
"tapable": "^2.1.1",
|
28
|
-
"terser-webpack-plugin": "^5.3.
|
28
|
+
"terser-webpack-plugin": "^5.3.11",
|
29
29
|
"watchpack": "^2.4.1",
|
30
30
|
"webpack-sources": "^3.2.3"
|
31
31
|
},
|
@@ -35,15 +35,15 @@
|
|
35
35
|
}
|
36
36
|
},
|
37
37
|
"devDependencies": {
|
38
|
-
"@babel/core": "^7.
|
38
|
+
"@babel/core": "^7.26.8",
|
39
39
|
"@babel/preset-react": "^7.25.7",
|
40
|
-
"@eslint/js": "^9.
|
41
|
-
"@stylistic/eslint-plugin": "^
|
40
|
+
"@eslint/js": "^9.20.0",
|
41
|
+
"@stylistic/eslint-plugin": "^3.1.0",
|
42
42
|
"@types/glob-to-regexp": "^0.4.4",
|
43
43
|
"@types/jest": "^29.5.11",
|
44
44
|
"@types/mime-types": "^2.1.4",
|
45
45
|
"@types/node": "^22.0.0",
|
46
|
-
"assemblyscript": "^0.27.
|
46
|
+
"assemblyscript": "^0.27.34",
|
47
47
|
"babel-loader": "^9.1.3",
|
48
48
|
"benchmark": "^2.1.4",
|
49
49
|
"bundle-loader": "^0.5.6",
|
@@ -55,8 +55,8 @@
|
|
55
55
|
"date-fns": "^4.0.0",
|
56
56
|
"es5-ext": "^0.10.53",
|
57
57
|
"es6-promise-polyfill": "^1.2.0",
|
58
|
-
"eslint": "^9.
|
59
|
-
"eslint-config-prettier": "^
|
58
|
+
"eslint": "^9.20.0",
|
59
|
+
"eslint-config-prettier": "^10.0.1",
|
60
60
|
"eslint-plugin-jest": "^28.6.0",
|
61
61
|
"eslint-plugin-jsdoc": "^48.10.1",
|
62
62
|
"eslint-plugin-n": "^17.11.1",
|
@@ -67,7 +67,6 @@
|
|
67
67
|
"globals": "^15.4.0",
|
68
68
|
"hash-wasm": "^4.9.0",
|
69
69
|
"husky": "^9.0.11",
|
70
|
-
"is-ci": "^3.0.0",
|
71
70
|
"istanbul": "^0.4.5",
|
72
71
|
"jest": "^29.7.0",
|
73
72
|
"jest-circus": "^29.7.0",
|
@@ -87,28 +86,28 @@
|
|
87
86
|
"mini-svg-data-uri": "^1.2.3",
|
88
87
|
"nyc": "^17.1.0",
|
89
88
|
"open-cli": "^8.0.0",
|
90
|
-
"prettier": "^3.
|
89
|
+
"prettier": "^3.5.0",
|
91
90
|
"prettier-2": "npm:prettier@^2",
|
92
91
|
"pretty-format": "^29.5.0",
|
93
92
|
"pug": "^3.0.3",
|
94
93
|
"pug-loader": "^2.4.0",
|
95
94
|
"raw-loader": "^4.0.1",
|
96
|
-
"react": "^
|
97
|
-
"react-dom": "^
|
95
|
+
"react": "^19.0.0",
|
96
|
+
"react-dom": "^19.0.0",
|
98
97
|
"rimraf": "^3.0.2",
|
99
98
|
"script-loader": "^0.7.2",
|
100
99
|
"simple-git": "^3.27.0",
|
101
100
|
"strip-ansi": "^6.0.0",
|
102
101
|
"style-loader": "^4.0.0",
|
103
|
-
"terser": "^5.
|
102
|
+
"terser": "^5.38.1",
|
104
103
|
"toml": "^3.0.0",
|
105
104
|
"tooling": "webpack/tooling#v1.23.5",
|
106
105
|
"ts-loader": "^9.5.1",
|
107
|
-
"typescript": "^5.
|
106
|
+
"typescript": "^5.7.3",
|
108
107
|
"url-loader": "^4.1.0",
|
109
108
|
"wast-loader": "^1.12.1",
|
110
109
|
"webassembly-feature": "1.3.0",
|
111
|
-
"webpack-cli": "^
|
110
|
+
"webpack-cli": "^6.0.1",
|
112
111
|
"xxhashjs": "^0.2.2",
|
113
112
|
"yamljs": "^0.3.0",
|
114
113
|
"yarn-deduplicate": "^6.0.1"
|
@@ -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(
|
6
|
+
"use strict";function r(e,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:s=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return r.errors=[{params:{type:"object"}}],!1;{const t=0;for(const t in e)if("exportsDepth"!==t&&"parse"!==t)return r.errors=[{params:{additionalProperty:t}}],!1;if(0===t){if(void 0!==e.exportsDepth){const t=0;if("number"!=typeof e.exportsDepth)return r.errors=[{params:{type:"number"}}],!1;var n=0===t}else n=!0;if(n)if(void 0!==e.parse){const t=0;if(!(e.parse instanceof Function))return r.errors=[{params:{}}],!1;n=0===t}else n=!0}}return r.errors=null,!0}module.exports=r,module.exports.default=r;
|
@@ -3,6 +3,10 @@
|
|
3
3
|
"type": "object",
|
4
4
|
"additionalProperties": false,
|
5
5
|
"properties": {
|
6
|
+
"exportsDepth": {
|
7
|
+
"description": "The depth of json dependency flagged as `exportInfo`.",
|
8
|
+
"type": "number"
|
9
|
+
},
|
6
10
|
"parse": {
|
7
11
|
"description": "Function that executes for a module source string and should return json-compatible data.",
|
8
12
|
"instanceof": "Function",
|
package/types.d.ts
CHANGED
@@ -248,19 +248,20 @@ declare interface ArgumentConfig {
|
|
248
248
|
type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset";
|
249
249
|
values?: any[];
|
250
250
|
}
|
251
|
+
type ArrayBufferLike = ArrayBuffer | SharedArrayBuffer;
|
251
252
|
type ArrayBufferView =
|
252
|
-
| Uint8Array
|
253
|
-
| Uint8ClampedArray
|
254
|
-
| Uint16Array
|
255
|
-
| Uint32Array
|
256
|
-
| Int8Array
|
257
|
-
| Int16Array
|
258
|
-
| Int32Array
|
259
|
-
| BigUint64Array
|
260
|
-
| BigInt64Array
|
261
|
-
| Float32Array
|
262
|
-
| Float64Array
|
263
|
-
| DataView
|
253
|
+
| Uint8Array<ArrayBufferLike>
|
254
|
+
| Uint8ClampedArray<ArrayBufferLike>
|
255
|
+
| Uint16Array<ArrayBufferLike>
|
256
|
+
| Uint32Array<ArrayBufferLike>
|
257
|
+
| Int8Array<ArrayBufferLike>
|
258
|
+
| Int16Array<ArrayBufferLike>
|
259
|
+
| Int32Array<ArrayBufferLike>
|
260
|
+
| BigUint64Array<ArrayBufferLike>
|
261
|
+
| BigInt64Array<ArrayBufferLike>
|
262
|
+
| Float32Array<ArrayBufferLike>
|
263
|
+
| Float64Array<ArrayBufferLike>
|
264
|
+
| DataView<ArrayBufferLike>;
|
264
265
|
declare interface Asset {
|
265
266
|
/**
|
266
267
|
* the filename of the asset
|
@@ -7481,6 +7482,10 @@ declare interface KnownAssetInfo {
|
|
7481
7482
|
declare interface KnownBuildInfo {
|
7482
7483
|
cacheable?: boolean;
|
7483
7484
|
parsed?: boolean;
|
7485
|
+
moduleArgument?: string;
|
7486
|
+
exportsArgument?: string;
|
7487
|
+
strict?: boolean;
|
7488
|
+
moduleConcatenationBailout?: string;
|
7484
7489
|
fileDependencies?: LazySet<string>;
|
7485
7490
|
contextDependencies?: LazySet<string>;
|
7486
7491
|
missingDependencies?: LazySet<string>;
|
@@ -7492,10 +7497,6 @@ declare interface KnownBuildInfo {
|
|
7492
7497
|
snapshot?: null | Snapshot;
|
7493
7498
|
}
|
7494
7499
|
declare interface KnownBuildMeta {
|
7495
|
-
moduleArgument?: string;
|
7496
|
-
exportsArgument?: string;
|
7497
|
-
strict?: boolean;
|
7498
|
-
moduleConcatenationBailout?: string;
|
7499
7500
|
exportsType?: "namespace" | "dynamic" | "default" | "flagged";
|
7500
7501
|
defaultObject?: false | "redirect" | "redirect-warn";
|
7501
7502
|
strictHarmonyModule?: boolean;
|
@@ -15464,6 +15465,7 @@ declare class WebpackError extends Error {
|
|
15464
15465
|
* Creates an instance of WebpackError.
|
15465
15466
|
*/
|
15466
15467
|
constructor(message?: string);
|
15468
|
+
[index: number]: () => string;
|
15467
15469
|
details?: string;
|
15468
15470
|
module?: null | Module;
|
15469
15471
|
loc?: SyntheticDependencyLocation | RealDependencyLocation;
|
@@ -15755,18 +15757,18 @@ declare interface WriteFile {
|
|
15755
15757
|
file: PathOrFileDescriptorFs,
|
15756
15758
|
data:
|
15757
15759
|
| string
|
15758
|
-
| Uint8Array
|
15759
|
-
| Uint8ClampedArray
|
15760
|
-
| Uint16Array
|
15761
|
-
| Uint32Array
|
15762
|
-
| Int8Array
|
15763
|
-
| Int16Array
|
15764
|
-
| Int32Array
|
15765
|
-
| BigUint64Array
|
15766
|
-
| BigInt64Array
|
15767
|
-
| Float32Array
|
15768
|
-
| Float64Array
|
15769
|
-
| DataView
|
15760
|
+
| Uint8Array<ArrayBufferLike>
|
15761
|
+
| Uint8ClampedArray<ArrayBufferLike>
|
15762
|
+
| Uint16Array<ArrayBufferLike>
|
15763
|
+
| Uint32Array<ArrayBufferLike>
|
15764
|
+
| Int8Array<ArrayBufferLike>
|
15765
|
+
| Int16Array<ArrayBufferLike>
|
15766
|
+
| Int32Array<ArrayBufferLike>
|
15767
|
+
| BigUint64Array<ArrayBufferLike>
|
15768
|
+
| BigInt64Array<ArrayBufferLike>
|
15769
|
+
| Float32Array<ArrayBufferLike>
|
15770
|
+
| Float64Array<ArrayBufferLike>
|
15771
|
+
| DataView<ArrayBufferLike>,
|
15770
15772
|
options: WriteFileOptions,
|
15771
15773
|
callback: (arg0: null | NodeJS.ErrnoException) => void
|
15772
15774
|
): void;
|
@@ -15774,18 +15776,18 @@ declare interface WriteFile {
|
|
15774
15776
|
file: PathOrFileDescriptorFs,
|
15775
15777
|
data:
|
15776
15778
|
| string
|
15777
|
-
| Uint8Array
|
15778
|
-
| Uint8ClampedArray
|
15779
|
-
| Uint16Array
|
15780
|
-
| Uint32Array
|
15781
|
-
| Int8Array
|
15782
|
-
| Int16Array
|
15783
|
-
| Int32Array
|
15784
|
-
| BigUint64Array
|
15785
|
-
| BigInt64Array
|
15786
|
-
| Float32Array
|
15787
|
-
| Float64Array
|
15788
|
-
| DataView
|
15779
|
+
| Uint8Array<ArrayBufferLike>
|
15780
|
+
| Uint8ClampedArray<ArrayBufferLike>
|
15781
|
+
| Uint16Array<ArrayBufferLike>
|
15782
|
+
| Uint32Array<ArrayBufferLike>
|
15783
|
+
| Int8Array<ArrayBufferLike>
|
15784
|
+
| Int16Array<ArrayBufferLike>
|
15785
|
+
| Int32Array<ArrayBufferLike>
|
15786
|
+
| BigUint64Array<ArrayBufferLike>
|
15787
|
+
| BigInt64Array<ArrayBufferLike>
|
15788
|
+
| Float32Array<ArrayBufferLike>
|
15789
|
+
| Float64Array<ArrayBufferLike>
|
15790
|
+
| DataView<ArrayBufferLike>,
|
15789
15791
|
callback: (arg0: null | NodeJS.ErrnoException) => void
|
15790
15792
|
): void;
|
15791
15793
|
}
|