lighthouse 12.6.1 → 12.7.0-dev.20250628

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 (162) hide show
  1. package/cli/test/smokehouse/core-tests.js +2 -0
  2. package/cli/test/smokehouse/frontends/lib.js +0 -2
  3. package/cli/test/smokehouse/frontends/smokehouse-bin.js +1 -3
  4. package/cli/test/smokehouse/lighthouse-runners/cli.js +1 -1
  5. package/cli/test/smokehouse/smokehouse.js +0 -2
  6. package/core/audits/audit.d.ts +7 -0
  7. package/core/audits/audit.js +17 -2
  8. package/core/audits/byte-efficiency/byte-efficiency-audit.js +6 -8
  9. package/core/audits/byte-efficiency/legacy-javascript.js +0 -1
  10. package/core/audits/byte-efficiency/render-blocking-resources.js +1 -1
  11. package/core/audits/deprecations.js +0 -2
  12. package/core/audits/insights/cache-insight.js +2 -1
  13. package/core/audits/insights/cls-culprits-insight.js +6 -7
  14. package/core/audits/insights/{interaction-to-next-paint-insight.d.ts → inp-breakdown-insight.d.ts} +3 -3
  15. package/core/audits/insights/{interaction-to-next-paint-insight.js → inp-breakdown-insight.js} +10 -10
  16. package/core/audits/insights/insight-audit.d.ts +7 -4
  17. package/core/audits/insights/insight-audit.js +48 -7
  18. package/core/audits/insights/lcp-breakdown-insight.d.ts +16 -0
  19. package/core/audits/insights/{lcp-phases-insight.js → lcp-breakdown-insight.js} +19 -19
  20. package/core/audits/insights/modern-http-insight.js +0 -2
  21. package/core/audits/insights/network-dependency-tree-insight.js +85 -8
  22. package/core/audits/insights/render-blocking-insight.js +1 -1
  23. package/core/audits/layout-shifts.js +5 -4
  24. package/core/audits/seo/crawlable-anchors.js +27 -0
  25. package/core/audits/seo/link-text.js +130 -83
  26. package/core/audits/third-party-cookies.js +0 -2
  27. package/core/audits/valid-source-maps.js +0 -2
  28. package/core/computed/js-bundles.js +0 -1
  29. package/core/computed/metrics/cumulative-layout-shift.js +1 -1
  30. package/core/computed/metrics/lantern-metric.js +4 -3
  31. package/core/computed/metrics/timing-summary.js +4 -1
  32. package/core/computed/page-dependency-graph.js +3 -3
  33. package/core/computed/trace-engine-result.js +1 -2
  34. package/core/config/config.js +1 -1
  35. package/core/config/default-config.js +4 -4
  36. package/core/config/experimental-config.js +2 -2
  37. package/core/config/filters.js +7 -0
  38. package/core/config/validation.js +4 -0
  39. package/core/gather/base-artifacts.js +3 -0
  40. package/core/gather/driver/environment.d.ts +6 -0
  41. package/core/gather/driver/environment.js +17 -0
  42. package/core/gather/driver/execution-context.d.ts +3 -1
  43. package/core/gather/driver/execution-context.js +3 -1
  44. package/core/gather/driver/navigation.js +1 -3
  45. package/core/gather/driver/wait-for-condition.js +0 -1
  46. package/core/gather/fetcher.js +0 -2
  47. package/core/gather/gatherers/accessibility.js +1 -1
  48. package/core/gather/gatherers/anchor-elements.js +61 -2
  49. package/core/gather/gatherers/cache-contents.js +0 -2
  50. package/core/gather/gatherers/css-usage.js +3 -1
  51. package/core/gather/gatherers/dobetterweb/doctype.js +0 -2
  52. package/core/gather/gatherers/dobetterweb/domstats.js +1 -1
  53. package/core/gather/gatherers/full-page-screenshot.js +1 -1
  54. package/core/gather/gatherers/image-elements.js +1 -1
  55. package/core/gather/gatherers/inspector-issues.js +1 -1
  56. package/core/gather/gatherers/link-elements.js +1 -1
  57. package/core/gather/gatherers/stacks.js +0 -1
  58. package/core/gather/gatherers/stylesheets.js +3 -1
  59. package/core/gather/gatherers/trace-elements.d.ts +3 -4
  60. package/core/gather/gatherers/trace-elements.js +13 -43
  61. package/core/gather/gatherers/viewport-dimensions.js +0 -2
  62. package/core/index.cjs +0 -1
  63. package/core/index.d.cts +5 -0
  64. package/core/lib/asset-saver.d.ts +1 -1
  65. package/core/lib/asset-saver.js +20 -8
  66. package/core/lib/bf-cache-strings.js +4 -1
  67. package/core/lib/deprecations-strings.d.ts +51 -47
  68. package/core/lib/deprecations-strings.js +14 -8
  69. package/core/lib/i18n/i18n.js +0 -2
  70. package/core/lib/lantern-trace-saver.js +1 -1
  71. package/core/lib/lh-error.js +0 -1
  72. package/core/lib/manifest-parser.js +0 -2
  73. package/core/lib/minify-devtoolslog.js +0 -2
  74. package/core/lib/sentry.d.ts +1 -1
  75. package/core/lib/sentry.js +2 -2
  76. package/core/runner.js +11 -8
  77. package/core/scoring.d.ts +186 -15
  78. package/core/scripts/manual-chrome-launcher.js +0 -1
  79. package/dist/report/bundle.esm.js +14 -12
  80. package/dist/report/flow.js +18 -16
  81. package/dist/report/standalone.js +15 -13
  82. package/eslint.config.mjs +242 -0
  83. package/flow-report/src/common.tsx +1 -0
  84. package/flow-report/src/i18n/i18n.tsx +1 -0
  85. package/flow-report/src/util.ts +2 -0
  86. package/package.json +23 -19
  87. package/readme.md +3 -2
  88. package/report/assets/styles.css +11 -9
  89. package/report/assets/templates.html +1 -1
  90. package/report/generator/file-namer.d.ts +5 -0
  91. package/report/generator/file-namer.js +1 -1
  92. package/report/generator/flow-report-assets.js +1 -1
  93. package/report/generator/report-assets.js +1 -1
  94. package/report/generator/report-generator.js +3 -3
  95. package/report/renderer/api.js +1 -0
  96. package/report/renderer/components.js +2 -2
  97. package/report/renderer/details-renderer.d.ts +5 -0
  98. package/report/renderer/details-renderer.js +35 -3
  99. package/report/renderer/dom.d.ts +2 -0
  100. package/report/renderer/dom.js +6 -0
  101. package/report/renderer/i18n-formatter.js +2 -1
  102. package/report/renderer/performance-category-renderer.js +2 -2
  103. package/report/renderer/report-renderer.js +1 -0
  104. package/report/renderer/report-ui-features.d.ts +1 -0
  105. package/report/renderer/report-ui-features.js +16 -0
  106. package/report/renderer/report-utils.js +3 -2
  107. package/report/renderer/text-encoding.js +0 -2
  108. package/report/renderer/topbar-features.js +1 -1
  109. package/report/types/report-renderer.d.ts +5 -0
  110. package/shared/localization/locales/ar-XB.json +57 -69
  111. package/shared/localization/locales/ar.json +57 -69
  112. package/shared/localization/locales/bg.json +57 -69
  113. package/shared/localization/locales/ca.json +57 -69
  114. package/shared/localization/locales/cs.json +57 -69
  115. package/shared/localization/locales/da.json +57 -69
  116. package/shared/localization/locales/de.json +57 -69
  117. package/shared/localization/locales/el.json +57 -69
  118. package/shared/localization/locales/en-GB.json +57 -69
  119. package/shared/localization/locales/en-US.json +73 -61
  120. package/shared/localization/locales/en-XL.json +73 -61
  121. package/shared/localization/locales/es-419.json +57 -69
  122. package/shared/localization/locales/es.json +56 -68
  123. package/shared/localization/locales/fi.json +57 -69
  124. package/shared/localization/locales/fil.json +57 -69
  125. package/shared/localization/locales/fr.json +57 -69
  126. package/shared/localization/locales/he.json +57 -69
  127. package/shared/localization/locales/hi.json +57 -69
  128. package/shared/localization/locales/hr.json +57 -69
  129. package/shared/localization/locales/hu.json +56 -68
  130. package/shared/localization/locales/id.json +57 -69
  131. package/shared/localization/locales/it.json +56 -68
  132. package/shared/localization/locales/ja.json +57 -69
  133. package/shared/localization/locales/ko.json +57 -69
  134. package/shared/localization/locales/lt.json +57 -69
  135. package/shared/localization/locales/lv.json +57 -69
  136. package/shared/localization/locales/nl.json +57 -69
  137. package/shared/localization/locales/no.json +57 -69
  138. package/shared/localization/locales/pl.json +56 -68
  139. package/shared/localization/locales/pt-PT.json +57 -69
  140. package/shared/localization/locales/pt.json +57 -69
  141. package/shared/localization/locales/ro.json +57 -69
  142. package/shared/localization/locales/ru.json +58 -70
  143. package/shared/localization/locales/sk.json +57 -69
  144. package/shared/localization/locales/sl.json +56 -68
  145. package/shared/localization/locales/sr-Latn.json +57 -69
  146. package/shared/localization/locales/sr.json +57 -69
  147. package/shared/localization/locales/sv.json +57 -69
  148. package/shared/localization/locales/ta.json +57 -69
  149. package/shared/localization/locales/te.json +57 -69
  150. package/shared/localization/locales/th.json +56 -68
  151. package/shared/localization/locales/tr.json +57 -69
  152. package/shared/localization/locales/uk.json +57 -69
  153. package/shared/localization/locales/vi.json +57 -69
  154. package/shared/localization/locales/zh-HK.json +57 -69
  155. package/shared/localization/locales/zh-TW.json +56 -68
  156. package/shared/localization/locales/zh.json +57 -69
  157. package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +1 -1
  158. package/types/artifacts.d.ts +8 -1
  159. package/types/internal/test.d.ts +1 -1
  160. package/types/lhr/audit-details.d.ts +13 -3
  161. package/types/lhr/lhr.d.ts +8 -1
  162. package/core/audits/insights/lcp-phases-insight.d.ts +0 -16
