americanexpress / fetchye

✨ If you know how to use Fetch, you know how to use Fetchye [fetch-yae]. Simple React Hooks, Centralized Cache, Infinitely Extensible.
Apache License 2.0
41 stars 21 forks source link

chore: use yarn 2 #16

Closed merceyz closed 3 years ago

merceyz commented 3 years ago

What's the problem this PR addresses?

15 aims to changes this repo to use Yarn 1 with workspaces, but Yarn 2's node_modules linker is much more stable than V1.

How did you fix it?

Use Yarn V2.

If you don't want to accept two mangled JS files from an external contributor they were generated by running

yarn set version 2 && yarn plugin import workspace-tools
CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

codesandbox-ci[bot] commented 3 years ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit dac744217a4621146558fab0eafd755397b98b87:

Sandbox Source
quick-install Configuration
fetchye-provider-install Configuration
quick-install Configuration
nextjs-fetchye-ssr Configuration
JamesSingleton commented 3 years ago

@merceyz out of curiosity, if someone has Yarn 1 on their local machine due to other libraries using Yarn 1 and goes to work on a Yarn 2 package, will that impact their ability to work on any Yarn 1 libraries?

merceyz commented 3 years ago

Nope, the CLI is checked into the repo so it's only using V2 in that project, the .yarnrc.yml file points to the CLI to use. This has the benefit of everyone that works on the project uses the exact same version of Yarn, and upgrading it doesn't require coordinating with a team, one person runs yarn set version latest and commits the changes, then the rest does a git pull at some point and you're done.

https://yarnpkg.com/getting-started/install