Scripts: Update lighthouse
dependency
#65488
Closed
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.
What?
Updates the
lighthouse
dependency in thee2e-test-utils-playwright
package.Why?
This fixes the issue with high-severity vulnerabilities introduced with an older version of the
puppeteer-core
dependency, as mentioned in #64597. Lighthouse uses puppeteer-core and needs to be updated to use the latest version to remove the old dependencies with vulnerabilities.How?
package.json
lighthouse dependency to the latest version.lighthouse+10.4.0.patch
file the old version depended on.Testing Instructions
Same as #64597:
npm i --save-dev @wordpress/scripts
npm audit
and you'll see a warning for high-severity vulnerabilities.npm i
to update the packages.Other Notes
I'm not sure this package can be updated with a simple change in this PR. Someone with more familiarity can chime in. Issue Scripts: Deprecated or remove Puppeteer as e2e test handler #60357 mentions puppeteer and its removal, so if that's in progress and includes the
e2e-test-utils-playwright
package, we can disregard this PR.The core package.json and package-lock.json may need to be updated to include lighthouse as a dev dependency as was the case for Scripts: Update
puppeteer-core
dependency #64597.