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

Use Promise.withResolvers to simplify promise handling #11666

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

aduth
Copy link
Member

@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
2 checks passed
@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