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

dep: remove mkdirp dependency #2084

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ before_script:
- npm list
script:
- node -e 'require("npmlog").level="verbose"; require("./lib/find-python")(null,()=>{})'
- npm test
- node --version
# Standard no longer supports Node.js v6
- if [[ $(node --version) != 'v6.17.0' ]]; then npm test; fi
- GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
notifications:
on_success: change
Expand Down
5 changes: 3 additions & 2 deletions lib/configure.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict'

const nodeFs = require('fs')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this and just use fs, it should pass through properly

const fs = require('graceful-fs')
const path = require('path')
const log = require('npmlog')
const os = require('os')
const mkdirp = require('mkdirp')
const processRelease = require('./process-release')
const win = process.platform === 'win32'
const findNodeDirectory = require('./find-node-directory')
Expand Down Expand Up @@ -73,7 +73,8 @@ function configure (gyp, argv, callback) {

function createBuildDir () {
log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir)
mkdirp(buildDir, function (err, isNew) {

nodeFs.mkdir(buildDir, { recursive: true }, function (err, isNew) {
if (err) {
return callback(err)
}
Expand Down
6 changes: 3 additions & 3 deletions lib/install.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'

const nodeFs = require('fs')
const fs = require('graceful-fs')
const os = require('os')
const tar = require('tar')
Expand All @@ -8,7 +9,6 @@ const crypto = require('crypto')
const log = require('npmlog')
const semver = require('semver')
const request = require('request')
const mkdir = require('mkdirp')
const processRelease = require('./process-release')
const win = process.platform === 'win32'
const getProxyFromURI = require('./proxy')
Expand Down Expand Up @@ -114,7 +114,7 @@ function install (fs, gyp, argv, callback) {
log.verbose('ensuring nodedir is created', devDir)

// first create the dir for the node dev files
mkdir(devDir, function (err, created) {
nodeFs.mkdir(devDir, { recursive: true }, function (err, created) {
if (err) {
if (err.code === 'EACCES') {
eaccesFallback(err)
Expand Down Expand Up @@ -310,7 +310,7 @@ function install (fs, gyp, argv, callback) {
log.verbose(name, 'dir', dir)
log.verbose(name, 'url', libUrl)

mkdir(dir, function (err) {
nodeFs.mkdir(dir, { recursive: true }, function (err) {
if (err) {
return done(err)
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"env-paths": "^2.2.0",
"glob": "^7.1.4",
"graceful-fs": "^4.2.2",
"mkdirp": "^0.5.1",
"nopt": "^4.0.1",
"npmlog": "^4.1.2",
"request": "^2.88.0",
Expand Down