lighthouse 13.3.0 → 13.4.0-dev.20260626

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 (205) hide show
  1. package/.agents/skills/lighthouse-verification/SKILL.md +23 -0
  2. package/cli/cli-flags.d.ts +8 -9
  3. package/cli/test/smokehouse/config/exclusions.js +2 -0
  4. package/cli/test/smokehouse/version-check.d.ts +1 -1
  5. package/core/audits/accessibility/accesskeys.js +1 -1
  6. package/core/audits/accessibility/aria-allowed-attr.js +1 -1
  7. package/core/audits/accessibility/aria-allowed-role.js +1 -1
  8. package/core/audits/accessibility/aria-command-name.js +1 -1
  9. package/core/audits/accessibility/aria-conditional-attr.js +1 -1
  10. package/core/audits/accessibility/aria-deprecated-role.js +1 -1
  11. package/core/audits/accessibility/aria-dialog-name.js +1 -1
  12. package/core/audits/accessibility/aria-hidden-body.js +1 -1
  13. package/core/audits/accessibility/aria-hidden-focus.js +1 -1
  14. package/core/audits/accessibility/aria-input-field-name.js +1 -1
  15. package/core/audits/accessibility/aria-meter-name.js +1 -1
  16. package/core/audits/accessibility/aria-progressbar-name.js +1 -1
  17. package/core/audits/accessibility/aria-prohibited-attr.js +1 -1
  18. package/core/audits/accessibility/aria-required-attr.js +1 -1
  19. package/core/audits/accessibility/aria-required-children.js +1 -1
  20. package/core/audits/accessibility/aria-required-parent.js +1 -1
  21. package/core/audits/accessibility/aria-roles.js +1 -1
  22. package/core/audits/accessibility/aria-text.js +1 -1
  23. package/core/audits/accessibility/aria-toggle-field-name.js +1 -1
  24. package/core/audits/accessibility/aria-tooltip-name.js +1 -1
  25. package/core/audits/accessibility/aria-treeitem-name.js +1 -1
  26. package/core/audits/accessibility/aria-valid-attr-value.js +1 -1
  27. package/core/audits/accessibility/aria-valid-attr.js +1 -1
  28. package/core/audits/accessibility/autocomplete-valid.js +1 -1
  29. package/core/audits/accessibility/button-name.js +1 -1
  30. package/core/audits/accessibility/bypass.js +1 -1
  31. package/core/audits/accessibility/color-contrast.js +1 -1
  32. package/core/audits/accessibility/definition-list.js +1 -1
  33. package/core/audits/accessibility/dlitem.js +1 -1
  34. package/core/audits/accessibility/document-title.js +1 -1
  35. package/core/audits/accessibility/duplicate-id-aria.js +1 -1
  36. package/core/audits/accessibility/empty-heading.js +1 -1
  37. package/core/audits/accessibility/form-field-multiple-labels.js +1 -1
  38. package/core/audits/accessibility/frame-title.js +1 -1
  39. package/core/audits/accessibility/heading-order.js +1 -1
  40. package/core/audits/accessibility/html-has-lang.js +1 -1
  41. package/core/audits/accessibility/html-lang-valid.js +1 -1
  42. package/core/audits/accessibility/html-xml-lang-mismatch.js +1 -1
  43. package/core/audits/accessibility/identical-links-same-purpose.js +1 -1
  44. package/core/audits/accessibility/image-alt.js +1 -1
  45. package/core/audits/accessibility/image-redundant-alt.js +1 -1
  46. package/core/audits/accessibility/input-button-name.js +1 -1
  47. package/core/audits/accessibility/input-image-alt.js +1 -1
  48. package/core/audits/accessibility/label-content-name-mismatch.js +1 -1
  49. package/core/audits/accessibility/label.js +1 -1
  50. package/core/audits/accessibility/landmark-one-main.js +1 -1
  51. package/core/audits/accessibility/link-in-text-block.js +1 -1
  52. package/core/audits/accessibility/link-name.js +1 -1
  53. package/core/audits/accessibility/list.js +1 -1
  54. package/core/audits/accessibility/listitem.js +1 -1
  55. package/core/audits/accessibility/meta-refresh.js +1 -1
  56. package/core/audits/accessibility/meta-viewport.js +1 -1
  57. package/core/audits/accessibility/object-alt.js +1 -1
  58. package/core/audits/accessibility/presentation-role-conflict.js +1 -1
  59. package/core/audits/accessibility/select-name.js +1 -1
  60. package/core/audits/accessibility/skip-link.js +1 -1
  61. package/core/audits/accessibility/svg-img-alt.js +1 -1
  62. package/core/audits/accessibility/tabindex.js +1 -1
  63. package/core/audits/accessibility/table-duplicate-name.js +1 -1
  64. package/core/audits/accessibility/table-fake-caption.js +1 -1
  65. package/core/audits/accessibility/target-size.js +1 -1
  66. package/core/audits/accessibility/td-has-header.js +1 -1
  67. package/core/audits/accessibility/td-headers-attr.js +1 -1
  68. package/core/audits/accessibility/th-has-data-cells.js +1 -1
  69. package/core/audits/accessibility/valid-lang.js +1 -1
  70. package/core/audits/accessibility/video-caption.js +1 -1
  71. package/core/audits/agentic/llms-txt.d.ts +1 -0
  72. package/core/audits/agentic/llms-txt.js +14 -1
  73. package/core/audits/baseline.js +10 -12
  74. package/core/audits/dobetterweb/geolocation-on-start.js +2 -1
  75. package/core/audits/network-requests.js +2 -0
  76. package/core/audits/seo/canonical.js +19 -7
  77. package/core/audits/seo/robots-txt.d.ts +1 -0
  78. package/core/audits/seo/robots-txt.js +22 -8
  79. package/core/computed/js-bundles.d.ts +1 -1
  80. package/core/computed/load-simulator.d.ts +1 -1
  81. package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +1 -1
  82. package/core/computed/metrics/first-contentful-paint.d.ts +1 -1
  83. package/core/computed/metrics/interactive.d.ts +1 -1
  84. package/core/computed/metrics/lantern-metric.d.ts +6 -6
  85. package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +1 -1
  86. package/core/computed/metrics/largest-contentful-paint.d.ts +1 -1
  87. package/core/computed/metrics/max-potential-fid.d.ts +1 -1
  88. package/core/computed/metrics/speed-index.d.ts +1 -1
  89. package/core/computed/metrics/time-to-first-byte.d.ts +1 -1
  90. package/core/computed/metrics/total-blocking-time.d.ts +1 -1
  91. package/core/computed/module-duplication.d.ts +1 -1
  92. package/core/computed/page-dependency-graph.d.ts +1 -1
  93. package/core/computed/unused-css.d.ts +1 -1
  94. package/core/config/agentic-browsing-config.d.ts +1 -0
  95. package/core/config/agentic-browsing-config.js +1 -0
  96. package/core/config/config-helpers.d.ts +1 -0
  97. package/core/config/config-helpers.js +1 -1
  98. package/core/config/config-plugin.d.ts +1 -0
  99. package/core/config/config-plugin.js +1 -0
  100. package/core/config/config.d.ts +1 -0
  101. package/core/config/config.js +1 -0
  102. package/core/config/constants.d.ts +1 -0
  103. package/core/config/constants.js +1 -0
  104. package/core/config/experimental-config.d.ts +1 -9
  105. package/core/config/experimental-config.js +2 -0
  106. package/core/config/filters.d.ts +1 -0
  107. package/core/config/filters.js +1 -0
  108. package/core/config/full-config.d.ts +1 -5
  109. package/core/config/full-config.js +2 -0
  110. package/core/config/lr-desktop-config.d.ts +1 -0
  111. package/core/config/lr-desktop-config.js +1 -0
  112. package/core/config/lr-mobile-config.d.ts +1 -5
  113. package/core/config/lr-mobile-config.js +2 -0
  114. package/core/config/perf-config.d.ts +1 -5
  115. package/core/config/perf-config.js +2 -0
  116. package/core/config/validation.d.ts +1 -0
  117. package/core/config/validation.js +1 -0
  118. package/core/gather/driver/execution-context.d.ts +23 -0
  119. package/core/gather/driver/execution-context.js +86 -1
  120. package/core/gather/driver/storage.js +13 -0
  121. package/core/gather/driver.d.ts +1 -1
  122. package/core/gather/gatherers/accessibility.js +1 -0
  123. package/core/gather/gatherers/agentic/llms-txt.js +5 -1
  124. package/core/gather/gatherers/seo/robots-txt.js +6 -1
  125. package/core/gather/gatherers/trace-elements.d.ts +4 -1
  126. package/core/gather/gatherers/trace-elements.js +24 -28
  127. package/core/gather/gatherers/webmcp-schema.js +9 -16
  128. package/core/gather/gatherers/webmcp.d.ts +5 -0
  129. package/core/gather/gatherers/webmcp.js +34 -27
  130. package/core/lib/baseline/web-features-data.json +1179 -0
  131. package/core/lib/baseline/web-features-metadata.json +1 -1
  132. package/core/lib/deprecations-strings.d.ts +113 -89
  133. package/core/lib/deprecations-strings.js +24 -0
  134. package/core/lib/script-helpers.js +13 -1
  135. package/core/scoring.d.ts +58 -58
  136. package/dist/report/bundle.esm.js +4 -7
  137. package/dist/report/flow.js +6 -9
  138. package/dist/report/standalone.js +20 -12
  139. package/flow-report/types/flow-report.d.ts +2 -2
  140. package/package.json +28 -28
  141. package/report/assets/styles.css +1 -4
  142. package/report/renderer/components.js +1 -1
  143. package/report/renderer/details-renderer.d.ts +6 -1
  144. package/report/renderer/details-renderer.js +11 -3
  145. package/report/renderer/explodey-gauge.js +9 -7
  146. package/report/renderer/i18n-formatter.d.ts +1 -1
  147. package/report/renderer/logger.js +18 -4
  148. package/report/renderer/text-encoding.js +1 -1
  149. package/report/types/html-renderer.d.ts +2 -2
  150. package/shared/localization/locales/ar-XB.json +290 -65
  151. package/shared/localization/locales/ar.json +290 -65
  152. package/shared/localization/locales/bg.json +290 -65
  153. package/shared/localization/locales/ca.json +295 -70
  154. package/shared/localization/locales/cs.json +290 -65
  155. package/shared/localization/locales/da.json +294 -69
  156. package/shared/localization/locales/de.json +295 -70
  157. package/shared/localization/locales/el.json +290 -65
  158. package/shared/localization/locales/en-GB.json +290 -65
  159. package/shared/localization/locales/en-US.json +86 -68
  160. package/shared/localization/locales/en-XA.json +253 -64
  161. package/shared/localization/locales/en-XL.json +86 -68
  162. package/shared/localization/locales/es-419.json +290 -65
  163. package/shared/localization/locales/es.json +298 -73
  164. package/shared/localization/locales/fi.json +290 -65
  165. package/shared/localization/locales/fil.json +290 -65
  166. package/shared/localization/locales/fr.json +294 -69
  167. package/shared/localization/locales/he.json +293 -68
  168. package/shared/localization/locales/hi.json +291 -66
  169. package/shared/localization/locales/hr.json +290 -65
  170. package/shared/localization/locales/hu.json +290 -65
  171. package/shared/localization/locales/id.json +290 -65
  172. package/shared/localization/locales/it.json +294 -69
  173. package/shared/localization/locales/ja.json +290 -65
  174. package/shared/localization/locales/ko.json +290 -65
  175. package/shared/localization/locales/lt.json +290 -65
  176. package/shared/localization/locales/lv.json +290 -65
  177. package/shared/localization/locales/nl.json +290 -65
  178. package/shared/localization/locales/no.json +290 -65
  179. package/shared/localization/locales/pl.json +290 -65
  180. package/shared/localization/locales/pt-PT.json +291 -66
  181. package/shared/localization/locales/pt.json +290 -65
  182. package/shared/localization/locales/ro.json +290 -65
  183. package/shared/localization/locales/ru.json +301 -76
  184. package/shared/localization/locales/sk.json +291 -66
  185. package/shared/localization/locales/sl.json +290 -65
  186. package/shared/localization/locales/sr-Latn.json +290 -65
  187. package/shared/localization/locales/sr.json +290 -65
  188. package/shared/localization/locales/sv.json +297 -72
  189. package/shared/localization/locales/ta.json +291 -66
  190. package/shared/localization/locales/te.json +293 -68
  191. package/shared/localization/locales/th.json +291 -66
  192. package/shared/localization/locales/tr.json +290 -65
  193. package/shared/localization/locales/uk.json +290 -65
  194. package/shared/localization/locales/vi.json +291 -66
  195. package/shared/localization/locales/zh-HK.json +292 -67
  196. package/shared/localization/locales/zh-TW.json +291 -66
  197. package/shared/localization/locales/zh.json +291 -66
  198. package/shared/types/shared.d.ts +1 -1
  199. package/tsconfig-base.json +2 -1
  200. package/tsconfig.json +2 -0
  201. package/types/artifacts.d.ts +1 -1
  202. package/types/internal/rxjs.d.ts +1 -1
  203. package/types/internal/smokehouse.d.ts +1 -1
  204. package/types.d.ts +2 -0
  205. package/types.js +11 -0
