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

fs: use createDeferredPromise() in promises.watch() #37386

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Feb 15, 2021

This commit updates fsPromises.watch() to use the createDeferredPromise() utility.

@nodejs-github-bot nodejs-github-bot added the fs Issues and PRs related to the fs subsystem / file system. label Feb 15, 2021
Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

I really don't like this pattern because of safety - but the refactoring doesn't really change the code it just uses a utility.

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

Oh nice, I hadn't seen that the utility had already landed.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@RaisinTen
Copy link
Contributor

I think this should be rebased to include 1c6484b for a green CI.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Feb 17, 2021

@cjihrig cjihrig added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 17, 2021
This commit updates fsPromises.watch() to use the
createDeferredPromise() utility.

PR-URL: nodejs#37386
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
@cjihrig cjihrig merged commit 9a2ac2c into nodejs:master Feb 18, 2021
@cjihrig cjihrig deleted the deferred branch February 18, 2021 04:35
targos pushed a commit that referenced this pull request Feb 28, 2021
This commit updates fsPromises.watch() to use the
createDeferredPromise() utility.

PR-URL: #37386
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants