Possible to patch react-native-reanimated? (eas build)

Is it possible to apply a patch to react-native-reanimated and get “eas build” to “pick it up”? Specifically for iOS.

I tried forking the repo, applying the patch in a branch, and:
npm install “https://github.com/my_github_username/react-native-reanimated.git#my_branch
I can see my package.json has:
“react-native-reanimated”: "github:my_github_username/react-native-reanimated#my_branch,
But I don’t think the (remote) build is getting my patch, but instead just using the stock react-native-reanimated release 2.8.0.

Hi there -
EAS Build should be able to build your forked version of the library.
Can you share more information here?
Maybe a link to your specific forked version of the lib on Github?
Also, what things make you think you’re getting the stock release instead of your patched version?

Thanks for your reply.

This is my fork (technically, a branch within my fork): https://github.com/ericgjackson/react-native-reanimated/tree/patch280

I added a “#warning” directive in the patched code in the hopes that I would see the warning in the “eas build” logging output (line 26 of ios/REANodesManager.m).

The warning doesn’t appear. In general, nothing in the logging output indicates it is fetching my code. In the “Install Pods” phase I see:
Installing RNReanimated (2.8.0)
Hard to be sure, but I think that’s the stock unpatched reanimated.

In case you’re able (and willing) to look at it, my last build was https://expo.dev/accounts/egjackson/projects/Lexatious/builds/d5b5f6c3-285e-47c6-8b0c-acba6108b05b

Hi @egjackson

Another possibility that I’ve used successfully in the past is to patch the dependency using patch-package.