[12.x] doc: update fs promise-based examples by richardlau · Pull Request #35760 · nodejs/node

@nodejs-github-bot added doc

Issues and PRs related to the documentations.

fs

Issues and PRs related to the fs subsystem / file system.

v12.x labels

Oct 22, 2020

aduh95

@richardlau

nodejs#34843 was cherry-picked onto
`v12.x-staging` in 961844d but the `fs/promises` API, as used
in the examples, is only available from Node.js 14. Change the
added examples to use `require(fs).promises` instead.

@richardlau richardlau changed the title [12.x] doc: update fs.promises examples [12.x] doc: update fs promise-based examples

Oct 22, 2020

@rickyes rickyes added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Oct 27, 2020

antsmartian

MylesBorins pushed a commit that referenced this pull request

Nov 3, 2020
#34843 was cherry-picked onto
`v12.x-staging` in 961844d but the `fs/promises` API, as used
in the examples, is only available from Node.js 14. Change the
added examples to use `require(fs).promises` instead.

PR-URL: #35760
Fixes: #35740
Refs: #34843
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>

MylesBorins pushed a commit that referenced this pull request

Nov 16, 2020
#34843 was cherry-picked onto
`v12.x-staging` in 961844d but the `fs/promises` API, as used
in the examples, is only available from Node.js 14. Change the
added examples to use `require(fs).promises` instead.

PR-URL: #35760
Fixes: #35740
Refs: #34843
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>