webpack 5.42.0 → 5.42.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.

@@ -766,6 +766,7 @@ class NormalModuleFactory extends ModuleFactory {
766
766
  if (!unsafeCacheData.has(module)) {
767
767
  unsafeCacheData.set(module, module.getUnsafeCacheData());
768
768
  }
769
+ this._restoredUnsafeCacheEntries.add(module);
769
770
  }
770
771
 
771
772
  callback(null, factoryResult);
@@ -265,7 +265,7 @@ class AssetGenerator extends Generator {
265
265
  * @returns {Set<string>} available types (do not mutate)
266
266
  */
267
267
  getTypes(module) {
268
- if (module.buildInfo.dataUrl || this.emit === false) {
268
+ if ((module.buildInfo && module.buildInfo.dataUrl) || this.emit === false) {
269
269
  return JS_TYPES;
270
270
  } else {
271
271
  return JS_AND_ASSET_TYPES;
@@ -289,7 +289,7 @@ class AssetGenerator extends Generator {
289
289
  return originalSource.size();
290
290
  }
291
291
  default:
292
- if (module.buildInfo.dataUrl) {
292
+ if (module.buildInfo && module.buildInfo.dataUrl) {
293
293
  const originalSource = module.originalSource();
294
294
 
295
295
  if (!originalSource) {
@@ -116,7 +116,7 @@ class JsonGenerator extends Generator {
116
116
  * @returns {number} estimate size of the module
117
117
  */
118
118
  getSize(module, type) {
119
- let data = module.buildInfo.jsonData;
119
+ let data = module.buildInfo && module.buildInfo.jsonData;
120
120
  if (!data) return 0;
121
121
  return stringifySafe(data).length + 10;
122
122
  }
@@ -145,7 +145,7 @@ class JsonGenerator extends Generator {
145
145
  concatenationScope
146
146
  }
147
147
  ) {
148
- const data = module.buildInfo.jsonData;
148
+ const data = module.buildInfo && module.buildInfo.jsonData;
149
149
  if (data === undefined) {
150
150
  return new RawSource(
151
151
  runtimeTemplate.missingModuleStatement({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.42.0",
3
+ "version": "5.42.1",
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",