Skip to content

build(bundles): Use ES2017 for bundles (drop ES5 support) #10911

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

Merged
merged 3 commits into from
Mar 7, 2024
Merged

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Mar 4, 2024

ref #9829

Copy link
Contributor

github-actions bot commented Mar 4, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 77.52 KB (+0.18% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.74 KB (+0.24% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 72.66 KB (+0.22% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 62.27 KB (+0.21% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.97 KB (+0.41% 🔺)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 32.97 KB (+0.41% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.36 KB (+0.06% 🔺)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.37 KB (+0.05% 🔺)
@sentry/browser - Webpack (gzipped) 22.57 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 0 B (removed)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 0 B (removed)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 0 B (removed)
@sentry/browser - ES6 CDN Bundle (gzipped) 0 B (removed)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 0 B (removed)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 0 B (removed)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 0 B (removed)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 0 B (removed)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 69 KB (+0.19% 🔺)
@sentry/react - Webpack (gzipped) 22.6 KB (+0.05% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 85.44 KB (+0.18% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 49.83 KB (+0.27% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.41 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) - CDN Bundle (gzipped) 75.61 KB (added)
@sentry/browser (incl. Tracing, Replay) - CDN Bundle (gzipped) 67.2 KB (added)
@sentry/browser (incl. Tracing) - CDN Bundle (gzipped) 33.08 KB (added)
@sentry/browser - CDN Bundle (gzipped) 24.01 KB (added)
@sentry/browser (incl. Tracing, Replay) - CDN Bundle (minified & uncompressed) 211.13 KB (added)
@sentry/browser (incl. Tracing) - CDN Bundle (minified & uncompressed) 99.93 KB (added)
@sentry/browser - CDN Bundle (minified & uncompressed) 71.76 KB (added)

@s1gr1d s1gr1d self-assigned this Mar 5, 2024
@s1gr1d s1gr1d marked this pull request as ready for review March 6, 2024 09:38
@s1gr1d s1gr1d requested review from AbhiPrasad and mydea March 6, 2024 09:38
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.

This all looks really good to me!
let's also add an entry into MIGRATION.md, indicating that ES5 is not supported anymore, and users need to polyfill stuff themselves if they want to continue supporting ES5.

Also, let's wait for another review from e.g. @AbhiPrasad to have a second set of eyes on this as well :)

@mydea
Copy link
Member

mydea commented Mar 6, 2024

After that we can also remove the promise like stuff etc 🎉

@s1gr1d
Copy link
Member Author

s1gr1d commented Mar 6, 2024

This all looks really good to me! let's also add an entry into MIGRATION.md, indicating that ES5 is not supported anymore, and users need to polyfill stuff themselves if they want to continue supporting ES5.

@mydea This should be covered here in MIGRATION.md: https://github.com/getsentry/sentry-javascript/pull/10911/files#diff-c1603ee6a674bb75255aa448057630506153e363297fd58668e6679f10909bc6L27-L40

Or should we be more specific on that?

@mydea
Copy link
Member

mydea commented Mar 6, 2024

Ahh you are right of course, we already added this in advance - all good then :D

@@ -24,7 +24,7 @@ stable release of `8.x` comes out).
`@sentry/node` and all of our node-based server-side sdks (`@sentry/nextjs`, `@sentry/serverless`, etc.). We no longer
test against Node 8, 10, or 12 and cannot guarantee that the SDK will work as expected on these versions.

**Browser**: Our browser SDKs (`@sentry/browser`, `@sentry/react`, `@sentry/vue`, etc.) now require ES6+ compatible
Copy link
Member

Choose a reason for hiding this comment

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

We should double check if the browser listed below are still accurate here - caniuse is here

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point!

@s1gr1d s1gr1d enabled auto-merge (squash) March 7, 2024 08:18
@s1gr1d s1gr1d merged commit ebbdc8e into develop Mar 7, 2024
@s1gr1d s1gr1d deleted the sig-es2017 branch March 7, 2024 08:47
s1gr1d added a commit to getsentry/sentry that referenced this pull request Mar 13, 2024
As the coming version of the JS SDK only uses ES2017 bundles, it is no
longer necessary to differentiate between es5 and es6 bundles.

ref getsentry/sentry-javascript#10911
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