-
Notifications
You must be signed in to change notification settings - Fork 27
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
isSupported
reporting false negatives
#82
Comments
The problem is in this line Line 49 in 1b74c10
To be precise the Would the maintainer be open to accept a PR? |
kyliau
pushed a commit
to angular/angular-cli
that referenced
this issue
Jun 11, 2019
…S6 modules are being marked as not supported `caniuse-api` only returns `true` for a feature when it's fully supported. This might causes redundant ES5 builds if users opt to support only browsers which do support ES6 modules but either require polyfills such as Safari 10.1 or when both bundles will be downloaded such as `Edge 18` See: https://github.com/Nyalab/caniuse-api/blob/1b74c10257e36877709da4f6630513db10203a78/src/index.js#L49 and Nyalab/caniuse-api#82 Fixes #14580
kyliau
pushed a commit
to angular/angular-cli
that referenced
this issue
Jun 11, 2019
…s6 modules are being marked as not supported caniuse-api only returns true for a feature when it's fully supported. This might causes redundant ES5 builds if users opt to support only browsers which do support ES6 modules but either require polyfills such as Safari 10.1 or when both bundles will be downloaded such as Edge 18 See: https://github.com/Nyalab/caniuse-api/blob/1b74c10257e36877709da4f6630513db10203a78/src/index.js#L49 and Nyalab/caniuse-api#82 Fixes #14580
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that
isSupported
is reportingfalse
whenever a version has a "note".Take for example ES6: https://caniuse.com/#feat=es6
caniuse.isSupported('es6', 'chrome 74')
returnsfalse
(as doescaniuse.isSupported('es6', 'firefox 66')
) which makes little sense. I'd expect to always returntrue
if the version is marked in CanIUse as supported (dark green). Someone could argue that if that there is a note it means that something happens with it (in this example, missing tail call optimization), but that's what partially support (light green) means, doesn't it? If the note was important enough not to consider the feature as supported, it wouldn't be marked in dark green.The text was updated successfully, but these errors were encountered: