Skip to content

feat(browser): Update web-vitals to 5.0.2 #16492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jun 5, 2025

Important changes from the original library:

  • For now until the next SDK major, we'll keep reporting FID. web-vitals removed the already deprecated APIs for it in v5 but we simply keep them from v4
  • web-vitals further removed compatibility for older iOS Safari versions. Unfortunately, we still support Safari 14.4
    which is the last version that doesn't yet fully support the visibilitychange event. This requires us to keep the onHidden helper around which also listens to pagehide events that this Safari version supports. I adjusted our integration tests to keep one around that fails if we remove this special handling in a future upgrade (also added some context for future us).

I will follow up with at least one more PR to do some more refactorings but I decided to keep them minimal in this PR to get better diffs for reviewing:

  • rename the get* files to on*, since this is how they're named now in the official library

closes #16310

@Lms24 Lms24 self-assigned this Jun 5, 2025
Copy link
Contributor

github-actions bot commented Jun 6, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.99 kB - -
@sentry/browser - with treeshaking flags 23.76 kB - -
@sentry/browser (incl. Tracing) 38.69 kB +0.86% +327 B 🔺
@sentry/browser (incl. Tracing, Replay) 76.78 kB +0.4% +302 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.87 kB +0.44% +300 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 81.54 kB +0.38% +306 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 93.6 kB +0.31% +289 B 🔺
@sentry/browser (incl. Feedback) 40.73 kB - -
@sentry/browser (incl. sendFeedback) 28.7 kB - -
@sentry/browser (incl. FeedbackAsync) 33.59 kB - -
@sentry/react 25.76 kB - -
@sentry/react (incl. Tracing) 40.67 kB +0.79% +317 B 🔺
@sentry/vue 28.36 kB - -
@sentry/vue (incl. Tracing) 40.54 kB +0.82% +329 B 🔺
@sentry/svelte 24.01 kB - -
CDN Bundle 25.48 kB - -
CDN Bundle (incl. Tracing) 38.76 kB +0.59% +226 B 🔺
CDN Bundle (incl. Tracing, Replay) 74.63 kB +0.3% +221 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 80.09 kB +0.28% +223 B 🔺
CDN Bundle - uncompressed 74.41 kB - -
CDN Bundle (incl. Tracing) - uncompressed 114.83 kB +0.65% +736 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 228.8 kB +0.33% +736 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 241.63 kB +0.31% +736 B 🔺
@sentry/nextjs (client) 42.33 kB +0.76% +316 B 🔺
@sentry/sveltekit (client) 39.17 kB +0.83% +322 B 🔺
@sentry/node 150.28 kB - -
@sentry/node - without tracing 98.33 kB - -
@sentry/aws-serverless 124.1 kB -0.01% -1 B 🔽

View base workflow run

@Lms24 Lms24 marked this pull request as ready for review June 6, 2025 10:50
@Lms24 Lms24 requested review from AbhiPrasad and s1gr1d June 6, 2025 10:50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to bump the commit SHA linked in this README as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade web-vitals library to V5
2 participants