Ryan Zimmerman ab92b24370
BREAKING: Use internal fork of make-dir for mkdirs implementation (#756)
* 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 https://github.com/sindresorhus/make-dir/pull/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
2020-02-18 11:41:04 -05:00

15 lines
328 B
JavaScript

'use strict'
const u = require('universalify').fromPromise
const { makeDir: _makeDir, makeDirSync } = require('./make-dir')
const makeDir = u(_makeDir)
module.exports = {
mkdirs: makeDir,
mkdirsSync: makeDirSync,
// alias
mkdirp: makeDir,
mkdirpSync: makeDirSync,
ensureDir: makeDir,
ensureDirSync: makeDirSync
}