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.

Files changed (167) hide show
  1. package/README.md +3 -0
  2. package/bin/webpack.js +1 -3
  3. package/hot/log.js +0 -2
  4. package/lib/APIPlugin.js +17 -13
  5. package/lib/ChunkGraph.js +1 -1
  6. package/lib/CleanPlugin.js +12 -12
  7. package/lib/Compilation.js +26 -17
  8. package/lib/Compiler.js +13 -0
  9. package/lib/ConcatenationScope.js +2 -2
  10. package/lib/ConditionalInitFragment.js +3 -3
  11. package/lib/ContextModule.js +4 -4
  12. package/lib/ContextModuleFactory.js +1 -1
  13. package/lib/DefinePlugin.js +47 -26
  14. package/lib/DependencyTemplate.js +3 -1
  15. package/lib/EnvironmentNotSupportAsyncWarning.js +52 -0
  16. package/lib/EvalDevToolModulePlugin.js +1 -1
  17. package/lib/EvalSourceMapDevToolPlugin.js +2 -2
  18. package/lib/ExportsInfoApiPlugin.js +2 -2
  19. package/lib/ExternalModule.js +47 -12
  20. package/lib/ExternalModuleFactoryPlugin.js +1 -1
  21. package/lib/FileSystemInfo.js +20 -3
  22. package/lib/FlagDependencyExportsPlugin.js +1 -1
  23. package/lib/Generator.js +1 -0
  24. package/lib/HotModuleReplacementPlugin.js +3 -3
  25. package/lib/InitFragment.js +7 -7
  26. package/lib/LibManifestPlugin.js +4 -1
  27. package/lib/Module.js +2 -1
  28. package/lib/ModuleFilenameHelpers.js +1 -1
  29. package/lib/ModuleInfoHeaderPlugin.js +1 -1
  30. package/lib/MultiStats.js +2 -2
  31. package/lib/NodeStuffPlugin.js +48 -0
  32. package/lib/NormalModule.js +13 -11
  33. package/lib/NormalModuleFactory.js +7 -7
  34. package/lib/RuntimeTemplate.js +15 -11
  35. package/lib/SourceMapDevToolPlugin.js +2 -2
  36. package/lib/Stats.js +4 -0
  37. package/lib/WebpackOptionsApply.js +4 -3
  38. package/lib/asset/AssetModulesPlugin.js +2 -3
  39. package/lib/async-modules/AwaitDependenciesInitFragment.js +2 -2
  40. package/lib/buildChunkGraph.js +53 -0
  41. package/lib/cache/AddManagedPathsPlugin.js +6 -1
  42. package/lib/cache/IdleFileCachePlugin.js +12 -5
  43. package/lib/cache/PackFileCacheStrategy.js +3 -3
  44. package/lib/cache/ResolverCachePlugin.js +2 -2
  45. package/lib/config/browserslistTargetHandler.js +35 -14
  46. package/lib/config/defaults.js +88 -52
  47. package/lib/config/normalization.js +17 -18
  48. package/lib/config/target.js +5 -0
  49. package/lib/container/ContainerReferencePlugin.js +1 -1
  50. package/lib/css/CssExportsGenerator.js +14 -1
  51. package/lib/css/CssGenerator.js +14 -1
  52. package/lib/css/CssLoadingRuntimeModule.js +23 -23
  53. package/lib/css/CssModulesPlugin.js +68 -32
  54. package/lib/css/CssParser.js +8 -3
  55. package/lib/debug/ProfilingPlugin.js +2 -2
  56. package/lib/dependencies/AMDDefineDependency.js +4 -4
  57. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +126 -34
  58. package/lib/dependencies/AMDPlugin.js +11 -4
  59. package/lib/dependencies/AMDRequireArrayDependency.js +13 -1
  60. package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +159 -43
  61. package/lib/dependencies/AMDRequireDependency.js +2 -2
  62. package/lib/dependencies/AMDRequireItemDependency.js +1 -1
  63. package/lib/dependencies/CachedConstDependency.js +8 -1
  64. package/lib/dependencies/CommonJsImportsParserPlugin.js +1 -1
  65. package/lib/dependencies/ContextElementDependency.js +1 -1
  66. package/lib/dependencies/ExternalModuleDependency.js +107 -0
  67. package/lib/dependencies/ExternalModuleInitFragment.js +131 -0
  68. package/lib/dependencies/HarmonyAcceptDependency.js +1 -1
  69. package/lib/dependencies/HarmonyDetectionParserPlugin.js +7 -1
  70. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +18 -18
  71. package/lib/dependencies/HarmonyExportInitFragment.js +6 -6
  72. package/lib/dependencies/HarmonyImportDependency.js +4 -4
  73. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +6 -6
  74. package/lib/dependencies/ImportDependency.js +26 -6
  75. package/lib/dependencies/JsonExportsDependency.js +1 -1
  76. package/lib/dependencies/LoaderPlugin.js +2 -1
  77. package/lib/dependencies/LocalModuleDependency.js +1 -1
  78. package/lib/dependencies/PureExpressionDependency.js +12 -4
  79. package/lib/dependencies/RequireIncludeDependency.js +1 -1
  80. package/lib/dependencies/WebpackIsIncludedDependency.js +1 -1
  81. package/lib/dependencies/WorkerPlugin.js +10 -3
  82. package/lib/dependencies/getFunctionExpression.js +2 -2
  83. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +6 -6
  84. package/lib/hmr/HotModuleReplacement.runtime.js +3 -5
  85. package/lib/hmr/lazyCompilationBackend.js +4 -4
  86. package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
  87. package/lib/index.js +4 -0
  88. package/lib/javascript/JavascriptGenerator.js +16 -1
  89. package/lib/javascript/JavascriptModulesPlugin.js +33 -33
  90. package/lib/javascript/JavascriptParser.js +220 -74
  91. package/lib/json/JsonGenerator.js +1 -1
  92. package/lib/library/AmdLibraryPlugin.js +5 -1
  93. package/lib/library/AssignLibraryPlugin.js +1 -1
  94. package/lib/library/SystemLibraryPlugin.js +1 -1
  95. package/lib/library/UmdLibraryPlugin.js +39 -39
  96. package/lib/logging/createConsoleLogger.js +1 -19
  97. package/lib/node/ReadFileChunkLoadingRuntimeModule.js +8 -8
  98. package/lib/node/RequireChunkLoadingRuntimeModule.js +8 -8
  99. package/lib/node/nodeConsole.js +1 -5
  100. package/lib/optimize/ConcatenatedModule.js +7 -7
  101. package/lib/optimize/InnerGraphPlugin.js +9 -1
  102. package/lib/optimize/MangleExportsPlugin.js +5 -1
  103. package/lib/optimize/ModuleConcatenationPlugin.js +2 -2
  104. package/lib/optimize/RemoveParentModulesPlugin.js +123 -47
  105. package/lib/optimize/SideEffectsFlagPlugin.js +15 -3
  106. package/lib/optimize/SplitChunksPlugin.js +16 -16
  107. package/lib/prefetch/ChunkPrefetchStartupRuntimeModule.js +2 -2
  108. package/lib/rules/RuleSetCompiler.js +1 -1
  109. package/lib/runtime/AutoPublicPathRuntimeModule.js +2 -2
  110. package/lib/runtime/GetChunkFilenameRuntimeModule.js +4 -4
  111. package/lib/runtime/GetTrustedTypesPolicyRuntimeModule.js +4 -4
  112. package/lib/runtime/LoadScriptRuntimeModule.js +2 -2
  113. package/lib/runtime/StartupChunkDependenciesRuntimeModule.js +23 -22
  114. package/lib/runtime/StartupEntrypointRuntimeModule.js +2 -2
  115. package/lib/schemes/HttpUriPlugin.js +1 -1
  116. package/lib/serialization/FileMiddleware.js +4 -4
  117. package/lib/serialization/ObjectMiddleware.js +4 -4
  118. package/lib/sharing/ConsumeSharedPlugin.js +5 -5
  119. package/lib/sharing/ConsumeSharedRuntimeModule.js +8 -4
  120. package/lib/sharing/ProvideSharedModule.js +2 -2
  121. package/lib/sharing/SharePlugin.js +2 -2
  122. package/lib/sharing/ShareRuntimeModule.js +1 -1
  123. package/lib/sharing/utils.js +24 -28
  124. package/lib/stats/DefaultStatsFactoryPlugin.js +10 -10
  125. package/lib/stats/DefaultStatsPresetPlugin.js +3 -7
  126. package/lib/stats/DefaultStatsPrinterPlugin.js +34 -31
  127. package/lib/util/chainedImports.js +7 -6
  128. package/lib/util/cleverMerge.js +4 -4
  129. package/lib/util/comparators.js +59 -23
  130. package/lib/util/hash/xxhash64.js +2 -2
  131. package/lib/util/identifier.js +2 -2
  132. package/lib/util/internalSerializables.js +6 -0
  133. package/lib/util/numberHash.js +64 -52
  134. package/lib/util/runtime.js +18 -1
  135. package/lib/util/semver.js +19 -24
  136. package/lib/util/smartGrouping.js +1 -1
  137. package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +53 -28
  138. package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +2 -2
  139. package/lib/wasm-async/AsyncWebAssemblyParser.js +6 -0
  140. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +2 -2
  141. package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +2 -2
  142. package/lib/web/JsonpChunkLoadingRuntimeModule.js +13 -13
  143. package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +6 -6
  144. package/package.json +25 -80
  145. package/schemas/WebpackOptions.check.js +1 -1
  146. package/schemas/WebpackOptions.json +140 -32
  147. package/schemas/plugins/css/CssAutoGeneratorOptions.check.d.ts +7 -0
  148. package/schemas/plugins/css/CssAutoGeneratorOptions.check.js +6 -0
  149. package/schemas/plugins/css/CssAutoGeneratorOptions.json +3 -0
  150. package/schemas/plugins/css/CssAutoParserOptions.check.d.ts +7 -0
  151. package/schemas/plugins/css/CssAutoParserOptions.check.js +6 -0
  152. package/schemas/plugins/css/CssAutoParserOptions.json +3 -0
  153. package/schemas/plugins/css/CssGeneratorOptions.check.js +1 -1
  154. package/schemas/plugins/css/CssGlobalGeneratorOptions.check.d.ts +7 -0
  155. package/schemas/plugins/css/CssGlobalGeneratorOptions.check.js +6 -0
  156. package/schemas/plugins/css/CssGlobalGeneratorOptions.json +3 -0
  157. package/schemas/plugins/css/CssGlobalParserOptions.check.d.ts +7 -0
  158. package/schemas/plugins/css/CssGlobalParserOptions.check.js +6 -0
  159. package/schemas/plugins/css/CssGlobalParserOptions.json +3 -0
  160. package/schemas/plugins/css/CssModuleGeneratorOptions.check.d.ts +7 -0
  161. package/schemas/plugins/css/CssModuleGeneratorOptions.check.js +6 -0
  162. package/schemas/plugins/css/CssModuleGeneratorOptions.json +3 -0
  163. package/schemas/plugins/css/CssModuleParserOptions.check.d.ts +7 -0
  164. package/schemas/plugins/css/CssModuleParserOptions.check.js +6 -0
  165. package/schemas/plugins/css/CssModuleParserOptions.json +3 -0
  166. package/schemas/plugins/css/CssParserOptions.check.js +1 -1
  167. package/types.d.ts +273 -94
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.89.0",
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.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.14.5",
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.7",
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.21.4",
40
- "@babel/preset-react": "^7.18.6",
41
- "@types/jest": "^29.5.0",
42
- "@types/mime-types": "^2.1.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.2",
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.15.0",
54
+ "date-fns": "^3.2.0",
55
55
  "es5-ext": "^0.10.53",
56
56
  "es6-promise-polyfill": "^1.2.0",
57
- "eslint": "^8.38.0",
58
- "eslint-config-prettier": "^8.1.0",
59
- "eslint-plugin-jest": "^27.2.1",
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-node": "^11.0.0",
62
- "eslint-plugin-prettier": "^4.2.1",
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.5.0",
70
- "jest-circus": "^29.5.0",
71
- "jest-cli": "^29.5.0",
72
- "jest-diff": "^29.5.0",
73
- "jest-environment-node": "^29.5.0",
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": "^2.7.1",
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.17.0",
100
+ "terser": "^5.26.0",
100
101
  "toml": "^3.0.0",
101
- "tooling": "webpack/tooling#v1.23.0",
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
  }