@@ -322,12 +322,14 @@ function _setPerfGaugeExplodey(dom, wrapperEl, category) {
322
322
 
323
323
  // To visually get the outer ring to peek on the edge, we need the inner ring on top. This is SVG's equivalent to `innerElem.zIndex = 100`
324
324
  const inner = dom.find('.lh-exp-gauge__inner', SVG);
325
- const id = `uniq-${Math.random()}`;
326
- inner.setAttribute('id', id);
327
- const useElem = dom.createSVGElement('use');
328
- useElem.setAttribute('href', `#${id}`);
329
- // for paint order this must come _after_ the outer.
330
- SVG.appendChild(useElem);
325
+ const useElems = Array.from(inner.querySelectorAll('circle')).map(circle => {
326
+ const id = `uniq-${Math.random()}`;
327
+ circle.setAttribute('id', id);
328
+ const useElem = dom.createSVGElement('use');
329
+ useElem.setAttribute('href', `#${id}`);
330
+ SVG.appendChild(useElem);
331
+ return useElem;
332
+ });
331
333
 
332
334
  const peekDurationSec = 2.5;
333
335
  SVG.style.setProperty('--peek-dur', `${peekDurationSec}s`);
@@ -336,7 +338,7 @@ function _setPerfGaugeExplodey(dom, wrapperEl, category) {
336
338
  // Fancy double cleanup
337
339
  const cleanup = () => {
338
340
  SVG.classList.remove('state--peek', 'state--expanded');
339
- useElem.remove();
341
+ useElems.forEach(el => el.remove());
340
342
  };
341
343
  const tId = setTimeout(() => {
342
344
  SVG.removeEventListener('mouseenter', handleEarlyInteraction);
@@ -3,7 +3,7 @@ export class I18nFormatter {
3
3
  * @param {LH.Locale} locale
4
4
  */
5
5
  constructor(locale: LH.Locale);
6
- _locale: "ar" | "en-US" | "en" | "en-AU" | "en-GB" | "en-IE" | "en-SG" | "en-ZA" | "en-IN" | "ar-XB" | "bg" | "ca" | "cs" | "da" | "de" | "el" | "en-XL" | "es" | "es-419" | "es-AR" | "es-BO" | "es-BR" | "es-BZ" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PE" | "es-PR" | "es-PY" | "es-SV" | "es-US" | "es-UY" | "es-VE" | "fi" | "fil" | "fr" | "he" | "hi" | "hr" | "hu" | "gsw" | "id" | "in" | "it" | "iw" | "ja" | "ko" | "lt" | "lv" | "mo" | "nl" | "nb" | "no" | "pl" | "pt" | "pt-PT" | "ro" | "ru" | "sk" | "sl" | "sr" | "sr-Latn" | "sv" | "ta" | "te" | "th" | "tl" | "tr" | "uk" | "vi" | "zh" | "zh-HK" | "zh-TW";
6
+ _locale: "id" | "hr" | "th" | "tr" | "mo" | "en-US" | "en" | "en-AU" | "en-GB" | "en-IE" | "en-SG" | "en-ZA" | "en-IN" | "ar-XB" | "ar" | "bg" | "ca" | "cs" | "da" | "de" | "el" | "en-XL" | "es" | "es-419" | "es-AR" | "es-BO" | "es-BR" | "es-BZ" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PE" | "es-PR" | "es-PY" | "es-SV" | "es-US" | "es-UY" | "es-VE" | "fi" | "fil" | "fr" | "he" | "hi" | "hu" | "gsw" | "in" | "it" | "iw" | "ja" | "ko" | "lt" | "lv" | "nl" | "nb" | "no" | "pl" | "pt" | "pt-PT" | "ro" | "ru" | "sk" | "sl" | "sr" | "sr-Latn" | "sv" | "ta" | "te" | "tl" | "uk" | "vi" | "zh" | "zh-HK" | "zh-TW";
7
7
  _cachedNumberFormatters: Map<any, any>;
8
8
  /**
9
9
  * @param {number} number
@@ -13,8 +13,18 @@ export class Logger {
13
13
  */
14
14
  constructor(element) {
15
15
  this.el = element;
16
+
16
17
  const styleEl = document.createElement('style');
17
18
  styleEl.textContent = /* css */ `
19
+ @keyframes fadeInDown {
20
+ from { transform: translateY(100px); opacity: 0; }
21
+ to { transform: translateY(0); opacity: 1; }
22
+ }
23
+ @keyframes fadeOutUp {
24
+ from { transform: translateY(0); opacity: 1; }
25
+ to { transform: translateY(100px); opacity: 0; }
26
+ }
27
+
18
28
  #lh-log {
19
29
  position: fixed;
20
30
  background-color: #323232;
@@ -27,7 +37,6 @@ export class Logger {
27
37
  margin: 12px;
28
38
  font-size: 14px;
29
39
  cursor: default;
30
- transition: transform 0.3s, opacity 0.3s;
31
40
  transform: translateY(100px);
32
41
  opacity: 0;
33
42
  bottom: 0;
@@ -40,8 +49,11 @@ export class Logger {
40
49
  }
41
50
 
42
51
  #lh-log.lh-show {
43
- opacity: 1;
44
- transform: translateY(0);
52
+ animation: fadeInDown 0.3s forwards;
53
+ }
54
+
55
+ #lh-log.lh-hide {
56
+ animation: fadeOutUp 0.3s forwards;
45
57
  }
46
58
  `;
47
59
  if (!this.el.parentNode) throw new Error('element needs to be in the DOM');
@@ -59,10 +71,11 @@ export class Logger {
59
71
  this._id && clearTimeout(this._id);
60
72
 
61
73
  this.el.textContent = msg;
74
+ this.el.classList.remove('lh-hide');
62
75
  this.el.classList.add('lh-show');
63
76
  if (autoHide) {
64
77
  this._id = setTimeout(() => {
65
- this.el.classList.remove('lh-show');
78
+ this.hide();
66
79
  }, 7000);
67
80
  }
68
81
  }
@@ -93,5 +106,6 @@ export class Logger {
93
106
  hide() {
94
107
  this._id && clearTimeout(this._id);
95
108
  this.el.classList.remove('lh-show');
109
+ this.el.classList.add('lh-hide');
96
110
  }
97
111
  }
@@ -36,7 +36,7 @@ async function toBase64(string, options) {
36
36
  } else {
37
37
  /** @type {import('pako')=} */
38
38
  const pako = window.pako;
39
- bytes = pako.gzip(string);
39
+ bytes = /** @type {any} */ (pako.gzip(string));
40
40
  }
41
41
  }
42
42
 
@@ -14,7 +14,7 @@ import Treemap_ from '../../types/lhr/treemap';
14
14
 
15
15
  declare global {
16
16
  // Expose global types in LH namespace.
17
- module LH {
17
+ namespace LH {
18
18
  export import Result = LHResult;
19
19
  export import ReportResult = ReportResult_;
20
20
  export import Renderer = Renderer_;
@@ -22,7 +22,7 @@ declare global {
22
22
  export type IcuMessage = IcuMessage_;
23
23
  export type FormattedIcu<T> = FormattedIcu_<T>;
24
24
 
25
- module Audit {
25
+ namespace Audit {
26
26
  export import Details = AuditDetails;
27
27
  }
28
28