lighthouse 12.3.0-dev.20250206 → 12.3.0-dev.20250208

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.
@@ -52,11 +52,22 @@ async function adaptInsightToAuditProduct(artifacts, context, insightName, creat
52
52
  };
53
53
  }
54
54
 
55
+ // This hack is to add metric adorners if an insight category links it to a metric,
56
+ // but doesn't output a metric savings for that metric.
57
+ let metricSavings = insight.metricSavings;
58
+ if (insight.category === 'INP' && !metricSavings?.INP) {
59
+ metricSavings = {...metricSavings, INP: /** @type {any} */ (0)};
60
+ } else if (insight.category === 'CLS' && !metricSavings?.CLS) {
61
+ metricSavings = {...metricSavings, CLS: /** @type {any} */ (0)};
62
+ } else if (insight.category === 'LCP' && !metricSavings?.LCP) {
63
+ metricSavings = {...metricSavings, LCP: /** @type {any} */ (0)};
64
+ }
65
+
55
66
  return {
56
67
  scoreDisplayMode:
57
68
  insight.metricSavings ? Audit.SCORING_MODES.METRIC_SAVINGS : Audit.SCORING_MODES.NUMERIC,
58
69
  score: insight.shouldShow ? 0 : 1,
59
- metricSavings: insight.metricSavings,
70
+ metricSavings,
60
71
  warnings: insight.warnings,
61
72
  details,
62
73
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "12.3.0-dev.20250206",
4
+ "version": "12.3.0-dev.20250208",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {