Skip to content

Commit 5d2b876

Browse files
Sarah Dayanclaude
andcommitted
chore: replace mkdirp with native fs.mkdirSync
Node.js has supported `fs.mkdirSync(path, { recursive: true })` since v10.12.0. This removes the need for the mkdirp package. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent cb4410f commit 5d2b876

4 files changed

Lines changed: 2 additions & 10 deletions

File tree

packages/shipjs/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"ejs": "^3.1.10",
4848
"globby": "^14.1.0",
4949
"inquirer": "^12.5.0",
50-
"mkdirp": "^3.0.1",
5150
"open": "^10.1.2",
5251
"prettier": "^3.5.3",
5352
"serialize-javascript": "^6.0.2",

packages/shipjs/src/step/setup/CI/addCircleCIConfig.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import fs from 'fs';
22
import path from 'path';
33

44
import ejs from 'ejs';
5-
import { mkdirpSync } from 'mkdirp';
65
import { getGitConfig } from 'shipjs-lib';
76

87
import { info, warning } from '../../../color.js';
@@ -41,7 +40,7 @@ export default ({ baseBranch, schedulePrepare, cronExpr, dir, dryRun }) =>
4140
print(`.circleci/config.yml`);
4241
print(content);
4342
} else {
44-
mkdirpSync(path.dirname(filePath));
43+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
4544
fs.writeFileSync(filePath, content);
4645
}
4746
return () => {

packages/shipjs/src/step/setup/CI/addGitHubActions.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import fs from 'fs';
22
import path from 'path';
33

44
import ejs from 'ejs';
5-
import { mkdirpSync } from 'mkdirp';
65

76
import { info, warning } from '../../../color.js';
87
import { print } from '../../../util/index.js';
@@ -71,7 +70,7 @@ function createGitHubAction({ content, actionPath, dir, dryRun }) {
7170
print(actionPath);
7271
print(content);
7372
} else {
74-
mkdirpSync(path.dirname(filePath));
73+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
7574
fs.writeFileSync(filePath, content);
7675
}
7776
return () => {

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6308,11 +6308,6 @@ mkdirp@^1.0.3:
63086308
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
63096309
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
63106310

6311-
mkdirp@^3.0.1:
6312-
version "3.0.1"
6313-
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50"
6314-
integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==
6315-
63166311
modify-values@^1.0.1:
63176312
version "1.0.1"
63186313
resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"

0 commit comments

Comments
 (0)