-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Use es.*
for stable esnext features
#98
Conversation
00d009b
to
5248a9d
Compare
Could we add a checker for es-shims also? |
5248a9d
to
8f1a95a
Compare
es.*
for stable esnext features
@ljharb Sure, will do it in a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC logic of falling back es.
-> esnext.
had some problems, could you add tests for that?
@@ -128,7 +132,7 @@ _reduceRightInstanceProperty(object); | |||
|
|||
_repeatInstanceProperty(object); | |||
|
|||
object.replaceAll; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the replaceAll
is stage 4, we should polyfill it if users are using an older version of corejs which provides esnext.string.replace-all
.
@@ -104,13 +107,31 @@ export default defineProvider<Options>(function( | |||
!(object && desc.exclude && desc.exclude.includes(object)) && | |||
esnextFallback(desc.name, shouldInjectPolyfill) | |||
) { | |||
const { name } = desc; | |||
let useProposalBase = false; | |||
if (proposals || name.startsWith("es.next")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like a typo.
@@ -109,7 +109,7 @@ export default defineProvider<Options>(function( | |||
) { | |||
const { name } = desc; | |||
let useProposalBase = false; | |||
if (proposals) { | |||
if (proposals || (shippedProposals && name.startsWith("esnext."))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name.startsWith("esnext.")
is always false
when both proposals
and shippedProposals
are not enabled.
Fixes #97
Added a
builtin-definition-checker
so we don't forget to update it anymore.