lighthouse 10.4.0 → 11.0.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 (288) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/cli/cli-flags.d.ts +1 -6
  3. package/cli/cli-flags.js +0 -5
  4. package/cli/run.js +3 -10
  5. package/cli/sentry-prompt.js +4 -2
  6. package/cli/test/smokehouse/core-tests.js +0 -2
  7. package/cli/test/smokehouse/frontends/smokehouse-bin.js +24 -14
  8. package/cli/test/smokehouse/lighthouse-runners/bundle.d.ts +1 -2
  9. package/cli/test/smokehouse/lighthouse-runners/bundle.js +12 -21
  10. package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +1 -3
  11. package/cli/test/smokehouse/lighthouse-runners/cli.js +3 -7
  12. package/cli/test/smokehouse/lighthouse-runners/devtools.d.ts +1 -5
  13. package/cli/test/smokehouse/lighthouse-runners/devtools.js +1 -12
  14. package/cli/test/smokehouse/readme.md +0 -2
  15. package/cli/test/smokehouse/report-assert.d.ts +1 -3
  16. package/cli/test/smokehouse/report-assert.js +2 -19
  17. package/cli/test/smokehouse/smokehouse.js +3 -32
  18. package/core/audits/accessibility/aria-allowed-role.d.ts +10 -0
  19. package/core/audits/accessibility/aria-allowed-role.js +46 -0
  20. package/core/audits/accessibility/image-redundant-alt.d.ts +10 -0
  21. package/core/audits/accessibility/image-redundant-alt.js +45 -0
  22. package/core/audits/accessibility/label-content-name-mismatch.d.ts +10 -0
  23. package/core/audits/accessibility/label-content-name-mismatch.js +44 -0
  24. package/core/audits/accessibility/skip-link.d.ts +10 -0
  25. package/core/audits/accessibility/skip-link.js +43 -0
  26. package/core/audits/accessibility/table-duplicate-name.d.ts +10 -0
  27. package/core/audits/accessibility/table-duplicate-name.js +44 -0
  28. package/core/audits/accessibility/target-size.js +1 -1
  29. package/core/audits/byte-efficiency/duplicated-javascript.js +2 -2
  30. package/core/audits/byte-efficiency/render-blocking-resources.js +1 -0
  31. package/core/audits/dobetterweb/uses-http2.d.ts +18 -1
  32. package/core/audits/dobetterweb/uses-http2.js +62 -16
  33. package/core/audits/installable-manifest.d.ts +1 -5
  34. package/core/audits/installable-manifest.js +2 -7
  35. package/core/audits/largest-contentful-paint-element.d.ts +0 -6
  36. package/core/audits/largest-contentful-paint-element.js +13 -15
  37. package/core/audits/metrics/{experimental-interaction-to-next-paint.d.ts → interaction-to-next-paint.d.ts} +3 -3
  38. package/core/audits/metrics/{experimental-interaction-to-next-paint.js → interaction-to-next-paint.js} +3 -3
  39. package/core/audits/uses-rel-preconnect.js +23 -8
  40. package/core/audits/work-during-interaction.js +2 -2
  41. package/core/computed/processed-navigation.d.ts +1 -1
  42. package/core/config/config-helpers.d.ts +3 -3
  43. package/core/config/config-helpers.js +5 -12
  44. package/core/config/config.js +1 -7
  45. package/core/config/constants.d.ts +0 -2
  46. package/core/config/constants.js +2 -18
  47. package/core/config/default-config.js +59 -53
  48. package/core/config/filters.js +1 -1
  49. package/core/config/validation.d.ts +7 -12
  50. package/core/config/validation.js +16 -26
  51. package/core/gather/base-artifacts.d.ts +4 -4
  52. package/core/gather/base-artifacts.js +2 -6
  53. package/core/gather/base-gatherer.d.ts +12 -37
  54. package/core/gather/base-gatherer.js +7 -54
  55. package/core/gather/driver/dom.d.ts +4 -4
  56. package/core/gather/driver/dom.js +2 -2
  57. package/core/gather/driver/environment.d.ts +4 -4
  58. package/core/gather/driver/environment.js +2 -2
  59. package/core/gather/driver/execution-context.d.ts +12 -3
  60. package/core/gather/driver/execution-context.js +34 -3
  61. package/core/gather/driver/navigation.d.ts +2 -2
  62. package/core/gather/driver/navigation.js +2 -5
  63. package/core/gather/driver/network-monitor.d.ts +7 -6
  64. package/core/gather/driver/network-monitor.js +4 -4
  65. package/core/gather/driver/network.d.ts +2 -2
  66. package/core/gather/driver/network.js +1 -1
  67. package/core/gather/driver/prepare.d.ts +10 -10
  68. package/core/gather/driver/prepare.js +10 -10
  69. package/core/gather/driver/service-workers.d.ts +4 -4
  70. package/core/gather/driver/service-workers.js +2 -2
  71. package/core/gather/driver/storage.d.ts +6 -6
  72. package/core/gather/driver/storage.js +3 -3
  73. package/core/gather/driver/target-manager.d.ts +6 -5
  74. package/core/gather/driver/target-manager.js +3 -3
  75. package/core/gather/driver/wait-for-condition.d.ts +14 -14
  76. package/core/gather/driver/wait-for-condition.js +8 -8
  77. package/core/gather/driver.d.ts +9 -6
  78. package/core/gather/driver.js +14 -4
  79. package/core/gather/fetcher.d.ts +3 -3
  80. package/core/gather/fetcher.js +1 -1
  81. package/core/gather/gatherers/accessibility.d.ts +4 -4
  82. package/core/gather/gatherers/accessibility.js +8 -3
  83. package/core/gather/gatherers/anchor-elements.d.ts +4 -4
  84. package/core/gather/gatherers/anchor-elements.js +4 -4
  85. package/core/gather/gatherers/bf-cache-failures.d.ts +8 -14
  86. package/core/gather/gatherers/bf-cache-failures.js +5 -14
  87. package/core/gather/gatherers/cache-contents.d.ts +4 -4
  88. package/core/gather/gatherers/cache-contents.js +3 -3
  89. package/core/gather/gatherers/console-messages.d.ts +6 -6
  90. package/core/gather/gatherers/console-messages.js +4 -4
  91. package/core/gather/gatherers/css-usage.d.ts +14 -14
  92. package/core/gather/gatherers/css-usage.js +9 -9
  93. package/core/gather/gatherers/devtools-log-compat.d.ts +5 -5
  94. package/core/gather/gatherers/devtools-log-compat.js +4 -4
  95. package/core/gather/gatherers/devtools-log.d.ts +6 -6
  96. package/core/gather/gatherers/devtools-log.js +4 -4
  97. package/core/gather/gatherers/dobetterweb/doctype.d.ts +4 -4
  98. package/core/gather/gatherers/dobetterweb/doctype.js +3 -3
  99. package/core/gather/gatherers/dobetterweb/domstats.d.ts +4 -4
  100. package/core/gather/gatherers/dobetterweb/domstats.js +3 -3
  101. package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +10 -22
  102. package/core/gather/gatherers/dobetterweb/optimized-images.js +10 -27
  103. package/core/gather/gatherers/dobetterweb/response-compression.d.ts +6 -12
  104. package/core/gather/gatherers/dobetterweb/response-compression.js +14 -21
  105. package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +8 -14
  106. package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +5 -14
  107. package/core/gather/gatherers/full-page-screenshot.d.ts +10 -10
  108. package/core/gather/gatherers/full-page-screenshot.js +7 -10
  109. package/core/gather/gatherers/global-listeners.d.ts +4 -4
  110. package/core/gather/gatherers/global-listeners.js +3 -3
  111. package/core/gather/gatherers/iframe-elements.d.ts +4 -4
  112. package/core/gather/gatherers/iframe-elements.js +3 -3
  113. package/core/gather/gatherers/image-elements.d.ts +10 -10
  114. package/core/gather/gatherers/image-elements.js +6 -6
  115. package/core/gather/gatherers/inputs.d.ts +4 -4
  116. package/core/gather/gatherers/inputs.js +3 -3
  117. package/core/gather/gatherers/inspector-issues.d.ts +8 -19
  118. package/core/gather/gatherers/inspector-issues.js +9 -26
  119. package/core/gather/gatherers/installability-errors.d.ts +6 -6
  120. package/core/gather/gatherers/installability-errors.js +4 -4
  121. package/core/gather/gatherers/js-usage.d.ts +6 -6
  122. package/core/gather/gatherers/js-usage.js +4 -4
  123. package/core/gather/gatherers/link-elements.d.ts +8 -20
  124. package/core/gather/gatherers/link-elements.js +7 -24
  125. package/core/gather/gatherers/main-document-content.d.ts +4 -16
  126. package/core/gather/gatherers/main-document-content.js +5 -23
  127. package/core/gather/gatherers/meta-elements.d.ts +4 -4
  128. package/core/gather/gatherers/meta-elements.js +3 -3
  129. package/core/gather/gatherers/network-user-agent.d.ts +5 -5
  130. package/core/gather/gatherers/network-user-agent.js +4 -4
  131. package/core/gather/gatherers/script-elements.d.ts +6 -11
  132. package/core/gather/gatherers/script-elements.js +4 -13
  133. package/core/gather/gatherers/scripts.d.ts +7 -6
  134. package/core/gather/gatherers/scripts.js +7 -9
  135. package/core/gather/gatherers/seo/embedded-content.d.ts +4 -4
  136. package/core/gather/gatherers/seo/embedded-content.js +3 -3
  137. package/core/gather/gatherers/seo/font-size.d.ts +6 -6
  138. package/core/gather/gatherers/seo/font-size.js +5 -5
  139. package/core/gather/gatherers/seo/robots-txt.d.ts +4 -4
  140. package/core/gather/gatherers/seo/robots-txt.js +3 -3
  141. package/core/gather/gatherers/seo/tap-targets.d.ts +8 -8
  142. package/core/gather/gatherers/seo/tap-targets.js +5 -5
  143. package/core/gather/gatherers/service-worker.d.ts +4 -10
  144. package/core/gather/gatherers/service-worker.js +3 -15
  145. package/core/gather/gatherers/source-maps.d.ts +11 -23
  146. package/core/gather/gatherers/source-maps.js +22 -53
  147. package/core/gather/gatherers/stacks.d.ts +7 -7
  148. package/core/gather/gatherers/stacks.js +6 -6
  149. package/core/gather/gatherers/trace-compat.d.ts +5 -5
  150. package/core/gather/gatherers/trace-compat.js +4 -4
  151. package/core/gather/gatherers/trace-elements.d.ts +13 -25
  152. package/core/gather/gatherers/trace-elements.js +19 -32
  153. package/core/gather/gatherers/trace.d.ts +8 -8
  154. package/core/gather/gatherers/trace.js +5 -5
  155. package/core/gather/gatherers/viewport-dimensions.d.ts +4 -4
  156. package/core/gather/gatherers/viewport-dimensions.js +3 -3
  157. package/core/gather/gatherers/web-app-manifest.d.ts +8 -8
  158. package/core/gather/gatherers/web-app-manifest.js +5 -5
  159. package/core/gather/navigation-runner.d.ts +9 -9
  160. package/core/gather/navigation-runner.js +14 -8
  161. package/core/gather/runner-helpers.d.ts +3 -3
  162. package/core/gather/runner-helpers.js +12 -4
  163. package/core/gather/session.d.ts +2 -2
  164. package/core/gather/session.js +1 -1
  165. package/core/gather/snapshot-runner.d.ts +2 -2
  166. package/core/gather/snapshot-runner.js +1 -1
  167. package/core/gather/timespan-runner.d.ts +2 -2
  168. package/core/gather/timespan-runner.js +1 -1
  169. package/core/index.cjs +0 -7
  170. package/core/index.d.ts +0 -15
  171. package/core/index.js +2 -40
  172. package/core/lib/asset-saver.js +14 -4
  173. package/core/lib/axe.js +1 -1
  174. package/core/lib/dependency-graph/simulator/network-analyzer.d.ts +28 -12
  175. package/core/lib/dependency-graph/simulator/network-analyzer.js +128 -100
  176. package/core/lib/emulation.d.ts +14 -14
  177. package/core/lib/emulation.js +7 -7
  178. package/core/lib/navigation-error.js +5 -0
  179. package/core/lib/network-recorder.d.ts +2 -1
  180. package/core/lib/network-recorder.js +1 -0
  181. package/core/lib/network-request.js +12 -3
  182. package/core/lib/page-functions.d.ts +10 -2
  183. package/core/lib/page-functions.js +85 -8
  184. package/core/lib/sentry.js +9 -2
  185. package/core/lib/stack-packs.js +4 -0
  186. package/core/runner.d.ts +8 -30
  187. package/core/runner.js +8 -39
  188. package/core/user-flow.d.ts +4 -4
  189. package/core/user-flow.js +2 -2
  190. package/dist/report/bundle.esm.js +2221 -5832
  191. package/dist/report/flow.js +2631 -235
  192. package/dist/report/standalone.js +2586 -234
  193. package/flow-report/src/i18n/i18n.d.ts +2 -2
  194. package/package.json +17 -24
  195. package/readme.md +3 -1
  196. package/report/assets/templates.html +3 -1
  197. package/report/renderer/category-renderer.d.ts +3 -2
  198. package/report/renderer/category-renderer.js +8 -4
  199. package/report/renderer/components.js +11 -5
  200. package/report/renderer/pwa-category-renderer.js +1 -1
  201. package/report/renderer/report-ui-features.js +9 -6
  202. package/report/renderer/report-utils.d.ts +1 -1
  203. package/report/renderer/report-utils.js +2 -2
  204. package/report/renderer/topbar-features.js +3 -0
  205. package/shared/localization/locales/ar-XB.json +185 -44
  206. package/shared/localization/locales/ar.json +185 -44
  207. package/shared/localization/locales/bg.json +185 -44
  208. package/shared/localization/locales/ca.json +190 -49
  209. package/shared/localization/locales/cs.json +185 -44
  210. package/shared/localization/locales/da.json +185 -44
  211. package/shared/localization/locales/de.json +185 -44
  212. package/shared/localization/locales/el.json +185 -44
  213. package/shared/localization/locales/en-GB.json +185 -44
  214. package/shared/localization/locales/en-US.json +99 -45
  215. package/shared/localization/locales/en-XA.json +185 -44
  216. package/shared/localization/locales/en-XL.json +99 -45
  217. package/shared/localization/locales/es-419.json +185 -44
  218. package/shared/localization/locales/es.json +185 -44
  219. package/shared/localization/locales/fi.json +185 -44
  220. package/shared/localization/locales/fil.json +185 -44
  221. package/shared/localization/locales/fr.json +185 -44
  222. package/shared/localization/locales/he.json +186 -45
  223. package/shared/localization/locales/hi.json +185 -44
  224. package/shared/localization/locales/hr.json +185 -44
  225. package/shared/localization/locales/hu.json +185 -44
  226. package/shared/localization/locales/id.json +185 -44
  227. package/shared/localization/locales/it.json +185 -44
  228. package/shared/localization/locales/ja.json +185 -44
  229. package/shared/localization/locales/ko.json +185 -44
  230. package/shared/localization/locales/lt.json +185 -44
  231. package/shared/localization/locales/lv.json +185 -44
  232. package/shared/localization/locales/nl.json +185 -44
  233. package/shared/localization/locales/no.json +185 -44
  234. package/shared/localization/locales/pl.json +185 -44
  235. package/shared/localization/locales/pt-PT.json +185 -44
  236. package/shared/localization/locales/pt.json +190 -49
  237. package/shared/localization/locales/ro.json +185 -44
  238. package/shared/localization/locales/ru.json +185 -44
  239. package/shared/localization/locales/sk.json +185 -44
  240. package/shared/localization/locales/sl.json +185 -44
  241. package/shared/localization/locales/sr-Latn.json +185 -44
  242. package/shared/localization/locales/sr.json +185 -44
  243. package/shared/localization/locales/sv.json +185 -44
  244. package/shared/localization/locales/ta.json +185 -44
  245. package/shared/localization/locales/te.json +185 -44
  246. package/shared/localization/locales/th.json +185 -44
  247. package/shared/localization/locales/tr.json +185 -44
  248. package/shared/localization/locales/uk.json +185 -44
  249. package/shared/localization/locales/vi.json +185 -44
  250. package/shared/localization/locales/zh-HK.json +185 -44
  251. package/shared/localization/locales/zh-TW.json +185 -44
  252. package/shared/localization/locales/zh.json +185 -44
  253. package/third-party/esbuild-plugins-polyfills/LICENSE +3 -0
  254. package/third-party/esbuild-plugins-polyfills/README.md +7 -0
  255. package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.d.ts +9 -0
  256. package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.js +129 -0
  257. package/tsconfig.json +2 -1
  258. package/types/artifacts.d.ts +16 -45
  259. package/types/config.d.ts +10 -52
  260. package/types/externs.d.ts +0 -2
  261. package/types/gatherer.d.ts +24 -47
  262. package/types/internal/rxjs.d.ts +26 -0
  263. package/types/internal/smokehouse.d.ts +1 -3
  264. package/types/lh.d.ts +0 -2
  265. package/types/lhr/settings.d.ts +1 -1
  266. package/core/audits/metrics/first-contentful-paint-3g.d.ts +0 -15
  267. package/core/audits/metrics/first-contentful-paint-3g.js +0 -69
  268. package/core/audits/resource-summary.d.ts +0 -16
  269. package/core/audits/resource-summary.js +0 -104
  270. package/core/audits/service-worker.d.ts +0 -46
  271. package/core/audits/service-worker.js +0 -182
  272. package/core/gather/gatherers/gatherer.d.ts +0 -46
  273. package/core/gather/gatherers/gatherer.js +0 -58
  274. package/core/legacy/config/config.d.ts +0 -107
  275. package/core/legacy/config/config.js +0 -566
  276. package/core/legacy/config/legacy-default-config.d.ts +0 -4
  277. package/core/legacy/config/legacy-default-config.js +0 -87
  278. package/core/legacy/gather/connections/connection.d.ts +0 -77
  279. package/core/legacy/gather/connections/connection.js +0 -196
  280. package/core/legacy/gather/connections/cri.d.ts +0 -27
  281. package/core/legacy/gather/connections/cri.js +0 -162
  282. package/core/legacy/gather/connections/raw.d.ts +0 -20
  283. package/core/legacy/gather/connections/raw.js +0 -57
  284. package/core/legacy/gather/driver.d.ts +0 -216
  285. package/core/legacy/gather/driver.js +0 -480
  286. package/core/legacy/gather/gather-runner.d.ts +0 -166
  287. package/core/legacy/gather/gather-runner.js +0 -590
  288. package/types/internal/lighthouse-logger.d.ts +0 -34
