Just opening an issue to track this.
A recursive flag was added to fs.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/removing mkdirp/mkdirs/ensureDir when all supported Node versions support it (separate discussion for another day).
Just opening an issue to track this.
A
recursiveflag was added tofs.mkdirin 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
recursiveflag is supported in the running Node version: nodejs/node#22302.When this feature lands, I'd like to use it for
ensureDirin environments that support it. Long-term, we may consider deprecating/removingmkdirp/mkdirs/ensureDirwhen all supported Node versions support it (separate discussion for another day).