which
Advanced tools
Comparing version 3.0.1 to 4.0.0
@@ -1,2 +0,2 @@ | ||
const isexe = require('isexe') | ||
const { isexe, sync: isexeSync } = require('isexe') | ||
const { join, delimiter, sep, posix } = require('path') | ||
@@ -34,7 +34,3 @@ | ||
['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter) | ||
const pathExt = pathExtExe.split(optDelimiter).reduce((acc, item) => { | ||
acc.push(item) | ||
acc.push(item.toLowerCase()) | ||
return acc | ||
}, []) | ||
const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]) | ||
if (cmd.includes('.') && pathExt[0] !== '') { | ||
@@ -94,3 +90,3 @@ pathExt.unshift('') | ||
const withExt = p + ext | ||
const is = isexe.sync(withExt, { pathExt: pathExtExe, ignoreErrors: true }) | ||
const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true }) | ||
if (is) { | ||
@@ -97,0 +93,0 @@ if (!opt.all) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"repository": { | ||
@@ -17,7 +17,7 @@ "type": "git", | ||
"dependencies": { | ||
"isexe": "^2.0.0" | ||
"isexe": "^3.1.1" | ||
}, | ||
"devDependencies": { | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.14.1", | ||
"@npmcli/template-oss": "4.18.0", | ||
"tap": "^16.3.0" | ||
@@ -46,9 +46,15 @@ }, | ||
"engines": { | ||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0" | ||
"node": "^16.13.0 || >=18.0.0" | ||
}, | ||
"templateOSS": { | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.14.1", | ||
"ciVersions": [ | ||
"16.13.0", | ||
"16.x", | ||
"18.0.0", | ||
"18.x" | ||
], | ||
"version": "4.18.0", | ||
"publish": "true" | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7505
0
135
+ Addedisexe@3.1.1(transitive)
- Removedisexe@2.0.0(transitive)
Updatedisexe@^3.1.1