knip icon indicating copy to clipboard operation
knip copied to clipboard

Script discovery tests

Open hilja opened this issue 2 months ago • 3 comments

Not 100% if pkgScripts is how you tell it to treat program as a script. These obviously fail.

https://github.com/webpro-nl/knip/issues/1399

hilja avatar Dec 19 '25 13:12 hilja

I think a whole category of tests are missing, the pnpm program ... is covered really well, but there's just the basic case for pnpm script ... and node -r script.

hilja avatar Dec 19 '25 16:12 hilja

Feel free to add more cases. Please keep in mind I like to keep it a bit concise/sensible/maintainable, there's no need to test every possible case out there (e.g. that list of bun [command] cases are a bit much imho).

Cases that won't be fixed in this round are still useful to know about and we can t.skip.

webpro avatar Dec 20 '25 06:12 webpro

Fixed a few cases. Forgot to add: Knip does not aim to implement all the features all the various tools might have. It's on the basis of best-effort. That said, feel free to dive in!

webpro avatar Dec 21 '25 19:12 webpro

:rocket: This issue has been resolved in v5.83.1. See Release 5.83.1 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

webpro avatar Feb 06 '26 17:02 webpro