-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Warn when unsupported ava.config.json files are encountered #2962
Conversation
Thanks for this @razor-x. I'm thinking we shouldn't print to the console in |
🤦🏻 🤦🏻 That's actually hilarious. I'm pretty sure what happened is there are so many tools that have the pattern of putting configs in Anyway, I agree about not logging from this file. Instead of changing the return signature though, how about passing a callback |
Returning it makes it easier to print a nice list of encountered files, that's harder to do with a callback. |
I looked at updating the return value, but that seemed kinda stressful as it's a breaking change for that function and would require updating its usage in all tests and other files. I ended up opting for the callback instead since it's a backwards compatible change. Hopefully this is ok with you. It still produces a nice list since it calls the function once with an array. I ran a quick local test on the cli to check the warning. This is what it looks like. |
Cheers @razor-x. I haven't had a chance to look at this yet though. |
5c8f8bd
to
29710ce
Compare
No worries. I fixed the tests. |
@razor-x could you allow me to push to your branch? I've got some commits ready that make this return the unsupported files rather than using the callback but I don't seem to be able to push them to the PR. |
Done. Looks like GH does not support that option for org-owned forks, so I just added you to repo. |
@razor-x it should be this checkbox on the right: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork |
Strange, it's normally not an issue. |
@razor-x what do you think of the changes? |
I think it's this: isaacs/github#1681 I got into the habit of putting all my forks on a separate org so they don't clutter up my main account.
All good, thanks. |
Lovely, thanks @razor-x! |
See #2957 (comment)