depcheck-detector-execa
Advanced tools
Comparing version
import { compact, filter, flatMap, flatten, groupBy, join, keys, map, mapValues, split, uniq } from '@dword-design/functions'; | ||
import fs from 'fs-extra'; | ||
import moduleRoot from 'module-root'; | ||
import parsePackagejsonName from 'parse-packagejson-name'; | ||
const getSegments = node => { | ||
@@ -40,3 +41,3 @@ if (node.callee?.object?.name === 'execa' && ['command', 'commandSync'].includes(node.callee?.property?.name) || ['execaCommand', 'execaCommandSync'].includes(node.callee?.name)) { | ||
const bin = packageConfig.bin || {}; | ||
const binaries = typeof bin === 'string' ? [packageConfig.name] : (_bin = bin, keys(_bin)); | ||
const binaries = typeof bin === 'string' ? [parsePackagejsonName(packageConfig.name).fullName] : (_bin = bin, keys(_bin)); | ||
return _binaries = binaries, map(binary => ({ | ||
@@ -43,0 +44,0 @@ binary, |
{ | ||
"name": "depcheck-detector-execa", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Detector for depcheck that finds dependencies in execa calls.", | ||
@@ -28,3 +28,4 @@ "repository": "dword-design/depcheck-detector-execa", | ||
"fs-extra": "^11.1.0", | ||
"module-root": "npm:@dword-design/module-root@^0" | ||
"module-root": "npm:@dword-design/module-root@^0", | ||
"parse-packagejson-name": "^1.0.1" | ||
}, | ||
@@ -31,0 +32,0 @@ "devDependencies": { |
9832
1.34%53
1.92%4
33.33%+ Added