-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support resolving jest-junit file dependencies #835
Conversation
commit: |
Excellent
Maybe we could add e.g.
Knip does not need to verify functional/correctness (e.g. if jest-jsunit would crash on missing file we don't need to report that because it should be fixed anyway). If we know that items are files (and can't be dependencies), we can use |
ca2f994
to
1132265
Compare
How it currently works if the configured file would not exist:
So in where you quote me I was referring to the Let's forget about
This exception is there because recently did I large refactor (to introduce the So the question remains, should we use Btw this does give me good input to tinker about, this whole |
🚀 This pull request is included in v5.37.0. See Release 5.37.0 for release notes. Using Knip in a commercial project? Please consider becoming a sponsor. |
Great! Thanks for reviewing the PR and taking the time 🎉 |
Thanks for your help! Also see https://bsky.app/profile/webpro.nl/post/3lavdqcaecc2n :) |
Hello, since updating to knip 5.37.0 (Issue persists in 5.37.1), Knip complains about "unresolved imports" errors regarding As far as I understand this I do not need to have these files in the repository for jest-junit to work. Is there something I'm missing? Thank you :) |
Oops, yes please file an issue and we'll look into it shortly. |
Yeah its what i feared! I was wrong that both files are always required. We should only identify deps explicitly defined in the config here |
This PR
Adds support for resolving dependencies from
jest-junit
reporter configuration.See https://github.com/jest-community/jest-junit?tab=readme-ov-file#configuration
Files declared through the combination of
from
jest-jsunit
configuration are now correctly reported as used.Things to consider
jest-jsunit
is used. They both have default values in the configuration. But could be good to just double check so we don't report unused files incorrectly if these files don't exist and should not exist. I'm not sure if jest-jsunit can work with the absence of properties file or a suit properties file or both.