Skip to content

Commit 3967635

Browse files
cpojerfacebook-github-bot
authored andcommitted
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
1 parent 12543d5 commit 3967635

File tree

9 files changed

+13
-1602
lines changed

9 files changed

+13
-1602
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"test-ios": "./scripts/objc-test.sh test"
7979
},
8080
"workspaces": [
81+
"packages/!(eslint-config-react-native-community)",
8182
"repo-config"
8283
],
8384
"peerDependencies": {

packages/react-native-codegen/BUCK

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ fb_native.sh_binary(
4747
"buck_tests/generate-tests.js",
4848
"package.json",
4949
"//xplat/js:setup_env",
50-
"yarn.lock",
5150
],
5251
visibility = ["PUBLIC"],
5352
)

packages/react-native-codegen/buck_tests/generate-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOUR
1212
# shellcheck source=xplat/js/env-utils/setup_env_vars.sh
1313
source "$THIS_DIR/../../../../env-utils/setup_env_vars.sh"
1414

15-
pushd "$THIS_DIR/.." >/dev/null
15+
pushd "$JS_DIR" >/dev/null
1616
"$INSTALL_NODE_MODULES"
1717
popd >/dev/null
1818

packages/react-native-codegen/src/cli/combine/combine_js_to_schema.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOUR
1212
# shellcheck source=xplat/js/env-utils/setup_env_vars.sh
1313
source "$THIS_DIR/../../../../../../env-utils/setup_env_vars.sh"
1414

15-
pushd "$THIS_DIR/../../.." >/dev/null
15+
pushd "$JS_DIR" >/dev/null
1616
"$INSTALL_NODE_MODULES"
1717
popd >/dev/null
1818

packages/react-native-codegen/src/cli/verify_with_old_codegen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOUR
1212
# shellcheck source=xplat/js/env-utils/setup_env_vars.sh
1313
source "$THIS_DIR/../../../../../env-utils/setup_env_vars.sh"
1414

15-
pushd "$THIS_DIR/../.." >/dev/null
15+
pushd "$JS_DIR" >/dev/null
1616
"$INSTALL_NODE_MODULES"
1717
popd >/dev/null
1818

packages/react-native-codegen/yarn.lock

Lines changed: 0 additions & 1577 deletions
This file was deleted.

packages/rn-tester/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
"type": "git",
99
"url": "[email protected]:facebook/react-native.git"
1010
},
11-
"scripts": {},
1211
"dependencies": {
1312
"invariant": "^2.2.4",
14-
"nullthrows": "^1.1.1",
13+
"nullthrows": "^1.1.1"
14+
},
15+
"peerDependencies": {
1516
"react": "16.13.1",
1617
"react-native": "*"
1718
},

repo-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@babel/core": "^7.0.0",
1313
"@babel/generator": "^7.5.0",
14-
"@react-native-community/eslint-plugin": "file:../packages/eslint-plugin-react-native-community",
14+
"@react-native-community/eslint-plugin": "*",
1515
"@reactions/component": "^2.0.2",
1616
"async": "^2.4.0",
1717
"babel-eslint": "^10.1.0",

yarn.lock

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,24 +1141,6 @@
11411141
sudo-prompt "^9.0.0"
11421142
wcwidth "^1.0.1"
11431143

1144-
"@react-native-community/eslint-plugin@file:packages/eslint-plugin-react-native-community":
1145-
version "1.1.0"
1146-
1147-
"@react-native/[email protected]":
1148-
version "1.0.0"
1149-
resolved "https://registry.yarnpkg.com/@react-native/assets/-/assets-1.0.0.tgz#c6f9bf63d274bafc8e970628de24986b30a55c8e"
1150-
integrity sha512-KrwSpS1tKI70wuKl68DwJZYEvXktDHdZMG0k2AXD/rJVSlB23/X2CB2cutVR0HwNMJIal9HOUOBB2rVfa6UGtQ==
1151-
1152-
"@react-native/[email protected]":
1153-
version "1.0.0"
1154-
resolved "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-1.0.0.tgz#c52a99d4fe01049102d47dc45d40cbde4f720ab6"
1155-
integrity sha512-xUNRvNmCl3UGCPbbHvfyFMnpvLPoOjDCcp5bT9m2k+TF/ZBklEQwhPZlkrxRx2NhgFh1X3a5uL7mJ7ZR+8G7Qg==
1156-
1157-
"@react-native/[email protected]":
1158-
version "1.0.0"
1159-
resolved "https://registry.yarnpkg.com/@react-native/polyfills/-/polyfills-1.0.0.tgz#05bb0031533598f9458cf65a502b8df0eecae780"
1160-
integrity sha512-0jbp4RxjYopTsIdLl+/Fy2TiwVYHy4mgeu07DG4b/LyM0OS/+lPP5c9sbnt/AMlnF6qz2JRZpPpGw1eMNS6A4w==
1161-
11621144
"@reactions/component@^2.0.2":
11631145
version "2.0.2"
11641146
resolved "https://registry.yarnpkg.com/@reactions/component/-/component-2.0.2.tgz#40f8c1c2c37baabe57a0c944edb9310dc1ec6642"
@@ -3289,6 +3271,11 @@ flow-parser@0.*:
32893271
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.89.0.tgz#c87bf45831644733dd576983ab12e75a3546573b"
32903272
integrity sha512-vC8YuwhAPE+tbkz49DA/TjtFyfhcqM48occMdRQiZ/HL+Wg97IcuebMZUGVB4oBq7aHw0iJJtnvmlnmOQF7Ydg==
32913273

3274+
flow-parser@^0.121.0:
3275+
version "0.121.0"
3276+
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.121.0.tgz#9f9898eaec91a9f7c323e9e992d81ab5c58e618f"
3277+
integrity sha512-1gIBiWJNR0tKUNv8gZuk7l9rVX06OuLzY9AoGio7y/JT4V1IZErEMEq2TJS+PFcw/y0RshZ1J/27VfK1UQzYVg==
3278+
32923279
for-in@^1.0.2:
32933280
version "1.0.2"
32943281
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"

0 commit comments

Comments
 (0)