mocha icon indicating copy to clipboard operation
mocha copied to clipboard

Use standard Promise.allSettled instead polyfill

Open outsideris opened this issue 3 years ago • 3 comments

Description of the Change

We've introduced @ungap/promise-all-settled in #4476. And Node.js support Promise.allSettled in Node 12.9.0.

So, we don't need polyfill anymore because we support Node 14+.

Why should this be in core?

We don't need polyfill anymore.

Benefits

dependency is reduced.

Possible Drawbacks

N/A

outsideris avatar Jul 31 '22 05:07 outsideris

Coverage Status

Coverage decreased (-0.002%) to 94.326% when pulling c557d79a382044bbb87f8023e01e26d730548844 on use-builtin-allsettled into 84b2f846148b180d6e1af088f77358a85c81d1ba on master.

coveralls avatar Jul 31 '22 05:07 coveralls

@outsideris I guess this PR makes sense. One of your links points to a korean page. I couldn't find any docs about Node supporting Promise.allSettled(). Can you help, please?

juergba avatar Aug 09 '22 18:08 juergba

Oops! Sorry for korea link. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled

CleanShot 2022-08-10 at 03 10 05@2x

And you can see 12.9.0 release note.

outsideris avatar Aug 09 '22 18:08 outsideris