lighthouse 12.3.0-dev.20250224 → 12.3.0-dev.20250225

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.
Files changed (90) hide show
  1. package/core/audits/audit.js +1 -0
  2. package/core/audits/insights/cls-culprits-insight.d.ts +14 -0
  3. package/core/audits/insights/cls-culprits-insight.js +97 -12
  4. package/core/audits/insights/document-latency-insight.js +1 -0
  5. package/core/audits/insights/dom-size-insight.js +1 -0
  6. package/core/audits/insights/font-display-insight.js +1 -0
  7. package/core/audits/insights/image-delivery-insight.js +6 -0
  8. package/core/audits/insights/interaction-to-next-paint-insight.js +1 -0
  9. package/core/audits/insights/lcp-discovery-insight.js +1 -0
  10. package/core/audits/insights/lcp-phases-insight.js +1 -0
  11. package/core/audits/insights/long-critical-network-tree-insight.js +1 -0
  12. package/core/audits/insights/render-blocking-insight.js +1 -0
  13. package/core/audits/insights/third-parties-insight.js +1 -0
  14. package/core/audits/insights/viewport-insight.js +1 -0
  15. package/core/audits/layout-shifts.js +1 -1
  16. package/core/lib/bf-cache-strings.d.ts +7 -4
  17. package/core/lib/bf-cache-strings.js +174 -140
  18. package/core/lib/cdt/generated/ParsedURL.d.ts +1 -0
  19. package/core/lib/cdt/generated/ParsedURL.js +16 -4
  20. package/core/lib/cdt/generated/SourceMap.d.ts +32 -5
  21. package/core/lib/cdt/generated/SourceMap.js +192 -100
  22. package/core/lib/deprecations-strings.d.ts +78 -98
  23. package/core/lib/deprecations-strings.js +23 -41
  24. package/core/lib/i18n/i18n.d.ts +1 -0
  25. package/core/lib/i18n/i18n.js +2 -0
  26. package/dist/report/bundle.esm.js +164 -15
  27. package/dist/report/flow.js +159 -10
  28. package/dist/report/standalone.js +158 -9
  29. package/package.json +3 -3
  30. package/readme.md +1 -0
  31. package/report/assets/styles.css +141 -5
  32. package/report/assets/templates.html +13 -0
  33. package/report/renderer/components.js +2 -2
  34. package/report/renderer/details-renderer.js +3 -0
  35. package/report/renderer/dom.d.ts +12 -1
  36. package/report/renderer/dom.js +26 -1
  37. package/report/renderer/performance-category-renderer.d.ts +2 -2
  38. package/report/renderer/performance-category-renderer.js +58 -23
  39. package/report/renderer/topbar-features.js +4 -5
  40. package/shared/localization/locales/ar-XB.json +0 -21
  41. package/shared/localization/locales/ar.json +0 -21
  42. package/shared/localization/locales/bg.json +0 -21
  43. package/shared/localization/locales/ca.json +0 -21
  44. package/shared/localization/locales/cs.json +0 -21
  45. package/shared/localization/locales/da.json +0 -21
  46. package/shared/localization/locales/de.json +0 -21
  47. package/shared/localization/locales/el.json +0 -21
  48. package/shared/localization/locales/en-GB.json +0 -21
  49. package/shared/localization/locales/en-US.json +33 -24
  50. package/shared/localization/locales/en-XA.json +0 -21
  51. package/shared/localization/locales/en-XL.json +33 -24
  52. package/shared/localization/locales/es-419.json +0 -21
  53. package/shared/localization/locales/es.json +0 -21
  54. package/shared/localization/locales/fi.json +0 -21
  55. package/shared/localization/locales/fil.json +0 -21
  56. package/shared/localization/locales/fr.json +0 -21
  57. package/shared/localization/locales/he.json +0 -21
  58. package/shared/localization/locales/hi.json +0 -21
  59. package/shared/localization/locales/hr.json +0 -21
  60. package/shared/localization/locales/hu.json +0 -21
  61. package/shared/localization/locales/id.json +0 -21
  62. package/shared/localization/locales/it.json +0 -21
  63. package/shared/localization/locales/ja.json +0 -21
  64. package/shared/localization/locales/ko.json +0 -21
  65. package/shared/localization/locales/lt.json +0 -21
  66. package/shared/localization/locales/lv.json +0 -21
  67. package/shared/localization/locales/nl.json +0 -21
  68. package/shared/localization/locales/no.json +0 -21
  69. package/shared/localization/locales/pl.json +0 -21
  70. package/shared/localization/locales/pt-PT.json +0 -21
  71. package/shared/localization/locales/pt.json +0 -21
  72. package/shared/localization/locales/ro.json +0 -21
  73. package/shared/localization/locales/ru.json +0 -21
  74. package/shared/localization/locales/sk.json +0 -21
  75. package/shared/localization/locales/sl.json +0 -21
  76. package/shared/localization/locales/sr-Latn.json +0 -21
  77. package/shared/localization/locales/sr.json +0 -21
  78. package/shared/localization/locales/sv.json +0 -21
  79. package/shared/localization/locales/ta.json +0 -21
  80. package/shared/localization/locales/te.json +0 -21
  81. package/shared/localization/locales/th.json +0 -21
  82. package/shared/localization/locales/tr.json +0 -21
  83. package/shared/localization/locales/uk.json +0 -21
  84. package/shared/localization/locales/vi.json +0 -21
  85. package/shared/localization/locales/zh-HK.json +0 -21
  86. package/shared/localization/locales/zh-TW.json +0 -21
  87. package/shared/localization/locales/zh.json +0 -21
  88. package/types/audit.d.ts +2 -0
  89. package/types/lhr/audit-details.d.ts +5 -1
  90. package/types/lhr/audit-result.d.ts +2 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "12.3.0-dev.20250224",
