Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove make-dir dependency #742

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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