Closed vubogovich closed 4 months ago
If yup is listed in both root and shared package, seems it's unused in root. Expected behavior?
If yup is listed in both root and shared package, seems it's unused in root. Expected behavior?
Expected behavior is all issues from all packages are reported.
It does not matter what dependency, now replaced yup
with zod
in packages/shared
in my example. Both of them unused but only root one is reported. When yup
is removed from the root, knip
says all good so it ignores packages/shared
having unused file and dependency.
Sorry, maybe checking that from phone late at night wasn't the best idea.
Non-glob additional workspace names were indeed not added properly (e.g. just "packages/*": {}
seems to work fine).
Thanks for the report!
:rocket: This issue has been resolved in v5.25.2. See Release 5.25.2 for release notes.
Using Knip in a commercial project? Please consider becoming a sponsor.
Interesting that I had an issue with the glob workspace name in 5.25.1
but the new version 5.25.2
works like a charm 🥇
Thanks a lot for the prompt solution!
Thanks @vubogovich!
Our monorepo consists of independent packages and does not use npm workspaces yet. As a result, it and requires
npm install
for each of the package separately. We have setup prettier and eslint in the root package and typescript is configurated independently.knip
is installed on the root package andknip.json
has the following content:However,
knip
reports issues only in the root package.knip --workspace packages/shared
suggested in the docs didn't help.The issues were unused dependency and file
unused.ts
. Very nice template for reproductions 👍 here is my version.Thanks a lot for very useful tool! I used it in the normal repo and enjoyed a lot ❤️