chore(dev-deps): update dependency lighthouse to v10 #489
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
9.6.8
->10.0.1
Release Notes
GoogleChrome/lighthouse
v10.0.1
Compare Source
Full Changelog
We expect this release to ship in the DevTools of Chrome 112, and to PageSpeed Insights within 2 weeks.
Core
Deps
Docs
Misc
v10.0.0
Compare Source
Full Changelog
We expect this release to ship in the DevTools of Chrome 112, and to PageSpeed Insights within 2 weeks.
New Contributors
Thanks to our new contributors 👽🐷🐰🐯🐻!
Notable Changes
Performance Score Changes
In the 8.0 release, we described TTI's waning role, and today we have the followup. Time to Interactive (TTI) no longer contributes to the performance score and is not displayed in the report. However, it is still accessible in the Lighthouse result JSON.
Without TTI, the weighting of Cumulative Layout Shift (CLS) has increased from 15% to 25%. See the docs for a complete breakdown of how the Performance score is calculated in 10.0, or play with the scoring calculator.
Types for the Node package
Lighthouse now includes type declarations! Our example TypeScript recipe demonstrates how to achieve proper type safety with Lighthouse.
Third-party Entity classification
Since Lighthouse 5.3, the community-driven
third-party-web
dataset has been used to summarize how every third-party found on a page contributes to the total JavaScript blocking time, via thethird-party-summary
audit. With Lighthouse 10.0, we are adding a new property to the JSON result (entities
) to make further use of this dataset. Every origin encountered on a page is now classified as first-party or third-party withinentities
. In 10.0, this classification is used to power the existing third-party filter checkbox.In a future version of Lighthouse, this will be used to group the table items of every audit based on the entity it originated from, and aggregate the impact of items from that specific entity.
🆕 New Audits
Back/forward cache
The Back/forward cache (bfcache for short) is a browser optimization that serves pages from fully serialized snapshots when navigating back or forwards in session history. There are over 100 different reasons why a page may not be eligible for this optimization, so to assist developers Lighthouse now attempts to trigger a bfcache response and will list anything that prevented the browser from using the bfcache. #14465
For more on bfcache, see the web.dev article.
Note: This audit initially will not be available for PageSpeed Insights.
Preventing pasting to inputs
The audit
password-inputs-can-be-pasted-into
is nowpaste-preventing-inputs
. This audit's logic works just as before, but rather than just considering[type=password]
inputs, it now fails if any non-readonly input element prevents the user from pasting. #14313Lighthouse documentation is now on developer.chrome.com
Our documentation is no longer hosted on web.dev. For the most up to date audit docs, please go to developer.chrome.com/docs/lighthouse/
💥 Breaking changes
Under the hood, Lighthouse now uses the new user-flow supporting infrastructure by default, even for traditional navigation runs. You can opt out of this by: in the CLI, use
--legacy-navigation
; in DevTools: check “Legacy Navigation” in the settings menu. If you have a use case that necessitates this escape hatch, please file an issue. We plan to remove this legacy path in 11.0.For Lighthouse result JSON (LHR) users
Page URLs on the Lighthouse Result
Until now, there were two URL fields to describe a Lighthouse run:
requestedUrl
: the url given by the users, which Lighthouse instructs Chrome to navigate tofinalUrl
: the url after any server-initiated HTTP and JS-initiated redirectsThis taxonomy cannot account for more complex scenarios, such as JS-initiated redirects, usage of the History API or soft-navigations. They were also ill-defined for timespan and snapshot modes. To account for that, Lighthouse 10.0 now has these URL fields:
requestedUrl
: The URL that Lighthouse initially navigated to before redirects. This is the same as it was before for navigation mode, but now it will beundefined
in timespan/snapshot.mainDocumentUrl
: The URL of the last document requested during a navigation. It does not account for soft navigations or history API events made after the page loads. It is only available in navigation mode, and will be undefined in timespan and snapshot modes.finalDisplayedUrl
: The URL displayed in the browser combobox at the end of a Lighthouse run. It accounts for soft navigations and history API events. Available in navigation, timespan, and snapshot modes.finalUrl
: Same value asmainDocumentUrl
.Audit changes
password-inputs-can-be-pasted-into
->paste-preventing-inputs
preload-lcp-image
->prioritize-lcp-image
third-party-summary
no longer uses alink
value foritem.entity
, instead uses a rawtext
valuefull-page-screenshot
is no longer an audit, instead it is stored atlhr.fullPageScreenshot
. To suppress collection of the full-page screenshot in the CLI, you must migrate from--skip-audits full-page-screenshot
to--disable-full-page-screenshot
.For Node users
lighthouse-core/
andlighthouse-cli/
folders are now simplycore/
andcli/
await import('lighthouse')
. For access to just thelighthouse
function in CommonJS, you can also userequire('lighthouse/core/index.cjs')
LHError
is nowLighthouseError
. If you are attempting to catch an error thrown by Lighthouse, be sure to account for this!Node API changes
The
lighthouse
function now has better integration with Puppeteer. Uselighthouse(url, flags, config, page)
to run Lighthouse, passing an existingPuppeteer.Page
handle aspage
.The user flow api has moved to the top level node entrypoint and can be imported with
import {startFlow} from 'lighthouse'
.New
flow.startNavigation()
andflow.endNavigation()
functions let you define a user triggered navigation without any callback function. See the user flow docs for an example.To change settings for a single user flow step, define the settings overrides on the toplevel flags options
flow.snapshot({skipAduits: ['uses-http2']})
instead of on thesettingsOverride
property.To give a flow step a custom name, use
flow.snapshot({name: 'Custom name'})
. Previously this was done viastepName
.For Lighthouse customization (custom config, gatherers, audits)
passes
to load the page multiple times in navigation mode anymore. If you need to load the page multiple times, we recommend using a user flow. See our config docs for instructions on how to convert to the new config formatScriptElements
artifact is nowScripts
, with a slightly different shapeAudit.makeOpportunityDetails
andAudit.makeTableDetails
now accept an options object as the third parameter. This ends up being a breaking change for justAudit.makeOpportunityDetails
.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.