Uh oh!
There was an error while loading. Please reload this page.
fs: add recursive option to rmdir() - #29168
Conversation
Trott
commented
Aug 18, 2019
FWIW, other than the docs and tests that need to be added, this looks good to me. |
silverwind
commented
Aug 19, 2019
Liking this as well, good call with the lazy loading. Waiting for docs/tests as well. Maybe some of the edge cases like the Windows ones can be included in the tests as well, but it's not a strict requirement. |
97b7a02 to
e293b5dComparecjihrig
commented
Aug 19, 2019
OK, this is ready for review. It occurred to me that we may want to mark this as experimental for a few releases. Any thoughts? |
nodejs-github-bot
commented
Aug 19, 2019
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Aug 20, 2019
CI: https://ci.nodejs.org/job/node-test-pull-request/25126/ EDIT: CI was yellow. |
bcoe
left a comment
There was a problem hiding this comment.
Having thought about rimraf way too much over the last few months, I ultimately come around to liking the consistency that a recursive option introduces (in relation to our implementation of mkdir recursive)...
I think there's meat to the argument that this makes rmdir with an option combine both unlink and rmdir behavior, which is a bit weird, but I feel this is ultimately the better user experience.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Trott
commented
Aug 20, 2019
We need to update license-builder.sh and re-run it? |
nodejs-github-bot
commented
Aug 21, 2019
This commit adds a recursive option to fs.rmdir(), fs.rmdirSync(), and fs.promises.rmdir(). The implementation is a port of the npm module rimraf. PR-URL: #29168 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Trott
commented
Aug 23, 2019
Landed in 53816cc |
ljharb
commented
Aug 24, 2019
Sorry i missed the PR; nobody posted a comment in #28208 indicating this one was opened. Does this mean that to feature detect this option, i have to try/catch around passing the wrong type of options object into the sync function? Am i missing a less invasive mechanism? |
Correct. It's the same with the |
This commit adds a recursive option to fs.rmdir(), fs.rmdirSync(), and fs.promises.rmdir(). The implementation is a port of the npm module rimraf. PR-URL: #29168 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Notable changes: * deps: * Update npm to 6.10.3 (isaacs) #29023 * fs: * Add recursive option to rmdir() (cjihrig) #29168 * Allow passing true to emitClose option (Giorgos Ntemiris) #29212 * Add \*timeNs properties to BigInt Stats objects (Joyee Cheung) #21387 * net: * Allow reading data into a static buffer (Brian White) #25436 PR-URL: #29429
Notable changes: * deps: * Update npm to 6.10.3 (isaacs) #29023 * fs: * Add recursive option to rmdir() (cjihrig) #29168 * Allow passing true to emitClose option (Giorgos Ntemiris) #29212 * Add \*timeNs properties to BigInt Stats objects (Joyee Cheung) #21387 * net: * Allow reading data into a static buffer (Brian White) #25436 PR-URL: #29429
Notable changes: * deps: * Update npm to 6.10.3 (isaacs) #29023 * fs: * Add recursive option to rmdir() (cjihrig) #29168 * Allow passing true to emitClose option (Giorgos Ntemiris) #29212 * Add \*timeNs properties to BigInt Stats objects (Joyee Cheung) #21387 * net: * Allow reading data into a static buffer (Brian White) #25436 PR-URL: #29429
mysticatea
commented
Sep 4, 2019
I guess |
silverwind
commented
May 11, 2020
Any chance of a backport to v10 for this (asking for sindresorhus/del#124)? |
MylesBorins
commented
May 11, 2020
via email
10.x is in maintenance already so I think we missed the boat to do another
semver minor …On Mon, May 11, 2020, 11:02 AM silverwind ***@***.***> wrote:
Any chance of a backport to v10 for this (asking for sindresorhus/del#124
<sindresorhus/del#124>)?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#29168 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADZYV26DAS6E6RI276YBYTRRAHQXANCNFSM4IMMFUTA>
.
|
silverwind
commented
May 11, 2020
Fine with me. Agree it would be odd to add features like this so late in the cycle. |
This PR adds a
recursiveoption tofs.rmdir(),fs.rmdirSync(), andfs.promises.rmdir(). The implementation is a port of the npm modulerimraf. I added an option tormdir()to match the approach taken with core's recursivemkdir().This is my alternative to #28208 from #28208 (review).
I'm marking this PR as a work in progress, as I haven't added docs yet.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes