unstale

npm / web-vitals

web-vitals

What changed in web-vitals 1 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

20 breaking1 deprecations12 new APIs and options4 behavior and defaults2 tooling14 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

web-vitals 617 changes

Breaking changes 2

  • Types are now exported as explicit types, so code importing them may need to use import type.

    6.0.0upgrade guide

  • includeProcessedEventEntries now defaults to false; set it to true to include the extra attribution details.

    6.0.0upgrade guide

New APIs and options 1

  • Adds a Resource Timing buffer for LCP attribution, supporting attribution data collection.

    6.1.0release notes

Behavior and default changes 3

  • Small INP interactions are reported with bfcache support.

    6.0.0release notes

  • The default for includeProcessedEventEntries changes to false in v6.

    6.0.0release notes

  • Web Vitals metrics support Soft Navigation when supported by the browser.

    6.0.0release notesupgrade guide

Tooling 2

Fixes and other changes 9

  • Fixes an INP clean-up bug that caused a memory leak.

    6.2.3release notes

  • Fixes negative resourceLoadDuration values in LCP attribution.

    6.2.3release notes

  • Caps pending LoAFs to avoid a memory leak.

    6.2.2release notes

  • Fixes negative inputDelay in INP attribution.

    6.2.1release notes

  • Prevents a spurious CLS report of 0 after bfcache restore.

    6.2.0release notes

  • Guards supportedEntryTypes for older browsers.

    6.2.0release notes

  • Navigation interaction counts are scoped to each InteractionManager.

    6.1.1release notes

  • Prevents a JavaScript error when PerformanceObserver is unavailable.

    6.0.1release notes

  • RequestIdleCallback is capped at 1 second so metrics report even when the browser is busy.

    6.0.0release notesupgrade guide

web-vitals 513 changes

Breaking changes 5

  • Removed getFirstHiddenTimePolyfill.

    5.3.0release notes

  • Removes obsolete FID polyfill types.

    5.2.0release notes

  • Classes in attribution selectors are sorted to reduce cardinality, which may cause short-term reporting differences but should make selectors easier to group over time.

    5.0.0upgrade guide

  • Removed interactionTargetElement by default; it can be generated when creating custom targets in the attribution build.

    5.0.0upgrade guide

  • First Input Delay support and onFID() were removed; FID has been replaced by INP.

    5.0.0upgrade guide

New APIs and options 3

  • Adds the includeProcessedEventEntries option.

    5.2.0release notes

  • The attribution build supports generating custom targets.

    5.0.0upgrade guide

  • INP attribution now includes extra LoAF information: the longest script and buckets.

    5.0.0upgrade guide

Fixes and other changes 5

  • Fixed errors that could occur when passing the same configuration object to multiple metric functions.

    5.3.0release notes

  • Made the INP interactionTarget setting more robust.

    5.3.0release notes

  • Uses LargestContentfulPaint.id as a fallback when the element is removed from the DOM.

    5.2.0release notes

  • Fixes a bug when onLCP is attached late.

    5.2.0release notes

  • Handles initially hidden pages and onLCP registered on visibility change.

    5.2.0release notes

web-vitals 421 changes

Breaking changes 12

  • The build that included the FID and Navigation Timing polyfills for legacy Safari browsers was removed.

    4.0.0upgrade guide

  • Renamed the TTFBAttribution property from connectionTime.

    4.0.0upgrade guide

  • Renamed the TTFBAttribution property from dnsTime.

    4.0.0upgrade guide

  • Removed in favor of processedEventEntries, which includes event entries processed in the same animation frame as the INP candidate interaction.

    4.0.0upgrade guide

  • All getXXX() functions that were deprecated in v3 were removed.

    4.0.0upgrade guide

  • entries now includes only entries with a matching interactionId processed within the same animation frame, excluding entries that do not impact INP.

    4.0.0upgrade guide

  • Renamed the INPAttribution property from eventTarget.

    4.0.0upgrade guide

  • Renamed the INPAttribution property from eventTime.

    4.0.0upgrade guide

  • Renamed the property from eventType; its value is now always either "pointer" or "keyboard".

    4.0.0upgrade guide

  • Renamed the TTFBAttribution property from requestTime.

    4.0.0upgrade guide

  • Renamed the LCPAttribution property from resourceLoadTime.

    4.0.0upgrade guide

  • Renamed the TTFBAttribution property from waitingTime; the duration spent checking the HTTP cache is separately available as cacheDuration.

    4.0.0upgrade guide

Deprecations 1

  • Deprecated in favor of explicit callback types for each metric function.

    4.0.0upgrade guide

New APIs and options 8

  • Added to TTFBAttribution to mark the total time spent checking the HTTP cache for a match.

    4.0.0upgrade guide

  • Added to INPAttribution to measure the time from user interaction until the browser can start processing its event listeners.

    4.0.0upgrade guide

  • Added to INPAttribution.

    4.0.0upgrade guide

  • Added to include long-animation-frame entries that overlap with the INP candidate interaction.

    4.0.0upgrade guide

  • Added to INPAttribution to mark the timestamp of the next paint after the interaction.

    4.0.0upgrade guide

  • Added to INPAttribution to measure the time from event-listener processing finishing until the next frame is presented and visible.

    4.0.0upgrade guide

  • Added an array of event entries processed within the same animation frame as the INP candidate interaction.

    4.0.0upgrade guide

  • Added to INPAttribution to measure the time from the first event listener running until all event listener processing has finished.

    4.0.0upgrade guide

web-vitals 12 changes

Breaking changes 1

  • The isFinal flag was removed from the Metric interface.

    1.0.0release notes

Behavior and default changes 1

  • Metrics are now reported when a page is restored from the back/forward cache.

    1.0.0release notes