From 8b4a6a17fbd016319e7197bde766ff988734bae5 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Thu, 17 Oct 2019 11:55:17 +0200 Subject: [PATCH] refactor: drop resolve-from dependency --- index.js | 3 +-- package-lock.json | 3 ++- package.json | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 337de71..85b18fb 100644 --- a/index.js +++ b/index.js @@ -16,9 +16,8 @@ const uidNumber = require('uid-number') const umask = require('umask') const which = require('which') const byline = require('byline') -const resolveFrom = require('resolve-from') -const DEFAULT_NODE_GYP_PATH = resolveFrom(__dirname, 'node-gyp/bin/node-gyp') +const DEFAULT_NODE_GYP_PATH = require.resolve('node-gyp/bin/node-gyp') const hookStatCache = new Map() let PATH = isWindows ? 'Path' : 'PATH' diff --git a/package-lock.json b/package-lock.json index 7df2276..46783ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4007,7 +4007,8 @@ "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true }, "restore-cursor": { "version": "2.0.0", diff --git a/package.json b/package.json index cdc6812..42a138c 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "byline": "^5.0.0", "graceful-fs": "^4.1.15", "node-gyp": "^5.0.2", - "resolve-from": "^4.0.0", "slide": "^1.1.6", "uid-number": "0.0.6", "umask": "^1.1.0",