Closed biin closed 6 months ago
Sorry, I don't understand what do you mean. Everything here works as expected and es.array.to-sorted
marked as required for iOS 15.7.2:
What do you mean by "the version list is retrieved via browserslist"? Could you show your browserslist query and provide other info?
@zloirock This issue can be reproduced by setting the browserslist query to ios >= 15.7.2. I have confirmed that when executed as shown in the sample, there is no issue. It seems that this issue arises from a difference in the browserslist query.
Thank you.
Clear, I see it:
In this case, it's not a core-js
issue that works as expected as I have shown above, it's a browserslist
issue that ios >= 15.7.2
query also should include 15.6-15.8
. You could ask it in their repo.
In core-js-compat, the version list is retrieved via browserslist in targets-parser.js. For iOS version 15.7.2, browserslist returns the minimum version as 16. Subsequently, the minimum version is set to 16, and the necessary polyfill list is retrieved through checkModule in compat.js. The problem here is that for cases like es.array.to-sorted, where the minimum version is 16, checkModule uses < for comparison, so the necessary polyfills are not included. Should this be considered an error in browserslist, or is there a need for a separate handling for this version? Thank you!