Skip to content

Commit c748d93

Browse files
committed
⚙️ Chore: Patch react-native-builder-bob
1 parent 1f61ac5 commit c748d93

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/lib/utils/patchCodegen.js b/lib/utils/patchCodegen.js
2+
index 611e072d90e5fa676bf937a94b4d9a4207af102b..4427e5e7b22c5b51dffcdd33c77299541ec583a3 100644
3+
--- a/lib/utils/patchCodegen.js
4+
+++ b/lib/utils/patchCodegen.js
5+
@@ -20,7 +20,10 @@ const CODEGEN_DOCS = 'https://github.com/reactwg/react-native-new-architecture/b
6+
async function patchCodegen(projectPath,
7+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
8+
packageJson, report) {
9+
- let codegenAndroidPath = packageJson.codegenConfig.outputDir.android;
10+
+ let codegenAndroidPath = packageJson.codegenConfig.outputDir?.android;
11+
+ if(codegenAndroidPath == null){
12+
+ return;
13+
+ };
14+
if (!codegenAndroidPath) {
15+
throw new Error(`Your package.json doesn't contain codegenConfig.outputDir.android. Please see ${CODEGEN_DOCS}`);
16+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@
107107
"typescript": "^5.2.2"
108108
},
109109
"resolutions": {
110-
"@types/react": "^18.2.44"
110+
"@types/react": "^18.2.44",
111+
"react-native-builder-bob@^0.30.0": "patch:react-native-builder-bob@npm%3A0.30.2#./.yarn/patches/react-native-builder-bob-npm-0.30.2-5e6e62dece.patch"
111112
},
112113
"peerDependencies": {
113114
"react": "*",

0 commit comments

Comments
 (0)