lighthouse 13.5.0 → 13.6.0-dev.20261028

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 (272) hide show
  1. package/.agents/skills/update-ard-port/SKILL.md +171 -0
  2. package/.agents/skills/update-trace-engine/SKILL.md +154 -0
  3. package/cli/bin.d.ts +2 -2
  4. package/cli/bin.js +5 -4
  5. package/cli/cli-flags.d.ts +16 -1
  6. package/cli/cli-flags.js +53 -2
  7. package/cli/printer.js +5 -8
  8. package/cli/run.d.ts +5 -5
  9. package/cli/run.js +97 -47
  10. package/cli/sentry-prompt.js +3 -4
  11. package/cli/test/smokehouse/__snapshots__/report-assert-test.js.snap +1 -1
  12. package/cli/test/smokehouse/config/exclusions.js +3 -1
  13. package/cli/test/smokehouse/frontends/smokehouse-bin.js +5 -3
  14. package/cli/test/smokehouse/report-assert-test.js +65 -0
  15. package/cli/test/smokehouse/report-assert.js +24 -39
  16. package/cli/test/smokehouse/smokehouse-test.d.ts +2 -0
  17. package/cli/test/smokehouse/smokehouse-test.js +120 -0
  18. package/cli/test/smokehouse/smokehouse.js +37 -15
  19. package/cli/test/smokehouse/version-check-test.js +5 -0
  20. package/cli/test/smokehouse/version-check.d.ts +1 -1
  21. package/cli/test/smokehouse/version-check.js +1 -1
  22. package/commitlint.config.js +1 -1
  23. package/core/audits/accessibility/accesskeys.js +1 -1
  24. package/core/audits/accessibility/aria-allowed-attr.js +1 -1
  25. package/core/audits/accessibility/aria-allowed-role.js +1 -1
  26. package/core/audits/accessibility/aria-command-name.js +1 -1
  27. package/core/audits/accessibility/aria-conditional-attr.js +1 -1
  28. package/core/audits/accessibility/aria-deprecated-role.js +1 -1
  29. package/core/audits/accessibility/aria-dialog-name.js +1 -1
  30. package/core/audits/accessibility/aria-hidden-body.js +1 -1
  31. package/core/audits/accessibility/aria-hidden-focus.js +1 -1
  32. package/core/audits/accessibility/aria-input-field-name.js +1 -1
  33. package/core/audits/accessibility/aria-meter-name.js +1 -1
  34. package/core/audits/accessibility/aria-progressbar-name.js +1 -1
  35. package/core/audits/accessibility/aria-prohibited-attr.js +1 -1
  36. package/core/audits/accessibility/aria-required-attr.js +1 -1
  37. package/core/audits/accessibility/aria-required-children.js +1 -1
  38. package/core/audits/accessibility/aria-required-parent.js +1 -1
  39. package/core/audits/accessibility/aria-roles.js +1 -1
  40. package/core/audits/accessibility/aria-text.js +1 -1
  41. package/core/audits/accessibility/aria-toggle-field-name.js +1 -1
  42. package/core/audits/accessibility/aria-tooltip-name.js +1 -1
  43. package/core/audits/accessibility/aria-treeitem-name.js +1 -1
  44. package/core/audits/accessibility/aria-valid-attr-value.js +1 -1
  45. package/core/audits/accessibility/aria-valid-attr.js +1 -1
  46. package/core/audits/accessibility/autocomplete-valid.js +1 -1
  47. package/core/audits/accessibility/button-name.js +1 -1
  48. package/core/audits/accessibility/bypass.js +1 -1
  49. package/core/audits/accessibility/color-contrast.js +1 -1
  50. package/core/audits/accessibility/definition-list.js +1 -1
  51. package/core/audits/accessibility/dlitem.js +1 -1
  52. package/core/audits/accessibility/document-title.js +1 -1
  53. package/core/audits/accessibility/duplicate-id-aria.js +1 -1
  54. package/core/audits/accessibility/empty-heading.js +1 -1
  55. package/core/audits/accessibility/form-field-multiple-labels.js +1 -1
  56. package/core/audits/accessibility/frame-title.js +1 -1
  57. package/core/audits/accessibility/heading-order.js +1 -1
  58. package/core/audits/accessibility/html-has-lang.js +1 -1
  59. package/core/audits/accessibility/html-lang-valid.js +1 -1
  60. package/core/audits/accessibility/html-xml-lang-mismatch.js +1 -1
  61. package/core/audits/accessibility/identical-links-same-purpose.js +1 -1
  62. package/core/audits/accessibility/image-alt.js +1 -1
  63. package/core/audits/accessibility/image-redundant-alt.js +1 -1
  64. package/core/audits/accessibility/input-button-name.js +1 -1
  65. package/core/audits/accessibility/input-image-alt.js +1 -1
  66. package/core/audits/accessibility/label-content-name-mismatch.js +1 -1
  67. package/core/audits/accessibility/label.js +1 -1
  68. package/core/audits/accessibility/landmark-one-main.js +1 -1
  69. package/core/audits/accessibility/link-in-text-block.js +1 -1
  70. package/core/audits/accessibility/link-name.js +1 -1
  71. package/core/audits/accessibility/list.js +1 -1
  72. package/core/audits/accessibility/listitem.js +1 -1
  73. package/core/audits/accessibility/meta-refresh.js +1 -1
  74. package/core/audits/accessibility/meta-viewport.js +1 -1
  75. package/core/audits/accessibility/object-alt.js +1 -1
  76. package/core/audits/accessibility/presentation-role-conflict.js +1 -1
  77. package/core/audits/accessibility/select-name.js +1 -1
  78. package/core/audits/accessibility/skip-link.js +1 -1
  79. package/core/audits/accessibility/svg-img-alt.js +1 -1
  80. package/core/audits/accessibility/tabindex.js +1 -1
  81. package/core/audits/accessibility/table-duplicate-name.js +1 -1
  82. package/core/audits/accessibility/table-fake-caption.js +1 -1
  83. package/core/audits/accessibility/target-size.js +1 -1
  84. package/core/audits/accessibility/td-has-header.js +1 -1
  85. package/core/audits/accessibility/td-headers-attr.js +1 -1
  86. package/core/audits/accessibility/th-has-data-cells.js +1 -1
  87. package/core/audits/accessibility/valid-lang.js +1 -1
  88. package/core/audits/accessibility/video-caption.js +1 -1
  89. package/core/audits/agentic/ard-schema.d.ts +13 -0
  90. package/core/audits/agentic/ard-schema.js +81 -33
  91. package/core/audits/agentic/llms-txt.js +5 -2
  92. package/core/audits/baseline.d.ts +29 -7
  93. package/core/audits/baseline.js +19 -6
  94. package/core/audits/byte-efficiency/byte-efficiency-audit.js +2 -2
  95. package/core/audits/insights/insight-audit.d.ts +9 -0
  96. package/core/audits/insights/insight-audit.js +35 -28
  97. package/core/audits/long-tasks.js +2 -1
  98. package/core/audits/predictive-perf.js +2 -2
  99. package/core/audits/screenshot-thumbnails.d.ts +0 -13
  100. package/core/audits/screenshot-thumbnails.js +0 -45
  101. package/core/audits/script-treemap-data.js +26 -6
  102. package/core/audits/seo/robots-txt.js +3 -8
  103. package/core/audits/unsized-images.d.ts +0 -7
  104. package/core/audits/unsized-images.js +7 -26
  105. package/core/computed/lcp-image-record.d.ts +2 -23
  106. package/core/computed/lcp-image-record.js +3 -67
  107. package/core/computed/lcp-network-record.d.ts +24 -0
  108. package/core/computed/lcp-network-record.js +74 -0
  109. package/core/computed/metrics/lantern-metric.js +1 -1
  110. package/core/computed/metrics/lcp-breakdown.js +6 -6
  111. package/core/computed/metrics/time-to-first-byte.js +5 -3
  112. package/core/computed/navigation-insights.js +3 -2
  113. package/core/computed/page-dependency-graph.js +55 -5
  114. package/core/computed/speedline.js +20 -5
  115. package/core/computed/trace-engine-result.js +25 -5
  116. package/core/computed/unused-css.js +15 -2
  117. package/core/config/config-helpers.d.ts +5 -0
  118. package/core/config/config-helpers.js +17 -28
  119. package/core/config/config-plugin.d.ts +7 -0
  120. package/core/config/config-plugin.js +49 -0
  121. package/core/config/config.js +10 -2
  122. package/core/config/constants.d.ts +2 -28
  123. package/core/config/filters.js +1 -0
  124. package/core/config/lr-desktop-config.js +13 -0
  125. package/core/config/lr-mobile-config.js +13 -0
  126. package/core/gather/base-artifacts.js +7 -1
  127. package/core/gather/driver/storage.js +3 -2
  128. package/core/gather/gatherers/agentic/ard.d.ts +59 -4
  129. package/core/gather/gatherers/agentic/ard.js +218 -56
  130. package/core/gather/gatherers/full-page-screenshot.js +2 -2
  131. package/core/gather/gatherers/image-elements.d.ts +7 -0
  132. package/core/gather/gatherers/image-elements.js +75 -24
  133. package/core/gather/gatherers/inspector-issues.js +2 -0
  134. package/core/gather/gatherers/js-usage.js +2 -0
  135. package/core/gather/gatherers/scripts.d.ts +16 -3
  136. package/core/gather/gatherers/scripts.js +157 -14
  137. package/core/gather/gatherers/stylesheets.js +2 -0
  138. package/core/gather/gatherers/trace-elements.js +2 -1
  139. package/core/gather/gatherers/trace.d.ts +6 -0
  140. package/core/gather/gatherers/trace.js +56 -16
  141. package/core/index.d.ts +2 -0
  142. package/core/index.js +2 -0
  143. package/core/lib/arbitrary-equality-map.d.ts +14 -3
  144. package/core/lib/arbitrary-equality-map.js +113 -6
  145. package/core/lib/baseline/web-features-data.json +32 -11
  146. package/core/lib/baseline/web-features-metadata.json +1 -1
  147. package/core/lib/bf-cache-strings.js +237 -254
  148. package/core/lib/cdt/Common.d.ts +1 -1
  149. package/core/lib/cdt/Common.js +2 -2
  150. package/core/lib/cdt/Platform.d.ts +7 -7
  151. package/core/lib/cdt/Platform.js +11 -8
  152. package/core/lib/cdt/SDK.d.ts +5 -1
  153. package/core/lib/cdt/SDK.js +4 -2
  154. package/core/lib/cdt/generated/ParsedURL.d.ts +0 -1
  155. package/core/lib/cdt/generated/ParsedURL.js +3 -9
  156. package/core/lib/cdt/generated/SourceMap.d.ts +24 -25
  157. package/core/lib/cdt/generated/SourceMap.js +7 -15
  158. package/core/lib/deprecations-strings.d.ts +93 -88
  159. package/core/lib/deprecations-strings.js +20 -14
  160. package/core/lib/i18n/i18n.d.ts +2 -1
  161. package/core/lib/i18n/i18n.js +25 -13
  162. package/core/lib/legacy-javascript/legacy-javascript.d.ts +3 -2
  163. package/core/lib/legacy-javascript/legacy-javascript.js +235 -111
  164. package/core/lib/legacy-javascript/polyfill-graph-data.json +94 -89
  165. package/core/lib/legacy-javascript/polyfill-module-data.json +48 -7
  166. package/core/lib/minification-estimator.js +10 -10
  167. package/core/lib/network-request.d.ts +2 -0
  168. package/core/lib/network-request.js +21 -0
  169. package/core/lib/page-functions.js +2 -5
  170. package/core/lib/sentry.d.ts +1 -0
  171. package/core/lib/sentry.js +3 -0
  172. package/core/lib/trace-engine.d.ts +1 -0
  173. package/core/lib/trace-engine.js +2 -0
  174. package/core/runner.js +9 -3
  175. package/dist/report/bundle.esm.js +10 -10
  176. package/dist/report/flow.js +13 -13
  177. package/dist/report/standalone.js +5 -5
  178. package/flow-report/src/common.tsx +5 -2
  179. package/flow-report/src/i18n/i18n.d.ts +2 -0
  180. package/flow-report/src/summary/summary.tsx +9 -1
  181. package/flow-report/src/util.d.ts +1 -1
  182. package/package.json +62 -98
  183. package/readme.md +13 -18
  184. package/report/generator/file-namer.d.ts +1 -1
  185. package/report/generator/file-namer.js +5 -4
  186. package/report/generator/flow-report-assets.js +1 -3
  187. package/report/generator/report-assets.js +1 -2
  188. package/report/renderer/category-renderer.js +2 -2
  189. package/report/renderer/details-renderer.js +3 -2
  190. package/report/renderer/dom.d.ts +8 -2
  191. package/report/renderer/dom.js +29 -1
  192. package/report/renderer/element-screenshot-renderer.js +3 -0
  193. package/report/renderer/performance-category-renderer.js +3 -1
  194. package/report/renderer/report-renderer.js +4 -0
  195. package/report/renderer/report-utils.d.ts +1 -0
  196. package/report/renderer/report-utils.js +2 -0
  197. package/report/renderer/text-encoding.js +2 -2
  198. package/report/types/augment-dom.d.ts +4 -0
  199. package/shared/esm-utils.d.ts +0 -8
  200. package/shared/esm-utils.js +0 -18
  201. package/shared/localization/format.js +5 -3
  202. package/shared/localization/locales/ar-XB.json +157 -142
  203. package/shared/localization/locales/ar.json +157 -142
  204. package/shared/localization/locales/bg.json +154 -139
  205. package/shared/localization/locales/ca.json +157 -142
  206. package/shared/localization/locales/cs.json +148 -133
  207. package/shared/localization/locales/da.json +153 -138
  208. package/shared/localization/locales/de.json +152 -137
  209. package/shared/localization/locales/el.json +153 -138
  210. package/shared/localization/locales/en-GB.json +160 -145
  211. package/shared/localization/locales/en-US.json +239 -218
  212. package/shared/localization/locales/en-XL.json +239 -218
  213. package/shared/localization/locales/es-419.json +150 -135
  214. package/shared/localization/locales/es.json +149 -134
  215. package/shared/localization/locales/fi.json +151 -136
  216. package/shared/localization/locales/fil.json +154 -139
  217. package/shared/localization/locales/fr.json +150 -135
  218. package/shared/localization/locales/he.json +160 -145
  219. package/shared/localization/locales/hi.json +156 -141
  220. package/shared/localization/locales/hr.json +154 -139
  221. package/shared/localization/locales/hu.json +111 -96
  222. package/shared/localization/locales/id.json +153 -138
  223. package/shared/localization/locales/it.json +153 -138
  224. package/shared/localization/locales/ja.json +150 -135
  225. package/shared/localization/locales/ko.json +42 -27
  226. package/shared/localization/locales/lt.json +152 -137
  227. package/shared/localization/locales/lv.json +93 -78
  228. package/shared/localization/locales/nl.json +149 -134
  229. package/shared/localization/locales/no.json +152 -137
  230. package/shared/localization/locales/pl.json +153 -138
  231. package/shared/localization/locales/pt-PT.json +152 -137
  232. package/shared/localization/locales/pt.json +157 -142
  233. package/shared/localization/locales/ro.json +149 -134
  234. package/shared/localization/locales/ru.json +76 -61
  235. package/shared/localization/locales/sk.json +153 -138
  236. package/shared/localization/locales/sl.json +149 -134
  237. package/shared/localization/locales/sr-Latn.json +151 -136
  238. package/shared/localization/locales/sr.json +151 -136
  239. package/shared/localization/locales/sv.json +152 -137
  240. package/shared/localization/locales/ta.json +156 -141
  241. package/shared/localization/locales/te.json +157 -142
  242. package/shared/localization/locales/th.json +111 -96
  243. package/shared/localization/locales/tr.json +153 -138
  244. package/shared/localization/locales/uk.json +149 -134
  245. package/shared/localization/locales/vi.json +162 -147
  246. package/shared/localization/locales/zh-HK.json +150 -135
  247. package/shared/localization/locales/zh-TW.json +154 -139
  248. package/shared/localization/locales/zh.json +152 -137
  249. package/shared/localization/swap-locale.js +10 -5
  250. package/shared/root.js +1 -3
  251. package/third-party/ard/README.md +19 -10
  252. package/third-party/ard/ard-test.js +189 -266
  253. package/third-party/ard/ard.d.ts +18 -1
  254. package/third-party/ard/ard.js +282 -45
  255. package/third-party/ard/schema-validator.d.ts +14 -5
  256. package/third-party/ard/schema-validator.js +921 -1177
  257. package/third-party/ard/spec/schemas/ard-entry.schema.json +176 -0
  258. package/tsconfig.json +0 -2
  259. package/types/artifacts.d.ts +43 -7
  260. package/types/config.d.ts +6 -1
  261. package/types/externs.d.ts +4 -0
  262. package/types/internal/test.d.ts +1 -0
  263. package/build-tracker.config.js +0 -16
  264. package/core/lib/cdt/package.json +0 -4
  265. package/eslint-local-rules.d.cts +0 -9
  266. package/eslint.config.mjs +0 -242
  267. package/third-party/ard/spec/schemas/ai-catalog.schema.json +0 -292
  268. package/third-party/esbuild-plugins-polyfills/LICENSE +0 -3
  269. package/third-party/esbuild-plugins-polyfills/README.md +0 -7
  270. package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.d.ts +0 -9
  271. package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.js +0 -129
  272. package/types/internal/lookup-closest-locale.d.ts +0 -13
@@ -1,93 +1,98 @@
1
1
  {
2
- "moduleSizes": [26070, 498, 282, 294, 281, 467, 161, 236, 229, 765, 546, 339, 1608, 723, 729, 1545, 438, 214, 657, 111, 759, 537, 209, 281, 685, 217, 757, 631, 293, 182, 475, 79, 407, 140, 366, 792, 269, 222, 158, 280, 188, 137, 158, 105, 189, 543, 160, 742, 1436, 88, 904, 146, 314, 375, 183, 1083, 195, 503, 269, 208, 334, 350, 460, 568, 229, 1155, 334, 266, 30, 120, 309, 370, 358, 1952, 1638, 304, 153, 274, 1288, 192, 543, 74, 144, 137, 33, 336, 457, 2122, 535, 711, 1323, 117, 1961, 244, 557, 318, 119, 124, 108, 144, 96, 133, 441, 210, 1627, 1956, 693, 1426, 863, 637, 301, 51, 708, 583, 119, 600, 221, 370, 728, 1085, 552, 629, 125, 1746, 97, 441, 543, 2756, 371, 447, 548, 243, 266, 217, 99, 440, 183, 546, 137, 464, 207, 983, 503, 237, 382, 249, 675, 402, 254, 223, 164, 214, 191, 831, 218, 202, 232, 124, 249, 160, 251, 217, 717, 78, 561, 1627, 256, 386, 225, 432, 499, 394, 364, 445, 634, 667, 177, 346, 470, 663, 142, 588, 414, 617, 1559, 380, 2520, 1040, 417, 289, 238, 220, 214, 303, 163, 141, 510, 397, 137, 137, 133, 133, 390, 266, 137, 183, 215, 191, 485, 328, 575, 799, 533, 148, 215, 589, 589, 130, 362, 562, 471, 179, 186, 1266, 1456, 521, 1536, 427, 444, 406, 912, 150, 283, 144, 485, 470, 205, 1268, 796, 658, 306, 3751, 814, 146, 2328, 1226, 922, 237, 206, 198, 250, 283, 60, 3000],
2
+ "moduleSizes": [26175, 498, 282, 294, 281, 467, 164, 236, 229, 765, 555, 339, 300, 1977, 723, 729, 1547, 438, 214, 657, 111, 759, 537, 209, 281, 685, 217, 757, 631, 293, 182, 475, 79, 407, 140, 366, 792, 269, 222, 158, 280, 192, 137, 158, 105, 189, 543, 160, 742, 1436, 88, 978, 146, 314, 375, 183, 1083, 195, 503, 269, 208, 334, 233, 350, 580, 491, 229, 1155, 334, 266, 30, 120, 309, 370, 358, 1952, 1638, 304, 153, 274, 1288, 192, 543, 74, 144, 137, 33, 336, 457, 2219, 535, 711, 1323, 64, 117, 1961, 244, 557, 318, 119, 173, 108, 144, 96, 133, 441, 210, 1627, 1956, 693, 1426, 863, 637, 301, 51, 708, 583, 119, 600, 221, 370, 728, 1085, 552, 629, 125, 1746, 97, 441, 543, 2931, 767, 371, 588, 548, 243, 266, 217, 99, 440, 183, 607, 180, 464, 207, 983, 530, 237, 382, 249, 675, 402, 254, 223, 164, 214, 191, 831, 218, 202, 232, 124, 250, 160, 251, 217, 717, 78, 561, 1696, 256, 386, 225, 432, 499, 394, 364, 445, 625, 680, 177, 346, 663, 142, 588, 414, 686, 1628, 380, 2580, 558, 783, 1410, 1040, 417, 433, 266, 263, 214, 303, 163, 141, 510, 397, 137, 137, 133, 133, 390, 266, 137, 183, 215, 191, 485, 328, 575, 799, 533, 148, 215, 589, 589, 130, 362, 562, 471, 179, 186, 1266, 1456, 366, 521, 1536, 511, 444, 406, 1053, 150, 283, 144, 485, 470, 205, 1268, 796, 658, 595, 306, 3750, 814, 146, 2298, 1226, 881, 1144, 237, 206, 198, 250, 283, 60, 3000],
3
3
  "dependencies": {
4
- "Array.prototype.at": [0, 5, 69, 105, 106, 116, 164],
5
- "Array.prototype.concat": [0, 16, 21, 22, 26, 34, 40, 76, 78, 155, 165],
6
- "Array.prototype.copyWithin": [0, 5, 9, 37, 69, 105, 106, 116, 166],
7
- "Array.prototype.every": [0, 15, 17, 21, 22, 26, 53, 59, 76, 78, 155, 167],
8
- "Array.prototype.fill": [0, 5, 10, 69, 105, 106, 116, 168],
9
- "Array.prototype.filter": [0, 15, 16, 21, 22, 26, 53, 59, 76, 78, 155, 169],
10
- "Array.prototype.find": [0, 5, 15, 21, 22, 26, 53, 59, 69, 76, 78, 105, 106, 116, 155, 173],
11
- "Array.prototype.findIndex": [0, 5, 15, 21, 22, 26, 53, 59, 69, 76, 78, 105, 106, 116, 155, 170],
12
- "Array.prototype.findLast": [0, 5, 14, 53, 59, 69, 105, 106, 116, 172],
13
- "Array.prototype.findLastIndex": [0, 5, 14, 53, 59, 69, 105, 106, 116, 171],
14
- "Array.prototype.flat": [0, 21, 22, 26, 40, 50, 53, 59, 76, 78, 155, 175],
15
- "Array.prototype.flatMap": [0, 21, 22, 26, 40, 50, 53, 59, 76, 78, 155, 174],
16
- "Array.prototype.forEach": [0, 11, 15, 17, 21, 22, 26, 53, 59, 76, 78, 155, 176],
17
- "Array.from": [0, 12, 23, 24, 26, 34, 53, 59, 62, 63, 75, 78, 88, 155, 177],
18
- "Array.prototype.includes": [0, 5, 69, 105, 106, 116, 178],
19
- "Array.prototype.indexOf": [0, 17, 59, 179],
20
- "Array.isArray": [0, 76, 180],
21
- "Array.prototype.join": [0, 17, 181],
22
- "Array.prototype.map": [0, 15, 16, 21, 22, 26, 53, 59, 76, 78, 155, 182],
23
- "Array.of": [0, 26, 34, 78, 155, 183],
24
- "Array.prototype.slice": [0, 16, 19, 26, 34, 76, 78, 155, 184],
25
- "Array.prototype.some": [0, 15, 17, 21, 22, 26, 53, 59, 76, 78, 155, 185],
26
- "Array.prototype.sort": [0, 17, 19, 20, 26, 37, 42, 43, 46, 155, 156, 186],
27
- "Array.prototype.unshift": [0, 18, 37, 40, 76, 187],
28
- "Math.acosh": [0, 97, 188],
29
- "Math.asinh": [0, 189],
30
- "Math.atanh": [0, 190],
31
- "Math.cbrt": [0, 100, 191],
32
- "Math.clz32": [0, 192],
33
- "Math.cosh": [0, 93, 193],
34
- "Math.expm1": [0, 93, 194],
35
- "Math.fround": [0, 94, 95, 99, 100, 195],
36
- "Math.hypot": [0, 196],
37
- "Math.imul": [0, 197],
38
- "Math.log10": [0, 96, 198],
39
- "Math.log1p": [0, 97, 199],
40
- "Math.log2": [0, 98, 200],
41
- "Math.sign": [0, 100, 201],
42
- "Math.sinh": [0, 93, 202],
43
- "Math.tanh": [0, 93, 203],
44
- "Math.trunc": [0, 204],
45
- "Object.assign": [0, 104, 116, 205],
46
- "Object.create": [0, 69, 105, 106, 116, 206],
47
- "Object.entries": [0, 29, 112, 116, 119, 207],
48
- "Object.freeze": [0, 8, 19, 51, 73, 109, 113, 208],
49
- "Object.fromEntries": [0, 26, 34, 53, 59, 62, 63, 75, 87, 88, 155, 209],
50
- "Object.getOwnPropertyDescriptor": [0, 210],
51
- "Object.getOwnPropertyDescriptors": [0, 34, 211],
52
- "Object.getPrototypeOf": [0, 29, 112, 212],
53
- "Object.hasOwn": [0, 213],
54
- "Object.is": [0, 134, 217],
55
- "Object.isExtensible": [0, 8, 113, 214],
56
- "Object.isFrozen": [0, 8, 215],
57
- "Object.isSealed": [0, 8, 216],
58
- "Object.keys": [0, 116, 218],
59
- "Object.preventExtensions": [0, 8, 19, 51, 73, 109, 113, 219],
60
- "Object.seal": [0, 8, 19, 51, 73, 109, 113, 220],
61
- "Object.setPrototypeOf": [0, 4, 58, 83, 118, 221],
62
- "Object.values": [0, 29, 112, 116, 119, 222],
63
- "Promise.any": [0, 24, 26, 47, 53, 59, 62, 63, 75, 87, 88, 102, 122, 123, 124, 125, 155, 224],
64
- "Reflect.apply": [0, 52, 225],
65
- "Reflect.construct": [0, 3, 19, 26, 52, 55, 69, 78, 105, 106, 116, 155, 226],
66
- "Reflect.deleteProperty": [0, 227],
67
- "Reflect.get": [0, 29, 79, 112, 230],
68
- "Reflect.getOwnPropertyDescriptor": [0, 228],
69
- "Reflect.getPrototypeOf": [0, 29, 112, 229],
70
- "Reflect.has": [0, 231],
71
- "Reflect.isExtensible": [0, 8, 113, 232],
72
- "Reflect.ownKeys": [0, 233],
73
- "Reflect.preventExtensions": [0, 51, 234],
74
- "Reflect.setPrototypeOf": [0, 4, 58, 83, 118, 235],
75
- "String.prototype.codePointAt": [0, 26, 141, 155, 156, 236],
76
- "String.prototype.endsWith": [0, 26, 28, 59, 85, 103, 155, 156, 237],
77
- "String.fromCodePoint": [0, 238],
78
- "String.prototype.includes": [0, 26, 28, 85, 103, 155, 156, 239],
79
- "String.prototype.matchAll": [0, 3, 6, 26, 29, 31, 59, 69, 78, 85, 89, 90, 105, 106, 112, 116, 126, 127, 128, 129, 130, 131, 132, 135, 139, 141, 155, 156, 241],
80
- "String.raw": [0, 26, 155, 156, 242],
81
- "String.prototype.repeat": [0, 26, 142, 155, 156, 243],
82
- "String.prototype.replaceAll": [0, 26, 65, 85, 128, 129, 155, 156, 244],
83
- "String.prototype.startsWith": [0, 26, 28, 59, 85, 103, 155, 156, 245],
84
- "String.prototype.substr": [0, 26, 155, 156, 246],
85
- "String.prototype.trim": [0, 26, 144, 146, 155, 156, 163, 251],
86
- "String.prototype.trimEnd": [0, 26, 143, 144, 146, 155, 156, 163, 247, 249],
87
- "String.prototype.trimStart": [0, 26, 144, 145, 146, 155, 156, 163, 248, 250],
88
- "String.prototype.link": [0, 26, 30, 140, 155, 156, 240],
89
- "Promise.allSettled": [0, 24, 26, 47, 53, 59, 62, 63, 75, 87, 88, 102, 122, 123, 124, 125, 155, 223, 252],
90
- "focus-visible": [253]
4
+ "Array.prototype.at": [0, 5, 71, 108, 109, 119, 168],
5
+ "Array.prototype.concat": [0, 17, 19, 22, 23, 27, 35, 41, 78, 80, 159, 169],
6
+ "Array.prototype.copyWithin": [0, 5, 9, 38, 71, 108, 109, 119, 170],
7
+ "Array.prototype.every": [0, 16, 18, 22, 23, 27, 35, 54, 60, 78, 80, 159, 171],
8
+ "Array.prototype.fill": [0, 5, 10, 71, 108, 109, 119, 172],
9
+ "Array.prototype.filter": [0, 16, 17, 22, 23, 27, 35, 54, 60, 78, 80, 159, 173],
10
+ "Array.prototype.find": [0, 5, 16, 22, 23, 27, 35, 54, 60, 71, 78, 80, 108, 109, 119, 159, 177],
11
+ "Array.prototype.findIndex": [0, 5, 16, 22, 23, 27, 35, 54, 60, 71, 78, 80, 108, 109, 119, 159, 174],
12
+ "Array.prototype.findLast": [0, 5, 15, 54, 60, 71, 108, 109, 119, 176],
13
+ "Array.prototype.findLastIndex": [0, 5, 15, 54, 60, 71, 108, 109, 119, 175],
14
+ "Array.prototype.flat": [0, 22, 23, 27, 35, 41, 51, 54, 60, 78, 80, 159, 179],
15
+ "Array.prototype.flatMap": [0, 22, 23, 27, 35, 41, 51, 54, 60, 78, 80, 159, 178],
16
+ "Array.prototype.forEach": [0, 11, 16, 18, 22, 23, 27, 35, 54, 60, 78, 80, 159, 180],
17
+ "Array.from": [0, 13, 19, 24, 25, 27, 35, 41, 54, 60, 64, 65, 77, 78, 80, 90, 93, 159, 181],
18
+ "Array.prototype.indexOf": [0, 18, 60, 182],
19
+ "Array.isArray": [0, 78, 183],
20
+ "Array.prototype.join": [0, 18, 184],
21
+ "Array.prototype.map": [0, 16, 17, 22, 23, 27, 35, 54, 60, 78, 80, 159, 185],
22
+ "Array.of": [0, 19, 27, 35, 78, 80, 159, 186],
23
+ "Array.prototype.slice": [0, 17, 19, 20, 27, 35, 78, 80, 159, 187],
24
+ "Array.prototype.some": [0, 16, 18, 22, 23, 27, 35, 54, 60, 78, 80, 159, 188],
25
+ "Array.prototype.sort": [0, 18, 20, 21, 27, 38, 43, 44, 47, 159, 160, 189],
26
+ "Array.prototype.toReversed": [0, 5, 35, 71, 108, 109, 119, 190],
27
+ "Array.prototype.toSorted": [0, 5, 12, 62, 71, 108, 109, 119, 191],
28
+ "Array.prototype.toSpliced": [0, 5, 35, 41, 71, 108, 109, 119, 192],
29
+ "Array.prototype.unshift": [0, 19, 38, 41, 78, 193],
30
+ "Math.acosh": [0, 100, 194],
31
+ "Math.asinh": [0, 100, 195],
32
+ "Math.atanh": [0, 100, 196],
33
+ "Math.cbrt": [0, 103, 197],
34
+ "Math.clz32": [0, 198],
35
+ "Math.cosh": [0, 96, 199],
36
+ "Math.expm1": [0, 96, 200],
37
+ "Math.fround": [0, 97, 98, 102, 103, 201],
38
+ "Math.hypot": [0, 202],
39
+ "Math.imul": [0, 203],
40
+ "Math.log10": [0, 99, 204],
41
+ "Math.log1p": [0, 100, 205],
42
+ "Math.log2": [0, 101, 206],
43
+ "Math.sign": [0, 103, 207],
44
+ "Math.sinh": [0, 96, 208],
45
+ "Math.tanh": [0, 96, 209],
46
+ "Math.trunc": [0, 210],
47
+ "Object.assign": [0, 107, 119, 211],
48
+ "Object.create": [0, 71, 108, 109, 119, 212],
49
+ "Object.entries": [0, 30, 115, 119, 122, 213],
50
+ "Object.freeze": [0, 8, 20, 52, 75, 112, 116, 214],
51
+ "Object.fromEntries": [0, 35, 54, 60, 64, 65, 77, 89, 90, 93, 215],
52
+ "Object.getOwnPropertyDescriptor": [0, 216],
53
+ "Object.getOwnPropertyDescriptors": [0, 35, 217],
54
+ "Object.getPrototypeOf": [0, 30, 115, 218],
55
+ "Object.hasOwn": [0, 219],
56
+ "Object.is": [0, 138, 223],
57
+ "Object.isExtensible": [0, 8, 116, 220],
58
+ "Object.isFrozen": [0, 8, 221],
59
+ "Object.isSealed": [0, 8, 222],
60
+ "Object.keys": [0, 119, 224],
61
+ "Object.preventExtensions": [0, 8, 20, 52, 75, 112, 116, 225],
62
+ "Object.seal": [0, 8, 20, 52, 75, 112, 116, 226],
63
+ "Object.setPrototypeOf": [0, 4, 59, 85, 121, 227],
64
+ "Object.values": [0, 30, 115, 119, 122, 228],
65
+ "Promise.any": [0, 25, 48, 54, 60, 64, 65, 77, 89, 90, 93, 105, 125, 126, 127, 128, 230],
66
+ "Promise.withResolvers": [0, 105, 231],
67
+ "Reflect.apply": [0, 53, 232],
68
+ "Reflect.construct": [0, 3, 20, 27, 53, 56, 71, 80, 108, 109, 119, 159, 233],
69
+ "Reflect.deleteProperty": [0, 234],
70
+ "Reflect.get": [0, 30, 81, 115, 237],
71
+ "Reflect.getOwnPropertyDescriptor": [0, 235],
72
+ "Reflect.getPrototypeOf": [0, 30, 115, 236],
73
+ "Reflect.has": [0, 238],
74
+ "Reflect.isExtensible": [0, 8, 116, 239],
75
+ "Reflect.ownKeys": [0, 240],
76
+ "Reflect.preventExtensions": [0, 52, 241],
77
+ "Reflect.setPrototypeOf": [0, 4, 59, 85, 121, 242],
78
+ "String.prototype.codePointAt": [0, 27, 145, 159, 160, 243],
79
+ "String.prototype.endsWith": [0, 27, 29, 60, 87, 106, 159, 160, 244],
80
+ "String.fromCodePoint": [0, 245],
81
+ "String.prototype.includes": [0, 27, 29, 87, 106, 159, 160, 246],
82
+ "String.prototype.isWellFormed": [0, 27, 159, 160, 247],
83
+ "String.prototype.matchAll": [0, 3, 6, 27, 30, 32, 60, 71, 80, 87, 91, 92, 93, 108, 109, 115, 119, 129, 130, 131, 132, 133, 134, 135, 136, 139, 143, 145, 159, 160, 249],
84
+ "String.raw": [0, 27, 159, 160, 250],
85
+ "String.prototype.repeat": [0, 27, 146, 159, 160, 251],
86
+ "String.prototype.replaceAll": [0, 27, 67, 87, 131, 132, 133, 159, 160, 252],
87
+ "String.prototype.startsWith": [0, 27, 29, 60, 87, 106, 159, 160, 253],
88
+ "String.prototype.substr": [0, 27, 159, 160, 254],
89
+ "String.prototype.toWellFormed": [0, 27, 159, 160, 255],
90
+ "String.prototype.trim": [0, 27, 148, 150, 159, 160, 167, 260],
91
+ "String.prototype.trimEnd": [0, 27, 147, 148, 150, 159, 160, 167, 256, 258],
92
+ "String.prototype.trimStart": [0, 27, 148, 149, 150, 159, 160, 167, 257, 259],
93
+ "String.prototype.link": [0, 27, 31, 144, 159, 160, 248],
94
+ "Promise.allSettled": [0, 25, 48, 54, 60, 64, 65, 77, 89, 90, 93, 105, 125, 126, 127, 128, 229, 261],
95
+ "focus-visible": [262]
91
96
  },
92
- "maxSize": 155835
97
+ "maxSize": 163427
93
98
  }
