Skip to content

Commit

Permalink
chore: remove mkdirp
Browse files Browse the repository at this point in the history
Now that we expect Node v10+, we can pass the `recursive` option to
`fs.mkdir`.

Fixes #1913
  • Loading branch information
gabegorelick committed Feb 19, 2020
1 parent 1f47f1a commit e38b117
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
9 changes: 1 addition & 8 deletions lib/back.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ try {
// do nothing, probably in browser
}

let mkdirp
try {
mkdirp = require('mkdirp')
} catch (err) {
// do nothing, probably in browser
}

/**
* nock the current function with the fixture given
*
Expand Down Expand Up @@ -176,7 +169,7 @@ const record = {
typeof outputs === 'string' ? outputs : JSON.stringify(outputs, null, 4)
debug('recorder outputs:', outputs)

mkdirp.sync(path.dirname(fixture))
fs.mkdirSync(path.dirname(fixture), {recursive: true})
fs.writeFileSync(fixture, outputs)
}
},
Expand Down
41 changes: 35 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"debug": "^4.1.0",
"json-stringify-safe": "^5.0.1",
"lodash": "^4.17.13",
"mkdirp": "^1.0.0",
"propagate": "^2.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit e38b117

Please sign in to comment.