Add a proper "monorepo" setup for React Native

Summary:
This adds all the packages we use to the workspace in open source, which means we can change our publish scripts to also publish the packages from the repo every time we publish the main repo. I'll work with somebody from the community on that part.

Note: We do not use `eslint-config-react-native-community` internally and it pulls in a lot of packages we don't need. It is part of the React Native repo because it is used in the RN app template but we may want to choose to move it out into a separate repo at some point.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D23208695

fbshipit-source-id: 02d401721dfdc8bbb2305f8ac3381f1e98c18f1d
This commit is contained in:
Christoph Nakazawa 2020-08-21 02:52:03 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 12543d557f
Коммит 3967635632
9 изменённых файлов: 13 добавлений и 1602 удалений

Просмотреть файл

@ -78,6 +78,7 @@
"test-ios": "./scripts/objc-test.sh test"
},
"workspaces": [
"packages/!(eslint-config-react-native-community)",
"repo-config"
],
"peerDependencies": {

Просмотреть файл

@ -47,7 +47,6 @@ fb_native.sh_binary(
"buck_tests/generate-tests.js",
"package.json",
"//xplat/js:setup_env",
"yarn.lock",
],
visibility = ["PUBLIC"],
)

Просмотреть файл

@ -12,7 +12,7 @@ THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOUR
# shellcheck source=xplat/js/env-utils/setup_env_vars.sh
source "$THIS_DIR/../../../../env-utils/setup_env_vars.sh"
pushd "$THIS_DIR/.." >/dev/null
pushd "$JS_DIR" >/dev/null
"$INSTALL_NODE_MODULES"
popd >/dev/null

Просмотреть файл

@ -12,7 +12,7 @@ THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOUR
# shellcheck source=xplat/js/env-utils/setup_env_vars.sh
source "$THIS_DIR/../../../../../../env-utils/setup_env_vars.sh"
pushd "$THIS_DIR/../../.." >/dev/null
pushd "$JS_DIR" >/dev/null
"$INSTALL_NODE_MODULES"
popd >/dev/null

Просмотреть файл

@ -12,7 +12,7 @@ THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOUR
# shellcheck source=xplat/js/env-utils/setup_env_vars.sh
source "$THIS_DIR/../../../../../env-utils/setup_env_vars.sh"
pushd "$THIS_DIR/../.." >/dev/null
pushd "$JS_DIR" >/dev/null
"$INSTALL_NODE_MODULES"
popd >/dev/null

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -8,10 +8,11 @@
"type": "git",
"url": "git@github.com:facebook/react-native.git"
},
"scripts": {},
"dependencies": {
"invariant": "^2.2.4",
"nullthrows": "^1.1.1",
"nullthrows": "^1.1.1"
},
"peerDependencies": {
"react": "16.13.1",
"react-native": "*"
},

Просмотреть файл

@ -11,7 +11,7 @@
"dependencies": {
"@babel/core": "^7.0.0",
"@babel/generator": "^7.5.0",
"@react-native-community/eslint-plugin": "file:../packages/eslint-plugin-react-native-community",
"@react-native-community/eslint-plugin": "*",
"@reactions/component": "^2.0.2",
"async": "^2.4.0",
"babel-eslint": "^10.1.0",

Просмотреть файл

@ -1141,24 +1141,6 @@
sudo-prompt "^9.0.0"
wcwidth "^1.0.1"
"@react-native-community/eslint-plugin@file:packages/eslint-plugin-react-native-community":
version "1.1.0"
"@react-native/assets@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@react-native/assets/-/assets-1.0.0.tgz#c6f9bf63d274bafc8e970628de24986b30a55c8e"
integrity sha512-KrwSpS1tKI70wuKl68DwJZYEvXktDHdZMG0k2AXD/rJVSlB23/X2CB2cutVR0HwNMJIal9HOUOBB2rVfa6UGtQ==
"@react-native/normalize-color@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-1.0.0.tgz#c52a99d4fe01049102d47dc45d40cbde4f720ab6"
integrity sha512-xUNRvNmCl3UGCPbbHvfyFMnpvLPoOjDCcp5bT9m2k+TF/ZBklEQwhPZlkrxRx2NhgFh1X3a5uL7mJ7ZR+8G7Qg==
"@react-native/polyfills@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@react-native/polyfills/-/polyfills-1.0.0.tgz#05bb0031533598f9458cf65a502b8df0eecae780"
integrity sha512-0jbp4RxjYopTsIdLl+/Fy2TiwVYHy4mgeu07DG4b/LyM0OS/+lPP5c9sbnt/AMlnF6qz2JRZpPpGw1eMNS6A4w==
"@reactions/component@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@reactions/component/-/component-2.0.2.tgz#40f8c1c2c37baabe57a0c944edb9310dc1ec6642"
@ -3289,6 +3271,11 @@ flow-parser@0.*:
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.89.0.tgz#c87bf45831644733dd576983ab12e75a3546573b"
integrity sha512-vC8YuwhAPE+tbkz49DA/TjtFyfhcqM48occMdRQiZ/HL+Wg97IcuebMZUGVB4oBq7aHw0iJJtnvmlnmOQF7Ydg==
flow-parser@^0.121.0:
version "0.121.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.121.0.tgz#9f9898eaec91a9f7c323e9e992d81ab5c58e618f"
integrity sha512-1gIBiWJNR0tKUNv8gZuk7l9rVX06OuLzY9AoGio7y/JT4V1IZErEMEq2TJS+PFcw/y0RshZ1J/27VfK1UQzYVg==
for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"