@@ -112,13 +112,6 @@
112
112
  ],
113
113
  "corejs": true
114
114
  },
115
- {
116
- "name": "Array.prototype.includes",
117
- "modules": [
118
- "es.array.includes"
119
- ],
120
- "corejs": true
121
- },
122
115
  {
123
116
  "name": "Array.prototype.indexOf",
124
117
  "modules": [
@@ -175,6 +168,30 @@
175
168
  ],
176
169
  "corejs": true
177
170
  },
171
+ {
172
+ "name": "Array.prototype.toReversed",
173
+ "modules": [
174
+ "es.array.to-reversed",
175
+ "esnext.array.to-reversed"
176
+ ],
177
+ "corejs": true
178
+ },
179
+ {
180
+ "name": "Array.prototype.toSorted",
181
+ "modules": [
182
+ "es.array.to-sorted",
183
+ "esnext.array.to-sorted"
184
+ ],
185
+ "corejs": true
186
+ },
187
+ {
188
+ "name": "Array.prototype.toSpliced",
189
+ "modules": [
190
+ "es.array.to-spliced",
191
+ "esnext.array.to-spliced"
192
+ ],
193
+ "corejs": true
194
+ },
178
195
  {
179
196
  "name": "Array.prototype.unshift",
180
197
  "modules": [
@@ -436,6 +453,14 @@
436
453
  ],
437
454
  "corejs": true
438
455
  },
