webpack 5.46.0 → 5.49.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 (39) hide show
  1. package/lib/Compilation.js +5 -2
  2. package/lib/ExternalModuleFactoryPlugin.js +1 -1
  3. package/lib/HotModuleReplacementPlugin.js +4 -4
  4. package/lib/Module.js +1 -0
  5. package/lib/MultiCompiler.js +0 -2
  6. package/lib/NormalModule.js +44 -19
  7. package/lib/NormalModuleFactory.js +145 -76
  8. package/lib/Template.js +1 -4
  9. package/lib/WebpackOptionsApply.js +8 -0
  10. package/lib/asset/AssetGenerator.js +1 -1
  11. package/lib/asset/AssetModulesPlugin.js +0 -1
  12. package/lib/config/defaults.js +44 -17
  13. package/lib/config/normalization.js +6 -1
  14. package/lib/dependencies/AMDRequireDependency.js +2 -8
  15. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +6 -3
  16. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +4 -2
  17. package/lib/dependencies/HarmonyImportDependency.js +5 -1
  18. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +40 -5
  19. package/lib/dependencies/HarmonyImportSideEffectDependency.js +2 -2
  20. package/lib/dependencies/HarmonyImportSpecifierDependency.js +10 -2
  21. package/lib/dependencies/ModuleDependency.js +8 -1
  22. package/lib/hmr/HotModuleReplacement.runtime.js +5 -1
  23. package/lib/index.js +0 -3
  24. package/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js +2 -8
  25. package/lib/javascript/JavascriptModulesPlugin.js +48 -29
  26. package/lib/javascript/JavascriptParser.js +14 -9
  27. package/lib/optimize/SplitChunksPlugin.js +4 -4
  28. package/lib/rules/{DescriptionDataMatcherRulePlugin.js → ObjectMatcherRulePlugin.js} +14 -10
  29. package/lib/schemes/HttpUriPlugin.js +942 -25
  30. package/lib/serialization/BinaryMiddleware.js +0 -2
  31. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +2 -2
  32. package/package.json +3 -2
  33. package/schemas/WebpackOptions.check.js +1 -1
  34. package/schemas/WebpackOptions.json +50 -0
  35. package/schemas/plugins/schemes/HttpUriPlugin.check.d.ts +7 -0
  36. package/schemas/plugins/schemes/HttpUriPlugin.check.js +6 -0
  37. package/schemas/plugins/schemes/HttpUriPlugin.json +42 -0
  38. package/types.d.ts +148 -18
  39. package/lib/schemes/HttpsUriPlugin.js +0 -63
@@ -10,8 +10,6 @@ const SerializerMiddleware = require("./SerializerMiddleware");
10
10
  /** @typedef {import("./types").BufferSerializableType} BufferSerializableType */
11
11
  /** @typedef {import("./types").PrimitiveSerializableType} PrimitiveSerializableType */
12
12
 
13
- /* eslint-disable no-loop-func */
14
-
15
13
  /*
16
14
  Format:
17
15
 
@@ -36,7 +36,7 @@ const getAsyncWebAssemblyParser = memoize(() =>
36
36
  );
37
37
 
38
38
  /**
39
- * @typedef {Object} RenderContext
39
+ * @typedef {Object} WebAssemblyRenderContext
40
40
  * @property {Chunk} chunk the chunk
41
41
  * @property {DependencyTemplates} dependencyTemplates the dependency templates
42
42
  * @property {RuntimeTemplate} runtimeTemplate the runtime template
@@ -47,7 +47,7 @@ const getAsyncWebAssemblyParser = memoize(() =>
47
47
 
48
48
  /**
49
49
  * @typedef {Object} CompilationHooks
50
- * @property {SyncWaterfallHook<[Source, Module, RenderContext]>} renderModuleContent
50
+ * @property {SyncWaterfallHook<[Source, Module, WebAssemblyRenderContext]>} renderModuleContent
51
51
  */
52
52
 
53
53
  /** @type {WeakMap<Compilation, CompilationHooks>} */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.46.0",
3
+ "version": "5.49.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",
@@ -11,6 +11,7 @@
11
11
  "@webassemblyjs/wasm-edit": "1.11.1",
12
12
  "@webassemblyjs/wasm-parser": "1.11.1",
13
13
  "acorn": "^8.4.1",
14
+ "acorn-import-assertions": "^1.7.6",
14
15
  "browserslist": "^4.14.5",
15
16
  "chrome-trace-event": "^1.0.2",
16
17
  "enhanced-resolve": "^5.8.0",
@@ -27,7 +28,7 @@
27
28
  "tapable": "^2.1.1",
28
29
  "terser-webpack-plugin": "^5.1.3",
29
30
  "watchpack": "^2.2.0",
30
- "webpack-sources": "^2.3.1"
31
+ "webpack-sources": "^3.2.0"
31
32
  },
32
33
  "peerDependenciesMeta": {
33
34
  "webpack-cli": {