Back to Explore

GoogleChrome/web-vitals

GitHub
6 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, with recent GitHub updates (latest upstream push on 2026-08-26, and multiple releases in August 2026), indicating the project is still actively evolving rather than in maintenance mode.
  • Apparent update cadence is fairly steady recently, with several patch/minor updates in 2026 (notably v6.0.0 on 2026-07-21, v6.0.1 on 2026-07-27, v6.1.0 on 2026-08-05, v6.1.1 on 2026-08-15, and v6.2.0 on 2026-08-24).

AI summary generated

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

Recent updates

  • v6.2.1

    Release v6.2.1 includes a fix to prevent negative inputDelay values during INP attribution. The code changes also tighten the criteria for which PerformanceEventTiming entries are treated as INP candidates, impacting how first-input entries are grouped and attributed.

  • v6.2.0

    Version v6.2.0 primarily addresses metric-reporting edge cases, specifically preventing a spurious CLS report of 0 after a bfcache restore. It also adds a browser-compatibility guard for detecting soft-navigation support to avoid runtime errors on older PerformanceObserver implementations.

  • v6.1.1

    This release (v6.1.1) updates the INP interaction tracking logic so the interaction count used for p98 estimation is scoped per InteractionManager instance. The provided publisher release notes are empty, but the code change is meaningful for apps that create multiple InteractionManager/onINP instances.

  • v6.1.0

    web-vitals v6.1.0 introduces Resource Timing buffering to improve LCP attribution and adds a new `resourceBufferSize` option to `onLCP`. The implementation changes how the library retrieves the Resource Timing entry used for attribution by maintaining an internal buffer fed by a `PerformanceObserver`.

    Features
  • 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.