456
+ {
457
+ "name": "Promise.withResolvers",
458
+ "modules": [
459
+ "es.promise.with-resolvers",
460
+ "esnext.promise.with-resolvers"
461
+ ],
462
+ "corejs": true
463
+ },
439
464
  {
440
465
  "name": "Reflect.apply",
441
466
  "modules": [
@@ -541,6 +566,14 @@
541
566
  ],
542
567
  "corejs": true
543
568
  },
569
+ {
570
+ "name": "String.prototype.isWellFormed",
571
+ "modules": [
572
+ "es.string.is-well-formed",
573
+ "esnext.string.is-well-formed"
574
+ ],
575
+ "corejs": true
576
+ },
544
577
  {
545
578
  "name": "String.prototype.matchAll",
546
579
  "modules": [
@@ -585,6 +618,14 @@
585
618
  ],
586
619
  "corejs": true
587
620
  },
621
+ {
622
+ "name": "String.prototype.toWellFormed",
623
+ "modules": [
624
+ "es.string.to-well-formed",
625
+ "esnext.string.to-well-formed"
626
+ ],
627
+ "corejs": true
628
+ },
588
629
  {
589
630
  "name": "String.prototype.trim",
590
631
  "modules": [
@@ -7,7 +7,6 @@
7
7
  // https://www.ecma-international.org/ecma-262/9.0/index.html#sec-punctuators
8
8
  // eslint-disable-next-line max-len
9
9
  const PUNCTUATOR_REGEX = /(return|case|else|{|\(|\[|\.\.\.|;|,|<|>|<=|>=|==|!=|===|!==|\+|-|\*|%|\*\*|\+\+|--|<<|>>|>>>|&|\||\^|!|~|&&|\|\||\?|:|=|\+=|-=|\*=|%=|\*\*=|<<=|>>=|>>>=|&=|\|=|\^=|=>|\/|\/=|\})$/;
10
- const WHITESPACE_REGEX = /( |\n|\t)+$/;
11
10
 
12
11
  /**
13
12
  * Look backwards from `startPosition` in `content` for an ECMAScript punctuator.
@@ -19,11 +18,13 @@ const WHITESPACE_REGEX = /( |\n|\t)+$/;
19
18
  */
20
19
  function hasPunctuatorBefore(content, startPosition) {
21
20
  for (let i = startPosition; i > 0; i--) {
21
+ const char = content[i - 1];
22
+ // Skip over any ending whitespace
23
+ if (char === ' ' || char === '\n' || char === '\t') continue;
24
+
22
25
  // Try to grab at least 6 characters so we can check for `return`
23
26
  const sliceStart = Math.max(0, i - 6);
24
27
  const precedingCharacters = content.slice(sliceStart, i);
25
- // Skip over any ending whitespace
26
- if (WHITESPACE_REGEX.test(precedingCharacters)) continue;
27
28
  // Check if it's a punctuator
28
29
  return PUNCTUATOR_REGEX.test(precedingCharacters);
29
30
  }
@@ -56,8 +57,7 @@ function computeTokenLength(content, features) {
56
57
  const templateLiteralDepth = [];
57
58
 
58
59
  for (let i = 0; i < content.length; i++) {
59
- const twoChars = content.substr(i, 2);
60
- const char = twoChars.charAt(0);
60
+ const char = content[i];
61
61
 
62
62
  const isWhitespace = char === ' ' || char === '\n' || char === '\t';
63
63
  const isAStringOpenChar = char === `'` || char === '"' || char === '`';
@@ -71,7 +71,7 @@ function computeTokenLength(content, features) {
71
71
  // License comments count
72
72
  if (isInLicenseComment) totalTokenLength++;
73
73
 
74
- if (twoChars === '*/') {
74
+ if (char === '*' && content[i + 1] === '/') {
75
75
  // License comments count, account for the '/' character we're skipping over
76
76
  if (isInLicenseComment) totalTokenLength++;
77
77
  // End the comment when we hit the closing sequence
@@ -83,7 +83,7 @@ function computeTokenLength(content, features) {
83
83
  // String characters count
84
84
  totalTokenLength++;
85
85
 
86
- if (stringOpenChar === '`' && twoChars === '${') {
86
+ if (stringOpenChar === '`' && char === '$' && content[i + 1] === '{') {
87
87
  // Start new template literal
88
88
  templateLiteralDepth.push('templateBrace');
89
89
  isInString = false;
@@ -119,16 +119,16 @@ function computeTokenLength(content, features) {
119
119
  }
120
120
  } else {
121
121
  // We're not in any particular token mode, look for the start of different
122
- if (twoChars === '/*') {
122
+ if (char === '/' && content[i + 1] === '*') {
123
123
  // Start the multi-line comment
124
124
  isInMultilineComment = true;
125
125
  // Check if it's a license comment so we know whether to count it
126
- isInLicenseComment = content.charAt(i + 2) === '!';
126
+ isInLicenseComment = content[i + 2] === '!';
127
127
  // += 2 because we are processing 2 characters, not just 1
128
128
  if (isInLicenseComment) totalTokenLength += 2;
129
129
  // Skip over the '*' character since we've already processed it
130
130
  i++;
131
- } else if (twoChars === '//' && features.singlelineComments) {
131
+ } else if (char === '/' && content[i + 1] === '/' && features.singlelineComments) {
132
132
  // Start the single-line comment
133
133
  isInSinglelineComment = true;
134
134
  isInMultilineComment = false;
@@ -155,6 +155,8 @@ export class NetworkRequest {
155
155
  sessionTargetType: LH.Protocol.TargetType | undefined;
156
156
  fromWorker: boolean;
157
157
  isLinkPreload: boolean;
158
+ /** @type {import('@paulirish/trace_engine/models/trace/types/TraceEvents.js').RenderBlocking|undefined} */
159
+ renderBlocking: import("@paulirish/trace_engine/models/trace/types/TraceEvents.js").RenderBlocking | undefined;
158
160
  /**
159
161
  * @return {boolean}
160
162
  */
@@ -66,6 +66,17 @@ const HEADER_TOTAL = 'X-TotalMs';
66
66
  const HEADER_FETCHED_SIZE = 'X-TotalFetchedSize';
67
67
  const HEADER_PROTOCOL_IS_H2 = 'X-ProtocolIsH2';
68
68
 
69
+ // CDP uses PascalCase (M145+), Lantern uses snake_case.
70
+ /** @type {Record<LH.Crdp.Network.RenderBlockingBehavior,
71
+ * import('@paulirish/trace_engine/models/trace/types/TraceEvents.js').RenderBlocking>} */
72
+ const CDP_TO_LANTERN_RENDER_BLOCKING = {
73
+ 'NonBlocking': 'non_blocking',
74
+ 'Blocking': 'blocking',
75
+ 'InBodyParserBlocking': 'in_body_parser_blocking',
76
+ 'PotentiallyBlocking': 'potentially_blocking',
77
+ 'NonBlockingDynamic': 'dynamically_injected_non_blocking',
78
+ };
79
+
69
80
  /**
70
81
  * @typedef HeaderEntry
71
82
  * @property {string} name
@@ -187,6 +198,8 @@ class NetworkRequest {
187
198
  this.sessionTargetType = undefined;
188
199
  this.fromWorker = false;
189
200
  this.isLinkPreload = false;
201
+ /** @type {import('@paulirish/trace_engine/models/trace/types/TraceEvents.js').RenderBlocking|undefined} */
202
+ this.renderBlocking = undefined;
190
203
  }
191
204
 
192
205
  /**
@@ -239,6 +252,11 @@ class NetworkRequest {
239
252
 
240
253
  this.frameId = data.frameId;
241
254
  this.isLinkPreload = data.initiator.type === 'preload' || !!data.request.isLinkPreload;
255
+ // M145+ provides renderBlockingBehavior in CDP
256
+ const renderBlockingBehavior = data.renderBlockingBehavior;
257
+ if (renderBlockingBehavior) {
258
+ this.renderBlocking = CDP_TO_LANTERN_RENDER_BLOCKING[renderBlockingBehavior];
259
+ }
242
260
  this.isValid = true;
243
261
  }
244
262
 
@@ -327,6 +345,9 @@ class NetworkRequest {
327
345
  this.networkEndTime = data.timestamp * 1000;
328
346
 
329
347
  this._updateResponseHeadersEndTimeIfNecessary();
348
+ this._updateProtocolForLightrider();
349
+ this._updateTransferSizeForLightrider();
350
+ this._updateTimingsForLightrider();
330
351
  }
331
352
 
332
353
  /**
@@ -97,13 +97,10 @@ function getOuterHTMLSnippet(element, ignoreAttrs = [], snippetCharacterLimit =
97
97
  }
98
98
 
99
99
  try {
100
- /** @type {Element} */
101
- // @ts-expect-error - clone will be same type as element - see https://github.com/microsoft/TypeScript/issues/283
102
- const clone = element.cloneNode();
103
-
104
- // Prevent any potential side-effects by appending to a template element.
100
+ // Prevent any potential side-effects by cloning into a template element.
105
101
  // See https://github.com/GoogleChrome/lighthouse/issues/11465
106
102
  const template = element.ownerDocument.createElement('template');
103
+ const clone = template.content.ownerDocument.importNode(element);
107
104
  template.content.append(clone);
108
105
  ignoreAttrs.concat(autoFillIgnoreAttrs).forEach(attribute =>{
109
106
  clone.removeAttribute(attribute);
@@ -3,6 +3,7 @@ export namespace Sentry {
3
3
  export { noop as captureMessage };
4
4
  export { noop as captureBreadcrumb };
5
5
  export { noop as getContext };
6
+ export { noop as setContext };
6
7
  export let captureException: (error: Error, options: {
7
8
  level?: string;
8
9
  tags?: {
@@ -32,6 +32,8 @@ const sentryDelegate = {
32
32
  captureBreadcrumb: noop,
33
33
  /** @type {() => any} */
34
34
  getContext: noop,
35
+ /** @type {(name: string, context: {[key: string]: any} | null) => void} */
36
+ setContext: noop,
35
37
  /** @type {(error: Error, options: {level?: string, tags?: {[key: string]: any}, extra?: {[key: string]: any}}) => Promise<void>} */
36
38
  captureException: async () => { },
37
39
  _shouldSample() {
@@ -88,6 +90,7 @@ async function init(opts) {
88
90
  sentryDelegate.captureMessage = (...args) => Sentry.captureMessage(...args);
89
91
  sentryDelegate.captureBreadcrumb = (...args) => Sentry.addBreadcrumb(...args);
90
92
  sentryDelegate.getContext = () => extras;
93
+ sentryDelegate.setContext = (...args) => Sentry.setContext(...args);
91
94
 
92
95
  // Keep a record of exceptions per audit/gatherer so we can just report once
93
96
  const sentryExceptionCache = new Map();
@@ -16,5 +16,6 @@ export const TraceProcessor: typeof TraceEngine.Processor.TraceProcessor;
16
16
  export const TraceHandlers: typeof TraceEngine.Handlers.ModelHandlers;
17
17
  export const Insights: typeof TraceEngine.Insights;
18
18
  export const Helpers: typeof TraceEngine.Helpers;
19
+ export const Types: typeof TraceEngine.Types;
19
20
  import * as TraceEngine from '@paulirish/trace_engine';
20
21
  //# sourceMappingURL=trace-engine.d.ts.map
@@ -12,10 +12,12 @@ const TraceProcessor = TraceEngine.Processor.TraceProcessor;
12
12
  const TraceHandlers = TraceEngine.Handlers.ModelHandlers;
13
13
  const Insights = TraceEngine.Insights;
14
14
  const Helpers = TraceEngine.Helpers;
15
+ const Types = TraceEngine.Types;
15
16
 
16
17
  export {
17
18
  TraceProcessor,
18
19
  TraceHandlers,
19
20
  Insights,
20
21
  Helpers,
22
+ Types,
21
23
  };
package/core/runner.js CHANGED
@@ -9,7 +9,6 @@ import path from 'path';
9
9
 
10
10
 
11
11
  import log from 'lighthouse-logger';
12
- import {isEqual} from 'lodash-es';
13
12
 
14
13
  import {ReportScoring} from './scoring.js';
15
14
  import {Audit} from './audits/audit.js';
@@ -20,12 +19,13 @@ import {Sentry} from './lib/sentry.js';
20
19
  import {ReportGenerator} from '../report/generator/report-generator.js';
21
20
  import {LighthouseError} from './lib/lh-error.js';
22
21
  import {lighthouseVersion} from '../shared/root.js';
23
- import {getModuleDirectory} from '../shared/esm-utils.js';
24
22
  import {EntityClassification} from './computed/entity-classification.js';
25
23
  import UrlUtils from './lib/url-utils.js';
26
24
  import {Util} from '../shared/util.js';
25
+ import {isEqual} from './lib/arbitrary-equality-map.js';
26
+ import {ARD_VERSION} from '../third-party/ard/ard.js';
27
27
 
28
- const moduleDir = getModuleDirectory(import.meta);
28
+ const moduleDir = import.meta.dirname;
29
29
 
30
30
  /** @typedef {import('./lib/arbitrary-equality-map.js').ArbitraryEqualityMap} ArbitraryEqualityMap */
31
31
 
@@ -71,9 +71,14 @@ class Runner {
71
71
  // Use version from gathering stage.
72
72
  // If accessibility gatherer didn't run or errored, it won't be in credits.
73
73
  const axeVersion = artifacts.Accessibility?.version;
74
+ const ardVersion = (
75
+ artifacts.AgentResourceDiscovery &&
76
+ !(artifacts.AgentResourceDiscovery instanceof Error)
77
+ ) ? ARD_VERSION : undefined;
74
78
  /** @type {Record<string, string|undefined>} */
75
79
  const credits = {
76
80
  'axe-core': axeVersion,
81
+ 'ard': ardVersion,
77
82
  };
78
83
 
79
84
  // Add plugins to the credits.
@@ -230,6 +235,7 @@ class Runner {
230
235
  log.time(runnerStatus, 'verbose');
231
236
 
232
237
  const artifacts = await gatherFn({resolvedConfig: options.resolvedConfig});
238
+ options.resolvedConfig.artifacts = null;
233
239
  log.timeEnd(runnerStatus);
234
240
 
235
241
  // If `gather` is run multiple times before `audit`, the timing entries for each `gather` can pollute one another.