npm-cli-dir
Advanced tools
Comparing version 2.0.2 to 3.0.0-0
18
index.js
'use strict'; | ||
const pathLib = require('path'); | ||
const {dirname, join, parse} = require('path'); | ||
const dirname = pathLib.dirname; | ||
const join = pathLib.join; | ||
const parse = pathLib.parse; | ||
const npmCliPath = require('npm-cli-path'); | ||
const getNpmCliDir = npmCliPath().then(result => { | ||
const path = parse(result); | ||
const root = path.root; | ||
result = path.dir; | ||
const getNpmCliDir = (async () => { | ||
const path = parse(await npmCliPath()); | ||
const {root} = path; | ||
let result = path.dir; | ||
@@ -26,6 +22,6 @@ do { | ||
return result; | ||
}); | ||
})(); | ||
module.exports = function npmCliDir() { | ||
module.exports = async function npmCliDir() { | ||
return getNpmCliDir; | ||
}; |
{ | ||
"name": "npm-cli-dir", | ||
"version": "2.0.2", | ||
"version": "3.0.0-0", | ||
"description": "Resolve the directory path where npm CLI is installed", | ||
@@ -34,10 +34,10 @@ "repository": "shinnn/npm-cli-dir", | ||
"dependencies": { | ||
"npm-cli-path": "^2.0.1" | ||
"npm-cli-path": "^2.0.3" | ||
}, | ||
"devDependencies": { | ||
"@shinnn/eslint-config-node": "^5.0.0", | ||
"eslint": "^4.16.0", | ||
"execa": "^0.9.0", | ||
"nyc": "^11.4.1", | ||
"tape": "^4.8.0" | ||
"eslint": "^4.19.1", | ||
"execa": "^0.10.0", | ||
"nyc": "^11.8.0", | ||
"tape": "^4.9.0" | ||
}, | ||
@@ -44,0 +44,0 @@ "eslintConfig": { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3559
20
2
Updatednpm-cli-path@^2.0.3