-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Check for node_modules presence instead of isInternal for Eleventy plugin #462
Conversation
Great! This is the fiddling that we sometimes need to get right. Ideally we don't need to actually glob or resolve modules here, because it could degrade performance and/or duplicate unnecessary work. But I've done it before, sometimes there's no way around it: https://github.com/webpro/knip/blob/main/packages/knip/src/plugins/vitest/index.ts#L27-L33 |
Happy to merge this! Any chance you could add something to an existing test/fixture to prevent regression later on? |
Are you suggesting for me to do this? Not sure what this means.
Yep, I'm trying to think of how to do it... |
No, sorry, just saying it's sometimes necessary and this is an example of when/how.
What I often try to do is add something to a fixture that makes the related test fail. Then change the implementation to make the test pass. In this case you could add a |
Still not sure I get it. I'm not even positive I know why that was happening. How did I even realize this was an issue? 😆 |
In the
Run the test:
Or run
And so on :) |
Ah, right, I forgot about that kind of test. Thank you, I'll do that. |
Should be good now, I added that line and ran tests with the changes in this PR (fine) and without (error). |
🚀 This pull request is included in v4.2.0. See Release 4.2.0 for release notes. |
Thanks! I've also added that file to reflect it being "used". |
Resolves #460 (comment). Would love to hear your thoughts on this.