Update fs-rmSync.js

This commit is contained in:
AnnAngela 2022-03-02 16:10:14 +08:00 committed by GitHub
parent 783173fd1f
commit 88a798704b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
const fs = require("fs"); const fs = require("fs");
/** /**
* Detect if `fs.rmSync` is available * Detect if `fs.rmSync` is available
* to avoid the runtime warning triggered for using `fs.rmdirSync` with `{ recursive: true }` in Node.js v16, * 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. * or the `recursive` property removing completely in the future Node.js version.
* See the link below. * See the link below.
* @link https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true- * @link https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true-