Skip to content

Conversation

@kraenhansen
Copy link
Collaborator

This PR copies code from the POC branch into the existing structure with the least dependencies and configuration necessary.

@kraenhansen kraenhansen self-assigned this Apr 21, 2025
@changeset-bot
Copy link

changeset-bot bot commented Apr 21, 2025

⚠️ No Changeset found

Latest commit: acd8043

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines +11 to +18
PATCHED_HERMES_DIR = File.join(__dir__, "../hermes")
unless Dir.exist?(PATCHED_HERMES_DIR)
sleep 1
# Cloning (advice.detachedHead=false for a pretty output)
system("git clone -c advice.detachedHead=false --recursive --depth 1 --branch node-api-for-react-native-0.79.0 https://github.com/kraenhansen/hermes.git #{PATCHED_HERMES_DIR}")
# Patch React Native's copy of JSI
system("cp -rf #{PATCHED_HERMES_DIR}/API/jsi/jsi/ #{REACT_NATIVE_DIR}/ReactCommon/jsi/jsi/")
end
Copy link
Collaborator Author

@kraenhansen kraenhansen Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of the test app cloning the Hermes repo, this is an attempt to drive the patching of Hermes from the "host" package.

This is not the ideal long-term solution, but it's needed until the Hermes branch merge upstream.

@kraenhansen kraenhansen requested a review from mani3xis April 21, 2025 14:08
"eslint": "^9.19.0",
"react-native": "0.77.0",
"globals": "^16.0.0",
"react-native": "0.79.1",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is upgrading to the latest React Native too.

// TODO: Read the version from the addon
// @see
// https://github.com/callstackincubator/react-native-node-api-modules/issues/4
napi_env env = reinterpret_cast<napi_env>(rt.createNodeApiEnv(8));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is using the new createNodeApiEnv method.

@kraenhansen kraenhansen mentioned this pull request Apr 22, 2025
@kraenhansen kraenhansen merged commit acd8043 into main Apr 23, 2025
@kraenhansen kraenhansen deleted the kh/turbo-module-and-test-app branch April 23, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants