-
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 fspromises mkdir example #40843
Conversation
Signed-off-by: Tierney Cyren <[email protected]>
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Tierney Cyren <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]>
@aduh95 PTAL. Should be good now. Worth noting that I also added a slash at the end of the CJS example, again to be consistent. |
Added
author ready
|
(also apologies for the delay, ngl I forgot this was open) |
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.
All the docs are now using node:
prefix.
doc/api/fs.md
Outdated
|
||
} | ||
|
||
makeDirectory(); |
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.
nit: instead of a try/catch, I would put a .catch(console.error)
: calling an async function without awaiting it or having a catch handler should be frowned upon imho.
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.
would you want me to move the MJS example to be a function and do the same, or should that continue using top-level await in a try/catch?
Signed-off-by: Tierney Cyren <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]>
Landed in fab676e |
Signed-off-by: Tierney Cyren <[email protected]> PR-URL: nodejs#40843 Reviewed-By: Adrian Estrada <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]> PR-URL: #40843 Reviewed-By: Adrian Estrada <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]> PR-URL: #40843 Reviewed-By: Adrian Estrada <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]> PR-URL: #40843 Reviewed-By: Adrian Estrada <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]> PR-URL: #40843 Reviewed-By: Adrian Estrada <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Tierney Cyren <[email protected]> PR-URL: nodejs/node#40843 Reviewed-By: Adrian Estrada <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: James M Snell <[email protected]>
Adds an example to the fsPromises
mkdir
doc. Includes both cjs and mjs versions, because we should support both imo.