When I last tried Yarn v2, it was a nightmare. Besides the fact it was a completely new major version that fundamentally changed how Yarn worked (from its architecture to how dependencies were handled).
After seeing news about the latest release for Yarn v2, I got to thinking and the idea I would migrate one of my Aurelia 2 Projects from Yarn v1 go Yarn v2 was born.
This isn’t going to be a tutorial or how-to for upgrading. I didn’t actually encounter any issues upgrading to v2. In fact, this is quite a non-eventful post.
I followed all of the steps in the official Yarn documentation which details installing and configuring Yarn to work with v2. They’ve handled the legacy problem quite nicely, you install v1 of Yarn as a global Node package and then you configure on a per-project basis to switch over to v2.
As a precaution, I initially enabled legacy support for Node modules because I wasn’t sure how things would go without a physical
node_modules directory. But, it worked without the need for legacy mode. Not all libraries are compatible with the new version of Yarn, but many are finally starting to catch up or fix the issues.