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 .gitignore
if both yarn.lock
and package-lock.json
exist.
#6
Comments
Hi |
This feels like a highly opinionated solution (which is ok) for a use case that I don't feel provides a clear signal about the user's intention (compared to having specific files present or package managers installed). To elaborate, I can see potential situations where the lockfiles are ignored in a Is there a way to accommodate both cases? |
Hi My original / first answser was not very clear, it's true ;) @camacho , as I explained, it's already the case about => Why choose absolutly yarn if you see a yarn.lock file in the project ? You see what I mean :) Allowing to gitignore one of them, this allow for each user / developer to have locally his own config file directly from the gitignore file. HOWEVER, without the feature requested in this thread, I can't let the yarn.lock file in the project on github for example, so when I run yarn, I don't use the locked libraries if I don't already have the yarn.lock file locally ;) Anyway, I hope that will be more clear. Even if, when I wrote this mesage, I was lost during few seconds :p |
Thanks for the response! I better understand the case you are explaining. I am still hesitant because I see the strength of the signal from an ignore file being weaker than the signal from the "yarn.lock file in the project", as you wrote. I should take some time to think about it more. The idea is clever and addresses a use case I had not considered. |
If
yarn.lock
andpackage-lock.json
both exist, it could be better if we can check:If
yarn.lock
is ignored, we can assume that the project usesnpm
maybe.If
package-lock.json
is ignored, we can assume that the project usesyarn
maybe.The text was updated successfully, but these errors were encountered: