Uh oh!
There was an error while loading. Please reload this page.
feat: use Yarn v3 with nodeLinker: node-modules for new projects - #2134
Conversation
szymonrybczak
commented
Oct 26, 2023
9afaa54 to
4457c77Compareszymonrybczak
commented
Oct 26, 2023
One note here is that Yarn v4 was released few days ago, and it is working with React Native properly. With this change we're aiming for 0.74 so until that time it will be tested well in various production environments. Also Yarn v4 had 53 releases so we can assume that team tested it well 😅 So let''s wait for some minor fixes that probably will be released, and then will finally bump to Yarn v4 in CLI - with current setup it is just changing number. |
c3bbbb5 to
b9fb423CompareUh oh!
There was an error while loading. Please reload this page.
71f3dce to
a04a792Compare
robhogan
left a comment
There was a problem hiding this comment.
Couple of questions/suggestions but LGTM in principle
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| await executeCommand('yarn', ['set', 'version', YARN_VERSION], { | ||
| root, | ||
| silent, | ||
| }); |
There was a problem hiding this comment.
Just to check my understanding here - this will install the requested version via corepack if it isn't currently on the machine? What if corepack isn't enabled?
a8af0aa to
1b47345CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
667da6d to
bc0dc7dCompare
Esemesek
left a comment
There was a problem hiding this comment.
Seems to be working fine on my machine. Code also seems to be LGTMT +1
86ccccf to
8f96a0eCompare8f96a0e to
fac59f2CompareSummary: Recently inside React Native Community CLI we added bumping Yarn version inside `init` command, more information here: react-native-community/cli#2134. In this Pull Request I added required rules in `.gitignore` for new projects created. ## Changelog: [GENERAL] [ADDED] - Add Yarn files to `.gitignore` in template Pull Request resolved: #42313 Test Plan: 1. Follow [Contributing guide](https://github.com/react-native-community/cli/blob/main/CONTRIBUTING.md) from React Native Community CLI repository to setup locally newest version of CLI. 2. Run this command: ```sh node /path/to/react-native-cli/packages/cli/build/bin.js init --template path/to/template ``` 3. Appropriate should be ignored. Reviewed By: NickGerleman Differential Revision: D52907962 Pulled By: cortinico fbshipit-source-id: f12dce8836e7e94257f8c690434b11227aa46446
Summary: Recently inside React Native Community CLI we added bumping Yarn version inside `init` command, more information here: react-native-community/cli#2134. In this Pull Request I added required rules in `.gitignore` for new projects created. ## Changelog: [GENERAL] [ADDED] - Add Yarn files to `.gitignore` in template Pull Request resolved: react/react-native#42313 Test Plan: 1. Follow [Contributing guide](https://github.com/react-native-community/cli/blob/main/CONTRIBUTING.md) from React Native Community CLI repository to setup locally newest version of CLI. 2. Run this command: ```sh node /path/to/react-native-cli/packages/cli/build/bin.js init --template path/to/template ``` 3. Appropriate should be ignored. Reviewed By: NickGerleman Differential Revision: D52907962 Pulled By: cortinico fbshipit-source-id: f12dce8836e7e94257f8c690434b11227aa46446 Original: react/react-native@965f2eb
Summary: Recently inside React Native Community CLI we added bumping Yarn version inside `init` command, more information here: react-native-community/cli#2134. In this Pull Request I added required rules in `.gitignore` for new projects created. ## Changelog: [GENERAL] [ADDED] - Add Yarn files to `.gitignore` in template Pull Request resolved: react/react-native#42313 Test Plan: 1. Follow [Contributing guide](https://github.com/react-native-community/cli/blob/main/CONTRIBUTING.md) from React Native Community CLI repository to setup locally newest version of CLI. 2. Run this command: ```sh node /path/to/react-native-cli/packages/cli/build/bin.js init --template path/to/template ``` 3. Appropriate should be ignored. Reviewed By: NickGerleman Differential Revision: D52907962 Pulled By: cortinico fbshipit-source-id: f12dce8836e7e94257f8c690434b11227aa46446 Original-Commit: react/react-native@965f2eb
Summary: Recently inside React Native Community CLI we added bumping Yarn version inside `init` command, more information here: react-native-community/cli#2134. In this Pull Request I added required rules in `.gitignore` for new projects created. ## Changelog: [GENERAL] [ADDED] - Add Yarn files to `.gitignore` in template Pull Request resolved: react/react-native#42313 Test Plan: 1. Follow [Contributing guide](https://github.com/react-native-community/cli/blob/main/CONTRIBUTING.md) from React Native Community CLI repository to setup locally newest version of CLI. 2. Run this command: ```sh node /path/to/react-native-cli/packages/cli/build/bin.js init --template path/to/template ``` 3. Appropriate should be ignored. Reviewed By: NickGerleman Differential Revision: D52907962 Pulled By: cortinico fbshipit-source-id: f12dce8836e7e94257f8c690434b11227aa46446 Original-Commit: react/react-native@965f2eb
noway
commented
Apr 22, 2024
Sorry if this is not the right forum or if this is too much of a qualitative judgement, but I'd like to share my thoughts. Yarn Modern is less popular than Yarn Classic. While Yarn Classic is deprecated (and to be fair, subtly broken in different ways), Yarn Modern hasn't shown enough resiliency and it's long term success is far from guaranteed. Forcing new projects to start with Yarn v3 may send them on a path where they may end up with an unmaintained package manager few years down the track. Is it a prudent decision to switch new projects to Yarn Modern, especially for users who are just starting out with React Native? NPM would be a much sure choice. |
Summary:
Closes#1931
When creating new project we'll try to bump Yarn version to v3. We'll only do this if:
and the Yarn version in the location is Yarn Classicbc8aaaaTest Plan:
Checklist