Back to Explore

GoogleChrome/web-vitals

GitHub
3 updates · last 90 days1 watchersOpen source

Last release:

web-vitals is a small JavaScript library for measuring Web Vitals metrics on real users, using the same method Chrome and other Google performance tools report. It helps developers monitor Core Web Vitals like CLS, INP, and LCP, and can optionally include attribution data for diagnosing and prioritizing performance issues.

Project status

  • Actively maintained, the repo has a very recent upstream push (2026-07-27) and the latest published updates are only days apart (v6.0.1 on 2026-07-27, v6.0.0 on 2026-07-21).
  • Update cadence appears healthy for 2026, with updates in late July, then about a 7-week gap back to v5.3.0 (2026-05-28), indicating ongoing development rather than a long-term freeze.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v6.0.1

    v6.0.1 is a small patch release that focuses on preventing a runtime JavaScript error when `PerformanceObserver` is not available. The code change adds a defensive guard in the soft navigation capability check, and the rest of the diff is mostly documentation and version bookkeeping.

  • v6.0.0

    v6.0.0 introduces initial support for “soft-navigation” (PerformanceSoftNavigation) across multiple web vitals metrics, including new attribution fields and internal entry managers. It also extends the library’s reporting options (for example, enabling soft-nav reporting) and changes several TypeScript types and default behaviors, especially for INP attribution details.

    Features
  • v5.3.0

    v5.3.0 removes the getFirstHiddenTime polyfill and improves INP attribution logic for deriving interaction targets. It also adjusts internal instance caching to avoid configuration objects being shared across multiple metric functions causing errors. No release notes were provided in the release_notes section, but CHANGELOG.md includes entries for these changes.

    Breaking
  • v5.2.0

    This release introduces a new INP attribution option, includeProcessedEventEntries, and refactors several core scheduling and attribution code paths. It also changes some public TypeScript typing exports and tightens/adjusts internal event collection logic for INP and LCP attribution.

    BreakingFeatures
  • v5.1.0

    Release v5.1.0 was published on 2025-07-31, but no release notes were provided by the publisher. Because the notes are missing, there is no direct information available here about new features, fixes, breaking changes, or migration requirements.

  • v5.0.3

    This release is a small patch bump to v5.0.3. The code change centers on whenIdleOrHidden, specifically adding cleanup of a visibilitychange event listener. README and package metadata were also updated to reference the v5 CDN artifacts.

  • v5.0.2

    Release v5.0.2 contains a small change to the CLS attribution logic in src/attribution/onCLS.ts and updates the package version metadata. The code change adds additional safety checks to handle layout shift entries that may not have any sources.

  • v5.0.1

    Release v5.0.1 contains a targeted fix for incorrect missing reporting on prerendered pages, specifically called out as fixing missing FCP and LCP. The code change shows an adjustment to how the library interprets the first hidden visibility-state relative to activationStart, and the accompanying tests indicate behavior changes that extend beyond only FCP/LCP.

  • v5.0.0

    No publisher release notes were provided for v5.0.0. The diff for this release mainly updates version metadata, documentation (README and upgrade guide), and e2e tests (timing/idle handling for INP reporting). The only concrete API-impact details visible in the diff are in CHANGELOG.md entries marked as breaking.

  • v5.0.0-rc.2

    Release v5.0.0-rc.2 is described as a republish of v5.0.0-rc.1 with no intended functional changes. The code diff mainly updates version metadata and npm publishing behavior for prerelease tags.

  • v5.0.0-rc.1

    v5.0.0-rc.1 adds configurable “target” generation for metric attribution via a new `generateTarget` option, affecting CLS, LCP, and INP attribution logic. It also refactors the internal attribution pipelines by introducing manager classes (for INP, LCP, and layout shifts) and removing the prior shared interactions module, alongside several type changes in attribution objects.

    BreakingFeatures
  • v4.2.4

    Release v4.2.4 was published on 2024-10-22, but the publisher did not provide any release notes. No documented changes, fixes, or upgrade guidance are available in the provided data.

  • v5.0.0-rc.0

    This release is tagged v5.0.0-rc.0, but no release notes were provided by the publisher. As a result, there is no documented information about new features, breaking changes, bug fixes, security or performance updates. If you plan to upgrade, you should review the actual diff between your current version and v5.0.0-rc.0 for API or behavioral changes, and verify compatibility in your test suite.