Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Jan 16, 2023

Bloats the bundle size

I'm aware of the semantic difference between nullish coalescing and the ||-operator but I think for our use cases, replacing ?? with || should be fine.

@Lms24 Lms24 changed the title ref(tracing): Remove nullish coaloescing operator ref(tracing): Remove nullish coalescing operator Jan 16, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.82 KB (+0.01% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 61.44 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.49 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 54.74 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.22 KB (0%)
@sentry/browser - Webpack (minified) 66.17 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.24 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.51 KB (-0.18% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.73 KB (-0.18% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.01 KB (-0.39% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.11 KB (-0.82% 🔽)
@sentry/replay - Webpack (gzipped + minified) 38.45 KB (-0.99% 🔽)

@mydea
Copy link
Member

mydea commented Jan 16, 2023

Should we maybe also add an eslint rule for this? 🤔 Similar to #6777

@Lms24
Copy link
Member Author

Lms24 commented Jan 16, 2023

Should we maybe also add an eslint rule for this?

Sounds good to me. Will do in a bit

@Lms24 Lms24 changed the title ref(tracing): Remove nullish coalescing operator ref(tracing): Remove nullish coalescing operator and add eslint rule Jan 16, 2023
@Lms24 Lms24 marked this pull request as ready for review January 16, 2023 13:45
@Lms24 Lms24 requested review from a team, AbhiPrasad and mydea and removed request for a team January 16, 2023 13:45
Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

nice!

@Lms24 Lms24 force-pushed the lms-nullish-coalescing branch 2 times, most recently from 71d1e54 to 54052c6 Compare January 16, 2023 16:19
@Lms24 Lms24 force-pushed the lms-nullish-coalescing branch from 54052c6 to afa978b Compare January 16, 2023 16:45
@Lms24 Lms24 merged commit 0e1f3dc into master Jan 16, 2023
@Lms24 Lms24 deleted the lms-nullish-coalescing branch January 16, 2023 17:03
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.

4 participants