webpack 5.89.0 → 5.90.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.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/README.md +3 -0
- package/bin/webpack.js +1 -3
- package/hot/log.js +0 -2
- package/lib/APIPlugin.js +17 -13
- package/lib/ChunkGraph.js +1 -1
- package/lib/CleanPlugin.js +12 -12
- package/lib/Compilation.js +26 -17
- package/lib/Compiler.js +13 -0
- package/lib/ConcatenationScope.js +2 -2
- package/lib/ConditionalInitFragment.js +3 -3
- package/lib/ContextModule.js +4 -4
- package/lib/ContextModuleFactory.js +1 -1
- package/lib/DefinePlugin.js +47 -26
- package/lib/DependencyTemplate.js +3 -1
- package/lib/EnvironmentNotSupportAsyncWarning.js +52 -0
- package/lib/EvalDevToolModulePlugin.js +1 -1
- package/lib/EvalSourceMapDevToolPlugin.js +2 -2
- package/lib/ExportsInfoApiPlugin.js +2 -2
- package/lib/ExternalModule.js +47 -12
- package/lib/ExternalModuleFactoryPlugin.js +1 -1
- package/lib/FileSystemInfo.js +20 -3
- package/lib/FlagDependencyExportsPlugin.js +1 -1
- package/lib/Generator.js +1 -0
- package/lib/HotModuleReplacementPlugin.js +3 -3
- package/lib/InitFragment.js +7 -7
- package/lib/LibManifestPlugin.js +4 -1
- package/lib/Module.js +2 -1
- package/lib/ModuleFilenameHelpers.js +1 -1
- package/lib/ModuleInfoHeaderPlugin.js +1 -1
- package/lib/MultiStats.js +2 -2
- package/lib/NodeStuffPlugin.js +48 -0
- package/lib/NormalModule.js +13 -11
- package/lib/NormalModuleFactory.js +7 -7
- package/lib/RuntimeTemplate.js +15 -11
- package/lib/SourceMapDevToolPlugin.js +2 -2
- package/lib/Stats.js +4 -0
- package/lib/WebpackOptionsApply.js +4 -3
- package/lib/asset/AssetModulesPlugin.js +2 -3
- package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
- package/lib/buildChunkGraph.js +53 -0
- package/lib/cache/AddManagedPathsPlugin.js +6 -1
- package/lib/cache/IdleFileCachePlugin.js +12 -5
- package/lib/cache/PackFileCacheStrategy.js +3 -3
- package/lib/cache/ResolverCachePlugin.js +2 -2
- package/lib/config/browserslistTargetHandler.js +35 -14
- package/lib/config/defaults.js +88 -52
- package/lib/config/normalization.js +17 -18
- package/lib/config/target.js +5 -0
- package/lib/container/ContainerReferencePlugin.js +1 -1
- package/lib/css/CssExportsGenerator.js +14 -1
- package/lib/css/CssGenerator.js +14 -1
- package/lib/css/CssLoadingRuntimeModule.js +23 -23
- package/lib/css/CssModulesPlugin.js +68 -32
- package/lib/css/CssParser.js +8 -3
- package/lib/debug/ProfilingPlugin.js +2 -2
- package/lib/dependencies/AMDDefineDependency.js +4 -4
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +126 -34
- package/lib/dependencies/AMDPlugin.js +11 -4
- package/lib/dependencies/AMDRequireArrayDependency.js +13 -1
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +159 -43
- package/lib/dependencies/AMDRequireDependency.js +2 -2
- package/lib/dependencies/AMDRequireItemDependency.js +1 -1
- package/lib/dependencies/CachedConstDependency.js +8 -1
- package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -1
- package/lib/dependencies/ContextElementDependency.js +1 -1
- package/lib/dependencies/ExternalModuleDependency.js +107 -0
- package/lib/dependencies/ExternalModuleInitFragment.js +131 -0
- package/lib/dependencies/HarmonyAcceptDependency.js +1 -1
- package/lib/dependencies/HarmonyDetectionParserPlugin.js +7 -1
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +18 -18
- package/lib/dependencies/HarmonyExportInitFragment.js +6 -6
- package/lib/dependencies/HarmonyImportDependency.js +4 -4
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +6 -6
- package/lib/dependencies/ImportDependency.js +26 -6
- package/lib/dependencies/JsonExportsDependency.js +1 -1
- package/lib/dependencies/LoaderPlugin.js +2 -1
- package/lib/dependencies/LocalModuleDependency.js +1 -1
- package/lib/dependencies/PureExpressionDependency.js +12 -4
- package/lib/dependencies/RequireIncludeDependency.js +1 -1
- package/lib/dependencies/WebpackIsIncludedDependency.js +1 -1
- package/lib/dependencies/WorkerPlugin.js +10 -3
- package/lib/dependencies/getFunctionExpression.js +2 -2
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +6 -6
- package/lib/hmr/HotModuleReplacement.runtime.js +3 -5
- package/lib/hmr/lazyCompilationBackend.js +4 -4
- package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
- package/lib/index.js +4 -0
- package/lib/javascript/JavascriptGenerator.js +16 -1
- package/lib/javascript/JavascriptModulesPlugin.js +33 -33
- package/lib/javascript/JavascriptParser.js +220 -74
- package/lib/json/JsonGenerator.js +1 -1
- package/lib/library/AmdLibraryPlugin.js +5 -1
- package/lib/library/AssignLibraryPlugin.js +1 -1
- package/lib/library/SystemLibraryPlugin.js +1 -1
- package/lib/library/UmdLibraryPlugin.js +39 -39
- package/lib/logging/createConsoleLogger.js +1 -19
- package/lib/node/ReadFileChunkLoadingRuntimeModule.js +8 -8
- package/lib/node/RequireChunkLoadingRuntimeModule.js +8 -8
- package/lib/node/nodeConsole.js +1 -5
- package/lib/optimize/ConcatenatedModule.js +7 -7
- package/lib/optimize/InnerGraphPlugin.js +9 -1
- package/lib/optimize/MangleExportsPlugin.js +5 -1
- package/lib/optimize/ModuleConcatenationPlugin.js +2 -2
- package/lib/optimize/RemoveParentModulesPlugin.js +123 -47
- package/lib/optimize/SideEffectsFlagPlugin.js +15 -3
- package/lib/optimize/SplitChunksPlugin.js +16 -16
- package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +2 -2
- package/lib/rules/RuleSetCompiler.js +1 -1
- package/lib/runtime/AutoPublicPathRuntimeModule.js +2 -2
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +4 -4
- package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +4 -4
- package/lib/runtime/LoadScriptRuntimeModule.js +2 -2
- package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +23 -22
- package/lib/runtime/StartupEntrypointRuntimeModule.js +2 -2
- package/lib/schemes/HttpUriPlugin.js +1 -1
- package/lib/serialization/FileMiddleware.js +4 -4
- package/lib/serialization/ObjectMiddleware.js +4 -4
- package/lib/sharing/ConsumeSharedPlugin.js +5 -5
- package/lib/sharing/ConsumeSharedRuntimeModule.js +8 -4
- package/lib/sharing/ProvideSharedModule.js +2 -2
- package/lib/sharing/SharePlugin.js +2 -2
- package/lib/sharing/ShareRuntimeModule.js +1 -1
- package/lib/sharing/utils.js +24 -28
- package/lib/stats/DefaultStatsFactoryPlugin.js +10 -10
- package/lib/stats/DefaultStatsPresetPlugin.js +3 -7
- package/lib/stats/DefaultStatsPrinterPlugin.js +34 -31
- package/lib/util/chainedImports.js +7 -6
- package/lib/util/cleverMerge.js +4 -4
- package/lib/util/comparators.js +59 -23
- package/lib/util/hash/xxhash64.js +2 -2
- package/lib/util/identifier.js +2 -2
- package/lib/util/internalSerializables.js +6 -0
- package/lib/util/numberHash.js +64 -52
- package/lib/util/runtime.js +18 -1
- package/lib/util/semver.js +19 -24
- package/lib/util/smartGrouping.js +1 -1
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +53 -28
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +2 -2
- package/lib/wasm-async/AsyncWebAssemblyParser.js +6 -0
- package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +2 -2
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +2 -2
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +13 -13
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +6 -6
- package/package.json +25 -80
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +140 -32
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +6 -0
- package/schemas/plugins/css/CssAutoGeneratorOptions.json +3 -0
- package/schemas/plugins/css/CssAutoParserOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssAutoParserOptions.check.js +6 -0
- package/schemas/plugins/css/CssAutoParserOptions.json +3 -0
- package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +6 -0
- package/schemas/plugins/css/CssGlobalGeneratorOptions.json +3 -0
- package/schemas/plugins/css/CssGlobalParserOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssGlobalParserOptions.check.js +6 -0
- package/schemas/plugins/css/CssGlobalParserOptions.json +3 -0
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +6 -0
- package/schemas/plugins/css/CssModuleGeneratorOptions.json +3 -0
- package/schemas/plugins/css/CssModuleParserOptions.check.d.ts +7 -0
- package/schemas/plugins/css/CssModuleParserOptions.check.js +6 -0
- package/schemas/plugins/css/CssModuleParserOptions.json +3 -0
- package/schemas/plugins/css/CssParserOptions.check.js +1 -1
- package/types.d.ts +273 -94
package/package.json
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.90.1",
|
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",
|
7
7
|
"dependencies": {
|
8
8
|
"@types/eslint-scope": "^3.7.3",
|
9
|
-
"@types/estree": "^1.0.
|
9
|
+
"@types/estree": "^1.0.5",
|
10
10
|
"@webassemblyjs/ast": "^1.11.5",
|
11
11
|
"@webassemblyjs/wasm-edit": "^1.11.5",
|
12
12
|
"@webassemblyjs/wasm-parser": "^1.11.5",
|
13
13
|
"acorn": "^8.7.1",
|
14
14
|
"acorn-import-assertions": "^1.9.0",
|
15
|
-
"browserslist": "^4.
|
15
|
+
"browserslist": "^4.21.10",
|
16
16
|
"chrome-trace-event": "^1.0.2",
|
17
17
|
"enhanced-resolve": "^5.15.0",
|
18
18
|
"es-module-lexer": "^1.2.1",
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"neo-async": "^2.6.2",
|
27
27
|
"schema-utils": "^3.2.0",
|
28
28
|
"tapable": "^2.1.1",
|
29
|
-
"terser-webpack-plugin": "^5.3.
|
29
|
+
"terser-webpack-plugin": "^5.3.10",
|
30
30
|
"watchpack": "^2.4.0",
|
31
31
|
"webpack-sources": "^3.2.3"
|
32
32
|
},
|
@@ -36,12 +36,12 @@
|
|
36
36
|
}
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@babel/core": "^7.
|
40
|
-
"@babel/preset-react": "^7.
|
41
|
-
"@types/jest": "^29.5.
|
42
|
-
"@types/mime-types": "^2.1.
|
39
|
+
"@babel/core": "^7.23.7",
|
40
|
+
"@babel/preset-react": "^7.23.3",
|
41
|
+
"@types/jest": "^29.5.11",
|
42
|
+
"@types/mime-types": "^2.1.4",
|
43
43
|
"@types/node": "^20.1.7",
|
44
|
-
"assemblyscript": "^0.27.
|
44
|
+
"assemblyscript": "^0.27.22",
|
45
45
|
"babel-loader": "^8.1.0",
|
46
46
|
"benchmark": "^2.1.4",
|
47
47
|
"bundle-loader": "^0.5.6",
|
@@ -51,26 +51,26 @@
|
|
51
51
|
"coveralls": "^3.1.0",
|
52
52
|
"cspell": "^6.31.1",
|
53
53
|
"css-loader": "^5.0.1",
|
54
|
-
"date-fns": "^2.
|
54
|
+
"date-fns": "^3.2.0",
|
55
55
|
"es5-ext": "^0.10.53",
|
56
56
|
"es6-promise-polyfill": "^1.2.0",
|
57
|
-
"eslint": "^8.
|
58
|
-
"eslint-config-prettier": "^
|
59
|
-
"eslint-plugin-jest": "^27.
|
57
|
+
"eslint": "^8.48.0",
|
58
|
+
"eslint-config-prettier": "^9.1.0",
|
59
|
+
"eslint-plugin-jest": "^27.6.3",
|
60
60
|
"eslint-plugin-jsdoc": "^43.0.5",
|
61
|
-
"eslint-plugin-
|
62
|
-
"eslint-plugin-prettier": "^
|
61
|
+
"eslint-plugin-n": "^16.6.2",
|
62
|
+
"eslint-plugin-prettier": "^5.1.3",
|
63
63
|
"file-loader": "^6.0.0",
|
64
64
|
"fork-ts-checker-webpack-plugin": "^8.0.0",
|
65
65
|
"hash-wasm": "^4.9.0",
|
66
66
|
"husky": "^8.0.3",
|
67
67
|
"is-ci": "^3.0.0",
|
68
68
|
"istanbul": "^0.4.5",
|
69
|
-
"jest": "^29.
|
70
|
-
"jest-circus": "^29.
|
71
|
-
"jest-cli": "^29.
|
72
|
-
"jest-diff": "^29.
|
73
|
-
"jest-environment-node": "^29.
|
69
|
+
"jest": "^29.7.0",
|
70
|
+
"jest-circus": "^29.7.0",
|
71
|
+
"jest-cli": "^29.7.0",
|
72
|
+
"jest-diff": "^29.7.0",
|
73
|
+
"jest-environment-node": "^29.7.0",
|
74
74
|
"jest-junit": "^16.0.0",
|
75
75
|
"json-loader": "^0.5.7",
|
76
76
|
"json5": "^2.1.3",
|
@@ -84,7 +84,8 @@
|
|
84
84
|
"mini-svg-data-uri": "^1.2.3",
|
85
85
|
"nyc": "^15.1.0",
|
86
86
|
"open-cli": "^7.2.0",
|
87
|
-
"prettier": "
|
87
|
+
"prettier-2": "npm:prettier@^2",
|
88
|
+
"prettier": "^3.2.1",
|
88
89
|
"pretty-format": "^29.5.0",
|
89
90
|
"pug": "^3.0.0",
|
90
91
|
"pug-loader": "^2.4.0",
|
@@ -96,9 +97,9 @@
|
|
96
97
|
"simple-git": "^3.17.0",
|
97
98
|
"strip-ansi": "^6.0.0",
|
98
99
|
"style-loader": "^2.0.0",
|
99
|
-
"terser": "^5.
|
100
|
+
"terser": "^5.26.0",
|
100
101
|
"toml": "^3.0.0",
|
101
|
-
"tooling": "webpack/tooling#v1.23.
|
102
|
+
"tooling": "webpack/tooling#v1.23.1",
|
102
103
|
"ts-loader": "^9.4.2",
|
103
104
|
"typescript": "^5.0.4",
|
104
105
|
"url-loader": "^4.1.0",
|
@@ -158,7 +159,7 @@
|
|
158
159
|
"special-lint-fix": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/format-schemas --write && node tooling/generate-runtime-code.js --write && node tooling/generate-wasm-code.js --write && node node_modules/tooling/format-file-header --write && node node_modules/tooling/compile-to-definitions --write && node node_modules/tooling/precompile-schemas --write && node node_modules/tooling/generate-types --no-template-literals --write",
|
159
160
|
"fix": "yarn code-lint --fix && yarn special-lint-fix && yarn pretty-lint-fix",
|
160
161
|
"prepare": "husky install",
|
161
|
-
"pretty-lint-base": "prettier --cache .",
|
162
|
+
"pretty-lint-base": "node node_modules/prettier/bin/prettier.cjs --cache .",
|
162
163
|
"pretty-lint-fix": "yarn pretty-lint-base --loglevel warn --write",
|
163
164
|
"pretty-lint": "yarn pretty-lint-base --check",
|
164
165
|
"yarn-lint": "yarn-deduplicate --fail --list -s highest yarn.lock",
|
@@ -186,61 +187,5 @@
|
|
186
187
|
"*.md|{.github,benchmark,bin,examples,hot,lib,schemas,setup,tooling}/**/*.{md,yml,yaml,js,json}": [
|
187
188
|
"cspell"
|
188
189
|
]
|
189
|
-
},
|
190
|
-
"jest": {
|
191
|
-
"forceExit": true,
|
192
|
-
"setupFilesAfterEnv": [
|
193
|
-
"<rootDir>/test/setupTestFramework.js"
|
194
|
-
],
|
195
|
-
"testMatch": [
|
196
|
-
"<rootDir>/test/*.test.js",
|
197
|
-
"<rootDir>/test/*.basictest.js",
|
198
|
-
"<rootDir>/test/*.longtest.js",
|
199
|
-
"<rootDir>/test/*.unittest.js"
|
200
|
-
],
|
201
|
-
"watchPathIgnorePatterns": [
|
202
|
-
"<rootDir>/.git",
|
203
|
-
"<rootDir>/node_modules",
|
204
|
-
"<rootDir>/test/js",
|
205
|
-
"<rootDir>/test/browsertest/js",
|
206
|
-
"<rootDir>/test/fixtures/temp-cache-fixture",
|
207
|
-
"<rootDir>/test/fixtures/temp-",
|
208
|
-
"<rootDir>/benchmark",
|
209
|
-
"<rootDir>/assembly",
|
210
|
-
"<rootDir>/tooling",
|
211
|
-
"<rootDir>/examples/*/dist",
|
212
|
-
"<rootDir>/coverage",
|
213
|
-
"<rootDir>/.eslintcache"
|
214
|
-
],
|
215
|
-
"modulePathIgnorePatterns": [
|
216
|
-
"<rootDir>/.git",
|
217
|
-
"<rootDir>/node_modules/webpack/node_modules",
|
218
|
-
"<rootDir>/test/js",
|
219
|
-
"<rootDir>/test/browsertest/js",
|
220
|
-
"<rootDir>/test/fixtures/temp-cache-fixture",
|
221
|
-
"<rootDir>/test/fixtures/temp-",
|
222
|
-
"<rootDir>/benchmark",
|
223
|
-
"<rootDir>/examples/*/dist",
|
224
|
-
"<rootDir>/coverage",
|
225
|
-
"<rootDir>/.eslintcache"
|
226
|
-
],
|
227
|
-
"transformIgnorePatterns": [
|
228
|
-
"<rootDir>"
|
229
|
-
],
|
230
|
-
"coverageDirectory": "<rootDir>/coverage",
|
231
|
-
"coveragePathIgnorePatterns": [
|
232
|
-
"\\.runtime\\.js$",
|
233
|
-
"<rootDir>/test",
|
234
|
-
"<rootDir>/schemas",
|
235
|
-
"<rootDir>/node_modules"
|
236
|
-
],
|
237
|
-
"testEnvironment": "./test/patch-node-env.js",
|
238
|
-
"coverageReporters": [
|
239
|
-
"json"
|
240
|
-
],
|
241
|
-
"snapshotFormat": {
|
242
|
-
"escapeString": true,
|
243
|
-
"printBasicPrototype": true
|
244
|
-
}
|
245
190
|
}
|
246
191
|
}
|