Skip to main content
Wright Websites

vitals-pulse

gate Core Web Vitals in CI

Fail CI on Core Web Vitals: reads Lighthouse, Lighthouse CI, PageSpeed Insights and web-vitals reports (or runs Lighthouse), takes the median per URL and gates LCP, CLS, TBT (lab INP proxy), INP, FCP.

  • 14/week on npm
  • 2★
  • MIT
  • v1.0.0
  • Web Performance
npx vitals-pulse

Read the full README on GitHub (opens in a new tab)View on npm (opens in a new tab)

vitals-pulse

From the README

Lighthouse tells you a page is slow; it does not stop the pull request that made it slow. vitals-pulse reads the reports you already produce (Lighthouse JSON, Lighthouse CI's .lighthouseci folder, PageSpeed Insights API responses, or web-vitals measurements from your RUM) or runs Lighthouse for you, takes the median of several runs per URL, and fails the build when a metric crosses Google's "poor" or "needs improvement" lines or regresses against a snapshot from your main branch.

npx vitals-pulse .lighthouseci
npx vitals-pulse reports/ --lcp 2000 --min-score 0.9
npx vitals-pulse reports/ --snapshot vitals-base.json   # on main
npx vitals-pulse reports/ --baseline vitals-base.json --max-regression 5
npx vitals-pulse --url https://example.com/ --runs 5 --preset mobile

Related packages

Web Performance