webpack 5.57.0 → 5.57.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 (2) hide show
  1. package/lib/Compilation.js +14 -2
  2. package/package.json +1 -1
@@ -2252,7 +2252,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2252
2252
  }
2253
2253
 
2254
2254
  for (const module of modulesWithoutCache) {
2255
- const buildInfo = module.buildInfo && module.buildInfo.buildInfo;
2255
+ const buildInfo = module.buildInfo;
2256
2256
  if (buildInfo) {
2257
2257
  // create a new entry
2258
2258
  const memCache = new WeakTupleMap();
@@ -2340,6 +2340,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2340
2340
  const moduleMemCaches2 = (this.moduleMemCaches2 = new Map());
2341
2341
  const { moduleGraph, chunkGraph } = this;
2342
2342
  const key = "memCache2";
2343
+ let statUnchanged = 0;
2344
+ let statChanged = 0;
2345
+ let statNew = 0;
2343
2346
  /**
2344
2347
  * @param {Module} module module
2345
2348
  * @returns {{ modules?: Map<Module, string | number | undefined>, blocks?: (string | number)[] }} references
@@ -2354,7 +2357,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2354
2357
  for (const m of outgoing.keys()) {
2355
2358
  if (!m) continue;
2356
2359
  if (modules === undefined) modules = new Map();
2357
- modules.set(m, chunkGraph.getModuleId(module));
2360
+ modules.set(m, chunkGraph.getModuleId(m));
2358
2361
  }
2359
2362
  }
2360
2363
  if (module.blocks.length > 0) {
@@ -2416,15 +2419,24 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
2416
2419
  memCache: memCache2
2417
2420
  });
2418
2421
  moduleMemCaches2.set(module, memCache2);
2422
+ statNew++;
2419
2423
  } else if (!compareReferences(module, cache.references)) {
2420
2424
  const memCache = new WeakTupleMap();
2421
2425
  cache.references = computeReferences(module);
2422
2426
  cache.memCache = memCache;
2423
2427
  moduleMemCaches2.set(module, memCache);
2428
+ statChanged++;
2424
2429
  } else {
2425
2430
  moduleMemCaches2.set(module, cache.memCache);
2431
+ statUnchanged++;
2426
2432
  }
2427
2433
  }
2434
+
2435
+ this.logger.log(
2436
+ `${Math.round(
2437
+ (100 * statChanged) / (statNew + statChanged + statUnchanged)
2438
+ )}% modules flagged as affected by chunk graph (${statNew} new modules, ${statChanged} changed, ${statUnchanged} unchanged)`
2439
+ );
2428
2440
  }
2429
2441
 
2430
2442
  finish(callback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.57.0",
3
+ "version": "5.57.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",