diff --git a/lib/util/fs.js b/lib/util/fs.js index f077f32..4068a43 100644 --- a/lib/util/fs.js +++ b/lib/util/fs.js @@ -3,9 +3,8 @@ const {promisify} = require('util') const {dirname} = require('path') const fs = require('fs') -const {remove} = require('fs-extra') +const {ensureDir, remove} = require('fs-extra') -const mkdirp = promisify(require('mkdirp')) const glob = promisify(require('glob')) const readdir = promisify(fs.readdir) @@ -17,12 +16,12 @@ const cache = new Set() async function ensureDirectoryExists(path) { if (cache.has(path)) return - await mkdirp(path) + await ensureDir(path) } async function recreateDirectory(path) { await remove(path) - await mkdirp(path) + await ensureDir(path) } async function createFile(path, data) { @@ -32,7 +31,6 @@ async function createFile(path, data) { } module.exports = { - mkdirp, glob, readdir, rename, diff --git a/package.json b/package.json index 3eb4c04..26d70d3 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "glob": "^7.1.6", "lodash": "^4.17.20", "mapshaper": "^0.4.123", - "mkdirp": "^0.5.1", "moment": "^2.27.0", "pumpify": "^2.0.1", "worker-farm": "^1.7.0",