resolve-bin
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -28,5 +28,5 @@ 'use strict'; | ||
const path = resolveBin.sync('dependency-cruiser', { executable: 'depcruise' }); | ||
var path = resolveBin.sync('dependency-cruiser', { executable: 'depcruise' }); | ||
console.log(path); | ||
// => [..]/resolve-bin/node_modules/dependency-cruiser/bin/dependency-cruise.js |
@@ -7,6 +7,7 @@ 'use strict'; | ||
function requireResolve(name) { | ||
var requireOpts = { paths: require.main.paths }; | ||
try { | ||
return require.resolve(name); | ||
return require.resolve(name, requireOpts); | ||
} catch (err) { | ||
const modJson = require.resolve(name+"/package.json"); | ||
var modJson = require.resolve(name+"/package.json", requireOpts); | ||
return path.dirname(modJson) | ||
@@ -13,0 +14,0 @@ } |
{ | ||
"name": "resolve-bin", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Resolves the full path to the bin file of a given package by inspecting the \"bin\" field in its package.json.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "tap test/*.js" | ||
"test": "tap test/{**/*,*}.test.js" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16056
15
254