lighthouse 12.5.1 → 12.6.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 (269) hide show
  1. package/cli/run.js +1 -1
  2. package/cli/test/smokehouse/config/exclusions.js +2 -0
  3. package/cli/test/smokehouse/lib/concurrent-mapper.d.ts +3 -3
  4. package/core/audits/audit.d.ts +1 -1
  5. package/core/audits/audit.js +3 -2
  6. package/core/audits/bootup-time.d.ts +1 -1
  7. package/core/audits/bootup-time.js +3 -3
  8. package/core/audits/byte-efficiency/byte-efficiency-audit.js +1 -1
  9. package/core/audits/byte-efficiency/duplicated-javascript.js +1 -1
  10. package/core/audits/byte-efficiency/efficient-animated-content.js +1 -1
  11. package/core/audits/byte-efficiency/legacy-javascript.js +2 -3
  12. package/core/audits/byte-efficiency/modern-image-formats.js +1 -1
  13. package/core/audits/byte-efficiency/offscreen-images.js +4 -4
  14. package/core/audits/byte-efficiency/render-blocking-resources.js +4 -4
  15. package/core/audits/byte-efficiency/total-byte-weight.d.ts +1 -1
  16. package/core/audits/byte-efficiency/total-byte-weight.js +2 -2
  17. package/core/audits/byte-efficiency/unminified-css.js +1 -1
  18. package/core/audits/byte-efficiency/unminified-javascript.js +1 -1
  19. package/core/audits/byte-efficiency/unused-css-rules.js +2 -2
  20. package/core/audits/byte-efficiency/unused-javascript.js +1 -1
  21. package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +1 -1
  22. package/core/audits/byte-efficiency/uses-long-cache-ttl.js +2 -2
  23. package/core/audits/byte-efficiency/uses-optimized-images.js +2 -2
  24. package/core/audits/byte-efficiency/uses-responsive-images.d.ts +1 -1
  25. package/core/audits/byte-efficiency/uses-responsive-images.js +1 -1
  26. package/core/audits/byte-efficiency/uses-text-compression.js +1 -1
  27. package/core/audits/clickjacking-mitigation.js +2 -2
  28. package/core/audits/critical-request-chains.js +3 -3
  29. package/core/audits/csp-xss.js +2 -2
  30. package/core/audits/diagnostics.js +3 -3
  31. package/core/audits/dobetterweb/charset.js +2 -2
  32. package/core/audits/dobetterweb/doctype.js +2 -2
  33. package/core/audits/dobetterweb/dom-size.d.ts +1 -1
  34. package/core/audits/dobetterweb/dom-size.js +3 -3
  35. package/core/audits/dobetterweb/uses-http2.js +2 -2
  36. package/core/audits/final-screenshot.js +2 -2
  37. package/core/audits/font-display.js +2 -2
  38. package/core/audits/has-hsts.js +2 -2
  39. package/core/audits/image-size-responsive.d.ts +3 -2
  40. package/core/audits/image-size-responsive.js +30 -4
  41. package/core/audits/insights/{use-cache-insight.d.ts → cache-insight.d.ts} +3 -3
  42. package/core/audits/insights/{use-cache-insight.js → cache-insight.js} +15 -13
  43. package/core/audits/insights/cls-culprits-insight.js +3 -3
  44. package/core/audits/insights/document-latency-insight.js +1 -1
  45. package/core/audits/insights/dom-size-insight.js +1 -1
  46. package/core/audits/insights/duplicated-javascript-insight.d.ts +13 -0
  47. package/core/audits/insights/duplicated-javascript-insight.js +36 -9
  48. package/core/audits/insights/font-display-insight.js +1 -1
  49. package/core/audits/insights/forced-reflow-insight.js +1 -1
  50. package/core/audits/insights/image-delivery-insight.js +1 -1
  51. package/core/audits/insights/insight-audit.d.ts +11 -9
  52. package/core/audits/insights/insight-audit.js +37 -35
  53. package/core/audits/insights/interaction-to-next-paint-insight.js +3 -6
  54. package/core/audits/insights/lcp-discovery-insight.js +6 -3
  55. package/core/audits/insights/lcp-phases-insight.js +3 -6
  56. package/core/audits/insights/legacy-javascript-insight.d.ts +23 -0
  57. package/core/audits/insights/legacy-javascript-insight.js +101 -0
  58. package/core/audits/insights/modern-http-insight.d.ts +11 -0
  59. package/core/audits/insights/modern-http-insight.js +53 -0
  60. package/core/audits/insights/network-dependency-tree-insight.d.ts +5 -0
  61. package/core/audits/insights/network-dependency-tree-insight.js +35 -13
  62. package/core/audits/insights/render-blocking-insight.js +1 -1
  63. package/core/audits/insights/slow-css-selector-insight.js +3 -1
  64. package/core/audits/insights/third-parties-insight.d.ts +3 -3
  65. package/core/audits/insights/third-parties-insight.js +28 -23
  66. package/core/audits/insights/viewport-insight.js +1 -1
  67. package/core/audits/is-on-https.js +2 -2
  68. package/core/audits/largest-contentful-paint-element.js +3 -3
  69. package/core/audits/layout-shifts.js +4 -4
  70. package/core/audits/lcp-lazy-loaded.js +1 -1
  71. package/core/audits/long-tasks.d.ts +1 -1
  72. package/core/audits/long-tasks.js +3 -3
  73. package/core/audits/main-thread-tasks.js +2 -2
  74. package/core/audits/mainthread-work-breakdown.d.ts +1 -1
  75. package/core/audits/mainthread-work-breakdown.js +2 -2
  76. package/core/audits/manual/manual-audit.d.ts +1 -1
  77. package/core/audits/metrics/cumulative-layout-shift.d.ts +1 -1
  78. package/core/audits/metrics/cumulative-layout-shift.js +2 -2
  79. package/core/audits/metrics/first-contentful-paint.js +3 -3
  80. package/core/audits/metrics/first-meaningful-paint.js +1 -1
  81. package/core/audits/metrics/interaction-to-next-paint.d.ts +1 -1
  82. package/core/audits/metrics/interaction-to-next-paint.js +2 -2
  83. package/core/audits/metrics/interactive.js +3 -3
  84. package/core/audits/metrics/largest-contentful-paint.js +3 -3
  85. package/core/audits/metrics/max-potential-fid.d.ts +1 -1
  86. package/core/audits/metrics/max-potential-fid.js +3 -3
  87. package/core/audits/metrics/speed-index.js +3 -3
  88. package/core/audits/metrics/total-blocking-time.js +3 -3
  89. package/core/audits/metrics.js +3 -3
  90. package/core/audits/network-requests.js +2 -2
  91. package/core/audits/network-rtt.js +2 -2
  92. package/core/audits/network-server-latency.js +2 -2
  93. package/core/audits/origin-isolation.js +2 -2
  94. package/core/audits/predictive-perf.js +3 -3
  95. package/core/audits/preload-fonts.js +2 -2
  96. package/core/audits/prioritize-lcp-image.js +3 -3
  97. package/core/audits/redirects.js +3 -3
  98. package/core/audits/resource-summary.js +2 -2
  99. package/core/audits/screenshot-thumbnails.js +2 -2
  100. package/core/audits/script-treemap-data.js +32 -2
  101. package/core/audits/seo/canonical.js +2 -2
  102. package/core/audits/seo/http-status-code.js +2 -2
  103. package/core/audits/seo/is-crawlable.js +2 -2
  104. package/core/audits/server-response-time.js +2 -2
  105. package/core/audits/third-party-cookies.js +1 -1
  106. package/core/audits/third-party-facades.js +2 -2
  107. package/core/audits/third-party-summary.js +2 -2
  108. package/core/audits/user-timings.d.ts +1 -1
  109. package/core/audits/user-timings.js +2 -2
  110. package/core/audits/uses-rel-preconnect.js +3 -3
  111. package/core/audits/uses-rel-preload.js +3 -3
  112. package/core/audits/valid-source-maps.js +2 -2
  113. package/core/audits/work-during-interaction.js +3 -3
  114. package/core/computed/critical-request-chains.d.ts +1 -1
  115. package/core/computed/document-urls.d.ts +4 -1
  116. package/core/computed/entity-classification.d.ts +1 -1
  117. package/core/computed/image-records.d.ts +1 -1
  118. package/core/computed/js-bundles.d.ts +1 -1
  119. package/core/computed/lcp-image-record.d.ts +1 -1
  120. package/core/computed/load-simulator.d.ts +1 -1
  121. package/core/computed/main-resource.d.ts +1 -1
  122. package/core/computed/main-thread-tasks.d.ts +1 -1
  123. package/core/computed/metrics/cumulative-layout-shift.d.ts +10 -1
  124. package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +1 -1
  125. package/core/computed/metrics/first-contentful-paint.d.ts +1 -1
  126. package/core/computed/metrics/interactive.d.ts +1 -1
  127. package/core/computed/metrics/lantern-first-contentful-paint.d.ts +1 -1
  128. package/core/computed/metrics/lantern-interactive.d.ts +1 -1
  129. package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +1 -1
  130. package/core/computed/metrics/lantern-max-potential-fid.d.ts +1 -1
  131. package/core/computed/metrics/lantern-speed-index.d.ts +1 -1
  132. package/core/computed/metrics/lantern-total-blocking-time.d.ts +1 -1
  133. package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +1 -1
  134. package/core/computed/metrics/largest-contentful-paint.d.ts +1 -1
  135. package/core/computed/metrics/lcp-breakdown.d.ts +5 -1
  136. package/core/computed/metrics/max-potential-fid.d.ts +1 -1
  137. package/core/computed/metrics/responsiveness.d.ts +1 -1
  138. package/core/computed/metrics/speed-index.d.ts +1 -1
  139. package/core/computed/metrics/time-to-first-byte.d.ts +1 -1
  140. package/core/computed/metrics/timing-summary.d.ts +4 -1
  141. package/core/computed/metrics/total-blocking-time.d.ts +1 -1
  142. package/core/computed/module-duplication.d.ts +5 -1
  143. package/core/computed/navigation-insights.d.ts +1 -1
  144. package/core/computed/network-analysis.d.ts +1 -1
  145. package/core/computed/network-records.d.ts +1 -1
  146. package/core/computed/page-dependency-graph.d.ts +1 -1
  147. package/core/computed/processed-navigation.d.ts +1 -1
  148. package/core/computed/processed-trace.d.ts +1 -1
  149. package/core/computed/resource-summary.d.ts +1 -1
  150. package/core/computed/screenshots.d.ts +4 -1
  151. package/core/computed/speedline.d.ts +1 -1
  152. package/core/computed/tbt-impact-tasks.d.ts +1 -1
  153. package/core/computed/trace-engine-result.d.ts +1 -1
  154. package/core/computed/unused-css.d.ts +1 -1
  155. package/core/computed/unused-javascript-summary.d.ts +1 -1
  156. package/core/computed/user-timings.d.ts +1 -1
  157. package/core/computed/viewport-meta.d.ts +1 -1
  158. package/core/config/default-config.js +11 -6
  159. package/core/config/experimental-config.js +3 -2
  160. package/core/gather/driver/network-monitor.d.ts +1 -1
  161. package/core/gather/driver/network.d.ts +1 -1
  162. package/core/gather/driver.d.ts +1 -1
  163. package/core/gather/gatherers/devtools-log.d.ts +1 -1
  164. package/core/gather/gatherers/dobetterweb/optimized-images.js +3 -10
  165. package/core/gather/gatherers/trace-elements.d.ts +3 -4
  166. package/core/gather/gatherers/trace-elements.js +6 -8
  167. package/core/gather/gatherers/trace.js +0 -3
  168. package/core/gather/navigation-runner.d.ts +1 -1
  169. package/core/gather/snapshot-runner.d.ts +1 -1
  170. package/core/gather/timespan-runner.d.ts +1 -1
  171. package/core/index.d.ts +6 -6
  172. package/core/lib/asset-saver.d.ts +1 -1
  173. package/core/lib/asset-saver.js +1 -1
  174. package/core/lib/bf-cache-strings.js +2 -0
  175. package/core/lib/deprecations-strings.d.ts +71 -76
  176. package/core/lib/deprecations-strings.js +22 -25
  177. package/core/lib/i18n/README.md +1 -1
  178. package/core/lib/i18n/i18n.d.ts +1 -1
  179. package/core/lib/i18n/i18n.js +4 -4
  180. package/core/lib/legacy-javascript/legacy-javascript.js +4 -11
  181. package/core/lib/legacy-javascript/package.json +14 -0
  182. package/core/lib/page-functions.d.ts +1 -1
  183. package/core/lib/stack-packs.js +1 -1
  184. package/core/lib/tracehouse/cpu-profile-model.d.ts +1 -1
  185. package/core/lib/tracehouse/main-thread-tasks.d.ts +3 -3
  186. package/core/lib/tracehouse/main-thread-tasks.js +8 -0
  187. package/core/lib/tracehouse/trace-processor.d.ts +1 -1
  188. package/core/lib/traces/metric-trace-events.d.ts +2 -2
  189. package/core/runner.js +2 -1
  190. package/core/scoring.d.ts +539 -3
  191. package/core/user-flow.d.ts +6 -6
  192. package/dist/report/bundle.esm.js +89 -19
  193. package/dist/report/flow.js +92 -22
  194. package/dist/report/standalone.js +89 -19
  195. package/flow-report/src/i18n/i18n.d.ts +6 -2
  196. package/package.json +17 -16
  197. package/readme.md +1 -1
  198. package/report/README.md +1 -1
  199. package/report/assets/styles.css +76 -9
  200. package/report/assets/templates.html +3 -1
  201. package/report/clients/standalone.js +6 -4
  202. package/report/renderer/category-renderer.d.ts +2 -2
  203. package/report/renderer/components.js +3 -9
  204. package/report/renderer/crc-details-renderer.d.ts +13 -31
  205. package/report/renderer/crc-details-renderer.js +49 -47
  206. package/report/renderer/details-renderer.d.ts +1 -1
  207. package/report/renderer/details-renderer.js +6 -0
  208. package/report/renderer/dom.js +7 -0
  209. package/report/renderer/features-util.d.ts +1 -1
  210. package/report/renderer/performance-category-renderer.d.ts +28 -2
  211. package/report/renderer/performance-category-renderer.js +121 -3
  212. package/report/renderer/report-utils.d.ts +3 -1
  213. package/report/renderer/report-utils.js +11 -4
  214. package/report/renderer/topbar-features.js +1 -9
  215. package/shared/localization/format.d.ts +1 -1
  216. package/shared/localization/locales/ar-XB.json +66 -6
  217. package/shared/localization/locales/ar.json +66 -6
  218. package/shared/localization/locales/bg.json +66 -6
  219. package/shared/localization/locales/ca.json +66 -6
  220. package/shared/localization/locales/cs.json +66 -6
  221. package/shared/localization/locales/da.json +66 -6
  222. package/shared/localization/locales/de.json +66 -6
  223. package/shared/localization/locales/el.json +66 -6
  224. package/shared/localization/locales/en-GB.json +66 -6
  225. package/shared/localization/locales/en-US.json +87 -36
  226. package/shared/localization/locales/en-XA.json +0 -6
  227. package/shared/localization/locales/en-XL.json +87 -36
  228. package/shared/localization/locales/es-419.json +66 -6
  229. package/shared/localization/locales/es.json +67 -7
  230. package/shared/localization/locales/fi.json +66 -6
  231. package/shared/localization/locales/fil.json +66 -6
  232. package/shared/localization/locales/fr.json +66 -6
  233. package/shared/localization/locales/he.json +66 -6
  234. package/shared/localization/locales/hi.json +66 -6
  235. package/shared/localization/locales/hr.json +66 -6
  236. package/shared/localization/locales/hu.json +66 -6
  237. package/shared/localization/locales/id.json +66 -6
  238. package/shared/localization/locales/it.json +67 -7
  239. package/shared/localization/locales/ja.json +66 -6
  240. package/shared/localization/locales/ko.json +66 -6
  241. package/shared/localization/locales/lt.json +66 -6
  242. package/shared/localization/locales/lv.json +66 -6
  243. package/shared/localization/locales/nl.json +66 -6
  244. package/shared/localization/locales/no.json +66 -6
  245. package/shared/localization/locales/pl.json +66 -6
  246. package/shared/localization/locales/pt-PT.json +66 -6
  247. package/shared/localization/locales/pt.json +67 -7
  248. package/shared/localization/locales/ro.json +66 -6
  249. package/shared/localization/locales/ru.json +66 -6
  250. package/shared/localization/locales/sk.json +66 -6
  251. package/shared/localization/locales/sl.json +66 -6
  252. package/shared/localization/locales/sr-Latn.json +66 -6
  253. package/shared/localization/locales/sr.json +66 -6
  254. package/shared/localization/locales/sv.json +66 -6
  255. package/shared/localization/locales/ta.json +69 -9
  256. package/shared/localization/locales/te.json +66 -6
  257. package/shared/localization/locales/th.json +66 -6
  258. package/shared/localization/locales/tr.json +66 -6
  259. package/shared/localization/locales/uk.json +66 -6
  260. package/shared/localization/locales/vi.json +66 -6
  261. package/shared/localization/locales/zh-HK.json +67 -7
  262. package/shared/localization/locales/zh-TW.json +67 -7
  263. package/shared/localization/locales/zh.json +66 -6
  264. package/tsconfig-base.json +1 -1
  265. package/tsconfig.json +1 -0
  266. package/types/artifacts.d.ts +0 -2
  267. package/types/internal/node.d.ts +0 -16
  268. package/types/lhr/audit-details.d.ts +33 -1
  269. package/types/lhr/treemap.d.ts +5 -1
