-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
doc: add err
param to fs.copyFile callback
#53234
Conversation
I believe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as is; however all related changes that should be made: returned value for fs.cpSync()
, fs.copyFileSync()
; and values passed to callback for fs.cp()
, fs.copyFile()
.
Note that there is undefined
explicitly passed as second parameter to fs.cp()
's callback on success: this happens, because cpFn()
returns promise resolving with undefined
and callback-based cp()
is made using util.callbackify()
. If this was unintentional, I guess it might be better to change it before documenting (especially since these API are marked as stable now...)
I have two questions:
Lines 188 to 190 in 88d0701
|
Yes, they return
|
Sorry. I misunderstood you. If that's the case, can we consider to fix it in another PR if it's necessary? FYI, I added |
Yes, of course. |
This comment was marked as outdated.
This comment was marked as outdated.
Commit Queue failed- Loading data for nodejs/node/pull/53234 ✔ Done loading data for nodejs/node/pull/53234 ----------------------------------- PR info ------------------------------------ Title doc: add `err` param to fs.copyFile callback (#53234) Author Feng Yu (@F3n67u) Branch F3n67u:docs-copyfile-err -> nodejs:main Labels doc, fs, needs-ci Commits 2 - doc: add `err` param to fs.copyFile callback - doc: add err param to fs.cp callback Committers 1 - Feng Yu PR-URL: https://github.com/nodejs/node/pull/53234 Reviewed-By: LiviaMedeiros Reviewed-By: Luigi Pinca ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/53234 Reviewed-By: LiviaMedeiros Reviewed-By: Luigi Pinca -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 31 May 2024 19:42:40 GMT ✔ Approvals: 2 ✔ - LiviaMedeiros (@LiviaMedeiros): https://github.com/nodejs/node/pull/53234#pullrequestreview-2091640423 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/53234#pullrequestreview-2092020833 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-06-03T11:00:38Z: https://ci.nodejs.org/job/node-test-pull-request/59633/ - Querying data for job/node-test-pull-request/59633/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 53234 From https://github.com/nodejs/node * branch refs/pull/53234/merge -> FETCH_HEAD ✔ Fetched commits as 58711c2f8dbb..da77ab798ffd -------------------------------------------------------------------------------- [main 296e9c7027] doc: add `err` param to fs.copyFile callback Author: Feng Yu Date: Fri May 31 12:14:26 2024 -0700 2 files changed, 2 insertions(+), 1 deletion(-) [main a7bf82a713] doc: add err param to fs.cp callback Author: Feng Yu Date: Fri May 31 14:45:18 2024 -0700 2 files changed, 2 insertions(+), 1 deletion(-) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. Rebasing (2/4)https://github.com/nodejs/node/actions/runs/9354148429 |
Landed in 21f38f8...eae75fe |
PR-URL: #53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Fix #53230
Related issue: #52916