Skip to content

Commit c2816e1

Browse files
committed
fix: patch rnx-kit CLI to check for the new hermes-compiler package
1 parent 594eed5 commit c2816e1

File tree

3 files changed

+53
-3
lines changed

3 files changed

+53
-3
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/lib/bundle/hermes.js b/lib/bundle/hermes.js
2+
index c1de4fc01d797050b4885a25e565d60dd8c4087d..6ba3e8cce7cad3952a51ea164e9b3ce83c8d30b7 100644
3+
--- a/lib/bundle/hermes.js
4+
+++ b/lib/bundle/hermes.js
5+
@@ -58,6 +58,8 @@ function findHermesBinary({ reactNativePath }) {
6+
const locations = [
7+
() => path.join(reactNativePath, "sdks", "hermesc"),
8+
() => (0, package_1.findPackageDependencyDir)("hermes-engine"),
9+
+ // PATCH: also look for the newer hermes-compiler package (used for Hermes v1)
10+
+ () => (0, package_1.findPackageDependencyDir)("hermes-compiler/hermesc"),
11+
];
12+
for (const getLocation of locations) {
13+
const location = getLocation();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@react-native/metro-config": "^0.84.0-rc.4",
7777
"@react-native/typescript-config": "^0.84.0-rc.4",
7878
"@rnx-kit/babel-preset-metro-react-native": "3.0.0",
79-
"@rnx-kit/cli": "^1.0.0",
79+
"@rnx-kit/cli": "patch:@rnx-kit/cli@npm%3A1.0.0#~/.yarn/patches/@rnx-kit-cli-npm-1.0.0-9f40e0294d.patch",
8080
"@rnx-kit/metro-config": "^2.2.3",
8181
"@rnx-kit/metro-resolver-symlinks": "^0.2.11",
8282
"@types/babel__core": "^7.20.5",

yarn.lock

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,7 +2569,7 @@ __metadata:
25692569
languageName: node
25702570
linkType: hard
25712571

2572-
"@rnx-kit/cli@npm:^1.0.0":
2572+
"@rnx-kit/cli@npm:1.0.0":
25732573
version: 1.0.0
25742574
resolution: "@rnx-kit/cli@npm:1.0.0"
25752575
dependencies:
@@ -2606,6 +2606,43 @@ __metadata:
26062606
languageName: node
26072607
linkType: hard
26082608

2609+
"@rnx-kit/cli@patch:@rnx-kit/cli@npm%3A1.0.0#~/.yarn/patches/@rnx-kit-cli-npm-1.0.0-9f40e0294d.patch":
2610+
version: 1.0.0
2611+
resolution: "@rnx-kit/cli@patch:@rnx-kit/cli@npm%3A1.0.0#~/.yarn/patches/@rnx-kit-cli-npm-1.0.0-9f40e0294d.patch::version=1.0.0&hash=706d0b"
2612+
dependencies:
2613+
"@rnx-kit/align-deps": "npm:^3.3.3"
2614+
"@rnx-kit/config": "npm:^0.7.0"
2615+
"@rnx-kit/console": "npm:^2.0.0"
2616+
"@rnx-kit/metro-plugin-cyclic-dependencies-detector": "npm:^2.0.0"
2617+
"@rnx-kit/metro-plugin-duplicates-checker": "npm:^3.0.0"
2618+
"@rnx-kit/metro-plugin-typescript": "npm:^0.5.3"
2619+
"@rnx-kit/metro-serializer": "npm:^2.0.0"
2620+
"@rnx-kit/metro-serializer-esbuild": "npm:^0.3.0"
2621+
"@rnx-kit/metro-service": "npm:^4.1.3"
2622+
"@rnx-kit/third-party-notices": "npm:^2.0.0"
2623+
"@rnx-kit/tools-android": "npm:^0.2.2"
2624+
"@rnx-kit/tools-apple": "npm:^0.2.2"
2625+
"@rnx-kit/tools-filesystem": "npm:^0.1.0"
2626+
"@rnx-kit/tools-language": "npm:^3.0.1"
2627+
"@rnx-kit/tools-node": "npm:^3.0.3"
2628+
"@rnx-kit/tools-react-native": "npm:^2.3.2"
2629+
commander: "npm:^11.1.0"
2630+
ora: "npm:^5.4.1"
2631+
qrcode: "npm:^1.5.0"
2632+
peerDependencies:
2633+
jest: ">=26.0"
2634+
react-native: ">=0.64"
2635+
peerDependenciesMeta:
2636+
jest:
2637+
optional: true
2638+
react-native:
2639+
optional: true
2640+
bin:
2641+
rnx-cli: bin/rnx-cli.cjs
2642+
checksum: 10c0/a4e05205affd4d6e55ce3704bc67e066759f7f6e7875944a4818f64271ccb16ccfc2d1283c8578f7ede84500e39401b5d577502025f5dca0c103eb95ee7fcf47
2643+
languageName: node
2644+
linkType: hard
2645+
26092646
"@rnx-kit/config@npm:^0.7.0":
26102647
version: 0.7.1
26112648
resolution: "@rnx-kit/config@npm:0.7.1"
@@ -10090,7 +10127,7 @@ __metadata:
1009010127
"@react-native/typescript-config": "npm:^0.84.0-rc.4"
1009110128
"@rexovolt/react-native-markdown-display": "npm:^10.0.1"
1009210129
"@rnx-kit/babel-preset-metro-react-native": "npm:3.0.0"
10093-
"@rnx-kit/cli": "npm:^1.0.0"
10130+
"@rnx-kit/cli": "patch:@rnx-kit/cli@npm%3A1.0.0#~/.yarn/patches/@rnx-kit-cli-npm-1.0.0-9f40e0294d.patch"
1009410131
"@rnx-kit/metro-config": "npm:^2.2.3"
1009510132
"@rnx-kit/metro-resolver-symlinks": "npm:^0.2.11"
1009610133
"@traptitech/markdown-it-spoiler": "patch:@traptitech/markdown-it-spoiler@npm%3A1.1.6#~/.yarn/patches/@traptitech-markdown-it-spoiler-npm-1.1.6-ee0dc02626.patch"

0 commit comments

Comments
 (0)