@@ -31,7 +31,7 @@ class InteractionToNextPaint extends Audit {
31
31
  description: str_(UIStrings.description),
32
32
  scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
33
33
  supportedModes: ['timespan'],
34
- requiredArtifacts: ['traces'],
34
+ requiredArtifacts: ['Trace'],
35
35
  };
36
36
  }
37
37
 
@@ -61,7 +61,7 @@ class InteractionToNextPaint extends Audit {
61
61
  return {score: null, notApplicable: true};
62
62
  }
63
63
 
64
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
64
+ const trace = artifacts.Trace;
65
65
  const metricData = {trace, settings};
66
66
  const interactionEvent = await ComputedResponsivenes.request(metricData, context);
67
67
 
@@ -33,7 +33,7 @@ class InteractiveMetric extends Audit {
33
33
  description: str_(UIStrings.description),
34
34
  scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
35
35
  supportedModes: ['navigation'],
36
- requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'SourceMaps'],
36
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
37
37
  };
38
38
  }
39
39
 
@@ -67,8 +67,8 @@ class InteractiveMetric extends Audit {
67
67
  * @return {Promise<LH.Audit.Product>}
68
68
  */
69
69
  static async audit(artifacts, context) {
70
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
71
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
70
+ const trace = artifacts.Trace;
71
+ const devtoolsLog = artifacts.DevtoolsLog;
72
72
  const gatherContext = artifacts.GatherContext;
73
73
  const metricComputationData = {
74
74
  trace, devtoolsLog, gatherContext,
@@ -27,7 +27,7 @@ class LargestContentfulPaint extends Audit {
27
27
  description: str_(UIStrings.description),
28
28
  scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
29
29
  supportedModes: ['navigation'],
30
- requiredArtifacts: ['HostUserAgent', 'traces', 'devtoolsLogs', 'GatherContext', 'URL',
30
+ requiredArtifacts: ['HostUserAgent', 'Trace', 'DevtoolsLog', 'GatherContext', 'URL',
31
31
  'SourceMaps'],
32
32
  };
33
33
  }
@@ -70,8 +70,8 @@ class LargestContentfulPaint extends Audit {
70
70
  * @return {Promise<LH.Audit.Product>}
71
71
  */
72
72
  static async audit(artifacts, context) {
73
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
74
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
73
+ const trace = artifacts.Trace;
74
+ const devtoolsLog = artifacts.DevtoolsLog;
75
75
  const gatherContext = artifacts.GatherContext;
76
76
  const metricComputationData = {
77
77
  trace, devtoolsLog, gatherContext,
@@ -18,7 +18,7 @@ declare class MaxPotentialFID extends Audit {
18
18
  /**
19
19
  * @return {LH.Audit.ScoreOptions}
20
20
  */
21
- static get defaultOptions(): import("../../../types/audit.js").default.ScoreOptions;
21
+ static get defaultOptions(): LH.Audit.ScoreOptions;
22
22
  /**
23
23
  * Extract potential LoAF replacements for MPFID from the trace to log in
24
24
  * debugdata details.
@@ -43,7 +43,7 @@ class MaxPotentialFID extends Audit {
43
43
  description: str_(UIStrings.description),
44
44
  scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
45
45
  supportedModes: ['navigation'],
46
- requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'SourceMaps'],
46
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
47
47
  };
48
48
  }
49
49
 
@@ -117,8 +117,8 @@ class MaxPotentialFID extends Audit {
117
117
  * @return {Promise<LH.Audit.Product>}
118
118
  */
119
119
  static async audit(artifacts, context) {
120
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
121
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
120
+ const trace = artifacts.Trace;
121
+ const devtoolsLog = artifacts.DevtoolsLog;
122
122
  const gatherContext = artifacts.GatherContext;
123
123
  const metricComputationData = {
124
124
  trace, devtoolsLog, gatherContext,
@@ -27,7 +27,7 @@ class SpeedIndex extends Audit {
27
27
  description: str_(UIStrings.description),
28
28
  scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
29
29
  supportedModes: ['navigation'],
30
- requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'SourceMaps'],
30
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
31
31
  };
32
32
  }
33
33
 
@@ -63,8 +63,8 @@ class SpeedIndex extends Audit {
63
63
  * @return {Promise<LH.Audit.Product>}
64
64
  */
65
65
  static async audit(artifacts, context) {
66
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
67
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
66
+ const trace = artifacts.Trace;
67
+ const devtoolsLog = artifacts.DevtoolsLog;
68
68
  const gatherContext = artifacts.GatherContext;
69
69
  const metricComputationData = {
70
70
  trace, devtoolsLog, gatherContext,
@@ -27,7 +27,7 @@ class TotalBlockingTime extends Audit {
27
27
  title: str_(i18n.UIStrings.totalBlockingTimeMetric),
28
28
  description: str_(UIStrings.description),
29
29
  scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
30
- requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'SourceMaps'],
30
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
31
31
  };
32
32
  }
33
33
 
@@ -85,8 +85,8 @@ class TotalBlockingTime extends Audit {
85
85
  * @return {Promise<LH.Audit.Product>}
86
86
  */
87
87
  static async audit(artifacts, context) {
88
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
89
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
88
+ const trace = artifacts.Trace;
89
+ const devtoolsLog = artifacts.DevtoolsLog;
90
90
  const gatherContext = artifacts.GatherContext;
91
91
  const metricComputationData = {
92
92
  trace, devtoolsLog, gatherContext,
@@ -26,7 +26,7 @@ class Metrics extends Audit {
26
26
  title: 'Metrics',
27
27
  description: 'Collects all available metrics.',
28
28
  supportedModes: ['navigation'],
29
- requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'SourceMaps'],
29
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
30
30
  };
31
31
  }
32
32
 
@@ -38,8 +38,8 @@ class Metrics extends Audit {
38
38
  static async audit(artifacts, context) {
39
39
  const settings = context.settings;
40
40
  const gatherContext = artifacts.GatherContext;
41
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
42
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
41
+ const trace = artifacts.Trace;
42
+ const devtoolsLog = artifacts.DevtoolsLog;
43
43
  const {URL, SourceMaps} = artifacts;
44
44
  const summary = await TimingSummary
45
45
  .request({trace, devtoolsLog, gatherContext, settings, URL, SourceMaps}, context);
@@ -20,7 +20,7 @@ class NetworkRequests extends Audit {
20
20
  scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
21
21
  title: 'Network Requests',
22
22
  description: 'Lists the network requests that were made during page load.',
23
- requiredArtifacts: ['devtoolsLogs', 'URL', 'GatherContext'],
23
+ requiredArtifacts: ['DevtoolsLog', 'URL', 'GatherContext'],
24
24
  };
25
25
  }
26
26
 
@@ -30,7 +30,7 @@ class NetworkRequests extends Audit {
30
30
  * @return {Promise<LH.Audit.Product>}
31
31
  */
32
32
  static async audit(artifacts, context) {
33
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
33
+ const devtoolsLog = artifacts.DevtoolsLog;
34
34
  const records = await NetworkRecords.request(devtoolsLog, context);
35
35
  const classifiedEntities = await EntityClassification.request(
36
36
  {URL: artifacts.URL, devtoolsLog}, context);
@@ -30,7 +30,7 @@ class NetworkRTT extends Audit {
30
30
  scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
31
31
  title: str_(UIStrings.title),
32
32
  description: str_(UIStrings.description),
33
- requiredArtifacts: ['devtoolsLogs'],
33
+ requiredArtifacts: ['DevtoolsLog'],
34
34
  };
35
35
  }
36
36
 
@@ -40,7 +40,7 @@ class NetworkRTT extends Audit {
40
40
  * @return {Promise<LH.Audit.Product>}
41
41
  */
42
42
  static async audit(artifacts, context) {
43
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
43
+ const devtoolsLog = artifacts.DevtoolsLog;
44
44
  const records = await NetworkRecords.request(devtoolsLog, context);
45
45
  if (!records.length) {
46
46
  return {
@@ -30,7 +30,7 @@ class NetworkServerLatency extends Audit {
30
30
  scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
31
31
  title: str_(UIStrings.title),
32
32
  description: str_(UIStrings.description),
33
- requiredArtifacts: ['devtoolsLogs'],
33
+ requiredArtifacts: ['DevtoolsLog'],
34
34
  };
35
35
  }
36
36
 
@@ -40,7 +40,7 @@ class NetworkServerLatency extends Audit {
40
40
  * @return {Promise<LH.Audit.Product>}
41
41
  */
42
42
  static async audit(artifacts, context) {
43
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
43
+ const devtoolsLog = artifacts.DevtoolsLog;
44
44
  const records = await NetworkRecords.request(devtoolsLog, context);
45
45
  if (!records.length) {
46
46
  return {
@@ -35,7 +35,7 @@ class OriginIsolation extends Audit {
35
35
  scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
36
36
  title: str_(UIStrings.title),
37
37
  description: str_(UIStrings.description),
38
- requiredArtifacts: ['devtoolsLogs', 'URL'],
38
+ requiredArtifacts: ['DevtoolsLog', 'URL'],
39
39
  supportedModes: ['navigation'],
40
40
  };
41
41
  }
@@ -47,7 +47,7 @@ class OriginIsolation extends Audit {
47
47
  * @return {Promise<string[]>}
48
48
  */
49
49
  static async getRawCoop(artifacts, context) {
50
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
50
+ const devtoolsLog = artifacts.DevtoolsLog;
51
51
  const mainResource =
52
52
  await MainResource.request({devtoolsLog, URL: artifacts.URL}, context);
53
53
 
@@ -33,7 +33,7 @@ class PredictivePerf extends Audit {
33
33
  'a cellular connection on a mobile device.',
34
34
  scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
35
35
  supportedModes: ['navigation'],
36
- requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'SourceMaps'],
36
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'SourceMaps'],
37
37
  };
38
38
  }
39
39
 
@@ -44,8 +44,8 @@ class PredictivePerf extends Audit {
44
44
  */
45
45
  static async audit(artifacts, context) {
46
46
  const gatherContext = artifacts.GatherContext;
47
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
48
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
47
+ const trace = artifacts.Trace;
48
+ const devtoolsLog = artifacts.DevtoolsLog;
49
49
  const {URL, SourceMaps} = artifacts;
50
50
  /** @type {LH.Config.Settings} */
51
51
  const settings = JSON.parse(JSON.stringify(defaultSettings)); // Use default settings.
@@ -36,7 +36,7 @@ class PreloadFontsAudit extends Audit {
36
36
  title: str_(UIStrings.title),
37
37
  failureTitle: str_(UIStrings.failureTitle),
38
38
  description: str_(UIStrings.description),
39
- requiredArtifacts: ['devtoolsLogs', 'URL', 'CSSUsage'],
39
+ requiredArtifacts: ['DevtoolsLog', 'URL', 'CSSUsage', 'Stylesheets'],
40
40
  };
41
41
  }
42
42
 
@@ -63,7 +63,7 @@ class PreloadFontsAudit extends Audit {
63
63
  * @return {Promise<LH.Audit.Product>}
64
64
  */
65
65
  static async audit(artifacts, context) {
66
- const devtoolsLog = artifacts.devtoolsLogs[this.DEFAULT_PASS];
66
+ const devtoolsLog = artifacts.DevtoolsLog;
67
67
  const networkRecords = await NetworkRecords.request(devtoolsLog, context);
68
68
 
69
69
  // Gets the URLs of fonts where font-display: optional.
@@ -38,7 +38,7 @@ class PrioritizeLcpImage extends Audit {
38
38
  description: str_(UIStrings.description),
39
39
  supportedModes: ['navigation'],
40
40
  guidanceLevel: 4,
41
- requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'TraceElements',
41
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'GatherContext', 'URL', 'TraceElements',
42
42
  'SourceMaps'],
43
43
  scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
44
44
  };
@@ -236,8 +236,8 @@ class PrioritizeLcpImage extends Audit {
236
236
  */
237
237
  static async audit(artifacts, context) {
238
238
  const gatherContext = artifacts.GatherContext;
239
- const trace = artifacts.traces[PrioritizeLcpImage.DEFAULT_PASS];
240
- const devtoolsLog = artifacts.devtoolsLogs[PrioritizeLcpImage.DEFAULT_PASS];
239
+ const trace = artifacts.Trace;
240
+ const devtoolsLog = artifacts.DevtoolsLog;
241
241
  const {URL, SourceMaps} = artifacts;
242
242
  const settings = context.settings;
243
243
  const metricData =
@@ -31,7 +31,7 @@ class Redirects extends Audit {
31
31
  scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
32
32
  supportedModes: ['navigation'],
33
33
  guidanceLevel: 2,
34
- requiredArtifacts: ['URL', 'GatherContext', 'devtoolsLogs', 'traces', 'SourceMaps'],
34
+ requiredArtifacts: ['URL', 'GatherContext', 'DevtoolsLog', 'Trace', 'SourceMaps'],
35
35
  };
36
36
  }
37
37
 
@@ -84,8 +84,8 @@ class Redirects extends Audit {
84
84
  */
85
85
  static async audit(artifacts, context) {
86
86
  const settings = context.settings;
87
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
88
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
87
+ const trace = artifacts.Trace;
88
+ const devtoolsLog = artifacts.DevtoolsLog;
89
89
  const gatherContext = artifacts.GatherContext;
90
90
  const {URL, SourceMaps} = artifacts;
91
91
 
@@ -22,7 +22,7 @@ class ResourceSummary extends Audit {
22
22
  title: 'Resources Summary',
23
23
  description: 'Aggregates all network requests and groups them by type',
24
24
  scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
25
- requiredArtifacts: ['devtoolsLogs', 'URL'],
25
+ requiredArtifacts: ['DevtoolsLog', 'URL'],
26
26
  };
27
27
  }
28
28
 
@@ -32,7 +32,7 @@ class ResourceSummary extends Audit {
32
32
  * @return {Promise<LH.Audit.Product>}
33
33
  */
34
34
  static async audit(artifacts, context) {
35
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
35
+ const devtoolsLog = artifacts.DevtoolsLog;
36
36
  const summary = await ComputedResourceSummary
37
37
  .request({devtoolsLog, URL: artifacts.URL}, context);
38
38
 
@@ -24,7 +24,7 @@ class ScreenshotThumbnails extends Audit {
24
24
  scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
25
25
  title: 'Screenshot Thumbnails',
26
26
  description: 'This is what the load of your site looked like.',
27
- requiredArtifacts: ['traces', 'GatherContext'],
27
+ requiredArtifacts: ['Trace', 'GatherContext'],
28
28
  };
29
29
  }
30
30
 
@@ -70,7 +70,7 @@ class ScreenshotThumbnails extends Audit {
70
70
  * @return {Promise<LH.Audit.Product>}
71
71
  */
72
72
  static async _audit(artifacts, context) {
73
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
73
+ const trace = artifacts.Trace;
74
74
  /** @type {Map<SpeedlineFrame, string>} */
75
75
  const cachedThumbnails = new Map();
76
76
 
@@ -16,9 +16,10 @@
16
16
 
17
17
  import {Audit} from './audit.js';
18
18
  import {JSBundles} from '../computed/js-bundles.js';
19
+ import {NetworkRecords} from '../computed/network-records.js';
19
20
  import {UnusedJavascriptSummary} from '../computed/unused-javascript-summary.js';
20
21
  import {ModuleDuplication} from '../computed/module-duplication.js';
21
- import {isInline} from '../lib/script-helpers.js';
22
+ import {getRequestForScript, isInline} from '../lib/script-helpers.js';
22
23
 
23
24
  class ScriptTreemapDataAudit extends Audit {
24
25
  /**
@@ -31,7 +32,7 @@ class ScriptTreemapDataAudit extends Audit {
31
32
  title: 'Script Treemap Data',
32
33
  description: 'Used for treemap app',
33
34
  requiredArtifacts:
34
- ['traces', 'devtoolsLogs', 'SourceMaps', 'Scripts', 'JsUsage', 'URL', 'SourceMaps'],
35
+ ['Trace', 'DevtoolsLog', 'SourceMaps', 'Scripts', 'JsUsage', 'URL', 'SourceMaps'],
35
36
  };
36
37
  }
37
38
 
@@ -54,6 +55,7 @@ class ScriptTreemapDataAudit extends Audit {
54
55
  return {
55
56
  name,
56
57
  resourceBytes: 0,
58
+ encodedBytes: undefined,
57
59
  };
58
60
  }
59
61
 
@@ -167,6 +169,9 @@ class ScriptTreemapDataAudit extends Audit {
167
169
  * @return {Promise<LH.Treemap.Node[]>}
168
170
  */
169
171
  static async makeNodes(artifacts, context) {
172
+ const devtoolsLog = artifacts.DevtoolsLog;
173
+ const networkRecords = await NetworkRecords.request(devtoolsLog, context);
174
+
170
175
  /** @type {LH.Treemap.Node[]} */
171
176
  const nodes = [];
172
177
  /** @type {Map<string, LH.Treemap.Node>} */
@@ -234,6 +239,7 @@ class ScriptTreemapDataAudit extends Audit {
234
239
  node = {
235
240
  name,
236
241
  resourceBytes: unusedJavascriptSummary?.totalBytes ?? script.length ?? 0,
242
+ encodedBytes: undefined,
237
243
  unusedBytes: unusedJavascriptSummary?.wastedBytes,
238
244
  };
239
245
  }
@@ -246,6 +252,7 @@ class ScriptTreemapDataAudit extends Audit {
246
252
  htmlNode = {
247
253
  name,
248
254
  resourceBytes: 0,
255
+ encodedBytes: undefined,
249
256
  unusedBytes: undefined,
250
257
  children: [],
251
258
  };
@@ -261,6 +268,29 @@ class ScriptTreemapDataAudit extends Audit {
261
268
  } else {
262
269
  // Non-inline scripts each have their own top-level node.
263
270
  nodes.push(node);
271
+
272
+ const networkRecord = getRequestForScript(networkRecords, script);
273
+ if (networkRecord) {
274
+ const bodyTransferSize =
275
+ networkRecord.transferSize - networkRecord.responseHeadersTransferSize;
276
+ node.encodedBytes = bodyTransferSize;
277
+ } else {
278
+ node.encodedBytes = node.resourceBytes;
279
+ }
280
+ }
281
+ }
282
+
283
+ // For the HTML nodes, set encodedBytes to be the size of all the inline
284
+ // scripts multiplied by the average compression ratio of the HTML document.
285
+ for (const [frameId, node] of htmlNodesByFrameId) {
286
+ const record =
287
+ networkRecords.find(r => r.resourceType === 'Document' && r.frameId === frameId);
288
+ if (record) {
289
+ const inlineScriptsPct = node.resourceBytes / record.resourceSize;
290
+ const bodyTransferSize = record.transferSize - record.responseHeadersTransferSize;
291
+ node.encodedBytes = Math.floor(bodyTransferSize * inlineScriptsPct);
292
+ } else {
293
+ node.encodedBytes = node.resourceBytes;
264
294
  }
265
295
  }
266
296
 
@@ -63,7 +63,7 @@ class Canonical extends Audit {
63
63
  failureTitle: str_(UIStrings.failureTitle),
64
64
  description: str_(UIStrings.description),
65
65
  supportedModes: ['navigation'],
66
- requiredArtifacts: ['LinkElements', 'URL', 'devtoolsLogs'],
66
+ requiredArtifacts: ['LinkElements', 'URL', 'DevtoolsLog'],
67
67
  };
68
68
  }
69
69
 
@@ -187,7 +187,7 @@ class Canonical extends Audit {
187
187
  * @return {Promise<LH.Audit.Product>}
188
188
  */
189
189
  static async audit(artifacts, context) {
190
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
190
+ const devtoolsLog = artifacts.DevtoolsLog;
191
191
 
192
192
  const mainResource = await MainResource.request({devtoolsLog, URL: artifacts.URL}, context);
193
193
  const baseURL = new URL(mainResource.url);
@@ -33,7 +33,7 @@ class HTTPStatusCode extends Audit {
33
33
  title: str_(UIStrings.title),
34
34
  failureTitle: str_(UIStrings.failureTitle),
35
35
  description: str_(UIStrings.description),
36
- requiredArtifacts: ['devtoolsLogs', 'URL', 'GatherContext'],
36
+ requiredArtifacts: ['DevtoolsLog', 'URL', 'GatherContext'],
37
37
  supportedModes: ['navigation'],
38
38
  };
39
39
  }
@@ -44,7 +44,7 @@ class HTTPStatusCode extends Audit {
44
44
  * @return {Promise<LH.Audit.Product>}
45
45
  */
46
46
  static async audit(artifacts, context) {
47
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
47
+ const devtoolsLog = artifacts.DevtoolsLog;
48
48
  const URL = artifacts.URL;
49
49
  const mainResource = await MainResource.request({devtoolsLog, URL}, context);
50
50
 
@@ -91,7 +91,7 @@ class IsCrawlable extends Audit {
91
91
  failureTitle: str_(UIStrings.failureTitle),
92
92
  description: str_(UIStrings.description),
93
93
  supportedModes: ['navigation'],
94
- requiredArtifacts: ['MetaElements', 'RobotsTxt', 'URL', 'devtoolsLogs'],
94
+ requiredArtifacts: ['MetaElements', 'RobotsTxt', 'URL', 'DevtoolsLog'],
95
95
  };
96
96
  }
97
97
 
@@ -169,7 +169,7 @@ class IsCrawlable extends Audit {
169
169
  * @return {Promise<LH.Audit.Product>}
170
170
  */
171
171
  static async audit(artifacts, context) {
172
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
172
+ const devtoolsLog = artifacts.DevtoolsLog;
173
173
  const mainResource = await MainResource.request({devtoolsLog, URL: artifacts.URL}, context);
174
174
 
175
175
  const robotsTxtUrl = new URL('/robots.txt', mainResource.url);
@@ -38,7 +38,7 @@ class ServerResponseTime extends Audit {
38
38
  description: str_(UIStrings.description),
39
39
  supportedModes: ['navigation'],
40
40
  guidanceLevel: 1,
41
- requiredArtifacts: ['devtoolsLogs', 'URL', 'GatherContext'],
41
+ requiredArtifacts: ['DevtoolsLog', 'URL', 'GatherContext'],
42
42
  scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
43
43
  };
44
44
  }
@@ -62,7 +62,7 @@ class ServerResponseTime extends Audit {
62
62
  * @return {Promise<LH.Audit.Product>}
63
63
  */
64
64
  static async audit(artifacts, context) {
65
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
65
+ const devtoolsLog = artifacts.DevtoolsLog;
66
66
 
67
67
  /** @type {LH.Artifacts.NetworkRequest} */
68
68
  const mainResource = await MainResource.request({devtoolsLog, URL: artifacts.URL}, context);
@@ -18,7 +18,7 @@ const UIStrings = {
18
18
  /** Title of a Lighthouse audit that provides detail on the use of third party cookies. This descriptive title is shown to users when the page uses third party cookies. */
19
19
  failureTitle: 'Uses third-party cookies',
20
20
  /** Description of a Lighthouse audit that tells the user why they should not use third party cookies on their page. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
21
- description: 'Chrome is moving towards a new experience that allows users to choose to browse without third-party cookies. [Learn more about third-party cookies](https://developers.google.com/privacy-sandbox/cookies).',
21
+ description: 'Third-party cookies may be blocked in some contexts. [Learn more about preparing for third-party cookie restrictions](https://privacysandbox.google.com/cookies/prepare/overview).',
22
22
  /** [ICU Syntax] Label for the audit identifying the number of third-party cookies. */
23
23
  displayValue: `{itemCount, plural,
24
24
  =1 {1 cookie found}
@@ -87,7 +87,7 @@ class ThirdPartyFacades extends Audit {
87
87
  description: str_(UIStrings.description),
88
88
  supportedModes: ['navigation'],
89
89
  guidanceLevel: 3,
90
- requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'GatherContext', 'SourceMaps'],
90
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'URL', 'GatherContext', 'SourceMaps'],
91
91
  scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
92
92
  };
93
93
  }
@@ -150,7 +150,7 @@ class ThirdPartyFacades extends Audit {
150
150
  */
151
151
  static async audit(artifacts, context) {
152
152
  const settings = context.settings;
153
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
153
+ const devtoolsLog = artifacts.DevtoolsLog;
154
154
  const networkRecords = await NetworkRecords.request(devtoolsLog, context);
155
155
  const classifiedEntities = await EntityClassification.request(
156
156
  {URL: artifacts.URL, devtoolsLog}, context);
@@ -67,7 +67,7 @@ class ThirdPartySummary extends Audit {
67
67
  description: str_(UIStrings.description),
68
68
  guidanceLevel: 1,
69
69
  scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
70
- requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'GatherContext', 'SourceMaps'],
70
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'URL', 'GatherContext', 'SourceMaps'],
71
71
  };
72
72
  }
73
73
 
@@ -159,7 +159,7 @@ class ThirdPartySummary extends Audit {
159
159
  */
160
160
  static async audit(artifacts, context) {
161
161
  const settings = context.settings || {};
162
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
162
+ const devtoolsLog = artifacts.DevtoolsLog;
163
163
  const networkRecords = await NetworkRecords.request(devtoolsLog, context);
164
164
  const classifiedEntities = await EntityClassification.request(
165
165
  {URL: artifacts.URL, devtoolsLog}, context);
@@ -19,7 +19,7 @@ declare class UserTimings extends Audit {
19
19
  /**
20
20
  * @return {Array<string>}
21
21
  */
22
- static get excludedPrefixes(): string[];
22
+ static get excludedPrefixes(): Array<string>;
23
23
  /**
24
24
  * We remove mark/measures entered by third parties not of interest to the user
25
25
  * @param {MarkEvent|MeasureEvent} evt
@@ -40,7 +40,7 @@ class UserTimings extends Audit {
40
40
  description: str_(UIStrings.description),
41
41
  scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
42
42
  guidanceLevel: 2,
43
- requiredArtifacts: ['traces'],
43
+ requiredArtifacts: ['Trace'],
44
44
  };
45
45
  }
46
46
 
@@ -66,7 +66,7 @@ class UserTimings extends Audit {
66
66
  * @return {Promise<LH.Audit.Product>}
67
67
  */
68
68
  static async audit(artifacts, context) {
69
- const trace = artifacts.traces[Audit.DEFAULT_PASS];
69
+ const trace = artifacts.Trace;
70
70
  const computedUserTimings = await ComputedUserTimings.request(trace, context);
71
71
  const userTimings = computedUserTimings.filter(UserTimings.excludeEvent);
72
72
  const tableRows = userTimings.map(item => {
@@ -62,7 +62,7 @@ class UsesRelPreconnectAudit extends Audit {
62
62
  description: str_(UIStrings.description),
63
63
  supportedModes: ['navigation'],
64
64
  guidanceLevel: 3,
65
- requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'LinkElements', 'SourceMaps'],
65
+ requiredArtifacts: ['Trace', 'DevtoolsLog', 'URL', 'LinkElements', 'SourceMaps'],
66
66
  scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
67
67
  };
68
68
  }
@@ -122,8 +122,8 @@ class UsesRelPreconnectAudit extends Audit {
122
122
  * @return {Promise<LH.Audit.Product>}
123
123
  */
124
124
  static async audit(artifacts, context) {
125
- const trace = artifacts.traces[UsesRelPreconnectAudit.DEFAULT_PASS];
126
- const devtoolsLog = artifacts.devtoolsLogs[UsesRelPreconnectAudit.DEFAULT_PASS];
125
+ const trace = artifacts.Trace;
126
+ const devtoolsLog = artifacts.DevtoolsLog;
127
127
  const {URL, SourceMaps} = artifacts;
128
128
  const settings = context.settings;
129
129
 
@@ -44,7 +44,7 @@ class UsesRelPreloadAudit extends Audit {
44
44
  description: str_(UIStrings.description),
45
45
  supportedModes: ['navigation'],
46
46
  guidanceLevel: 3,
47
- requiredArtifacts: ['devtoolsLogs', 'traces', 'URL', 'SourceMaps'],
47
+ requiredArtifacts: ['DevtoolsLog', 'Trace', 'URL', 'SourceMaps'],
48
48
  scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
49
49
  };
50
50
  }
@@ -213,8 +213,8 @@ class UsesRelPreloadAudit extends Audit {
213
213
  */
214
214
  static async audit(artifacts, context) {
215
215
  const settings = context.settings;
216
- const trace = artifacts.traces[UsesRelPreloadAudit.DEFAULT_PASS];
217
- const devtoolsLog = artifacts.devtoolsLogs[UsesRelPreloadAudit.DEFAULT_PASS];
216
+ const trace = artifacts.Trace;
217
+ const devtoolsLog = artifacts.DevtoolsLog;
218
218
  const {URL, SourceMaps} = artifacts;
219
219
  const simulatorOptions = {devtoolsLog, settings: context.settings};
220
220
 
@@ -44,7 +44,7 @@ class ValidSourceMaps extends Audit {
44
44
  title: str_(UIStrings.title),
45
45
  failureTitle: str_(UIStrings.failureTitle),
46
46
  description: str_(UIStrings.description),
47
- requiredArtifacts: ['Scripts', 'SourceMaps', 'URL', 'devtoolsLogs'],
47
+ requiredArtifacts: ['Scripts', 'SourceMaps', 'URL', 'DevtoolsLog'],
48
48
  };
49
49
  }
50
50
 
@@ -70,7 +70,7 @@ class ValidSourceMaps extends Audit {
70
70
  */
71
71
  static async audit(artifacts, context) {
72
72
  const {SourceMaps} = artifacts;
73
- const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
73
+ const devtoolsLog = artifacts.DevtoolsLog;
74
74
  const classifiedEntities = await EntityClassification.request(
75
75
  {URL: artifacts.URL, devtoolsLog}, context);
76
76