4
+ "version": "12.3.0-dev.20250225",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -137,7 +137,7 @@
137
137
  "builtin-modules": "^3.3.0",
138
138
  "c8": "^7.11.3",
139
139
  "chalk": "^2.4.1",
140
- "chrome-devtools-frontend": "1.0.1153166",
140
+ "chrome-devtools-frontend": "1.0.1418433",
141
141
  "concurrently": "^6.4.0",
142
142
  "conventional-changelog-cli": "^2.1.1",
143
143
  "cpy": "^8.1.2",
@@ -187,7 +187,7 @@
187
187
  "axe-core": "^4.10.2",
188
188
  "chrome-launcher": "^1.1.2",
189
189
  "configstore": "^5.0.1",
190
- "csp_evaluator": "1.1.1",
190
+ "csp_evaluator": "1.1.5",
191
191
  "devtools-protocol": "^0.0.1421213",
192
192
  "enquirer": "^2.3.6",
193
193
  "http-link-header": "^1.1.1",
package/readme.md CHANGED
@@ -414,6 +414,7 @@ Other awesome open source projects that use Lighthouse.
414
414
  * **[webpack-lighthouse-plugin](https://github.com/addyosmani/webpack-lighthouse-plugin)** - Run Lighthouse from a Webpack build.
415
415
  * **[cypress-audit](https://github.com/mfrachet/cypress-audit)** - Run Lighthouse and Pa11y audits directly in your E2E test suites.
416
416
  * **[laravel-lighthouse](https://github.com/adityadees/laravel-lighthouse)** - Google Lighthouse wrapper for laravel framework to run Google Lighthouse CLI with custom option and can automatically save result in your server directory.
417
+ * **[Neodymium](https://github.com/Xceptance/neodymium/wiki/Accessibility)** - The Neodymium test automation framework integrates Lighthouse for accessibility and Web Vitals verification, allowing programmatic validation and assertion of all audit values.
417
418
 
418
419
  ## FAQ
419
420
 
@@ -199,6 +199,11 @@
199
199
  }
200
200
  }
201
201
 
202
+ /**
203
+ * This media query is a temporary fallback for browsers that do not support `@container query`.
204
+ * TODO: remove this media query when `@container query` is fully supported by browsers
205
+ * See https://github.com/GoogleChrome/lighthouse/pull/16332
206
+ */
202
207
  @media only screen and (max-width: 480px) {
203
208
  .lh-vars {
204
209
  --audit-group-margin-bottom: 20px;
@@ -225,6 +230,32 @@
225
230
  }
226
231
  }
227
232
 
233
+ @container lh-container (max-width: 480px) {
234
+ .lh-vars {
235
+ --audit-group-margin-bottom: 20px;
236
+ --edge-gap-padding: var(--default-padding);
237
+ --env-name-min-width: 120px;
238
+ --gauge-circle-size-big: 96px;
239
+ --gauge-circle-size: 72px;
240
+ --gauge-label-font-size-big: 22px;
241
+ --gauge-label-font-size: 14px;
242
+ --gauge-label-line-height-big: 26px;
243
+ --gauge-label-line-height: 20px;
244
+ --gauge-percentage-font-size-big: 34px;
245
+ --gauge-percentage-font-size: 26px;
246
+ --gauge-wrapper-width: 112px;
247
+ --header-padding: 16px 0 16px 0;
248
+ --image-preview-size: 24px;
249
+ --plugin-icon-size: 75%;
250
+ --report-font-size: 14px;
251
+ --report-line-height: 20px;
252
+ --score-icon-margin-left: 2px;
253
+ --score-icon-size: 10px;
254
+ --topbar-height: 28px;
255
+ --topbar-logo-size: 20px;
256
+ }
257
+ }
258
+
228
259
  .lh-vars.lh-devtools {
229
260
  --audit-explanation-line-height: 14px;
230
261
  --audit-group-margin-bottom: 20px;
@@ -369,6 +400,9 @@
369
400
  but they do not get any overflow:ellipsis treatment.
370
401
  */
371
402
  word-break: break-word;
403
+
404
+ container-name: lh-container;
405
+ container-type: inline-size;
372
406
  }
373
407
 
374
408
  .lh-audit-group a,
@@ -795,7 +829,11 @@
795
829
  grid-column-start: 2;
796
830
  }
797
831
 
798
-
832
+ /**
833
+ * This media query is a temporary fallback for browsers that do not support `@container query`.
834
+ * TODO: remove this media query when `@container query` is fully supported by browsers
835
+ * See https://github.com/GoogleChrome/lighthouse/pull/16332
836
+ */
799
837
  @media screen and (max-width: 535px) {
800
838
  .lh-metrics-container {
801
839
  display: block;
@@ -821,6 +859,31 @@
821
859
  }
822
860
  }
823
861
 
862
+ @container lh-container (max-width: 535px) {
863
+ .lh-metrics-container {
864
+ display: block;
865
+ }
866
+
867
+ .lh-metric {
868
+ border-bottom: none !important;
869
+ }
870
+ .lh-category:not(.lh--hoisted-meta) .lh-metric:nth-last-child(1) {
871
+ border-bottom: 1px solid var(--report-border-color-secondary) !important;
872
+ }
873
+
874
+ /* Change the grid to 3 columns for narrow viewport. */
875
+ .lh-metric__innerwrap {
876
+ /**
877
+ * Icon -- Metric Name -- Metric Value
878
+ */
879
+ grid-template-columns: calc(var(--score-icon-size) + var(--score-icon-margin-left) + var(--score-icon-margin-right)) 2fr 1fr;
880
+ }
881
+ .lh-metric__value {
882
+ justify-self: end;
883
+ grid-column-start: unset;
884
+ }
885
+ }
886
+
824
887
  /* No-JS toggle switch */
825
888
  /* Keep this selector sync'd w/ `magicSelector` in report-ui-features-test.js */
826
889
  .lh-metrics-toggle__input:checked ~ .lh-metrics-container .lh-metric__description {
@@ -1402,6 +1465,11 @@
1402
1465
  height: var(--gauge-circle-size-big);
1403
1466
  }
1404
1467
 
1468
+ /**
1469
+ * This media query is a temporary fallback for browsers that do not support `@container query`.
1470
+ * TODO: remove this media query when `@container query` is fully supported by browsers
1471
+ * See https://github.com/GoogleChrome/lighthouse/pull/16332
1472
+ */
1405
1473
  @media screen and (max-width: 780px) {
1406
1474
  .lh-category-header__finalscreenshot {
1407
1475
  grid-template: 1fr 1fr / none
@@ -1411,8 +1479,20 @@
1411
1479
  }
1412
1480
  }
1413
1481
 
1482
+ @container lh-container (max-width: 780px) {
1483
+ .lh-category-header__finalscreenshot {
1484
+ grid-template: 1fr 1fr / none
1485
+ }
1486
+ .lh-category-headercol--separator {
1487
+ display: none;
1488
+ }
1489
+ }
1414
1490
 
1415
- /* 964 fits the min-width of the filmstrip */
1491
+ /**
1492
+ * This media query is a temporary fallback for browsers that do not support `@container query`.
1493
+ * TODO: remove this media query when `@container query` is fully supported by browsers
1494
+ * See https://github.com/GoogleChrome/lighthouse/pull/16332
1495
+ */
1416
1496
  @media screen and (max-width: 964px) {
1417
1497
  .lh-report {
1418
1498
  margin-left: 0;
@@ -1420,6 +1500,14 @@
1420
1500
  }
1421
1501
  }
1422
1502
 
1503
+ /* 964 fits the min-width of the filmstrip */
1504
+ @container lh-container (max-width: 964px) {
1505
+ .lh-report {
1506
+ margin-left: 0;
1507
+ width: 100%;
1508
+ }
1509
+ }
1510
+
1423
1511
  @media print {
1424
1512
  body {
1425
1513
  -webkit-print-color-adjust: exact; /* print background colors */
@@ -1694,6 +1782,11 @@
1694
1782
  }
1695
1783
  }
1696
1784
 
1785
+ /**
1786
+ * This media query is a temporary fallback for browsers that do not support `@container query`.
1787
+ * TODO: remove this media query when `@container query` is fully supported by browsers
1788
+ * See https://github.com/GoogleChrome/lighthouse/pull/16332
1789
+ */
1697
1790
  @media screen and (max-width: 780px) {
1698
1791
  /* no black outline if we're not confident the entire table can be displayed within bounds */
1699
1792
  .lh-expandable-details[open] {
@@ -1701,6 +1794,13 @@
1701
1794
  }
1702
1795
  }
1703
1796
 
1797
+ @container lh-container (max-width: 780px) {
1798
+ /* no black outline if we're not confident the entire table can be displayed within bounds */
1799
+ .lh-expandable-details[open] {
1800
+ animation: none;
1801
+ }
1802
+ }
1803
+
1704
1804
  .lh-expandable-details[open] summary, details.lh-clump > summary {
1705
1805
  border-bottom: 1px solid var(--report-border-color-secondary);
1706
1806
  }
@@ -1733,8 +1833,11 @@ details[open] .lh-clump-toggletext--hide { display: block;}
1733
1833
  text-align: initial;
1734
1834
  line-height: 1.4;
1735
1835
  }