package/core/scoring.d.ts CHANGED
@@ -103,6 +103,24 @@ export class ReportScoring {
103
103
  } | {
104
104
  type: "list";
105
105
  items: ({
106
+ type: "network-tree";
107
+ longestChain: {
108
+ duration: number;
109
+ };
110
+ chains: {
111
+ [x: string]: {
112
+ url: string | import("./index.js").IcuMessage;
113
+ navStartToEndTime: number;
114
+ transferSize: number;
115
+ isLongest?: boolean | undefined;
116
+ children?: /*elided*/ any | undefined;
117
+ };
118
+ };
119
+ debugData?: {
120
+ [x: string]: any;
121
+ type: "debugdata";
122
+ } | undefined;
123
+ } | {
106
124
  [x: string]: any;
107
125
  type: "debugdata";
108
126
  } | {
@@ -152,6 +170,9 @@ export class ReportScoring {
152
170
  snippet?: string | import("./index.js").IcuMessage | undefined;
153
171
  nodeLabel?: string | import("./index.js").IcuMessage | undefined;
154
172
  explanation?: string | import("./index.js").IcuMessage | undefined;
173
+ } | {
174
+ type: "text";
175
+ value: import("./index.js").IcuMessage | string;
155
176
  } | {
156
177
  type: "subitems";
157
178
  items: /*elided*/ any[];
@@ -166,6 +187,7 @@ export class ReportScoring {
166
187
  line: number;
167
188
  column: number;
168
189
  } | undefined;
190
+ functionName?: string | import("./index.js").IcuMessage | undefined;
169
191
  } | {
170
192
  type: "link";
171
193
  text: string | import("./index.js").IcuMessage;
@@ -180,9 +202,6 @@ export class ReportScoring {
180
202
  type: "numeric";
181
203
  value: number;
182
204
  granularity?: number | undefined;
183
- } | {
184
- type: "text";
185
- value: import("./index.js").IcuMessage | string;
186
205
  } | undefined;
187
206
  debugData?: {
188
207
  [x: string]: any;
@@ -220,6 +239,154 @@ export class ReportScoring {
220
239
  snippet?: string | import("./index.js").IcuMessage | undefined;
221
240
  nodeLabel?: string | import("./index.js").IcuMessage | undefined;
222
241
  explanation?: string | import("./index.js").IcuMessage | undefined;
242
+ } | {
243
+ type: "text";
244
+ value: import("./index.js").IcuMessage | string;
245
+ } | {
246
+ type: "list-section";
247
+ title?: (import("./index.js").IcuMessage | string) | undefined;
248
+ description?: (import("./index.js").IcuMessage | string) | undefined;
249
+ value: {
250
+ type: "network-tree";
251
+ longestChain: {
252
+ duration: number;
253
+ };
254
+ chains: {
255
+ [x: string]: {
256
+ url: string | import("./index.js").IcuMessage;
257
+ navStartToEndTime: number;
258
+ transferSize: number;
259
+ isLongest?: boolean | undefined;
260
+ children?: /*elided*/ any | undefined;
261
+ };
262
+ };
263
+ debugData?: {
264
+ [x: string]: any;
265
+ type: "debugdata";
266
+ } | undefined;
267
+ } | {
268
+ [x: string]: any;
269
+ type: "debugdata";
270
+ } | {
271
+ type: "checklist";
272
+ items: {
273
+ [x: string]: {
274
+ value: boolean;
275
+ label: import("./index.js").IcuMessage | string;
276
+ };
277
+ };
278
+ debugData?: {
279
+ [x: string]: any;
280
+ type: "debugdata";
281
+ } | undefined;
282
+ } | {
283
+ type: "table";
284
+ headings: {
285
+ key: string | import("./index.js").IcuMessage | null;
286
+ label: import("./index.js").IcuMessage | string;
287
+ valueType: import("../types/lhr/audit-details.js").default.ItemValueType;
288
+ subItemsHeading?: {
289
+ key: string | import("./index.js").IcuMessage;
290
+ valueType?: import("../types/lhr/audit-details.js").default.ItemValueType | undefined;
291
+ displayUnit?: string | import("./index.js").IcuMessage | undefined;
292
+ granularity?: number | undefined;
293
+ } | undefined;
294
+ displayUnit?: string | import("./index.js").IcuMessage | undefined;
295
+ granularity?: number | undefined;
296
+ }[];
297
+ items: {
298
+ [x: string]: string | number | boolean | import("./index.js").IcuMessage | {
299
+ [x: string]: any;
300
+ type: "debugdata";
301
+ } | {
302
+ type: "node";
303
+ lhId?: string | import("./index.js").IcuMessage | undefined;
304
+ path?: string | import("./index.js").IcuMessage | undefined;
305
+ selector?: string | import("./index.js").IcuMessage | undefined;
306
+ boundingRect?: {
307
+ width: number;
308
+ height: number;
309
+ top: number;
310
+ right: number;
311
+ bottom: number;
312
+ left: number;
313
+ } | undefined;
314
+ snippet?: string | import("./index.js").IcuMessage | undefined;
315
+ nodeLabel?: string | import("./index.js").IcuMessage | undefined;
316
+ explanation?: string | import("./index.js").IcuMessage | undefined;
317
+ } | {
318
+ type: "text";
319
+ value: import("./index.js").IcuMessage | string;
320
+ } | {
321
+ type: "subitems";
322
+ items: /*elided*/ any[];
323
+ } | {
324
+ type: "source-location";
325
+ url: string | import("./index.js").IcuMessage;
326
+ urlProvider: "network" | "comment";
327
+ line: number;
328
+ column: number;
329
+ original?: {
330
+ file: string | import("./index.js").IcuMessage;
331
+ line: number;
332
+ column: number;
333
+ } | undefined;
334
+ functionName?: string | import("./index.js").IcuMessage | undefined;
335
+ } | {
336
+ type: "link";
337
+ text: string | import("./index.js").IcuMessage;
338
+ url: string | import("./index.js").IcuMessage;
339
+ } | {
340
+ type: "url";
341
+ value: string | import("./index.js").IcuMessage;
342
+ } | {
343
+ type: "code";
344
+ value: import("./index.js").IcuMessage | string;
345
+ } | {
346
+ type: "numeric";
347
+ value: number;
348
+ granularity?: number | undefined;
349
+ } | undefined;
350
+ debugData?: {
351
+ [x: string]: any;
352
+ type: "debugdata";
353
+ } | undefined;
354
+ subItems?: {
355
+ type: "subitems";
356
+ items: /*elided*/ any[];
357
+ } | undefined;
358
+ }[];
359
+ summary?: {
360
+ wastedMs?: number | undefined;
361
+ wastedBytes?: number | undefined;
362
+ } | undefined;
363
+ sortedBy?: (string | import("./index.js").IcuMessage)[] | undefined;
364
+ isEntityGrouped?: boolean | undefined;
365
+ skipSumming?: (string | import("./index.js").IcuMessage)[] | undefined;
366
+ debugData?: {
367
+ [x: string]: any;
368
+ type: "debugdata";
369
+ } | undefined;
370
+ } | {
371
+ type: "node";
372
+ lhId?: string | import("./index.js").IcuMessage | undefined;
373
+ path?: string | import("./index.js").IcuMessage | undefined;
374
+ selector?: string | import("./index.js").IcuMessage | undefined;
375
+ boundingRect?: {
376
+ width: number;
377
+ height: number;
378
+ top: number;
379
+ right: number;
380
+ bottom: number;
381
+ left: number;
382
+ } | undefined;
383
+ snippet?: string | import("./index.js").IcuMessage | undefined;
384
+ nodeLabel?: string | import("./index.js").IcuMessage | undefined;
385
+ explanation?: string | import("./index.js").IcuMessage | undefined;
386
+ } | {
387
+ type: "text";
388
+ value: import("./index.js").IcuMessage | string;
389
+ };
223
390
  })[];
224
391
  debugData?: {
225
392
  [x: string]: any;
@@ -260,6 +427,9 @@ export class ReportScoring {
260
427
  snippet?: string | import("./index.js").IcuMessage | undefined;
261
428
  nodeLabel?: string | import("./index.js").IcuMessage | undefined;
262
429
  explanation?: string | import("./index.js").IcuMessage | undefined;
430
+ } | {
431
+ type: "text";
432
+ value: import("./index.js").IcuMessage | string;
263
433
  } | {
264
434
  type: "subitems";
265
435
  items: {
@@ -282,6 +452,9 @@ export class ReportScoring {
282
452
  snippet?: string | import("./index.js").IcuMessage | undefined;
283
453
  nodeLabel?: string | import("./index.js").IcuMessage | undefined;
284
454
  explanation?: string | import("./index.js").IcuMessage | undefined;
455
+ } | {
456
+ type: "text";
457
+ value: import("./index.js").IcuMessage | string;
285
458
  } | /*elided*/ any | {
286
459
  type: "source-location";
287
460
  url: string | import("./index.js").IcuMessage;
@@ -293,6 +466,7 @@ export class ReportScoring {
293
466
  line: number;
294
467
  column: number;
295
468
  } | undefined;
469
+ functionName?: string | import("./index.js").IcuMessage | undefined;
296
470
  } | {
297
471
  type: "link";
298
472
  text: string | import("./index.js").IcuMessage;
@@ -307,9 +481,6 @@ export class ReportScoring {
307
481
  type: "numeric";
308
482
  value: number;
309
483
  granularity?: number | undefined;
310
- } | {
311
- type: "text";
312
- value: import("./index.js").IcuMessage | string;
313
484
  } | undefined;
314
485
  debugData?: {
315
486
  [x: string]: any;
@@ -328,6 +499,7 @@ export class ReportScoring {
328
499
  line: number;
329
500
  column: number;
330
501
  } | undefined;
502
+ functionName?: string | import("./index.js").IcuMessage | undefined;
331
503
  } | {
332
504
  type: "link";
333
505
  text: string | import("./index.js").IcuMessage;
@@ -342,9 +514,6 @@ export class ReportScoring {
342
514
  type: "numeric";
343
515
  value: number;
344
516
  granularity?: number | undefined;
345
- } | {
346
- type: "text";
347
- value: import("./index.js").IcuMessage | string;
348
517
  } | undefined;
349
518
  url: string | import("./index.js").IcuMessage;
350
519
  wastedBytes?: number | undefined;
@@ -376,6 +545,9 @@ export class ReportScoring {
376
545
  snippet?: string | import("./index.js").IcuMessage | undefined;
377
546
  nodeLabel?: string | import("./index.js").IcuMessage | undefined;
378
547
  explanation?: string | import("./index.js").IcuMessage | undefined;
548
+ } | {
549
+ type: "text";
550
+ value: import("./index.js").IcuMessage | string;
379
551
  } | /*elided*/ any | {
380
552
  type: "source-location";
381
553
  url: string | import("./index.js").IcuMessage;
@@ -387,6 +559,7 @@ export class ReportScoring {
387
559
  line: number;
388
560
  column: number;
389
561
  } | undefined;
562
+ functionName?: string | import("./index.js").IcuMessage | undefined;
390
563
  } | {
391
564
  type: "link";
392
565
  text: string | import("./index.js").IcuMessage;
@@ -401,9 +574,6 @@ export class ReportScoring {
401
574
  type: "numeric";
402
575
  value: number;
403
576
  granularity?: number | undefined;
404
- } | {
405
- type: "text";
406
- value: import("./index.js").IcuMessage | string;
407
577
  } | undefined;
408
578
  debugData?: {
409
579
  [x: string]: any;
@@ -478,6 +648,9 @@ export class ReportScoring {
478
648
  snippet?: string | import("./index.js").IcuMessage | undefined;
479
649
  nodeLabel?: string | import("./index.js").IcuMessage | undefined;
480
650
  explanation?: string | import("./index.js").IcuMessage | undefined;
651
+ } | {
652
+ type: "text";
653
+ value: import("./index.js").IcuMessage | string;
481
654
  } | {
482
655
  type: "subitems";
483
656
  items: /*elided*/ any[];
@@ -492,6 +665,7 @@ export class ReportScoring {
492
665
  line: number;
493
666
  column: number;
494
667
  } | undefined;
668
+ functionName?: string | import("./index.js").IcuMessage | undefined;
495
669
  } | {
496
670
  type: "link";
497
671
  text: string | import("./index.js").IcuMessage;
@@ -506,9 +680,6 @@ export class ReportScoring {
506
680
  type: "numeric";
507
681
  value: number;
508
682
  granularity?: number | undefined;
509
- } | {
510
- type: "text";
511
- value: import("./index.js").IcuMessage | string;
512
683
  } | undefined;
513
684
  debugData?: {
514
685
  [x: string]: any;
@@ -46,5 +46,4 @@ launch({
46
46
  ignoreDefaultFlags,
47
47
  chromeFlags,
48
48
  })
49
- // eslint-disable-next-line no-console
50
49
  .then(v => console.log(`✨ Chrome debugging port: ${v.port}`));