Skip to content

Commit

Permalink
Merge pull request #609 from trivikr/remove-mkdirp
Browse files Browse the repository at this point in the history
Replace `mkdirp` with `fs.mkdirSync(path, { recursive: true })`
  • Loading branch information
ElonVolo authored Jul 17, 2024
2 parents 5c4fb00 + a8d204e commit eb1daea
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion bin/__tests__/jscodeshift-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const child_process = require('child_process');
const fs = require('fs');
const path = require('path');
const temp = require('temp');
const mkdirp = require('mkdirp');
const testUtils = require('../../utils/testUtils');
const {chdir} = require('process');

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
"babel-eslint": "^10.0.1",
"eslint": "8.56.0",
"jest": "^29.7.0",
"jsdoc": "^4.0.3",
"mkdirp": "^3.0.1"
"jsdoc": "^4.0.3"
},
"jest": {
"roots": [
Expand Down
3 changes: 1 addition & 2 deletions utils/testUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
'use strict';

const fs = require('fs');
const mkdirp = require('mkdirp');
const path = require('path');
const temp = require('temp');

function renameFileTo(oldPath, newFilename, extension = '') {
const projectPath = path.dirname(oldPath);
const newPath = path.join(projectPath, newFilename + extension);
mkdirp.sync(path.dirname(newPath));
fs.mkdirSync(path.dirname(newPath), { recursive: true });
fs.renameSync(oldPath, newPath);
return newPath;
}
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2429,11 +2429,6 @@ mkdirp@^1.0.4:
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==

mkdirp@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50"
integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==

[email protected]:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
Expand Down

0 comments on commit eb1daea

Please sign in to comment.