From e9dd64b6f0a17057e2216de0535eefa30e4c925d Mon Sep 17 00:00:00 2001 From: AnnAngela Date: Wed, 6 Apr 2022 10:20:57 +0800 Subject: [PATCH] Update comments of fs-rmSync.js --- extra/fs-rmSync.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extra/fs-rmSync.js b/extra/fs-rmSync.js index 4c12f22e..8d361615 100644 --- a/extra/fs-rmSync.js +++ b/extra/fs-rmSync.js @@ -4,7 +4,10 @@ const fs = require("fs"); * to avoid the runtime deprecation warning triggered for using `fs.rmdirSync` with `{ recursive: true }` in Node.js v16, * or the `recursive` property removing completely in the future Node.js version. * See the link below. - * @link https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true- + * + * @todo Once we drop the support for Node.js v14 (or at least versions before v14.14.0), we can safely replace this function with `fs.rmSync`, since `fs.rmSync` was add in Node.js v14.14.0 and currently we supports all the Node.js v14 versions that include the version before the v14.14.0, and this function have almost the same signature with `fs.rmSync`. + * @link https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true- the deprecation infomation of `fs.rmdirSync` + * @link https://nodejs.org/docs/latest-v16.x/api/fs.html#fsrmsyncpath-options the document of `fs.rmSync` * @param {fs.PathLike} path Valid types for path values in "fs". * @param {fs.RmDirOptions} [options] options for `fs.rmdirSync`, if `fs.rmSync` is available and property `recursive` is true, it will automatically have property `force` with value `true`. */