unused-dependencies false positive for CLI tools used in scripts #107
-
|
Packages that ship a binary (via the Example — {
"scripts": {
"lint": "publint --strict && attw --profile esm-only --pack ."
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2"
}
}fallow flags The mapping is detectable: Expected behavior: packages whose binary is invoked in a Current workaround: add to {
"ignoreDependencies": ["@arethetypeswrong/cli"]
}Is this something fallow could detect? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Thanks for the report! This is now fixed in v2.34.0. Fallow now reads dependency Handles both
Also probes workspace-level Upgrade: |
Beta Was this translation helpful? Give feedback.
Thanks for the report! This is now fixed in v2.34.0.
Fallow now reads dependency
package.jsonbinfields fromnode_modules/and builds a reverse map (binary name → package name). Soattwcorrectly resolves to@arethetypeswrong/cli, and the false positive is gone.Handles both
binforms:"bin": { "attw": "./bin/cli.js" }→ keys are binary names"bin": "./cli.js"→ binary name derived from package nameAlso probes workspace-level
node_modules/for non-hoisted setups (pnpm strict, Yarn workspaces).Upgrade:
npm install -D fallow@latestor download from the release page.