lighthouse 13.2.0 → 13.4.0

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 (212) hide show
  1. package/cli/cli-flags.d.ts +8 -9
  2. package/cli/cli-flags.js +2 -2
  3. package/cli/test/smokehouse/config/exclusions.js +2 -0
  4. package/cli/test/smokehouse/lighthouse-runners/bundle.js +7 -3
  5. package/cli/test/smokehouse/lighthouse-runners/cli.js +5 -1
  6. package/cli/test/smokehouse/lighthouse-runners/devtools-mcp.js +7 -3
  7. package/cli/test/smokehouse/lighthouse-runners/devtools.js +4 -1
  8. package/cli/test/smokehouse/smokehouse.js +7 -2
  9. package/cli/test/smokehouse/version-check.d.ts +1 -1
  10. package/core/audits/accessibility/accesskeys.js +1 -1
  11. package/core/audits/accessibility/aria-allowed-attr.js +1 -1
  12. package/core/audits/accessibility/aria-allowed-role.js +1 -1
  13. package/core/audits/accessibility/aria-command-name.js +1 -1
  14. package/core/audits/accessibility/aria-conditional-attr.js +1 -1
  15. package/core/audits/accessibility/aria-deprecated-role.js +1 -1
  16. package/core/audits/accessibility/aria-dialog-name.js +1 -1
  17. package/core/audits/accessibility/aria-hidden-body.js +1 -1
  18. package/core/audits/accessibility/aria-hidden-focus.js +1 -1
  19. package/core/audits/accessibility/aria-input-field-name.js +1 -1
  20. package/core/audits/accessibility/aria-meter-name.js +1 -1
  21. package/core/audits/accessibility/aria-progressbar-name.js +1 -1
  22. package/core/audits/accessibility/aria-prohibited-attr.js +1 -1
  23. package/core/audits/accessibility/aria-required-attr.js +1 -1
  24. package/core/audits/accessibility/aria-required-children.js +1 -1
  25. package/core/audits/accessibility/aria-required-parent.js +1 -1
  26. package/core/audits/accessibility/aria-roles.js +1 -1
  27. package/core/audits/accessibility/aria-text.js +1 -1
  28. package/core/audits/accessibility/aria-toggle-field-name.js +1 -1
  29. package/core/audits/accessibility/aria-tooltip-name.js +1 -1
  30. package/core/audits/accessibility/aria-treeitem-name.js +1 -1
  31. package/core/audits/accessibility/aria-valid-attr-value.js +1 -1
  32. package/core/audits/accessibility/aria-valid-attr.js +1 -1
  33. package/core/audits/accessibility/autocomplete-valid.js +1 -1
  34. package/core/audits/accessibility/button-name.js +1 -1
  35. package/core/audits/accessibility/bypass.js +1 -1
  36. package/core/audits/accessibility/color-contrast.js +1 -1
  37. package/core/audits/accessibility/definition-list.js +1 -1
  38. package/core/audits/accessibility/dlitem.js +1 -1
  39. package/core/audits/accessibility/document-title.js +1 -1
  40. package/core/audits/accessibility/duplicate-id-aria.js +1 -1
  41. package/core/audits/accessibility/empty-heading.js +1 -1
  42. package/core/audits/accessibility/form-field-multiple-labels.js +1 -1
  43. package/core/audits/accessibility/frame-title.js +1 -1
  44. package/core/audits/accessibility/heading-order.js +1 -1
  45. package/core/audits/accessibility/html-has-lang.js +1 -1
  46. package/core/audits/accessibility/html-lang-valid.js +1 -1
  47. package/core/audits/accessibility/html-xml-lang-mismatch.js +1 -1
  48. package/core/audits/accessibility/identical-links-same-purpose.js +1 -1
  49. package/core/audits/accessibility/image-alt.js +1 -1
  50. package/core/audits/accessibility/image-redundant-alt.js +1 -1
  51. package/core/audits/accessibility/input-button-name.js +1 -1
  52. package/core/audits/accessibility/input-image-alt.js +1 -1
  53. package/core/audits/accessibility/label-content-name-mismatch.js +1 -1
  54. package/core/audits/accessibility/label.js +1 -1
  55. package/core/audits/accessibility/landmark-one-main.js +1 -1
  56. package/core/audits/accessibility/link-in-text-block.js +1 -1
  57. package/core/audits/accessibility/link-name.js +1 -1
  58. package/core/audits/accessibility/list.js +1 -1
  59. package/core/audits/accessibility/listitem.js +1 -1
  60. package/core/audits/accessibility/meta-refresh.js +1 -1
  61. package/core/audits/accessibility/meta-viewport.js +1 -1
  62. package/core/audits/accessibility/object-alt.js +1 -1
  63. package/core/audits/accessibility/presentation-role-conflict.js +1 -1
  64. package/core/audits/accessibility/select-name.js +1 -1
  65. package/core/audits/accessibility/skip-link.js +1 -1
  66. package/core/audits/accessibility/svg-img-alt.js +1 -1
  67. package/core/audits/accessibility/tabindex.js +1 -1
  68. package/core/audits/accessibility/table-duplicate-name.js +1 -1
  69. package/core/audits/accessibility/table-fake-caption.js +1 -1
  70. package/core/audits/accessibility/target-size.js +1 -1
  71. package/core/audits/accessibility/td-has-header.js +1 -1
  72. package/core/audits/accessibility/td-headers-attr.js +1 -1
  73. package/core/audits/accessibility/th-has-data-cells.js +1 -1
  74. package/core/audits/accessibility/valid-lang.js +1 -1
  75. package/core/audits/accessibility/video-caption.js +1 -1
  76. package/core/audits/agentic/agent-accessibility-tree.js +1 -1
  77. package/core/audits/agentic/llms-txt.js +10 -10
  78. package/core/audits/baseline.js +10 -12
  79. package/core/audits/dobetterweb/geolocation-on-start.js +2 -1
  80. package/core/audits/network-requests.js +2 -0
  81. package/core/audits/seo/canonical.js +19 -7
  82. package/core/audits/webmcp-form-coverage.js +2 -2
  83. package/core/audits/webmcp-registered-tools.js +1 -1
  84. package/core/audits/webmcp-schema-validity.js +1 -1
  85. package/core/computed/js-bundles.d.ts +1 -1
  86. package/core/computed/load-simulator.d.ts +1 -1
  87. package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +1 -1
  88. package/core/computed/metrics/first-contentful-paint.d.ts +1 -1
  89. package/core/computed/metrics/interactive.d.ts +1 -1
  90. package/core/computed/metrics/lantern-metric.d.ts +6 -6
  91. package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +1 -1
  92. package/core/computed/metrics/largest-contentful-paint.d.ts +1 -1
  93. package/core/computed/metrics/max-potential-fid.d.ts +1 -1
  94. package/core/computed/metrics/speed-index.d.ts +1 -1
  95. package/core/computed/metrics/time-to-first-byte.d.ts +1 -1
  96. package/core/computed/metrics/total-blocking-time.d.ts +1 -1
  97. package/core/computed/module-duplication.d.ts +1 -1
  98. package/core/computed/page-dependency-graph.d.ts +1 -1
  99. package/core/computed/unused-css.d.ts +1 -1
  100. package/core/config/agentic-browsing-config.d.ts +1 -0
  101. package/core/config/agentic-browsing-config.js +3 -2
  102. package/core/config/config-helpers.d.ts +1 -0
  103. package/core/config/config-helpers.js +1 -1
  104. package/core/config/config-plugin.d.ts +1 -0
  105. package/core/config/config-plugin.js +1 -0
  106. package/core/config/config.d.ts +1 -0
  107. package/core/config/config.js +1 -0
  108. package/core/config/constants.d.ts +1 -0
  109. package/core/config/constants.js +1 -0
  110. package/core/config/default-config.js +45 -0
  111. package/core/config/experimental-config.d.ts +1 -9
  112. package/core/config/experimental-config.js +2 -0
  113. package/core/config/filters.d.ts +1 -0
  114. package/core/config/filters.js +1 -0
  115. package/core/config/full-config.d.ts +1 -5
  116. package/core/config/full-config.js +2 -0
  117. package/core/config/lr-desktop-config.d.ts +1 -0
  118. package/core/config/lr-desktop-config.js +1 -0
  119. package/core/config/lr-mobile-config.d.ts +1 -5
  120. package/core/config/lr-mobile-config.js +2 -0
  121. package/core/config/perf-config.d.ts +1 -5
  122. package/core/config/perf-config.js +2 -0
  123. package/core/config/validation.d.ts +1 -0
  124. package/core/config/validation.js +1 -0
  125. package/core/gather/driver/execution-context.d.ts +23 -0
  126. package/core/gather/driver/execution-context.js +86 -1
  127. package/core/gather/driver/storage.js +13 -0
  128. package/core/gather/driver.d.ts +1 -1
  129. package/core/gather/gatherers/accessibility.js +1 -0
  130. package/core/gather/gatherers/trace-elements.d.ts +4 -1
  131. package/core/gather/gatherers/trace-elements.js +24 -28
  132. package/core/gather/gatherers/webmcp-schema.js +9 -16
  133. package/core/gather/gatherers/webmcp.d.ts +5 -0
  134. package/core/gather/gatherers/webmcp.js +34 -27
  135. package/core/index.d.ts +0 -1
  136. package/core/index.js +0 -1
  137. package/core/lib/baseline/web-features-data.json +1177 -0
  138. package/core/lib/baseline/web-features-metadata.json +1 -1
  139. package/core/lib/deprecations-strings.d.ts +45 -23
  140. package/core/lib/deprecations-strings.js +23 -0
  141. package/core/lib/script-helpers.js +13 -1
  142. package/core/scoring.d.ts +58 -58
  143. package/dist/report/bundle.esm.js +4 -7
  144. package/dist/report/flow.js +6 -9
  145. package/dist/report/standalone.js +20 -12
  146. package/flow-report/types/flow-report.d.ts +2 -2
  147. package/package.json +23 -26
  148. package/report/assets/styles.css +1 -4
  149. package/report/renderer/components.js +1 -1
  150. package/report/renderer/details-renderer.d.ts +6 -1
  151. package/report/renderer/details-renderer.js +11 -3
  152. package/report/renderer/explodey-gauge.js +9 -7
  153. package/report/renderer/i18n-formatter.d.ts +1 -1
  154. package/report/renderer/logger.js +18 -4
  155. package/report/renderer/text-encoding.js +1 -1
  156. package/report/types/html-renderer.d.ts +2 -2
  157. package/shared/localization/locales/ar-XB.json +290 -65
  158. package/shared/localization/locales/ar.json +290 -65
  159. package/shared/localization/locales/bg.json +290 -65
  160. package/shared/localization/locales/ca.json +295 -70
  161. package/shared/localization/locales/cs.json +290 -65
  162. package/shared/localization/locales/da.json +294 -69
  163. package/shared/localization/locales/de.json +295 -70
  164. package/shared/localization/locales/el.json +290 -65
  165. package/shared/localization/locales/en-GB.json +290 -65
  166. package/shared/localization/locales/en-US.json +105 -75
  167. package/shared/localization/locales/en-XA.json +253 -64
  168. package/shared/localization/locales/en-XL.json +105 -75
  169. package/shared/localization/locales/es-419.json +290 -65
  170. package/shared/localization/locales/es.json +298 -73
  171. package/shared/localization/locales/fi.json +290 -65
  172. package/shared/localization/locales/fil.json +290 -65
  173. package/shared/localization/locales/fr.json +294 -69
  174. package/shared/localization/locales/he.json +293 -68
  175. package/shared/localization/locales/hi.json +291 -66
  176. package/shared/localization/locales/hr.json +290 -65
  177. package/shared/localization/locales/hu.json +290 -65
  178. package/shared/localization/locales/id.json +290 -65
  179. package/shared/localization/locales/it.json +294 -69
  180. package/shared/localization/locales/ja.json +290 -65
  181. package/shared/localization/locales/ko.json +290 -65
  182. package/shared/localization/locales/lt.json +290 -65
  183. package/shared/localization/locales/lv.json +290 -65
  184. package/shared/localization/locales/nl.json +290 -65
  185. package/shared/localization/locales/no.json +290 -65
  186. package/shared/localization/locales/pl.json +290 -65
  187. package/shared/localization/locales/pt-PT.json +291 -66
  188. package/shared/localization/locales/pt.json +290 -65
  189. package/shared/localization/locales/ro.json +290 -65
  190. package/shared/localization/locales/ru.json +301 -76
  191. package/shared/localization/locales/sk.json +291 -66
  192. package/shared/localization/locales/sl.json +290 -65
  193. package/shared/localization/locales/sr-Latn.json +290 -65
  194. package/shared/localization/locales/sr.json +290 -65
  195. package/shared/localization/locales/sv.json +297 -72
  196. package/shared/localization/locales/ta.json +291 -66
  197. package/shared/localization/locales/te.json +293 -68
  198. package/shared/localization/locales/th.json +291 -66
  199. package/shared/localization/locales/tr.json +290 -65
  200. package/shared/localization/locales/uk.json +290 -65
  201. package/shared/localization/locales/vi.json +291 -66
  202. package/shared/localization/locales/zh-HK.json +292 -67
  203. package/shared/localization/locales/zh-TW.json +291 -66
  204. package/shared/localization/locales/zh.json +291 -66
  205. package/shared/types/shared.d.ts +1 -1
  206. package/tsconfig-base.json +2 -1
  207. package/tsconfig.json +2 -0
  208. package/types/artifacts.d.ts +1 -1
  209. package/types/internal/rxjs.d.ts +1 -1
  210. package/types/internal/smokehouse.d.ts +8 -2
  211. package/types.d.ts +2 -0
  212. package/types.js +11 -0
