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
Update preset-env builtin-definitions #10929
Update preset-env builtin-definitions #10929
Conversation
ad52baa
to
cc7407f
Compare
Maybe we could do it based on the |
@nicolo-ribaudo Well if we do it for the minors, we will need to keep track of which versions shipping which standard names. I think since it is not visible to users (as long as core-js still offers |
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.
but this will break users using an older version of core-js back when global-this hadn't reached stage-4 yet
Nope. All required logic already in the architecture. Need to update only built-ins definitions. For example, for globalThis
should be added both - esnext.global-this
and es.global-this
- and will be used only modules for the specified core-js
version (like corejs: '3.6'
or corejs: '3.1'
).
@zloirock Thanks, I just realize that we are doing sub imports for
|
cc7407f
to
b4f54b9
Compare
b3f5744
to
de42cfd
Compare
One more time: for enabling finished proposals should be updated only definitions, we should not return conception of shipped proposals for finished proposals to |
I agree that shipped proposals should exclude finished ones. But if we do it now we will introduce breaking change for users using an old core-js version. Like we will do in babel-parser, we can remove these 3 finished proposals in babel 8.
Yep. We should update documents and encourage the minor version specification. We can add a deprecation message for
Yep. I will come up with a new script to remind maintainers that |
It was a comment mainly about extending the current shipped proposals built-ins list only by finished proposals. If we wanna maintain proper "shipped proposals" functionality - it should be not just finished proposals, it could be the list of modules for stage 3+ proposals which we could get as |
The We are now testing if a proposal is shipped by querying |
I know what is |
Yeah. Both So here is some different interpretations of |
I also agree that |
I could accept your position. However, it will break
|
de42cfd
to
62bc1d5
Compare
@zloirock I acknowledge your concern on this approach that detecting browser data may not exactly match the As for your concern, we can certainly introduce whitelist in the future if a browser were shipping < state-3 proposals (usually something private is now standardized) or compat-data have been truncated. |
@JLHwung Has #10929 (review) ( |
@nicolo-ribaudo Yeah, it has been addressed in f754938. |
The requested changes have been addressed (#10929 (comment))
@JLHwung v7.9.0 or v7.8.6? |
@nicolo-ribaudo I prefer to ship it in patch release, same as what we did when we bumped browserslist. |
useBuiltIns: "usage"
will now include core-js stage-4 proposals by default. Besides that, thecorejs3/shippedProposals
are now moved to thedata/
folder and now generated fromcore-js-compat
.Ideally we should generate imports using standarized entry names, i.e. use
es.global-this
instead ofesnext.global-this
, but this will break users using an older version of core-js back whenglobal-this
hadn't reached stage-4 yet.