Skip to content

Commit

Permalink
Merge pull request #839 from babel/replace-mkdir-by-make-dir
Browse files Browse the repository at this point in the history
chore: replace mkdirp by make-dir@2
  • Loading branch information
nicolo-ribaudo committed Mar 23, 2020
2 parents 3ff9926 + 47958ca commit adac459
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"find-cache-dir": "^2.1.0",
"loader-utils": "^1.4.0",
"mkdirp": "^0.5.3",
"make-dir": "^2.1.0",
"pify": "^4.0.1",
"schema-utils": "^2.6.5"
},
Expand Down
5 changes: 2 additions & 3 deletions src/cache.js
Expand Up @@ -12,7 +12,6 @@ const os = require("os");
const path = require("path");
const zlib = require("zlib");
const crypto = require("crypto");
const mkdirpOrig = require("mkdirp");
const findCacheDir = require("find-cache-dir");
const promisify = require("pify");

Expand All @@ -24,7 +23,7 @@ const readFile = promisify(fs.readFile);
const writeFile = promisify(fs.writeFile);
const gunzip = promisify(zlib.gunzip);
const gzip = promisify(zlib.gzip);
const mkdirp = promisify(mkdirpOrig);
const makeDir = require("make-dir");

/**
* Read the contents from the compressed file.
Expand Down Expand Up @@ -99,7 +98,7 @@ const handleCache = async function(directory, params) {

// Make sure the directory exists.
try {
await mkdirp(directory);
await makeDir(directory);
} catch (err) {
if (fallback) {
return handleCache(os.tmpdir(), params);
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Expand Up @@ -4451,7 +4451,7 @@ mixin-deep@^1.2.0:
for-in "^1.0.2"
is-extendable "^1.0.1"

mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3:
mkdirp@^0.5.0, mkdirp@^0.5.1:
version "0.5.3"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c"
integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==
Expand Down

0 comments on commit adac459

Please sign in to comment.