Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Yarn 4 #2030

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Use Yarn 4 #2030

merged 1 commit into from
Jan 23, 2024

Conversation

Saadnajmi
Copy link
Collaborator

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

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 facebook#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
Copy link
Collaborator Author

I may wait to see if facebook#42256 merges upstream first, so that we can pick the change up in a merge / cherry-pick it

.yarn/install-state.gz Outdated Show resolved Hide resolved
packages/assets/package.json Show resolved Hide resolved
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Jan 22, 2024
Summary:
Over in React Native macOS land, I opened microsoft#2030 to update our mono repo to use Yarn 4. As a side effect, all the `package.json` files are formatted as a side effect of running `yarn install`. So that React Native macOS doesn't maintain this diff (and because they should only be good / no harm), let's upstream the formatting changes.

## Changelog:

[INTERNAL] [CHANGED] - Format package.json files in the monorepo

Pull Request resolved: #42256

Test Plan: This change should be a no-op, CI should pass.

Reviewed By: cortinico

Differential Revision: D52727623

Pulled By: huntie

fbshipit-source-id: 67862b16d576b0903abd91e016d7add4c19853dc
Copy link
Member

@tido64 tido64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see diffs, but I suppose they'll go away whenever we sync to latest.

@Saadnajmi Saadnajmi changed the title Use Yarn 4 for the mono repo Use Yarn 4 Jan 23, 2024
@Saadnajmi Saadnajmi merged commit 8c77eef into microsoft:main Jan 23, 2024
17 checks passed
@Saadnajmi Saadnajmi deleted the yarn4 branch January 23, 2024 18:57
@Saadnajmi Saadnajmi mentioned this pull request Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants