webpack 5.78.0 → 5.80.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 (35) hide show
  1. package/README.md +3 -0
  2. package/lib/CompatibilityPlugin.js +27 -10
  3. package/lib/Compiler.js +7 -4
  4. package/lib/DefinePlugin.js +18 -6
  5. package/lib/LibManifestPlugin.js +2 -1
  6. package/lib/NormalModuleFactory.js +11 -1
  7. package/lib/NormalModuleReplacementPlugin.js +1 -1
  8. package/lib/WarnCaseSensitiveModulesPlugin.js +12 -0
  9. package/lib/asset/AssetGenerator.js +11 -3
  10. package/lib/css/CssLoadingRuntimeModule.js +1 -1
  11. package/lib/css/CssParser.js +113 -18
  12. package/lib/css/walkCssTokens.js +134 -74
  13. package/lib/dependencies/CssUrlDependency.js +30 -18
  14. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +4 -0
  15. package/lib/dependencies/HarmonyImportSpecifierDependency.js +28 -3
  16. package/lib/dependencies/ImportMetaPlugin.js +56 -26
  17. package/lib/dependencies/ImportParserPlugin.js +17 -1
  18. package/lib/ids/OccurrenceModuleIdsPlugin.js +1 -1
  19. package/lib/index.js +5 -0
  20. package/lib/javascript/JavascriptParser.js +99 -1
  21. package/lib/schemes/DataUriPlugin.js +12 -3
  22. package/lib/stats/DefaultStatsFactoryPlugin.js +98 -25
  23. package/lib/stats/DefaultStatsPresetPlugin.js +9 -0
  24. package/lib/stats/DefaultStatsPrinterPlugin.js +18 -0
  25. package/lib/util/hash/md4.js +2 -2
  26. package/lib/util/hash/xxhash64.js +1 -1
  27. package/lib/webpack.js +1 -1
  28. package/package.json +54 -51
  29. package/schemas/WebpackOptions.check.js +1 -1
  30. package/schemas/WebpackOptions.json +8 -0
  31. package/schemas/plugins/ProgressPlugin.check.js +1 -1
  32. package/schemas/plugins/SourceMapDevToolPlugin.check.js +1 -1
  33. package/schemas/plugins/container/ModuleFederationPlugin.check.js +1 -1
  34. package/schemas/plugins/sharing/SharePlugin.check.js +1 -1
  35. package/types.d.ts +195 -139
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.78.0",
3
+ "version": "5.80.0",
4
4
  "author": "Tobias Koppers @sokra",
5
5
  "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support 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": "^0.0.51",
10
- "@webassemblyjs/ast": "1.11.1",
11
- "@webassemblyjs/wasm-edit": "1.11.1",
12
- "@webassemblyjs/wasm-parser": "1.11.1",
9
+ "@types/estree": "^1.0.0",
10
+ "@webassemblyjs/ast": "^1.11.5",
11
+ "@webassemblyjs/wasm-edit": "^1.11.5",
12
+ "@webassemblyjs/wasm-parser": "^1.11.5",
13
13
  "acorn": "^8.7.1",
14
14
  "acorn-import-assertions": "^1.7.6",
15
15
  "browserslist": "^4.14.5",
16
16
  "chrome-trace-event": "^1.0.2",
17
- "enhanced-resolve": "^5.10.0",
18
- "es-module-lexer": "^0.9.0",
17
+ "enhanced-resolve": "^5.13.0",
18
+ "es-module-lexer": "^1.2.1",
19
19
  "eslint-scope": "5.1.1",
20
20
  "events": "^3.2.0",
21
21
  "glob-to-regexp": "^0.4.1",
@@ -24,9 +24,9 @@
24
24
  "loader-runner": "^4.2.0",
25
25
  "mime-types": "^2.1.27",
26
26
  "neo-async": "^2.6.2",
27
- "schema-utils": "^3.1.0",
27
+ "schema-utils": "^3.1.2",
28
28
  "tapable": "^2.1.1",
29
- "terser-webpack-plugin": "^5.1.3",
29
+ "terser-webpack-plugin": "^5.3.7",
30
30
  "watchpack": "^2.4.0",
31
31
  "webpack-sources": "^3.2.3"
32
32
  },
@@ -36,12 +36,11 @@
36
36
  }
37
37
  },
38
38
  "devDependencies": {
39
- "@babel/core": "^7.11.1",
40
- "@babel/preset-react": "^7.10.4",
41
- "@types/es-module-lexer": "^0.4.1",
42
- "@types/jest": "^27.4.0",
43
- "@types/node": "^17.0.16",
44
- "assemblyscript": "^0.19.16",
39
+ "@babel/core": "^7.21.4",
40
+ "@babel/preset-react": "^7.18.6",
41
+ "@types/jest": "^29.5.0",
42
+ "@types/node": "^18.15.11",
43
+ "assemblyscript": "^0.27.2",
45
44
  "babel-loader": "^8.1.0",
46
45
  "benchmark": "^2.1.4",
47
46
  "bundle-loader": "^0.5.6",
@@ -49,65 +48,66 @@
49
48
  "coffeescript": "^2.5.1",
50
49
  "core-js": "^3.6.5",
51
50
  "coveralls": "^3.1.0",
52
- "cspell": "^4.0.63",
51
+ "cspell": "^6.31.1",
53
52
  "css-loader": "^5.0.1",
54
53
  "date-fns": "^2.15.0",
55
54
  "es5-ext": "^0.10.53",
56
55
  "es6-promise-polyfill": "^1.2.0",
57
- "eslint": "^7.14.0",
56
+ "eslint": "^8.38.0",
58
57
  "eslint-config-prettier": "^8.1.0",
59
- "eslint-plugin-jest": "^24.7.0",
60
- "eslint-plugin-jsdoc": "^33.0.0",
58
+ "eslint-plugin-jest": "^27.2.1",
59
+ "eslint-plugin-jsdoc": "^41.1.1",
61
60
  "eslint-plugin-node": "^11.0.0",
62
- "eslint-plugin-prettier": "^4.0.0",
61
+ "eslint-plugin-prettier": "^4.2.1",
63
62
  "file-loader": "^6.0.0",
64
- "fork-ts-checker-webpack-plugin": "^6.0.5",
63
+ "fork-ts-checker-webpack-plugin": "^8.0.0",
65
64
  "hash-wasm": "^4.9.0",
66
- "husky": "^6.0.0",
65
+ "husky": "^8.0.3",
67
66
  "is-ci": "^3.0.0",
68
67
  "istanbul": "^0.4.5",
69
- "jest": "^27.5.0",
70
- "jest-circus": "^27.5.0",
71
- "jest-cli": "^27.5.0",
72
- "jest-diff": "^27.5.0",
73
- "jest-junit": "^13.0.0",
68
+ "jest": "^29.5.0",
69
+ "jest-circus": "^29.5.0",
70
+ "jest-cli": "^29.5.0",
71
+ "jest-diff": "^29.5.0",
72
+ "jest-environment-node": "^29.5.0",
73
+ "jest-junit": "^16.0.0",
74
74
  "json-loader": "^0.5.7",
75
75
  "json5": "^2.1.3",
76
76
  "less": "^4.0.0",
77
77
  "less-loader": "^8.0.0",
78
- "lint-staged": "^11.0.0",
78
+ "lint-staged": "^13.2.1",
79
79
  "loader-utils": "^2.0.3",
80
80
  "lodash": "^4.17.19",
81
81
  "lodash-es": "^4.17.15",
82
- "memfs": "^3.2.0",
82
+ "memfs": "^3.5.0",
83
83
  "mini-css-extract-plugin": "^1.6.1",
84
84
  "mini-svg-data-uri": "^1.2.3",
85
85
  "nyc": "^15.1.0",
86
- "open-cli": "^6.0.1",
86
+ "open-cli": "^7.2.0",
87
87
  "prettier": "^2.7.1",
88
- "pretty-format": "^27.0.2",
88
+ "pretty-format": "^29.5.0",
89
89
  "pug": "^3.0.0",
90
90
  "pug-loader": "^2.4.0",
91
91
  "raw-loader": "^4.0.1",
92
- "react": "^17.0.1",
93
- "react-dom": "^17.0.1",
92
+ "react": "^18.2.0",
93
+ "react-dom": "^18.2.0",
94
94
  "rimraf": "^3.0.2",
95
95
  "script-loader": "^0.7.2",
96
- "simple-git": "^2.17.0",
96
+ "simple-git": "^3.17.0",
97
97
  "strip-ansi": "^6.0.0",
98
98
  "style-loader": "^2.0.0",
99
- "terser": "^5.7.0",
99
+ "terser": "^5.16.9",
100
100
  "toml": "^3.0.0",
101
- "tooling": "webpack/tooling#v1.22.0",
102
- "ts-loader": "^8.0.2",
101
+ "tooling": "webpack/tooling#v1.22.1",
102
+ "ts-loader": "^9.4.2",
103
103
  "typescript": "^4.8.4",
104
104
  "url-loader": "^4.1.0",
105
- "wast-loader": "^1.11.0",
105
+ "wast-loader": "^1.11.5",
106
106
  "webassembly-feature": "1.3.0",
107
- "webpack-cli": "^4.3.0",
107
+ "webpack-cli": "^5.0.1",
108
108
  "xxhashjs": "^0.2.2",
109
109
  "yamljs": "^0.3.0",
110
- "yarn-deduplicate": "^3.1.0"
110
+ "yarn-deduplicate": "^6.0.1"
111
111
  },
