Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Apr 14, 2022

This PR removes the forget() function from Utils as it is a rather unnecessary abstraction around logging a rejected Promise via console.error. It also adds to bundle size. The PR removes all (=2) calls to it and instead calls logger.error in the respective places.

ref: https://getsentry.atlassian.net/browse/WEB-826

this function just provides an unnecessary abstraction (and bundle size increase) around handling
a Promise rejection.
@Lms24 Lms24 requested a review from AbhiPrasad April 14, 2022 13:50
@Lms24 Lms24 changed the base branch from master to 7.x April 14, 2022 13:50
@Lms24 Lms24 requested a review from lforst April 14, 2022 13:54
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.2 KB (+0.29% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 64.33 KB (-0.44% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.84 KB (-0.09% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 57.94 KB (-0.06% 🔽)
@sentry/browser - Webpack (gzipped + minified) 23.41 KB (+0.76% 🔺)
@sentry/browser - Webpack (minified) 81.21 KB (-0.63% 🔽)
@sentry/react - Webpack (gzipped + minified) 23.46 KB (+0.79% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.96 KB (-0.2% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.04 KB (-0.14% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.41 KB (-0.29% 🔽)

Copy link
Contributor

@lforst lforst left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

@Lms24 Lms24 merged commit 0cf5fb5 into 7.x Apr 14, 2022
@Lms24 Lms24 deleted the lms-forget-forget branch April 14, 2022 15:25
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone Apr 25, 2022
Lms24 added a commit that referenced this pull request Apr 26, 2022
remove the `forget()` function from Utils as it is a rather unnecessary abstraction around logging a rejected Promise via console.error and it bloats the bundle
lobsterkatie pushed a commit that referenced this pull request Apr 26, 2022
remove the `forget()` function from Utils as it is a rather unnecessary abstraction around logging a rejected Promise via console.error and it bloats the bundle
lobsterkatie pushed a commit that referenced this pull request Apr 26, 2022
remove the `forget()` function from Utils as it is a rather unnecessary abstraction around logging a rejected Promise via console.error and it bloats the bundle
AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
remove the `forget()` function from Utils as it is a rather unnecessary abstraction around logging a rejected Promise via console.error and it bloats the bundle
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