| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
FWIW, other than the docs and tests that need to be added, this looks good to me. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
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? |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/25126/ EDIT: CI was yellow. |
Sorry, something went wrong.
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.
Sorry, something went wrong.
|
We need to update license-builder.sh and re-run it? |
Sorry, something went wrong.
Sorry, something went wrong.
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>
|
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? |
Sorry, something went wrong.
Correct. It's the same with the recursive option for mkdir(). We had a lot of discussion around feature detection for that, but when it came down to it, people either didn't need feature detection, kept using the mkdirp package, or did sniffing on process.version/process.versions.node . Not everyone was thrilled about version sniffing but no solution was going to make everyone happy (as the rest of that issue thread and others make clear) and it seems to be working out OK. |
Sorry, something went wrong.
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
I guess fs.rmdirSync.length can be used to detect because the number of arguments was changed. |
Sorry, something went wrong.
|
Any chance of a backport to v10 for this (asking for sindresorhus/del#124)? |
Sorry, something went wrong.
|
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>
.
|
Sorry, something went wrong.
|
Fine with me. Agree it would be odd to add features like this so late in the cycle. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR adds a recursive option to fs.rmdir(), fs.rmdirSync(), and fs.promises.rmdir(). The implementation is a port of the npm module rimraf. I added an option to rmdir() to match the approach taken with core's recursive mkdir().
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