112
112
  "engines": {
113
113
  "node": ">=10.13.0"
@@ -149,18 +149,17 @@
149
149
  "pretest": "yarn lint",
150
150
  "prelint": "yarn setup",
151
151
  "lint": "yarn code-lint && yarn special-lint && yarn type-lint && yarn typings-test && yarn module-typings-test && yarn yarn-lint && yarn pretty-lint && yarn spellcheck",
152
- "code-lint": "eslint . --ext '.js' --cache",
152
+ "code-lint": "eslint --cache .",
153
153
  "type-lint": "tsc",
154
154
  "typings-test": "tsc -p tsconfig.types.test.json",
155
155
  "module-typings-test": "tsc -p tsconfig.module.test.json",
156
- "spellcheck": "cspell \"**/*\"",
156
+ "spellcheck": "cspell --no-progress \"**\"",
157
157
  "special-lint": "node node_modules/tooling/lockfile-lint && node node_modules/tooling/schemas-lint && node node_modules/tooling/inherit-types && node node_modules/tooling/format-schemas && node tooling/generate-runtime-code.js && node tooling/generate-wasm-code.js && node node_modules/tooling/format-file-header && node node_modules/tooling/compile-to-definitions && node node_modules/tooling/precompile-schemas && node node_modules/tooling/generate-types --no-template-literals",
158
158
  "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
159
  "fix": "yarn code-lint --fix && yarn special-lint-fix && yarn pretty-lint-fix",
160
160
  "prepare": "husky install",
161
- "pretty-lint-base": "prettier \"*.{ts,json,yml,yaml,md}\" \"{setup,lib,bin,hot,benchmark,tooling,schemas}/**/*.json\" \"examples/*.md\"",
162
- "pretty-lint-base-all": "yarn pretty-lint-base \"*.js\" \"{setup,lib,bin,hot,benchmark,tooling,schemas}/**/*.js\" \"module.d.ts\" \"test/*.js\" \"test/helpers/*.js\" \"test/{configCases,watchCases,statsCases,hotCases,benchmarkCases}/**/webpack.config.js\" \"examples/**/webpack.config.js\"",
163
- "pretty-lint-fix": "yarn pretty-lint-base-all --loglevel warn --write",
161
+ "pretty-lint-base": "prettier --cache .",
162
+ "pretty-lint-fix": "yarn pretty-lint-base --loglevel warn --write",
164
163
  "pretty-lint": "yarn pretty-lint-base --check",
165
164
  "yarn-lint": "yarn-deduplicate --fail --list -s highest yarn.lock",
166
165
  "yarn-lint-fix": "yarn-deduplicate -s highest yarn.lock",
@@ -178,11 +177,11 @@
178
177
  "cover:report": "nyc report -t coverage"
179
178
  },
180
179
  "lint-staged": {
181
- "*.js|{lib,setup,bin,hot,tooling,schemas}/**/*.js|test/*.js|{test,examples}/**/webpack.config.js}": [
182
- "eslint --cache"
180
+ "*.{js,cjs,mjs}": [
181
+ "eslint --cache --fix"
183
182
  ],
184
- "*.{ts,json,yml,yaml,md}|examples/*.md": [
185
- "prettier --check"
183
+ "*": [
184
+ "prettier --cache --ignore-unknown"
186
185
  ],
187
186
  "*.md|{.github,benchmark,bin,examples,hot,lib,schemas,setup,tooling}/**/*.{md,yml,yaml,js,json}": [
188
187
  "cspell"
@@ -235,9 +234,13 @@
235
234
  "<rootDir>/schemas",
236
235
  "<rootDir>/node_modules"
237
236
  ],
238
- "testEnvironment": "node",
237
+ "testEnvironment": "./test/patch-node-env.js",
239
238
  "coverageReporters": [
240
239
  "json"
241
- ]
240
+ ],
241
+ "snapshotFormat": {
242
+ "escapeString": true,
243
+ "printBasicPrototype": true
244
+ }
242
245
  }
243
246
  }