-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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 esm examples to node:console
#54108
Conversation
Commit Queue failed- Loading data for nodejs/node/pull/54108 ✔ Done loading data for nodejs/node/pull/54108 ----------------------------------- PR info ------------------------------------ Title doc: add esm examples to `node:console` (#54108) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch mfdebian:docs-console-esm -> nodejs:main Labels doc, console Commits 2 - doc: add esm examples to node:console - fix: add node prefix to fix linter error Committers 1 - Alfredo González <[email protected]> PR-URL: https://github.com/nodejs/node/pull/54108 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/54108 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 29 Jul 2024 22:25:58 GMT ✔ Approvals: 4 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/54108#pullrequestreview-2208500175 ✔ - Jake Yuesong Li (@jakecastelli): https://github.com/nodejs/node/pull/54108#pullrequestreview-2209555625 ✔ - Ulises Gascón (@UlisesGascon): https://github.com/nodejs/node/pull/54108#pullrequestreview-2210904521 ✔ - Trivikram Kamat (@trivikr): https://github.com/nodejs/node/pull/54108#pullrequestreview-2217818127 ✔ Last GitHub CI successful ℹ Green GitHub CI is sufficient -------------------------------------------------------------------------------- ✔ 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 54108 From https://github.com/nodejs/node * branch refs/pull/54108/merge -> FETCH_HEAD ✔ Fetched commits as 2b41c237c03e..cf2b2977180e -------------------------------------------------------------------------------- [main 081bb0fa8a] doc: add esm examples to node:console Author: Alfredo González <[email protected]> Date: Mon Jul 29 18:16:27 2024 -0400 1 file changed, 27 insertions(+), 2 deletions(-) [main befd784103] fix: add node prefix to fix linter error Author: Alfredo González <[email protected]> Date: Mon Jul 29 18:29:21 2024 -0400 1 file changed, 1 insertion(+), 1 deletion(-) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. Rebasing (2/4)https://github.com/nodejs/node/actions/runs/10262942531 |
Landed in fd49758 |
PR-URL: #54108 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
This PR adds the
ESM
counterparts of theCJS
examples for the Console documentation.It also includes the missing
require
statements forfs
andConsole
used in this particular CJS example just to be concise with the rest of the documentation (as instream.pipeline(streams[, options])
for example).Also the documentation states we can either do:
Or
I've kept that on both the
ESM
andCJS
examples so new users don't get confused about it.Best regards.