Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Sutherland <ian@iansutherland.ca>2020-10-09 00:21:56 +0300
committerBenjamin Coe <bencoe@google.com>2020-10-15 04:56:40 +0300
commit2002d90abdf91e862294daab90661aa62b4dabe3 (patch)
treeb7f06af2b1fce35ce9b55d4947ede71e31e3a7ce /doc/api/deprecations.md
parentab0af50ef8cd18eff18918cf380ad1127d4c4a24 (diff)
fs: deprecation warning on recursive rmdir
This is a follow up to #35494 to add a deprecation warning when using recursive rmdir. This only warns if you are attempting to remove a file or a nonexistent path. PR-URL: https://github.com/nodejs/node/pull/35562 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'doc/api/deprecations.md')
-rw-r--r--doc/api/deprecations.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md
index 32ddc5f16ae..60cf45672be 100644
--- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md
@@ -2666,12 +2666,15 @@ changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/35579
description: Documentation-only deprecation.
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/35562
+ description: Runtime deprecation.
-->
-Type: Documentation-only
+Type: Runtime
In future versions of Node.js, `fs.rmdir(path, { recursive: true })` will throw
-on nonexistent paths, or when given a file as a target.
+if `path` does not exist or is a file.
Use `fs.rm(path, { recursive: true, force: true })` instead.
[Legacy URL API]: url.md#url_legacy_url_api