microsoft / react-native-macos

A framework for building native macOS apps with React.
https://microsoft.github.io/react-native-windows/
MIT License
3.45k stars 132 forks source link

Use Yarn 4 #2030

Closed Saadnajmi closed 7 months ago

Saadnajmi commented 8 months ago

Please select one of the following

Summary:

There's nothing preventing us from using yarn 4, and there are several long term benefits that could be had by being on the latest version of the package manager. Let's update! I ran the following steps:

  1. Ran yarn set version berry locally
  2. Set linker: "node-modules" in the .yarnrc.yml file
  3. Ran yarn

An interesting side effect is that by running yarn now lints/formats all the package.json files in the mono repo. So that we don't maintain this extra diff, I'm opening https://github.com/facebook/react-native/pull/42256 to upstream theses formats to React Native.

Changelog:

[INTERNAL] [CHANGED] - Use Yarn 4 for the mono repo

Test Plan:

CI should pass. After all, running yarn should be the same.

Saadnajmi commented 8 months ago

I may wait to see if https://github.com/facebook/react-native/pull/42256 merges upstream first, so that we can pick the change up in a merge / cherry-pick it