mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-18 05:52:10 +00:00
🔦 chore: Drop @lhci/cli and Run Lighthouse 13 Directly (#15687)
`@lhci/cli@0.15.1` pins `lighthouse` to an exact `12.6.1`, so the Lighthouse
lane could never move off a release whose `puppeteer-core` still depends on
`extract-zip` — an advisory with no patched version. That pin, not Lighthouse
itself, was holding 8 of the repository's 16 `npm audit` findings open.
LHCI was only ever a subprocess wrapper here: `audit.ts` shelled out to
`@lhci/cli/src/cli.js` for `collect` and `assert`, and LHCI's own node runner
shells out to `lighthouse/cli/index.js` in turn. Call that CLI directly, run
the three navigations in a loop, and assert the median budgets in TypeScript
next to the assertions `load.spec.ts` already makes.
- `npm audit`: 16 findings (7 high, 1 moderate, 8 low) -> 6 low. The remainder
is the pre-existing `elliptic` chain under `vite-plugin-node-polyfills`,
which has no fixed version and is unrelated to this lane.
- Lighthouse 13 removed `largest-contentful-paint-element` and moved the LCP
node into `lcp-breakdown-insight`. Reading it through a `lcpElement` helper
keeps the "the transcript must be the LCP element" guard working and makes
the next rename fail loudly in one place.
- Reports move to `.lighthouse/` as `lhr-N.report.{json,html}`; cookie
redaction, the API timing table and the desktop/provided-throttling settings
are unchanged. Budgets are now printed as a table immediately before they are
asserted, so the workflow's 80-line failure comment always contains them.
- `CHROME_PATH` and `LIGHTHOUSE_CHROME_FLAGS` are documented: chrome-launcher
prefers the Windows Chrome under WSL, whose debugging port Linux cannot
reach.
This commit is contained in:
parent
644e33ff37
commit
c883e9ef32
8 changed files with 699 additions and 1833 deletions
2
.github/workflows/lighthouse.yml
vendored
2
.github/workflows/lighthouse.yml
vendored
|
|
@ -65,7 +65,7 @@ jobs:
|
|||
with:
|
||||
name: lighthouse
|
||||
path: |
|
||||
.lighthouseci/
|
||||
.lighthouse/
|
||||
lighthouse-ci.log
|
||||
include-hidden-files: true
|
||||
retention-days: 7
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue