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

Compatibility data seems incomplete #817

Closed
implicitdef opened this issue Apr 28, 2020 · 3 comments
Closed

Compatibility data seems incomplete #817

implicitdef opened this issue Apr 28, 2020 · 3 comments

Comments

@implicitdef
Copy link

Hi

I've noticed that on a small JS project, when using the recommended setup of Babel with preset-env / core-js / browserslist etc., many polyfills are included, most of them I didn't think they would be necessary.

I've dug into the compatibility data. It seems to be saying that many features are not included on some browsers, contradicting the compatibility data I see on MDN or caniuse.com.

Here's a few exemples I don't understand. There are many more.

'es.array.concat': { chrome: '51', edge: '15', firefox: '48', safari: '10.0', },
Yet MDN states that it was in Chrome 1, Edge 12, Firefox 1, Safari 1
They also add IE 5.5 and some mobiles browsers.

'es.string.split': { chrome: '54', firefox: '49', safari: '10.0', },
Same thing, MDN says something different.
Are you saying that es.string.split is not present or not correctly implemented on "ie", "edge", "android" ?

'es.string.replace': { chrome: '64', },
Same thing, are you saying only Chrome 64+ implements this correctly ? Why ?
(MDN)

On a more general note, about "android" : the browserslist query I use on my project happens to include, amongst others, android 4.4.3-4.4.4.
In the data https://github.com/zloirock/core-js/blob/master/packages/core-js-compat/src/data.js, there seems to be only 4 references to "android". So this means that you're considering that Android Webview pretty much doesn't implement anything ? Why ? It doesn't seem right.

Thanks for you help

@slowcheetah
Copy link
Contributor

@implicitdef this is because in many browsers there are implementations, but they do not meet the standards. For example I already described about es.string.replace in that comment

@implicitdef
Copy link
Author

implicitdef commented Apr 28, 2020

OK, thank you. Could you detail a bit more, do you know what are exactly the problems with the features I listed ?

Where could I get more information on these problems ? Maybe you maintain some kind of history or documentation ? The only other sources I know of are caniuse.com and MDN, but they don't seem to reach the same conclusion as you.

Regarding your comment in the other issue:

es.string.replace & es.string.search should refer to well-known symbols

I don't understand what it means.

@slowcheetah
Copy link
Contributor

slowcheetah commented Apr 28, 2020

@implicitdef see official document about standards. If you want to dive deeper, you may search string 'well-known' and find table with info about well-known symbols. core-js tries to bring all implementations to the described standards.

Also for understanding you can see the tests. For example es.string.replace.js

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

No branches or pull requests

2 participants