voidcosmos / voidcosmos/npkill
Excluding `node_modules` from current directory excludes all nested `node_modules`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 9.4k
- Forks
- 254
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
npx npkill -y --no-check-update --exclude "node_modules" misses all node_modules folders deeply nested in the current working directory. npx npkill -y --no-check-update --exclude "./node_modules" has the same issue as well.
Expected behavior
It should find all nested node_modules, and exclude only the one node_modules folder located in the current directory.
Alternative that works correctly: npx npkill -y --no-check-update --exclude "$(pwd)/node_modules" (passing the absolute path works).
- OS: MacOS Sequoia 15.2
- npkill version 0.12.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the two relative-path commands from the issue, then compare it with the absolute-path variant while tracing exclude-path handling. Done means excluding ./node_modules finds nested node_modules directories but omits only the current directory's folder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100