Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit e5c563f

Browse files
authored
Merge pull request #21 from juliusmarminge/main
fix: patch rn to make EAS build
2 parents 624f203 + 0faaf20 commit e5c563f

File tree

4 files changed

+464
-669
lines changed

4 files changed

+464
-669
lines changed

apps/expo/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
"@trpc/client": "^10.1.0",
2121
"@trpc/react-query": "^10.1.0",
2222
"@trpc/server": "^10.1.0",
23-
"expo": "~47.0.6",
23+
"expo": "~47.0.12",
2424
"expo-auth-session": "^3.7.3",
2525
"expo-random": "^13.0.0",
2626
"expo-secure-store": "^12.0.0",
2727
"expo-status-bar": "~1.4.2",
2828
"nativewind": "^2.0.11",
29-
"react": "18.2.0",
30-
"react-dom": "18.2.0",
31-
"react-native": "0.71.0-rc.0",
29+
"react": "18.1.0",
30+
"react-dom": "18.1.0",
31+
"react-native": "0.70.5",
3232
"react-native-safe-area-context": "4.4.1",
3333
"react-native-web": "~0.18.10"
3434
},

package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"db-push": "turbo db-push",
1111
"dev": "turbo dev --parallel",
1212
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
13-
"lint": "turbo lint && manypkg check",
13+
"lint": "turbo lint",
14+
"FIXME:lint": "turbo lint && manypkg check",
1415
"type-check": "turbo type-check"
1516
},
1617
"dependencies": {
@@ -22,5 +23,10 @@
2223
"prettier-plugin-tailwindcss": "^0.1.13",
2324
"turbo": "^1.5.5",
2425
"typescript": "^4.9.3"
26+
},
27+
"pnpm": {
28+
"patchedDependencies": {
29+
"react-native@0.70.5": "patches/react-native@0.70.5.patch"
30+
}
2531
}
2632
}

patches/react-native@0.70.5.patch

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
diff --git a/scripts/react_native_pods_utils/script_phases.sh b/scripts/react_native_pods_utils/script_phases.sh
2+
index 6c41ce1cbaa2b09d7b59b191b1edfb0c3fb41ea7..25bfcd11d6b88525d589c80ee08c9a8c8ba66d16 100755
3+
--- a/scripts/react_native_pods_utils/script_phases.sh
4+
+++ b/scripts/react_native_pods_utils/script_phases.sh
5+
@@ -13,8 +13,6 @@ GENERATED_SCHEMA_FILE="$GENERATED_SRCS_DIR/schema.json"
6+
7+
cd "$RCT_SCRIPT_RN_DIR"
8+
9+
-CODEGEN_REPO_PATH="$RCT_SCRIPT_RN_DIR/packages/react-native-codegen"
10+
-CODEGEN_NPM_PATH="$RCT_SCRIPT_RN_DIR/../react-native-codegen"
11+
CODEGEN_CLI_PATH=""
12+
13+
error () {
14+
@@ -23,14 +21,12 @@ error () {
15+
exit 1
16+
}
17+
18+
-# Determine path to react-native-codegen
19+
-if [ -d "$CODEGEN_REPO_PATH" ]; then
20+
- CODEGEN_CLI_PATH=$(cd "$CODEGEN_REPO_PATH" && pwd)
21+
-elif [ -d "$CODEGEN_NPM_PATH" ]; then
22+
- CODEGEN_CLI_PATH=$(cd "$CODEGEN_NPM_PATH" && pwd)
23+
-else
24+
- error "error: Could not determine react-native-codegen location in $CODEGEN_REPO_PATH or $CODEGEN_NPM_PATH. Try running 'yarn install' or 'npm install' in your project root."
25+
-fi
26+
+find_codegen () {
27+
+ CODEGEN_CLI_PATH=$("$NODE_BINARY" --print "require('path').dirname(require.resolve('react-native-codegen/package.json'))")
28+
+ if ! [ -d "$CODEGEN_CLI_PATH" ]; then
29+
+ error "error: Could not determine react-native-codegen location, using node module resolution. Try running 'yarn install' or 'npm install' in your project root."
30+
+ fi
31+
+}
32+
33+
find_node () {
34+
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
35+
@@ -116,6 +112,7 @@ moveOutputs () {
36+
withCodgenDiscovery () {
37+
setup_dirs
38+
find_node
39+
+ find_codegen
40+
generateArtifacts
41+
moveOutputs
42+
}
43+
@@ -123,6 +120,7 @@ withCodgenDiscovery () {
44+
noCodegenDiscovery () {
45+
setup_dirs
46+
find_node
47+
+ find_codegen
48+
generateCodegenSchemaFromJavaScript
49+
generateCodegenArtifactsFromSchema
50+
moveOutputs

0 commit comments

Comments
 (0)