This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
generated from t3-oss/create-t3-turbo
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from juliusmarminge/main
fix: patch rn to make EAS build
- Loading branch information
Showing
4 changed files
with
464 additions
and
669 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,8 @@ | |
"db-push": "turbo db-push", | ||
"dev": "turbo dev --parallel", | ||
"format": "prettier --write \"**/*.{ts,tsx,md}\"", | ||
"lint": "turbo lint && manypkg check", | ||
"lint": "turbo lint", | ||
"FIXME:lint": "turbo lint && manypkg check", | ||
"type-check": "turbo type-check" | ||
}, | ||
"dependencies": { | ||
|
@@ -22,5 +23,10 @@ | |
"prettier-plugin-tailwindcss": "^0.1.13", | ||
"turbo": "^1.5.5", | ||
"typescript": "^4.9.3" | ||
}, | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
diff --git a/scripts/react_native_pods_utils/script_phases.sh b/scripts/react_native_pods_utils/script_phases.sh | ||
index 6c41ce1cbaa2b09d7b59b191b1edfb0c3fb41ea7..25bfcd11d6b88525d589c80ee08c9a8c8ba66d16 100755 | ||
--- a/scripts/react_native_pods_utils/script_phases.sh | ||
+++ b/scripts/react_native_pods_utils/script_phases.sh | ||
@@ -13,8 +13,6 @@ GENERATED_SCHEMA_FILE="$GENERATED_SRCS_DIR/schema.json" | ||
|
||
cd "$RCT_SCRIPT_RN_DIR" | ||
|
||
-CODEGEN_REPO_PATH="$RCT_SCRIPT_RN_DIR/packages/react-native-codegen" | ||
-CODEGEN_NPM_PATH="$RCT_SCRIPT_RN_DIR/../react-native-codegen" | ||
CODEGEN_CLI_PATH="" | ||
|
||
error () { | ||
@@ -23,14 +21,12 @@ error () { | ||
exit 1 | ||
} | ||
|
||
-# Determine path to react-native-codegen | ||
-if [ -d "$CODEGEN_REPO_PATH" ]; then | ||
- CODEGEN_CLI_PATH=$(cd "$CODEGEN_REPO_PATH" && pwd) | ||
-elif [ -d "$CODEGEN_NPM_PATH" ]; then | ||
- CODEGEN_CLI_PATH=$(cd "$CODEGEN_NPM_PATH" && pwd) | ||
-else | ||
- 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." | ||
-fi | ||
+find_codegen () { | ||
+ CODEGEN_CLI_PATH=$("$NODE_BINARY" --print "require('path').dirname(require.resolve('react-native-codegen/package.json'))") | ||
+ if ! [ -d "$CODEGEN_CLI_PATH" ]; then | ||
+ error "error: Could not determine react-native-codegen location, using node module resolution. Try running 'yarn install' or 'npm install' in your project root." | ||
+ fi | ||
+} | ||
|
||
find_node () { | ||
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}" | ||
@@ -116,6 +112,7 @@ moveOutputs () { | ||
withCodgenDiscovery () { | ||
setup_dirs | ||
find_node | ||
+ find_codegen | ||
generateArtifacts | ||
moveOutputs | ||
} | ||
@@ -123,6 +120,7 @@ withCodgenDiscovery () { | ||
noCodegenDiscovery () { | ||
setup_dirs | ||
find_node | ||
+ find_codegen | ||
generateCodegenSchemaFromJavaScript | ||
generateCodegenArtifactsFromSchema | ||
moveOutputs |
Oops, something went wrong.