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

doc: add fspromises mkdir example #40843

Merged
merged 8 commits into from
Jun 12, 2022

Conversation

bnb
Copy link
Contributor

@bnb bnb commented Nov 17, 2021

Adds an example to the fsPromises mkdir doc. Includes both cjs and mjs versions, because we should support both imo.

@duckduckstab1

This comment has been minimized.

doc/api/fs.md Outdated Show resolved Hide resolved
doc/api/fs.md Outdated Show resolved Hide resolved
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Nov 17, 2021
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Nov 19, 2021
doc/api/fs.md Outdated Show resolved Hide resolved
@Trott Trott removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 12, 2021
doc/api/fs.md Outdated Show resolved Hide resolved
@bnb
Copy link
Contributor Author

bnb commented Jun 11, 2022

@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.

@bnb bnb added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 11, 2022
@bnb
Copy link
Contributor Author

bnb commented Jun 11, 2022

Added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. back 👍🏻

@bnb
Copy link
Contributor Author

bnb commented Jun 11, 2022

(also apologies for the delay, ngl I forgot this was open)

Copy link
Contributor

@aduh95 aduh95 left a 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 Show resolved Hide resolved
doc/api/fs.md Outdated Show resolved Hide resolved
doc/api/fs.md Outdated Show resolved Hide resolved
doc/api/fs.md Outdated

}

makeDirectory();
Copy link
Contributor

@aduh95 aduh95 Jun 11, 2022

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.

Copy link
Contributor Author

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?

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 12, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 12, 2022
@nodejs-github-bot nodejs-github-bot merged commit fab676e into nodejs:master Jun 12, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in fab676e

italojs pushed a commit to italojs/node that referenced this pull request Jun 12, 2022
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]>
danielleadams pushed a commit that referenced this pull request Jun 13, 2022
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]>
@danielleadams danielleadams mentioned this pull request Jun 13, 2022
danielleadams pushed a commit that referenced this pull request Jun 13, 2022
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]>
@bnb bnb deleted the bnb/fspromises-mkdir branch June 14, 2022 18:04
targos pushed a commit that referenced this pull request Jul 12, 2022
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]>
targos pushed a commit that referenced this pull request Jul 31, 2022
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]>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
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]>
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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants