Skip to content

Use Promise.withResolvers to simplify promise handling#11666

Merged
aduth merged 2 commits intomainfrom
aduth-promise-with-resolvers
Dec 18, 2024
Merged

Use Promise.withResolvers to simplify promise handling#11666
aduth merged 2 commits intomainfrom
aduth-promise-with-resolvers

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Dec 18, 2024

🛠 Summary of changes

Updates a few instances of JavaScript behavior now able to be simplified using Promise.withResolvers, available as of Node.js v22.

See MDN "Description" documentation for an explanation of the exact type of code this feature seeks to replace.

This builds upon #11605 and #11648, leveraging newly-available features.

📜 Testing Plan

Since the changes only affect specs, it should be sufficient to verify that tests pass:

yarn test

@aduth aduth marked this pull request as draft December 18, 2024 15:42
@aduth aduth marked this pull request as ready for review December 18, 2024 16:27
changelog: Internal, Code Quality, Simplify code using newly-available JavaScript features
@aduth aduth force-pushed the aduth-promise-with-resolvers branch from 4729989 to 1b7a4ca Compare December 18, 2024 16:51
@aduth aduth merged commit 5e546a4 into main Dec 18, 2024
@aduth aduth deleted the aduth-promise-with-resolvers branch December 18, 2024 17:31
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.

2 participants