Skip to content

Commit

Permalink
chore: remove make-dir dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jul 8, 2024
1 parent 8edf1cc commit 713e964
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const log = require('npmlog');
const existsAsync = fs.exists || path.exists;
const versioning = require('./util/versioning.js');
const napi = require('./util/napi.js');
const makeDir = require('make-dir');
// for fetching binaries
const fetch = require('node-fetch');
const tar = require('tar');
Expand Down Expand Up @@ -208,7 +207,7 @@ function install(gyp, argv, callback) {
log.info('check', 'checked for "' + binary_module + '" (not found)');
}

makeDir(to).then(() => {
fs.promises.mkdir(to, { recursive: true }).then(() => {
const fileName = from.startsWith('file://') && from.slice('file://'.length);
if (fileName) {
extract_from_local(fileName, to, after_place);
Expand Down
3 changes: 1 addition & 2 deletions lib/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const log = require('npmlog');
const versioning = require('./util/versioning.js');
const napi = require('./util/napi.js');
const existsAsync = fs.exists || path.exists;
const makeDir = require('make-dir');
const tar = require('tar');

function readdirSync(dir) {
Expand Down Expand Up @@ -49,7 +48,7 @@ function _package(gyp, argv, callback) {
}
return false;
};
makeDir(path.dirname(tarball)).then(() => {
fs.promises.mkdir(path.dirname(tarball), { recursive: true }).then(() => {
let files = readdirSync(from);
const base = path.basename(from);
files = files.map((file) => {
Expand Down
3 changes: 1 addition & 2 deletions lib/testpackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const versioning = require('./util/versioning.js');
const napi = require('./util/napi.js');
const testbinary = require('./testbinary.js');
const tar = require('tar');
const makeDir = require('make-dir');

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

makeDir(to).then(() => {
fs.promises.mkdir(to, { recursive: true }).then(() => {
tar.extract({
file: tarball,
cwd: to,
Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"dependencies": {
"detect-libc": "^2.0.0",
"https-proxy-agent": "^5.0.0",
"make-dir": "^3.1.0",
"node-fetch": "^2.6.7",
"nopt": "^7.2.1",
"npmlog": "^7.0.1",
Expand Down

0 comments on commit 713e964

Please sign in to comment.