lighthouse 11.4.0-dev.20231211 → 11.4.0-dev.20231212

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.
@@ -7,7 +7,7 @@
7
7
  import {makeComputedArtifact} from './computed-artifact.js';
8
8
  import {NetworkRecords} from './network-records.js';
9
9
  import {Util} from '../../shared/util.js';
10
- import {estimateTransferSize} from '../lib/script-helpers.js';
10
+ import {estimateCompressedContentSize} from '../lib/script-helpers.js';
11
11
 
12
12
  const PREVIEW_LENGTH = 100;
13
13
 
@@ -70,15 +70,15 @@ class UnusedCSS {
70
70
  usedUncompressedBytes += usedRule.endOffset - usedRule.startOffset;
71
71
  }
72
72
 
73
- const totalTransferredBytes = estimateTransferSize(
73
+ const compressedSize = estimateCompressedContentSize(
74
74
  stylesheetInfo.networkRecord, totalUncompressedBytes, 'Stylesheet');
75
75
  const percentUnused = (totalUncompressedBytes - usedUncompressedBytes) / totalUncompressedBytes;
76
- const wastedBytes = Math.round(percentUnused * totalTransferredBytes);
76
+ const wastedBytes = Math.round(percentUnused * compressedSize);
77
77
 
78
78
  return {
79
79
  wastedBytes,
80
80
  wastedPercent: percentUnused * 100,
81
- totalBytes: totalTransferredBytes,
81
+ totalBytes: compressedSize,
82
82
  };
83
83
  }
84
84
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "11.4.0-dev.20231211",
4
+ "version": "11.4.0-dev.20231212",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {