Skip to content
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

fix(feedback): Avoid lazy loading code for syncFeedbackIntegration #14895

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Jan 3, 2025

Closes #14891

This PR updates the sync feedback integration to avoid it pulling in the lazyLoadIntegration code. This is not really needed and leads to some problems (and also bundle size increase).

For this I updated the type signature of buildFeedbackIntegration to ensure that either lazyLoadIntegration or the getter functions are provided, so we can type-safely use this.

We probably also want to backport this to v8 then.

@mydea mydea self-assigned this Jan 3, 2025
Copy link
Contributor

github-actions bot commented Jan 3, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.78 KB - -
@sentry/browser - with treeshaking flags 21.53 KB - -
@sentry/browser (incl. Tracing) 35.36 KB - -
@sentry/browser (incl. Tracing, Replay) 72.57 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.96 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 76.96 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 88.83 KB -0.58% -523 B 🔽
@sentry/browser (incl. Feedback) 39.07 KB -1.24% -502 B 🔽
@sentry/browser (incl. sendFeedback) 27.43 KB - -
@sentry/browser (incl. FeedbackAsync) 32.24 KB +0.15% +47 B 🔺
@sentry/react 25.54 KB - -
@sentry/react (incl. Tracing) 38.17 KB - -
@sentry/vue 27.06 KB - -
@sentry/vue (incl. Tracing) 37.22 KB - -
@sentry/svelte 22.95 KB - -
CDN Bundle 24.17 KB - -
CDN Bundle (incl. Tracing) 35.71 KB - -
CDN Bundle (incl. Tracing, Replay) 70.75 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 75.94 KB -0.01% -6 B 🔽
CDN Bundle - uncompressed 70.74 KB - -
CDN Bundle (incl. Tracing) - uncompressed 106.21 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.14 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 232.9 KB -0.05% -119 B 🔽
@sentry/nextjs (client) 38.48 KB - -
@sentry/sveltekit (client) 35.89 KB - -
@sentry/node 162.9 KB - -
@sentry/node - without tracing 98.67 KB - -
@sentry/aws-serverless 128.51 KB - -

View base workflow run

@mydea mydea marked this pull request as ready for review January 3, 2025 10:13
@mydea mydea requested a review from a team as a code owner January 3, 2025 10:13
Copy link
Member

@ryan953 ryan953 left a comment

Choose a reason for hiding this comment

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

Nice way to make the one arg optional with the type change, and the logic in the try/catches makes sense to me and should be very typesafe.

@mydea mydea merged commit c347dae into develop Jan 7, 2025
125 checks passed
@mydea mydea deleted the fn/fix-sync-feedback branch January 7, 2025 08:35
mydea added a commit that referenced this pull request Jan 7, 2025
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.

Chrome Extension using @sentry/browser or @sentry/react gets rejected
3 participants