Skip to content

Commit 1c4b902

Browse files
authored
chore: remove make-dir dependency (#742)
1 parent 18d5f80 commit 1c4b902

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

lib/install.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const log = require('npmlog');
1010
const existsAsync = fs.exists || path.exists;
1111
const versioning = require('./util/versioning.js');
1212
const napi = require('./util/napi.js');
13-
const makeDir = require('make-dir');
1413
// for fetching binaries
1514
const fetch = require('node-fetch');
1615
const tar = require('tar');
@@ -208,7 +207,7 @@ function install(gyp, argv, callback) {
208207
log.info('check', 'checked for "' + binary_module + '" (not found)');
209208
}
210209

211-
makeDir(to).then(() => {
210+
fs.promises.mkdir(to, { recursive: true }).then(() => {
212211
const fileName = from.startsWith('file://') && from.slice('file://'.length);
213212
if (fileName) {
214213
extract_from_local(fileName, to, after_place);

lib/package.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const log = require('npmlog');
1010
const versioning = require('./util/versioning.js');
1111
const napi = require('./util/napi.js');
1212
const existsAsync = fs.exists || path.exists;
13-
const makeDir = require('make-dir');
1413
const tar = require('tar');
1514

1615
function readdirSync(dir) {
@@ -49,7 +48,7 @@ function _package(gyp, argv, callback) {
4948
}
5049
return false;
5150
};
52-
makeDir(path.dirname(tarball)).then(() => {
51+
fs.promises.mkdir(path.dirname(tarball), { recursive: true }).then(() => {
5352
let files = readdirSync(from);
5453
const base = path.basename(from);
5554
files = files.map((file) => {

lib/testpackage.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const versioning = require('./util/versioning.js');
1212
const napi = require('./util/napi.js');
1313
const testbinary = require('./testbinary.js');
1414
const tar = require('tar');
15-
const makeDir = require('make-dir');
1615

1716
function testpackage(gyp, argv, callback) {
1817
const package_json = gyp.package_json;
@@ -28,7 +27,7 @@ function testpackage(gyp, argv, callback) {
2827
log.info('install', 'unpacking [' + entry.path + ']');
2928
}
3029

31-
makeDir(to).then(() => {
30+
fs.promises.mkdir(to, { recursive: true }).then(() => {
3231
tar.extract({
3332
file: tarball,
3433
cwd: to,

package-lock.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"dependencies": {
2626
"detect-libc": "^2.0.0",
2727
"https-proxy-agent": "^5.0.0",
28-
"make-dir": "^3.1.0",
2928
"node-fetch": "^2.6.7",
3029
"nopt": "^7.2.1",
3130
"npmlog": "^7.0.1",

0 commit comments

Comments
 (0)