1736
- /* shrink tooltips to not be cutoff on left edge of narrow viewports
1737
- 45vw is chosen to be ~= width of the left column of metrics
1836
+
1837
+ /**
1838
+ * This media query is a temporary fallback for browsers that do not support `@container query`.
1839
+ * TODO: remove this media query when `@container query` is fully supported by browsers
1840
+ * See https://github.com/GoogleChrome/lighthouse/pull/16332
1738
1841
  */
1739
1842
  @media screen and (max-width: 535px) {
1740
1843
  .lh-tooltip {
@@ -1743,6 +1846,16 @@ details[open] .lh-clump-toggletext--hide { display: block;}
1743
1846
  }
1744
1847
  }
1745
1848
 
1849
+ /* shrink tooltips to not be cutoff on left edge of narrow container
1850
+ 45vw is chosen to be ~= width of the left column of metrics
1851
+ */
1852
+ @container lh-container (max-width: 535px) {
1853
+ .lh-tooltip {
1854
+ min-width: 45vw;
1855
+ padding: 3vw;
1856
+ }
1857
+ }
1858
+
1746
1859
  .lh-tooltip-boundary:hover .lh-tooltip {
1747
1860
  display: block;
1748
1861
  animation: fadeInTooltip 250ms;
@@ -1875,18 +1988,41 @@ details[open] .lh-clump-toggletext--hide { display: block;}
1875
1988
  left: 6px;
1876
1989
  }