@@ -74,7 +74,6 @@ declare function useI18n(): {
74
74
  thirdPartyResourcesLabel: string;
75
75
  viewTreemapLabel: string;
76
76
  viewTraceLabel: string;
77
- viewOriginalTraceLabel: string;
78
77
  dropdownPrintSummary: string;
79
78
  dropdownPrintExpanded: string;
80
79
  dropdownCopyJSON: string;
@@ -83,6 +82,7 @@ declare function useI18n(): {
83
82
  dropdownViewer: string;
84
83
  dropdownSaveGist: string;
85
84
  dropdownDarkTheme: string;
85
+ dropdownViewUnthrottledTrace: string;
86
86
  runtimeSettingsDevice: string;
87
87
  runtimeSettingsNetworkThrottling: string;
88
88
  runtimeSettingsCPUThrottling: string;
@@ -177,7 +177,6 @@ declare function useLocalizedStrings(): {
177
177
  thirdPartyResourcesLabel: string;
178
178
  viewTreemapLabel: string;
179
179
  viewTraceLabel: string;
180
- viewOriginalTraceLabel: string;
181
180
  dropdownPrintSummary: string;
182
181
  dropdownPrintExpanded: string;
183
182
  dropdownCopyJSON: string;
@@ -186,6 +185,7 @@ declare function useLocalizedStrings(): {
186
185
  dropdownViewer: string;
187
186
  dropdownSaveGist: string;
188
187
  dropdownDarkTheme: string;
188
+ dropdownViewUnthrottledTrace: string;
189
189
  runtimeSettingsDevice: string;
190
190
  runtimeSettingsNetworkThrottling: string;
191
191
  runtimeSettingsCPUThrottling: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "10.4.0",
4
+ "version": "11.0.0",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -10,7 +10,7 @@
10
10
  "smokehouse": "./cli/test/smokehouse/frontends/smokehouse-bin.js"
11
11
  },
12
12
  "engines": {
13
- "node": ">=16.16"
13
+ "node": ">=18.16"
14
14
  },
15
15
  "scripts": {
16
16
  "prepack": "yarn build-report --standalone --flow --esm && yarn build-types",
@@ -41,7 +41,7 @@
41
41
  "start": "yarn build-report --standalone && node ./cli/index.js",
42
42
  "mocha": "node --loader=testdouble core/test/scripts/run-mocha-tests.js",
43
43
  "test": "yarn diff:sample-json && yarn lint --quiet && yarn unit && yarn type-check",
44
- "test-bundle": "yarn smoke --runner bundle --retries=2",
44
+ "test-bundle": "yarn smoke --runner bundle",
45
45
  "test-clients": "yarn mocha --testMatch clients/**/*-test.js && yarn mocha --testMatch clients/**/*-test-pptr.js",
46
46
  "test-viewer": "yarn unit-viewer && yarn mocha --testMatch viewer/**/*-test-pptr.js --timeout 35000",
47
47
  "test-treemap": "yarn unit-treemap && yarn mocha --testMatch treemap/**/*-test-pptr.js --timeout 35000",
@@ -99,14 +99,8 @@
99
99
  "devDependencies": {
100
100
  "@build-tracker/cli": "^1.0.0-beta.15",
101
101
  "@esbuild-kit/esm-loader": "^2.1.1",
102
+ "@esbuild-plugins/node-modules-polyfill": "^0.1.4",
102
103
  "@jest/fake-timers": "^28.1.0",
103
- "@rollup/plugin-alias": "^3.1.2",
104
- "@rollup/plugin-commonjs": "^20.0.0",
105
- "@rollup/plugin-dynamic-import-vars": "^1.1.1",
106
- "@rollup/plugin-json": "^4.1.0",
107
- "@rollup/plugin-node-resolve": "^13.0.4",
108
- "@rollup/plugin-typescript": "^8.2.5",
109
- "@stadtlandnetz/rollup-plugin-postprocess": "^1.1.0",
110
104
  "@testing-library/preact": "^3.1.1",
111
105
  "@testing-library/preact-hooks": "^1.1.0",
112
106
  "@types/archiver": "^2.1.2",
@@ -125,6 +119,7 @@
125
119
  "@types/node": "*",
126
120
  "@types/pako": "^1.0.1",
127
121
  "@types/resize-observer-browser": "^0.1.1",
122
+ "@types/resolve": "^1.20.2",
128
123
  "@types/semver": "^5.5.0",
129
124
  "@types/tabulator-tables": "^4.9.1",
130
125
  "@types/ws": "^7.0.0",
@@ -135,6 +130,7 @@
135
130
  "acorn": "^8.5.0",
136
131
  "angular": "^1.7.4",
137
132
  "archiver": "^3.0.0",
133
+ "builtin-modules": "^3.3.0",
138
134
  "c8": "^7.11.3",
139
135
  "chalk": "^2.4.1",
140
136
  "chrome-devtools-frontend": "1.0.1153166",
@@ -144,6 +140,7 @@
144
140
  "cross-env": "^7.0.2",
145
141
  "csv-validator": "^0.0.3",
146
142
  "es-main": "^1.2.0",
143
+ "esbuild": "^0.18.11",
147
144
  "eslint": "^8.4.1",
148
145
  "eslint-config-google": "^0.14.0",
149
146
  "eslint-formatter-codeframe": "^7.32.1",
@@ -169,17 +166,13 @@
169
166
  "pako": "^2.0.3",
170
167
  "preact": "^10.7.2",
171
168
  "pretty-json-stringify": "^0.0.2",
172
- "puppeteer": "^20.8.0",
173
- "resolve": "^1.20.0",
169
+ "puppeteer": "^21.0.1",
170
+ "resolve": "^1.22.1",
174
171
  "rollup": "^2.52.7",
175
- "rollup-plugin-node-resolve": "^5.2.0",
176
172
  "rollup-plugin-polyfill-node": "^0.12.0",
177
- "rollup-plugin-replace": "^2.2.0",
178
- "rollup-plugin-shim": "^1.0.0",
179
- "rollup-plugin-terser": "^7.0.2",
180
173
  "tabulator-tables": "^4.9.3",
181
- "terser": "^5.3.8",
182
- "testdouble": "^3.17.2",
174
+ "terser": "^5.18.2",
175
+ "testdouble": "^3.18.0",
183
176
  "typed-query-selector": "^2.6.1",
184
177
  "typescript": "^5.0.4",
185
178
  "wait-for-expect": "^3.0.2",
@@ -188,7 +181,7 @@
188
181
  "dependencies": {
189
182
  "@sentry/node": "^6.17.4",
190
183
  "axe-core": "4.7.2",
191
- "chrome-launcher": "^0.15.2",
184
+ "chrome-launcher": "^1.0.0",
192
185
  "configstore": "^5.0.1",
193
186
  "csp_evaluator": "1.1.1",
194
187
  "devtools-protocol": "0.0.1155343",
@@ -196,17 +189,17 @@
196
189
  "http-link-header": "^1.1.1",
197
190
  "intl-messageformat": "^4.4.0",
198
191
  "jpeg-js": "^0.4.4",
199
- "js-library-detector": "^6.6.0",
200
- "lighthouse-logger": "^1.4.1",
201
- "lighthouse-stack-packs": "1.11.0",
192
+ "js-library-detector": "^6.7.0",
193
+ "lighthouse-logger": "^2.0.1",
194
+ "lighthouse-stack-packs": "1.12.0",
202
195
  "lodash": "^4.17.21",
203
196
  "lookup-closest-locale": "6.2.0",
204
197
  "metaviewport-parser": "0.3.0",
205
198
  "open": "^8.4.0",
206
199
  "parse-cache-control": "1.0.1",
207
200
  "ps-list": "^8.0.0",
208
- "puppeteer-core": "^20.8.0",
209
- "robots-parser": "^3.0.0",
201
+ "puppeteer-core": "^21.0.1",
202
+ "robots-parser": "^3.0.1",
210
203
  "semver": "^5.3.0",
211
204
  "speedline-core": "^1.4.3",
212
205
  "third-party-web": "^0.23.3",
package/readme.md CHANGED
@@ -52,7 +52,7 @@ The Chrome extension was available prior to Lighthouse being available in Chrome
52
52
 
53
53
  The Node CLI provides the most flexibility in how Lighthouse runs can be configured and reported. Users who want more advanced usage, or want to run Lighthouse in an automated fashion should use the Node CLI.
54
54
 
55
- _Lighthouse requires Node 16 LTS (16.x) or later._
55
+ _Lighthouse requires Node 18 LTS (18.x) or later._
56
56
 
57
57
  **Installation**:
58
58
 
@@ -337,6 +337,8 @@ This section details services that have integrated Lighthouse data. If you're wo
337
337
 
338
338
  * **[Treo](https://treo.sh)** - Treo is Lighthouse as a Service. It provides regression testing, geographical regions, custom networks, and integrations with GitHub & Slack. Treo is a paid product with plans for solo-developers and teams.
339
339
 
340
+ * **[PageVitals](https://pagevitals.com)** - PageVitals combines Lighthouse, CrUX and real-user monitoring data to monitor the performance of websites. See how your website performs over time and get alerted if it gets too slow. Drill down and find the real cause of any performance issue. PageVitals is a paid product with a free 14-day trial.
341
+
340
342
  * **[Alertdesk](https://www.alertdesk.com/)** - Alertdesk is based on Lighthouse and helps you to keep track of your site’s quality & performance. Run daily quality & performance tests from both Mobile and Desktop and dive into the powerful & intuitive reports. You can also monitor your uptime (every minute - 24/7) & domain health. Alertdesk is a paid product with a free 14-day trial.
341
343
 
342
344
  * **[Screpy](https://screpy.com)** - Screpy is a web analysis tool that can analyze all pages of your websites in one dashboard and monitor them with your team. It's powered by Lighthouse and it also includes some different analysis tools (SERP, W3C, Uptime, etc). Screpy has free and paid plans.
@@ -282,7 +282,7 @@ limitations under the License.
282
282
  }
283
283
  .lh-tools__button.lh-active + .lh-tools__dropdown {
284
284
  opacity: 1;
285
- clip: rect(-1px, 194px, 242px, -3px);
285
+ clip: rect(-1px, 194px, 270px, -3px);
286
286
  visibility: visible;
287
287
  }
288
288
  .lh-tools__dropdown {
@@ -399,6 +399,8 @@ limitations under the License.
399
399
  <a role="menuitem" tabindex="-1" href="#" class="lh-report-icon lh-report-icon--download" data-i18n="dropdownSaveJSON" data-action="save-json"></a>
400
400
  <a role="menuitem" tabindex="-1" href="#" class="lh-report-icon lh-report-icon--open" data-i18n="dropdownViewer" data-action="open-viewer"></a>
401
401
  <a role="menuitem" tabindex="-1" href="#" class="lh-report-icon lh-report-icon--open" data-i18n="dropdownSaveGist" data-action="save-gist"></a>
402
+ <!-- Only enabled if Options.onViewTrace is set and we are on simulated throttling. -->
403
+ <a role="menuitem" tabindex="-1" href="#" class="lh-report-icon lh-report-icon--open lh-hidden" data-i18n="dropdownViewUnthrottledTrace" data-action="view-unthrottled-trace"></a>
402
404
  <a role="menuitem" tabindex="-1" href="#" class="lh-report-icon lh-report-icon--dark" data-i18n="dropdownDarkTheme" data-action="toggle-dark"></a>
403
405
  </div>
404
406
  </div>
@@ -87,12 +87,13 @@ export class CategoryRenderer {
87
87
  * Take a set of audits and render in a top-level, expandable clump that starts
88
88
  * in a collapsed state.
89
89
  * @param {Exclude<TopLevelClumpId, 'failed'>} clumpId
90
- * @param {{auditRefs: Array<LH.ReportResult.AuditRef>, description?: string}} clumpOpts
90
+ * @param {{auditRefs: Array<LH.ReportResult.AuditRef>, description?: string, openByDefault?: boolean}} clumpOpts
91
91
  * @return {!Element}
92
92
  */
93
- renderClump(clumpId: Exclude<TopLevelClumpId, 'failed'>, { auditRefs, description }: {
93
+ renderClump(clumpId: Exclude<TopLevelClumpId, 'failed'>, { auditRefs, description, openByDefault }: {
94
94
  auditRefs: Array<LH.ReportResult.AuditRef>;
95
95
  description?: string;
96
+ openByDefault?: boolean;
96
97
  }): Element;
97
98
  /**
98
99
  * @param {LH.ReportResult.Category} category
@@ -309,14 +309,14 @@ export class CategoryRenderer {
309
309
  * Take a set of audits and render in a top-level, expandable clump that starts
310
310
  * in a collapsed state.
311
311
  * @param {Exclude<TopLevelClumpId, 'failed'>} clumpId
312
- * @param {{auditRefs: Array<LH.ReportResult.AuditRef>, description?: string}} clumpOpts
312
+ * @param {{auditRefs: Array<LH.ReportResult.AuditRef>, description?: string, openByDefault?: boolean}} clumpOpts
313
313
  * @return {!Element}
314
314
  */
315
- renderClump(clumpId, {auditRefs, description}) {
315
+ renderClump(clumpId, {auditRefs, description, openByDefault}) {
316
316
  const clumpComponent = this.dom.createComponent('clump');
317
317
  const clumpElement = this.dom.find('.lh-clump', clumpComponent);
318
318
 
319
- if (clumpId === 'warning') {
319
+ if (openByDefault) {
320
320
  clumpElement.setAttribute('open', '');
321
321
  }
322
322
 
@@ -559,6 +559,7 @@ export class CategoryRenderer {
559
559
  });
560
560
  }
561
561
 
562
+ const numFailingAudits = clumps.get('failed')?.length;
562
563
  // Render each clump.
563
564
  for (const [clumpId, auditRefs] of clumps) {
564
565
  if (auditRefs.length === 0) continue;
@@ -571,7 +572,10 @@ export class CategoryRenderer {
571
572
  }
572
573
 
573
574
  const description = clumpId === 'manual' ? category.manualDescription : undefined;
574
- const clumpElem = this.renderClump(clumpId, {auditRefs, description});
575
+ // Expand on warning, or manual audits when there are no failing audits.
576
+ const openByDefault =
577
+ clumpId === 'warning' || (clumpId === 'manual' && numFailingAudits === 0);
578
+ const clumpElem = this.renderClump(clumpId, {auditRefs, description, openByDefault});
575
579
  element.append(clumpElem);
576
580
  }
577
581
 
@@ -531,7 +531,7 @@ function createStylesComponent(dom) {
531
531
  function createTopbarComponent(dom) {
532
532
  const el0 = dom.createFragment();
533
533
  const el1 = dom.createElement("style");
534
- el1.append("\n .lh-topbar {\n position: sticky;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n height: var(--topbar-height);\n padding: var(--topbar-padding);\n font-size: var(--report-font-size-secondary);\n background-color: var(--topbar-background-color);\n border-bottom: 1px solid var(--color-gray-200);\n }\n\n .lh-topbar__logo {\n width: var(--topbar-logo-size);\n height: var(--topbar-logo-size);\n user-select: none;\n flex: none;\n }\n\n .lh-topbar__url {\n margin: var(--topbar-padding);\n text-decoration: none;\n color: var(--report-text-color);\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n\n .lh-tools {\n display: flex;\n align-items: center;\n margin-left: auto;\n will-change: transform;\n min-width: var(--report-icon-size);\n }\n .lh-tools__button {\n width: var(--report-icon-size);\n min-width: 24px;\n height: var(--report-icon-size);\n cursor: pointer;\n margin-right: 5px;\n /* This is actually a button element, but we want to style it like a transparent div. */\n display: flex;\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n outline: inherit;\n }\n .lh-tools__button svg {\n fill: var(--tools-icon-color);\n }\n .lh-dark .lh-tools__button svg {\n filter: invert(1);\n }\n .lh-tools__button.lh-active + .lh-tools__dropdown {\n opacity: 1;\n clip: rect(-1px, 194px, 242px, -3px);\n visibility: visible;\n }\n .lh-tools__dropdown {\n position: absolute;\n background-color: var(--report-background-color);\n border: 1px solid var(--report-border-color);\n border-radius: 3px;\n padding: calc(var(--default-padding) / 2) 0;\n cursor: pointer;\n top: 36px;\n right: 0;\n box-shadow: 1px 1px 3px #ccc;\n min-width: 125px;\n clip: rect(0, 164px, 0, 0);\n visibility: hidden;\n opacity: 0;\n transition: all 200ms cubic-bezier(0,0,0.2,1);\n }\n .lh-tools__dropdown a {\n color: currentColor;\n text-decoration: none;\n white-space: nowrap;\n padding: 0 6px;\n line-height: 2;\n }\n .lh-tools__dropdown a:hover,\n .lh-tools__dropdown a:focus {\n background-color: var(--color-gray-200);\n outline: none;\n }\n /* save-gist option hidden in report. */\n .lh-tools__dropdown a[data-action='save-gist'] {\n display: none;\n }\n\n .lh-locale-selector {\n width: 100%;\n color: var(--report-text-color);\n background-color: var(--locale-selector-background-color);\n padding: 2px;\n }\n .lh-tools-locale {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n }\n .lh-tools-locale__selector-wrapper {\n transition: opacity 0.15s;\n opacity: 0;\n max-width: 200px;\n }\n .lh-button.lh-tool-locale__button {\n height: var(--topbar-height);\n color: var(--tools-icon-color);\n padding: calc(var(--default-padding) / 2);\n }\n .lh-tool-locale__button.lh-active + .lh-tools-locale__selector-wrapper {\n opacity: 1;\n clip: rect(-1px, 194px, 242px, -3px);\n visibility: visible;\n margin: 0 4px;\n }\n\n @media screen and (max-width: 964px) {\n .lh-tools__dropdown {\n right: 0;\n left: initial;\n }\n }\n @media print {\n .lh-topbar {\n position: static;\n margin-left: 0;\n }\n\n .lh-tools__dropdown {\n display: none;\n }\n }\n ");
534
+ el1.append("\n .lh-topbar {\n position: sticky;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n height: var(--topbar-height);\n padding: var(--topbar-padding);\n font-size: var(--report-font-size-secondary);\n background-color: var(--topbar-background-color);\n border-bottom: 1px solid var(--color-gray-200);\n }\n\n .lh-topbar__logo {\n width: var(--topbar-logo-size);\n height: var(--topbar-logo-size);\n user-select: none;\n flex: none;\n }\n\n .lh-topbar__url {\n margin: var(--topbar-padding);\n text-decoration: none;\n color: var(--report-text-color);\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n\n .lh-tools {\n display: flex;\n align-items: center;\n margin-left: auto;\n will-change: transform;\n min-width: var(--report-icon-size);\n }\n .lh-tools__button {\n width: var(--report-icon-size);\n min-width: 24px;\n height: var(--report-icon-size);\n cursor: pointer;\n margin-right: 5px;\n /* This is actually a button element, but we want to style it like a transparent div. */\n display: flex;\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n outline: inherit;\n }\n .lh-tools__button svg {\n fill: var(--tools-icon-color);\n }\n .lh-dark .lh-tools__button svg {\n filter: invert(1);\n }\n .lh-tools__button.lh-active + .lh-tools__dropdown {\n opacity: 1;\n clip: rect(-1px, 194px, 270px, -3px);\n visibility: visible;\n }\n .lh-tools__dropdown {\n position: absolute;\n background-color: var(--report-background-color);\n border: 1px solid var(--report-border-color);\n border-radius: 3px;\n padding: calc(var(--default-padding) / 2) 0;\n cursor: pointer;\n top: 36px;\n right: 0;\n box-shadow: 1px 1px 3px #ccc;\n min-width: 125px;\n clip: rect(0, 164px, 0, 0);\n visibility: hidden;\n opacity: 0;\n transition: all 200ms cubic-bezier(0,0,0.2,1);\n }\n .lh-tools__dropdown a {\n color: currentColor;\n text-decoration: none;\n white-space: nowrap;\n padding: 0 6px;\n line-height: 2;\n }\n .lh-tools__dropdown a:hover,\n .lh-tools__dropdown a:focus {\n background-color: var(--color-gray-200);\n outline: none;\n }\n /* save-gist option hidden in report. */\n .lh-tools__dropdown a[data-action='save-gist'] {\n display: none;\n }\n\n .lh-locale-selector {\n width: 100%;\n color: var(--report-text-color);\n background-color: var(--locale-selector-background-color);\n padding: 2px;\n }\n .lh-tools-locale {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n }\n .lh-tools-locale__selector-wrapper {\n transition: opacity 0.15s;\n opacity: 0;\n max-width: 200px;\n }\n .lh-button.lh-tool-locale__button {\n height: var(--topbar-height);\n color: var(--tools-icon-color);\n padding: calc(var(--default-padding) / 2);\n }\n .lh-tool-locale__button.lh-active + .lh-tools-locale__selector-wrapper {\n opacity: 1;\n clip: rect(-1px, 194px, 242px, -3px);\n visibility: visible;\n margin: 0 4px;\n }\n\n @media screen and (max-width: 964px) {\n .lh-tools__dropdown {\n right: 0;\n left: initial;\n }\n }\n @media print {\n .lh-topbar {\n position: static;\n margin-left: 0;\n }\n\n .lh-tools__dropdown {\n display: none;\n }\n }\n ");
535
535
  el0.append(el1);
536
536
  const el2 = dom.createElement("div", "lh-topbar");
537
537
  const el3 = dom.createElementNS("http://www.w3.org/2000/svg", "svg", "lh-topbar__logo");
@@ -646,13 +646,19 @@ function createTopbarComponent(dom) {
646
646
  el26.setAttribute('href', '#');
647
647
  el26.setAttribute('data-i18n', 'dropdownSaveGist');
648
648
  el26.setAttribute('data-action', 'save-gist');
649
- const el27 = dom.createElement("a", "lh-report-icon lh-report-icon--dark");
649
+ const el27 = dom.createElement("a", "lh-report-icon lh-report-icon--open lh-hidden");
650
650
  el27.setAttribute('role', 'menuitem');
651
651
  el27.setAttribute('tabindex', '-1');
652
652
  el27.setAttribute('href', '#');
653
- el27.setAttribute('data-i18n', 'dropdownDarkTheme');
654
- el27.setAttribute('data-action', 'toggle-dark');
655
- el19.append(" ",el20," ",el21," ",el22," "," ",el23," ",el24," ",el25," ",el26," ",el27," ");
653
+ el27.setAttribute('data-i18n', 'dropdownViewUnthrottledTrace');
654
+ el27.setAttribute('data-action', 'view-unthrottled-trace');
655
+ const el28 = dom.createElement("a", "lh-report-icon lh-report-icon--dark");
656
+ el28.setAttribute('role', 'menuitem');
657
+ el28.setAttribute('tabindex', '-1');
658
+ el28.setAttribute('href', '#');
659
+ el28.setAttribute('data-i18n', 'dropdownDarkTheme');
660
+ el28.setAttribute('data-action', 'toggle-dark');
661
+ el19.append(" ",el20," ",el21," ",el22," "," ",el23," ",el24," ",el25," ",el26," "," ",el27," ",el28," ");
656
662
  el8.append(" ",el9," ",el15," ",el19," ");
657
663
  el2.append(" "," ",el3," ",el7," ",el8," ");
658
664
  el0.append(el2);
@@ -41,7 +41,7 @@ export class PwaCategoryRenderer extends CategoryRenderer {
41
41
  // Manual audits are still in a manual clump.
42
42
  const manualAuditRefs = auditRefs.filter(ref => ref.result.scoreDisplayMode === 'manual');
43
43
  const manualElem = this.renderClump('manual',
44
- {auditRefs: manualAuditRefs, description: category.manualDescription});
44
+ {auditRefs: manualAuditRefs, description: category.manualDescription, openByDefault: true});
45
45
  categoryElem.append(manualElem);
46
46
 
47
47
  return categoryElem;
@@ -114,12 +114,15 @@ export class ReportUIFeatures {
114
114
  }
115
115
 
116
116
  if (this._opts.onViewTrace) {
117
- this.addButton({
118
- text: lhr.configSettings.throttlingMethod === 'simulate' ?
119
- Globals.strings.viewOriginalTraceLabel :
120
- Globals.strings.viewTraceLabel,
121
- onClick: () => this._opts.onViewTrace?.(),
122
- });
117
+ if (lhr.configSettings.throttlingMethod === 'simulate') {
118
+ // eslint-disable-next-line max-len
119
+ this._dom.find('a[data-action="view-unthrottled-trace"]', this._dom.rootEl).classList.remove('lh-hidden');
120
+ } else {
121
+ this.addButton({
122
+ text: Globals.strings.viewTraceLabel,
123
+ onClick: () => this._opts.onViewTrace?.(),
124
+ });
125
+ }
123
126
  }
124
127
 
125
128
  if (this._opts.getStandaloneReportHTML) {
@@ -100,7 +100,6 @@ export namespace UIStrings {
100
100
  const thirdPartyResourcesLabel: string;
101
101
  const viewTreemapLabel: string;
102
102
  const viewTraceLabel: string;
103
- const viewOriginalTraceLabel: string;
104
103
  const dropdownPrintSummary: string;
105
104
  const dropdownPrintExpanded: string;
106
105
  const dropdownCopyJSON: string;
@@ -109,6 +108,7 @@ export namespace UIStrings {
109
108
  const dropdownViewer: string;
110
109
  const dropdownSaveGist: string;
111
110
  const dropdownDarkTheme: string;
111
+ const dropdownViewUnthrottledTrace: string;
112
112
  const runtimeSettingsDevice: string;
113
113
  const runtimeSettingsNetworkThrottling: string;
114
114
  const runtimeSettingsCPUThrottling: string;
@@ -398,8 +398,6 @@ const UIStrings = {
398
398
  viewTreemapLabel: 'View Treemap',
399
399
  /** This label is for a button that will show the user a trace of the page. */
400
400
  viewTraceLabel: 'View Trace',
401
- /** This label is for a button that will show the user a trace of the page. */
402
- viewOriginalTraceLabel: 'View Original Trace',
403
401
 
404
402
  /** Option in a dropdown menu that opens a small, summary report in a print dialog. */
405
403
  dropdownPrintSummary: 'Print Summary',
@@ -417,6 +415,8 @@ const UIStrings = {
417
415
  dropdownSaveGist: 'Save as Gist',
418
416
  /** Option in a dropdown menu that toggles the themeing of the report between Light(default) and Dark themes. */
419
417
  dropdownDarkTheme: 'Toggle Dark Theme',
418
+ /** Option in a dropdown menu that opens the trace of the page without throttling. "Unthrottled" can be replaced with "Original". */
419
+ dropdownViewUnthrottledTrace: 'View Unthrottled Trace',
420
420
 
421
421
  /** Label for a row in a table that describes the kind of device that was emulated for the Lighthouse run. Example values for row elements: 'No Emulation', 'Emulated Desktop', etc. */
422
422
  runtimeSettingsDevice: 'Device',
@@ -114,6 +114,9 @@ export class TopbarFeatures {
114
114
  toggleDarkTheme(this._dom);
115
115
  break;
116
116
  }
117
+ case 'view-unthrottled-trace': {
118
+ this._reportUIFeatures._opts.onViewTrace?.();
119
+ }
117
120
  }
118
121
 
119
122
  this._dropDownMenu.close();