Specify package manager version for project (#47091)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47091

Prompted by https://github.com/facebook/react-native/pull/47083, this change adds a `"packageManager"` field to the root `package.json` specifying `yarn@1.22.22`. This will configure a compatible, predictable version of Yarn for users using [Corepack](https://nodejs.org/api/corepack.html) via the Yarn Modern install process.

See https://yarnpkg.com/getting-started/install and https://nodejs.org/api/corepack.html.

Tested on a fresh system (GitHub Codespaces).

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D64536673

fbshipit-source-id: 535c0ca725172e4a06de04b19c6cd2d31788f5a4
This commit is contained in:
Alex Hunt
2024-10-17 07:55:07 -07:00
committed by Facebook GitHub Bot
parent f1d2331dfb
commit 52ea8b07e2
+1
View File
@@ -3,6 +3,7 @@
"private": true,
"version": "1000.0.0",
"license": "MIT",
"packageManager": "yarn@1.22.22",
"scripts": {
"android": "cd packages/rn-tester && npm run android",
"build-android": "./gradlew :packages:react-native:ReactAndroid:build",