lighthouse 9.5.0-dev.20221127 → 9.5.0-dev.20221129

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "9.5.0-dev.20221127",
4
+ "version": "9.5.0-dev.20221129",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -202,6 +202,7 @@
202
202
  "parse-cache-control": "1.0.1",
203
203
  "ps-list": "^8.0.0",
204
204
  "puppeteer-core": "^18.0.5",
205
+ "quibble": "connorjclark/quibble#fork",
205
206
  "robots-parser": "^3.0.0",
206
207
  "semver": "^5.3.0",
207
208
  "speedline-core": "^1.4.3",
@@ -213,7 +214,7 @@
213
214
  "resolutions": {
214
215
  "puppeteer/**/devtools-protocol": "0.0.1034970",
215
216
  "puppeteer-core/**/devtools-protocol": "0.0.1034970",
216
- "testdouble/**/quibble": "connorjclark/quibble#mod-cache"
217
+ "testdouble/**/quibble": "connorjclark/quibble#fork"
217
218
  },
218
219
  "repository": "GoogleChrome/lighthouse",
219
220
  "keywords": [
package/readme.md CHANGED
@@ -20,7 +20,7 @@
20
20
  - [Lighthouse Integrations in Web Perf services](#lighthouse-integrations-in-web-perf-services)
21
21
  - [Lighthouse Integrations in non-Web Perf services](#lighthouse-integrations-in-non-web-perf-services)
22
22
  - [Plugins](#plugins)
23
- - [Related Projects](#related-projects)
23
+ - [Related projects](#related-projects)
24
24
  - [FAQ](#faq)
25
25
  * [How does Lighthouse work?](#how-does-lighthouse-work)
26
26
  * [Can I configure the lighthouse run?](#can-i-configure-the-lighthouse-run)
@@ -38,7 +38,7 @@ Lighthouse is integrated directly into the Chrome DevTools, under the "Lighthous
38
38
 
39
39
  **Run it**: open Chrome DevTools, select the Lighthouse panel, and hit "Generate report".
40
40
 
41
- <img src="https://raw.githubusercontent.com/GoogleChrome/lighthouse/4dbab6bf5466e7220980bccd2f5883f4ad661725/assets/example_dev_tools.png" alt="Lighthouse integration in Chrome DevTools" width="500px">
41
+ <img width="550" alt="Lighthouse integration in Chrome DevTools." src="https://user-images.githubusercontent.com/2766281/204185043-9c49abe5-baee-4b26-b5ce-ece410661213.png">
42
42
 
43
43
  ## Using the Chrome extension
44
44
 
@@ -253,14 +253,14 @@ Useful documentation, examples, and recipes to get you started.
253
253
 
254
254
  The session from Google I/O 2018 covers the new performance engine, upcoming Lighthouse REST API, and using the Chrome UX report to evaluate real-user data.
255
255
 
256
- [![Lighthouse @ Google I/O 2018](https://img.youtube.com/vi/UvK9zAsSM8Q/0.jpg)](https://www.youtube.com/watch?v=UvK9zAsSM8Q)
256
+ [![Watch the Lighthouse @ Google I/O 2018 session.](https://img.youtube.com/vi/UvK9zAsSM8Q/0.jpg)](https://www.youtube.com/watch?v=UvK9zAsSM8Q)
257
257
 
258
258
  The session from Google I/O 2017 covers architecture, writing custom audits,
259
259
  GitHub/Travis/CI integration, headless Chrome, and more:
260
260
 
261
- [![Lighthouse @ Google I/O 2017](https://img.youtube.com/vi/NoRYn6gOtVo/0.jpg)](https://www.youtube.com/watch?v=NoRYn6gOtVo)
261
+ [![Watch the Lighthouse @ Google I/O 2017 session.](https://img.youtube.com/vi/NoRYn6gOtVo/0.jpg)](https://www.youtube.com/watch?v=NoRYn6gOtVo)
262
262
 
263
- _click to watch the video_
263
+ _Click the image to watch the video on YouTube._
264
264
 
265
265
  ## Develop
266
266
 
@@ -312,12 +312,13 @@ yarn type-check
312
312
 
313
313
  ### Docs
314
314
 
315
- Some of our docs have tests that run only in CI by default. If you end up needing to modify our documentation, you'll need to run `yarn build-pack && yarn test-docs` locally to make sure they pass.
315
+ Some of our docs have tests that run only in CI by default. To modify our documentation, you'll need to run `yarn build-pack && yarn test-docs` locally to make sure they pass.
316
316
 
317
317
  **Additional Dependencies**
318
318
  - `brew install jq`
319
319
 
320
320
  ## Lighthouse Integrations in Web Perf services
321
+
321
322
  This section details services that have integrated Lighthouse data. If you're working on a cool project integrating Lighthouse and would like to be featured here, file an issue to this repo or tweet at us [@_____lighthouse](https://twitter.com/____lighthouse)!
322
323
 
323
324
  * **[Web Page Test](https://www.webpagetest.org)** — An [open source](https://github.com/WPO-Foundation/webpagetest) tool for measuring and analyzing the performance of web pages on real devices. Users can choose to produce a Lighthouse report alongside the analysis of WebPageTest results.
@@ -380,7 +381,8 @@ This section details services that have integrated Lighthouse data. If you're wo
380
381
 
381
382
  * **[lighthouse-plugin-crux](https://github.com/dvelasquez/lighthouse-plugin-crux)** - a plugin that quickly gathers real-user-metrics data from the [Chrome UX Report API](https://developers.google.com/web/tools/chrome-user-experience-report/api/reference).
382
383
 
383
- ## Related Projects
384
+ ## Related projects
385
+
384
386
  Other awesome open source projects that use Lighthouse.
385
387
 
386
388
  * **[auto-lighthouse](https://github.com/TGiles/auto-lighthouse)** - a CLI for crawling a domain and generating mobile and desktop reports for each page.
@@ -23,6 +23,7 @@ export class I18n {
23
23
 
24
24
  this._locale = locale;
25
25
  this._strings = strings;
26
+ this._cachedNumberFormatters = new Map();
26
27
  }
27
28
 
28
29
  get strings() {
@@ -57,7 +58,24 @@ export class I18n {
57
58
  number = 0;
58
59
  }
59
60
 
60
- return new Intl.NumberFormat(this._locale, opts).format(number).replace(' ', NBSP2);
61
+ let formatter;
62
+ // eslint-disable-next-line max-len
63
+ const cacheKey = [
64
+ opts.minimumFractionDigits,
65
+ opts.maximumFractionDigits,
66
+ opts.style,
67
+ opts.unit,
68
+ opts.unitDisplay,
69
+ this._locale,
70
+ ].join('');
71
+
72
+ formatter = this._cachedNumberFormatters.get(cacheKey);
73
+ if (!formatter) {
74
+ formatter = new Intl.NumberFormat(this._locale, opts);
75
+ this._cachedNumberFormatters.set(cacheKey, formatter);
76
+ }
77
+
78
+ return formatter.format(number).replace(' ', NBSP2);
61
79
  }
62
80
 
63
81
  /**
@@ -124,6 +124,8 @@ export interface GathererArtifacts extends PublicGathererArtifacts,LegacyBaseArt
124
124
  Accessibility: Artifacts.Accessibility;
125
125
  /** Array of all anchors on the page. */
126
126
  AnchorElements: Artifacts.AnchorElement[];
127
+ /** Errors when attempting to use the back/forward cache. */
128
+ BFCacheFailures: Artifacts.BFCacheFailure[];
127
129
  /** Array of all URLs cached in CacheStorage. */
128
130
  CacheContents: string[];
129
131
  /** CSS coverage information for styles used by page's final state. */
@@ -412,6 +414,16 @@ declare module Artifacts {
412
414
  }>
413
415
  }
414
416
 
417
+ type BFCacheReasonMap = {
418
+ [key in LH.Crdp.Page.BackForwardCacheNotRestoredReason]?: string[];
419
+ };
420
+
421
+ type BFCacheNotRestoredReasonsTree = Record<LH.Crdp.Page.BackForwardCacheNotRestoredReasonType, BFCacheReasonMap>;
422
+
423
+ interface BFCacheFailure {
424
+ notRestoredReasonsTree: BFCacheNotRestoredReasonsTree;
425
+ }
426
+
415
427
  interface Font {
416
428
  display: string;
417
429
  family: string;