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

Update core-js #138

Closed
wants to merge 3 commits into from
Closed

Update core-js #138

wants to merge 3 commits into from

Conversation

zloirock
Copy link
Member

No description provided.

@zloirock
Copy link
Member Author

zloirock commented Aug 5, 2022

@nicolo-ribaudo

JLHwung
JLHwung previously approved these changes Aug 5, 2022
"esnext.array.find-last-index",
"esnext.typed-array.find-last",
"esnext.typed-array.find-last-index",
"esnext.array.to-reversed",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it already available in some browsers by default?

Copy link
Member Author

@zloirock zloirock Aug 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's generated automatically, so yes, it's available in some environments by default. It's not a browser, it's bun.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But preset-env's shippedProposals does not include bun. Until preset-env recognizes bun as shippedProposals, can we exclude bun here?

if (Object.keys(compatData[feature]).length === 0) continue;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it should be solved on the preset-env side, babel/babel#14831.

Copy link
Member Author

@zloirock zloirock Sep 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this proposal is supported in Safari 16 that's released today. If you wanna change something in the shippedProposals logic - feel free to do it out of the scope of this PR - I think that the current logic of considering something as "shipped" is incorrect anyway.

@JLHwung JLHwung dismissed their stale review August 8, 2022 12:46

shippedProposals concern

@nicolo-ribaudo
Copy link
Member

Merged in 1f2008f

@zloirock
Copy link
Member Author

zloirock commented Sep 13, 2022

@nicolo-ribaudo why I wrote that the way of considering something as "shipped" is incorrect? It's not even the definition of "shipped".

Safari 16 implements the "change array by copy" proposal - all actual methods. However, in the proposal recently was changed the order of errors in %TypedArray%.prototype.with. Because of this minor issue, core-js-compat shows that this method is not supported in Safari 16. With the logic of "shipped proposals" list generation, to this will be added all methods from this proposal with the exception of esnext.typed-array.with.

It should be added too.

@nicolo-ribaudo
Copy link
Member

@zloirock I'm happy to delegate the decision of what counts as shipped to you: do you know where we can get the "is this supported enough, even if with bugs, to consider it as shipped" data?

@zloirock
Copy link
Member Author

@zloirock at this moment we could only manually support this list.

@nicolo-ribaudo
Copy link
Member

Note that apparently I forgot to run yarn build when merging this PR; the result is now this: https://github.com/babel/babel-polyfills/blob/main/packages/babel-plugin-polyfill-corejs3/src/shipped-proposals.ts

@zloirock
Copy link
Member Author

Yep, since it's fixed in Safari TP / Bun.

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

Successfully merging this pull request may close these issues.

None yet

3 participants