-
-
Notifications
You must be signed in to change notification settings - Fork 327
Support users using yarn berry but use classic mode #432
base: main
Are you sure you want to change the base?
Conversation
@brad-decker It's my understanding that Yarn works best if you install v1 (which should be the default version), then activate Berry per project. Can you go into more detail on why you use Berry as the default? If we want to make this change to this project, then that means we ought to make changes to all of our projects that are still using v1... but I am wondering whether there is another way. |
Can you say more about why yarn "works best" that way? If I were a new developer figuring out things for the first time I would install node, and most likely either use NPM or if i'm going to use yarn it would be because I visited yarnpkg.com, and then getting started and followed the steps there (which I did even as someone aware of yarn v1 when I set up my new computer). I would not have visited classic.yarnpkg.com/ and I would not have thought to switch to legacy documentation given the header on the main yarnpkg.com site. I'm not sure that using the "classic" versus "modern" yarn executable is a reasonable universal expectation. |
Hmm I see. It's possible that I am using an outdated setup and that's influenced my thinking on this. Obviously Yarn Berry is a relatively new addition for us. When I was looking into Berry for the monorepo, my sense was that even after all these years, the fact that it's still not the default (if you just That said, I guess I need to update my understanding here 😅 If the Yarn docs encourage you to use Berry globally via Corepack, then that's the way it is. I would definitely not expect anyone to go to classic.yarnpkg.com even with an understanding that v1 is/was a thing. |
@brad-decker This project is set to use Node 12 in development (according to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm that this works with Yarn Berry (stable) being globally installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, though i'd like it better if it can be done without checking in the yarn cjs binary.
If you happen to be using yarn berry as your yarn executable it can cause issues when working with repos that were set up with yarn classic. However, you can set your executable of yarn to classic so that whether you're using yarn 1 or yarn2+ that it'll work the same. This change should have no impact on the library but allow those of us using yarn berry to operate without swiching our executable.