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

Refactor move API to async/await #1025

Merged
merged 3 commits into from Oct 26, 2023

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Oct 25, 2023

The PR is the final part of #1020.

@SukkaW SukkaW marked this pull request as ready for review October 25, 2023 04:57
Comment on lines +15 to 21
async function fn () {
fn.callCount++
const callback = args.pop()
setTimeout(() => {
const err = new Error()
err.code = errCode
callback(err)
}, 10)
const err = new Error()
err.code = errCode

return Promise.reject(err)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The move now uses the Promise version of the fs.rename API (instead of the callback version), so the stub here needs to be changed.

Copy link
Collaborator

@RyanZim RyanZim left a comment

Choose a reason for hiding this comment

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

One nit; otherwise LGTM

lib/move/move.js Outdated Show resolved Hide resolved
@SukkaW SukkaW requested a review from RyanZim October 26, 2023 04:07
Copy link
Collaborator

@JPeer264 JPeer264 left a comment

Choose a reason for hiding this comment

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

Amazing work!

@RyanZim RyanZim merged commit a277cbb into jprichardson:master Oct 26, 2023
12 checks passed
@RyanZim
Copy link
Collaborator

RyanZim commented Oct 26, 2023

Thanks a lot @SukkaW!

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.

None yet

3 participants