-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[v8] Drop support for ES5 #9829
Comments
I vote for es2017! Having |
please do not abandon ie11 😭 |
@yonggwan 🥲 how are you using Sentry? Via the CDN bundle or the npm package? |
ES2018 includes Optional chaining and nullish coalescing are ES2020 but Node v14.18 supports both of them so we can remove the polyfills entirely for |
@timfish Good point! We can base everything on ES2018 to also use the spread operator 👍🏻 |
I just double checked this because I couldn't see any spread polyfills and... "iterable spread" (ie. I guess if we didn't have polyfills we were leaving these down to typescript? Or they've already been deleted and I missed that? |
Maybe TS transpiles that based on the target, I'd say? |
Update: after some discussion in slack we're going to make the default ES2018! This makes the minimum browser versions now:
|
|
Currently, we emit JS (both in the CDN bundles, as well as in the npm packages) that is ES5 (down to IE11) compatible.
In v8, we want to stop emitting ES5, and instead emit newer JS standard.
I would propose to emit ES2017. You can see a decent overview of new features here: https://en.wikipedia.org/wiki/ECMAScript_version_history#ES2017
ES2017 includes:
ES2018 added Promise.finally, which is nice but not so important for us I'd say.
ES 2019 added [].flat / [].flatMap(), and Object.fromEntries() (which again is nice, but nothing we use too much).
ES2020 is nice because it adds nullish coalescing and globalThis, but it is pretty recent ("just" 3 years old...)
This means that in v8, we will not ship any polyfills for stuff below ES2017. If you still need to support older browsers, you need to polyfill/transpile the SDK yourself (which most bundlers will do anyhow for you).
Open questions
The text was updated successfully, but these errors were encountered: