-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recursive mkdir coming to Node core #619
Comments
This was pushed back, and will not be going into Node 10.9.0: nodejs/node#22295 (comment) |
Unblocked as of nodejs/node#21875 (comment); should land in a future v10.x release. |
This was released in Node v10.12.0; perhaps we should revisit this? |
Just dropping this here for future reference: https://github.com/isaacs/node-mkdirp#choosing-a-recursive-mkdir-implementation |
I'm inclined to fork https://github.com/sindresorhus/make-dir into this project to use as the implementation here. It uses the native solution where possible, and the fallback solution fixes #524. The one sticker is that it depends on |
Resolves #619 Everything should work similarly to how it did before; except that we no longer return a file path on success (to match fs.mkdir). Also, errors may be different.
Resolves #619 Everything should work similarly to how it did before; except that we no longer return a file path on success (to match fs.mkdir). Also, errors may be different.
Resolves #619 Everything should work similarly to how it did before; except that we no longer return a file path on success (to match fs.mkdir). Also, errors may be different.
* BREAKING: Use internal fork of make-dir for mkdirs implementation Resolves #619 Everything should work similarly to how it did before; except that we no longer return a file path on success (to match fs.mkdir). Also, errors may be different. * Hopefully fix Windows tests - Error codes are different - Match fs.mkdir behavior on Windows when creating root * Port sindresorhus/make-dir#24 * Add comment for clarity * Use at-least-node for version sniffing * Consistent error codes across OSes * Allow different error codes on different Node versions
Just opening an issue to track this.
A
recursive
flag was added tofs.mkdir
in nodejs/node#21875.It's unreleased so far, but it's in the 10.9.0 release proposal: nodejs/node#22295.
There is currently an open debate on how to determine in code whether the
recursive
flag is supported in the running Node version: nodejs/node#22302.When this feature lands, I'd like to use it for
ensureDir
in environments that support it. Long-term, we may consider deprecating/removingmkdirp
/mkdirs
/ensureDir
when all supported Node versions support it (separate discussion for another day).The text was updated successfully, but these errors were encountered: