Skip to content

Commit 108f144

Browse files
committed
[pruning] rm mkdirp dependency (fix bcherny#618)
1 parent a1d22d8 commit 108f144

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

package-lock.json

-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"js-yaml": "^4.1.0",
5656
"lodash": "^4.17.21",
5757
"minimist": "^1.2.8",
58-
"mkdirp": "^3.0.1",
5958
"prettier": "^3.2.5"
6059
},
6160
"devDependencies": {

src/cli.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/usr/bin/env node
22

33
import minimist from 'minimist'
4-
import {readFileSync, writeFileSync, existsSync, lstatSync, readdirSync} from 'fs'
5-
import * as mkdirp from 'mkdirp'
4+
import {readFileSync, writeFileSync, existsSync, lstatSync, readdirSync, mkdirSync} from 'fs'
65
import {glob} from 'glob'
76
import isGlob from 'is-glob'
87
import {join, resolve, dirname} from 'path'
@@ -119,7 +118,7 @@ function outputResult(result: string, outputPath: string | undefined): void {
119118
process.stdout.write(result)
120119
} else {
121120
if (!isDir(dirname(outputPath))) {
122-
mkdirp.sync(dirname(outputPath))
121+
mkdirSync(dirname(outputPath), {recursive: true})
123122
}
124123
return writeFileSync(outputPath, result)
125124
}

0 commit comments

Comments
 (0)