@@ -12,7 +12,7 @@ import {Locale as Locale_} from '../../types/lhr/settings';
12
12
 
13
13
  declare global {
14
14
  // Expose global types in LH namespace.
15
- module LH {
15
+ namespace LH {
16
16
  export import Result = LHResult;
17
17
  export import FlowResult = FlowResult_;
18
18
  export type IcuMessage = IcuMessage_;
@@ -13,12 +13,13 @@
13
13
 
14
14
  "target": "es2023",
15
15
  "module": "preserve",
16
- "moduleResolution": "node",
16
+ "moduleResolution": "bundler",
17
17
  "esModuleInterop": true,
18
18
 
19
19
  "allowJs": true,
20
20
  "checkJs": true,
21
21
  "strict": true,
22
+ "skipLibCheck": true,
22
23
  // TODO: remove the next line to be fully `strict`.
23
24
  "useUnknownInCatchVariables": false,
24
25
 
package/tsconfig.json CHANGED
@@ -16,6 +16,7 @@
16
16
  "core/index.cjs",
17
17
  "clients/**/*.js",
18
18
  "build/**/*.js",
19
+ "types.js",
19
20
  "./types/**/*.d.ts",
20
21
  "eslint-local-rules.cjs",
21
22
  "third-party/axe/valid-langs.js",
@@ -25,6 +26,7 @@
25
26
  "core/test/fixtures/unresolved-perflog.json",
26
27
  "core/test/fixtures/traces/lcp-m78.devtools.log.json",
27
28
  "core/lib/baseline/web-features-metadata.json",
29
+ "core/lib/baseline/web-features-data.json",
28
30
  "core/lib/legacy-javascript/polyfill-graph-data.json",
29
31
  "core/lib/legacy-javascript/polyfill-module-data.json",
30
32
  "core/lib/baseline/baseline-features.json",
@@ -150,7 +150,7 @@ export interface GathererArtifacts extends PublicGathererArtifacts {
150
150
  TraceElements: Artifacts.TraceElement[];
151
151
  }
152
152
 
153
- declare module Artifacts {
153
+ declare namespace Artifacts {
154
154
  interface WebMcpSchemaIssue {
155
155
  errorType: string;
156
156
  violatingNodeId?: number;
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  declare module 'rxjs' {
8
- export * from 'rxjs/index.js';
8
+ export * from 'rxjs';
9
9
 
10
10
  // Puppeteer uses a later version of rxjs as a dev dep.
11
11
  // We don't need it for normal execution, but these types are necessary
@@ -10,7 +10,7 @@ import LHResult from '../lhr/lhr.js';
10
10
  import {LocalConsole} from '../../cli/test/smokehouse/lib/local-console.js';
11
11
 
12
12
  declare global {
13
- module Smokehouse {
13
+ namespace Smokehouse {
14
14
  interface ExpectedLHR {
15
15
  audits: Record<string, any>;
16
16
  requestedUrl: string;
@@ -42,6 +42,10 @@ declare global {
42
42
  config?: Config;
43
43
  /** If test is performance sensitive, set to true so that it won't be run parallel to other tests. */
44
44
  runSerially?: boolean;
45
+ /** Custom options for the test runner (e.g., custom Chrome flags). */
46
+ testRunnerOptions?: {
47
+ chromeFlags?: string;
48
+ };
45
49
  }
46
50
 
47
51
  /**
@@ -54,7 +58,7 @@ declare global {
54
58
  {expectations: Smokehouse.ExpectedRunnerResult | Array<Smokehouse.ExpectedRunnerResult>}
55
59
 
56
60
  export type LighthouseRunner =
57
- {runnerName?: string} & ((url: string, config?: Config, logger?: LocalConsole, runnerOptions?: {isDebug?: boolean}) => Promise<{lhr: LHResult, artifacts: Artifacts}>);
61
+ {runnerName?: string} & ((url: string, config?: Config, logger?: LocalConsole, runnerOptions?: SmokehouseOptions['testRunnerOptions']) => Promise<{lhr: LHResult, artifacts: Artifacts}>);
58
62
 
59
63
  export interface SmokehouseOptions {
60
64
  /** Options to pass to the specific Lighthouse runner. */
@@ -63,6 +67,8 @@ declare global {
63
67
  isDebug?: boolean;
64
68
  /** Launch Chrome in the new headless mode (`--headless=new`), rather than the typical desktop headful mode. */
65
69
  headless?: boolean;
70
+ /** Custom Chrome flags to pass to the launched browser. */
71
+ chromeFlags?: string;
66
72
  };
67
73
  /** Manually set the number of jobs to run at once. `1` runs all tests serially. */
68
74
  jobs: number;
package/types.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./types/lh.js";
2
+ //# sourceMappingURL=types.d.ts.map
package/types.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ /**
8
+ * @fileoverview Public type-only entry point for Lighthouse's LH namespace.
9
+ */
10
+
11
+ export * from './types/lh.js';