-
Notifications
You must be signed in to change notification settings - Fork 22
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
Yarn 2 (berry) support #52
Comments
yarn 2 could be easily detected by just checking for the presence of some yarn 2 files and/or directories. Maybe also |
I think checking files would be faster and more consistent with the existing infra. I googled around a bit and found this blog listing generated files. I'd rather check a single file so which one would you think works the best? I'm also thinking about the possibility making these flags configurable in a future version. |
Checking
I think presence of .yarnrc.yml file is pretty good Here's some thinking that led to this: https://gist.github.com/devinrhode2/97b2f3c664052946ee0fe4b9cd746251 |
That sounds pretty solid to me, thanks for the investigation! I think using the same way I'm also still thinking about using |
I'm experimenting with yarn 2 and it seems like none of the flags work anymore. I think we'll only pass |
@devinrhode2 @JanMatas would you like to take a look? I'll merge and cut an alpha release if it seems okay. |
Hi, thanks for addressing this so fast! It certainly works for us, but I am a bit worried about deciding based on Alternatively, making the flags configurable and just mentioning the recommended setup in the readme ( |
Actually, I apologize for the previous comment - it seems like .yml extension is indeed only present with yarn2 (based on the blog you linked). In that case, I am very happy about this PR #53 👍 |
Merging and cutting a beta release then, thanks for review! |
Reopened the issue until the fix is confirmed. Also published an old version accidentally and had to publish again, so it's not alpha. @JanMatas can you try |
Hi, just played around and I am afraid it does not work. yarnhook now uses |
Thanks so much for reporting, I have proper testing in a branch but I didn't have time to merge and release a major version so your feedback is very important. I see that I have mixed up the file to check to determine the package manager and the lockfile. I have a PR almost ready and will have a pre-release soon. |
I published a prerelease, please install with the tag |
Hi,
thanks for the awesome package. We have been using it for a couple of months, but since we migrated to yarn berry, we are having issues since
--frozen-lockfile
flag was deprecated in favour of--immutable
. Hence, the hook no longer works.Would it be possible to detect whether yarn classic or yarn 2 is used?
The text was updated successfully, but these errors were encountered: