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

chore: Dedupe @sentry/core imports #14529

Merged
merged 4 commits into from
Nov 29, 2024
Merged

chore: Dedupe @sentry/core imports #14529

merged 4 commits into from
Nov 29, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Nov 29, 2024

I noticed we have a whole bunch of files that have multiple imports from @sentry/core, so I went over all of those I could find and ran VSCode auto-import-ordering to clean this up. Would be nice to have this taken care of by eslint/biome, but somehow this does not seem to work... :(

This for sure does not capture everything, but a good amount of duplication at least.

@mydea mydea self-assigned this Nov 29, 2024
@mydea mydea requested review from a team as code owners November 29, 2024 08:55
Copy link
Contributor

github-actions bot commented Nov 29, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.1 KB -0.14% -33 B 🔽
@sentry/browser - with treeshaking flags 21.83 KB +0.03% +5 B 🔺
@sentry/browser (incl. Tracing) 35.5 KB -0.08% -28 B 🔽
@sentry/browser (incl. Tracing, Replay) 72.39 KB -0.08% -57 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.87 KB +0.09% +56 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 76.71 KB -0.08% -56 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 89.16 KB -0.07% -61 B 🔽
@sentry/browser (incl. Feedback) 39.84 KB -0.08% -31 B 🔽
@sentry/browser (incl. sendFeedback) 27.72 KB -0.09% -24 B 🔽
@sentry/browser (incl. FeedbackAsync) 32.53 KB -0.06% -17 B 🔽
@sentry/react 25.8 KB -0.01% -2 B 🔽
@sentry/react (incl. Tracing) 38.4 KB +0.06% +21 B 🔺
@sentry/vue 27.25 KB -0.1% -27 B 🔽
@sentry/vue (incl. Tracing) 37.3 KB -0.07% -25 B 🔽
@sentry/svelte 23.25 KB -0.11% -26 B 🔽
CDN Bundle 24.32 KB - -
CDN Bundle (incl. Tracing) 37.2 KB - -
CDN Bundle (incl. Tracing, Replay) 72.08 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 77.41 KB - -
CDN Bundle - uncompressed 71.45 KB - -
CDN Bundle (incl. Tracing) - uncompressed 110.5 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 223.57 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 236.79 KB - -
@sentry/nextjs (client) 38.71 KB +0.04% +15 B 🔺
@sentry/sveltekit (client) 36.05 KB - -
@sentry/node 135.08 KB +0.01% +5 B 🔺
@sentry/node - without tracing 97.13 KB -0.01% -6 B 🔽
@sentry/aws-serverless 109.43 KB - -

View base workflow run

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

@mydea
Copy link
Member Author

mydea commented Nov 29, 2024

Shouldn't https://eslint.org/docs/latest/rules/no-duplicate-imports catch this?

I think we are not using this and are instead using something from biome there which does not seem to properly work (??) but not quite sure 😬 What I can say is that as of now it does not seem to actually do/check this xD

I noticed we have a whole bunch of files that have multiple imports from `@sentry/core`, so I went over all of those I could find and ran VSCode auto-import-ordering to clean this up. Would be nice to have this taken care of by eslint/biome, but somehow this does not seem to work... :(
@mydea mydea enabled auto-merge (squash) November 29, 2024 13:21
@mydea mydea merged commit e17bd91 into develop Nov 29, 2024
180 checks passed
@mydea mydea deleted the fn/dedupe-imports branch November 29, 2024 14:00
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.

3 participants