1877
1990
 
1878
- /* Change the grid for narrow viewport. */
1991
+ /**
1992
+ * This media query is a temporary fallback for browsers that do not support `@container query`.
1993
+ * TODO: remove this media query when `@container query` is fully supported by browsers
1994
+ * See https://github.com/GoogleChrome/lighthouse/pull/16332
1995
+ */
1879
1996
  @media screen and (max-width: 640px) {
1880
1997
  .lh-meta__items {
1881
1998
  grid-template-columns: 1fr 1fr;
1882
1999
  }
1883
2000
  }
2001
+
2002
+ /* Change the grid for narrow container */
2003
+ @container lh-container (max-width: 640px) {
2004
+ .lh-meta__items {
2005
+ grid-template-columns: 1fr 1fr;
2006
+ }
2007
+ }
2008
+
2009
+ /**
2010
+ * This media query is a temporary fallback for browsers that do not support `@container query`.
2011
+ * TODO: remove this media query when `@container query` is fully supported by browsers
2012
+ * See https://github.com/GoogleChrome/lighthouse/pull/16332
2013
+ */
1884
2014
  @media screen and (max-width: 535px) {
1885
2015
  .lh-meta__items {
1886
2016
  display: block;
1887
2017
  }
1888
2018
  }
1889
2019
 
2020
+ @container lh-container (max-width: 535px) {
2021
+ .lh-meta__items {
2022
+ display: block;
2023
+ }
2024
+ }
2025
+
1890
2026
  /* Explodey gauge */
1891
2027
 
1892
2028
  .lh-exp-gauge-component {
@@ -298,12 +298,25 @@ SPDX-License-Identifier: Apache-2.0
298
298
  margin: 0 4px;
299
299
  }
300
300
 
301
+ /**
302
+ * This media query is a temporary fallback for browsers that do not support `@container query`.
303
+ * TODO: remove this media query when `@container query` is fully supported by browsers
304
+ * See https://github.com/GoogleChrome/lighthouse/pull/16332
305
+ */
301
306
  @media screen and (max-width: 964px) {
302
307
  .lh-tools__dropdown {
303
308
  right: 0;
304
309
  left: initial;
305
310
  }
306
311
  }
312
+
313
+ @container lh-container (max-width: 964px) {
314
+ .lh-tools__dropdown {
315
+ right: 0;
316
+ left: initial;
317
+ }
318
+ }
319
+
307
320
  @media print {
308
321
  .lh-topbar {
309
322
  position: static;