@orta/y2
v0.0.3
Published
Yarn 2, but with Yarn 1 defaults
Downloads
4
Readme
y2 - An experiment in using Yarn 2 with Yarn 1 defaults
Building off some of my notes in yarn-vs-npm, I wondered out loud what a version of Yarn 2 looks like where it's deployed like a normal npm package, and has defaults which align with traditional node projects.
This is the result of that. It's a fork of berry (here) forked from 2da8101 which defaults to the loosest resolution mode, and uses node_modules.
Usage:
npm install -g @orta/y2
y2 init
y2 add --dev typescript
y2 tsc
Building
Get a CLI build created in berry, then copy it into the vendor folder.
cd berry
yarn build:cli
cd ..
cp berry/packages/yarnpkg-cli/bundles/yarn.js vendor
Prod
Be careful with this, it's definitely safe to say y2
is not battle tested. I have removed the built-in patches (they should only be needed for PNP projects)
License
What little code in here I made it MIT. The vendored copy of Yarn 2 is BSD 2-Clause.