From e25068b7c7a1e0a33d71b9bec162e12dbb5c1f23 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Wed, 3 Jun 2026 09:09:20 +0100 Subject: [PATCH 1/3] reanimated/pods: Fix `react-native/../react-native` resolution failure --- .../scripts/reanimated_utils.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native-reanimated/scripts/reanimated_utils.rb b/packages/react-native-reanimated/scripts/reanimated_utils.rb index 6933867403f1..6d0b1c37c124 100644 --- a/packages/react-native-reanimated/scripts/reanimated_utils.rb +++ b/packages/react-native-reanimated/scripts/reanimated_utils.rb @@ -1,5 +1,5 @@ -def try_to_parse_react_native_package_json(node_modules_dir) - react_native_package_json_path = File.join(node_modules_dir, 'react-native/package.json') +def try_to_parse_react_native_package_json(react_native_dir) + react_native_package_json_path = File.join(react_native_dir, 'package.json') if !File.exist?(react_native_package_json_path) return nil end @@ -10,17 +10,17 @@ def find_config() result = { :is_reanimated_example_app => nil, :react_native_version => nil, - :react_native_node_modules_dir => nil, + :react_native_dir => nil, :react_native_common_dir => nil, } - react_native_node_modules_dir = File.join(File.dirname(`cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "require.resolve('react-native/package.json')"`), '..') - react_native_json = try_to_parse_react_native_package_json(react_native_node_modules_dir) + react_native_dir = File.dirname(`cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "require.resolve('react-native/package.json')"`) + react_native_json = try_to_parse_react_native_package_json(react_native_dir) if react_native_json == nil # user configuration, just in case node_modules_dir = ENV["REACT_NATIVE_NODE_MODULES_DIR"] - react_native_json = try_to_parse_react_native_package_json(node_modules_dir) + react_native_json = try_to_parse_react_native_package_json(File.join(node_modules_dir, 'react-native')) end if react_native_json == nil @@ -35,10 +35,10 @@ def find_config() result[:is_reanimated_example_app] = ENV["IS_REANIMATED_EXAMPLE_APP"] != nil result[:react_native_version] = react_native_json['version'] - result[:react_native_node_modules_dir] = File.expand_path(react_native_node_modules_dir) + result[:react_native_dir] = File.expand_path(react_native_dir) pods_root = Pod::Config.instance.project_pods_root - react_native_common_dir_absolute = File.join(react_native_node_modules_dir, 'react-native', 'ReactCommon') + react_native_common_dir_absolute = File.join(react_native_dir, 'ReactCommon') react_native_common_dir_relative = Pathname.new(react_native_common_dir_absolute).relative_path_from(pods_root).to_s result[:react_native_common_dir] = react_native_common_dir_relative From 976a7005b98a3917957c617de94c7d56b753f3b3 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Wed, 3 Jun 2026 09:12:15 +0100 Subject: [PATCH 2/3] worklets/pods: Fix `react-native/../react-native` resolution failure --- .../scripts/worklets_utils.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-native-worklets/scripts/worklets_utils.rb b/packages/react-native-worklets/scripts/worklets_utils.rb index aa26a22730f8..185c8857fded 100644 --- a/packages/react-native-worklets/scripts/worklets_utils.rb +++ b/packages/react-native-worklets/scripts/worklets_utils.rb @@ -1,5 +1,5 @@ -def worklets_try_to_parse_react_native_package_json(node_modules_dir) - react_native_package_json_path = File.join(node_modules_dir, 'react-native/package.json') +def worklets_try_to_parse_react_native_package_json(react_native_dir) + react_native_package_json_path = File.join(react_native_dir, 'package.json') if !File.exist?(react_native_package_json_path) return nil end @@ -12,17 +12,17 @@ def worklets_find_config() :fetch_preview_flag => nil, :is_reanimated_example_app => nil, :react_native_version => nil, - :react_native_node_modules_dir => nil, + :react_native_dir => nil, :react_native_common_dir => nil, } - react_native_node_modules_dir = File.join(File.dirname(`cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "require.resolve('react-native/package.json')"`), '..') - react_native_json = worklets_try_to_parse_react_native_package_json(react_native_node_modules_dir) + react_native_dir = File.dirname(`cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "require.resolve('react-native/package.json')"`) + react_native_json = worklets_try_to_parse_react_native_package_json(react_native_dir) if react_native_json == nil # user configuration, just in case node_modules_dir = ENV["REACT_NATIVE_NODE_MODULES_DIR"] - react_native_json = worklets_try_to_parse_react_native_package_json(node_modules_dir) + react_native_json = worklets_try_to_parse_react_native_package_json(File.join(node_modules_dir, 'react-native')) end if react_native_json == nil @@ -31,10 +31,10 @@ def worklets_find_config() result[:is_reanimated_example_app] = ENV["IS_REANIMATED_EXAMPLE_APP"] != nil result[:react_native_version] = react_native_json['version'] - result[:react_native_node_modules_dir] = File.expand_path(react_native_node_modules_dir) + result[:react_native_dir] = File.expand_path(react_native_dir) pods_root = Pod::Config.instance.project_pods_root - react_native_common_dir_absolute = File.join(react_native_node_modules_dir, 'react-native', 'ReactCommon') + react_native_common_dir_absolute = File.join(react_native_dir, 'ReactCommon') react_native_common_dir_relative = Pathname.new(react_native_common_dir_absolute).relative_path_from(pods_root).to_s result[:react_native_common_dir] = react_native_common_dir_relative From 09aa462acd4aa11a37acce2ad4a4cab78bf1c76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 8 Jun 2026 18:07:13 +0200 Subject: [PATCH 3/3] fix: syntax error --- packages/react-native-reanimated/scripts/reanimated_utils.rb | 4 ++-- packages/react-native-worklets/scripts/worklets_utils.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native-reanimated/scripts/reanimated_utils.rb b/packages/react-native-reanimated/scripts/reanimated_utils.rb index 7429e9418e6f..2368ca6b0f7c 100644 --- a/packages/react-native-reanimated/scripts/reanimated_utils.rb +++ b/packages/react-native-reanimated/scripts/reanimated_utils.rb @@ -1,8 +1,8 @@ module ReanimatedUtils module_function - def try_to_parse_react_native_package_json(react-native-dir) - react_native_package_json_path = File.join(react-native-dir, 'package.json') + def try_to_parse_react_native_package_json(react_native_dir) + react_native_package_json_path = File.join(react_native_dir, 'package.json') if !File.exist?(react_native_package_json_path) return nil end diff --git a/packages/react-native-worklets/scripts/worklets_utils.rb b/packages/react-native-worklets/scripts/worklets_utils.rb index 008b7785115a..175a3c3b0f74 100644 --- a/packages/react-native-worklets/scripts/worklets_utils.rb +++ b/packages/react-native-worklets/scripts/worklets_utils.rb @@ -1,8 +1,8 @@ module WorkletsUtils module_function - def try_to_parse_react_native_package_json(react-native-dir) - react_native_package_json_path = File.join(react-native-dir, 'package.json') + def try_to_parse_react_native_package_json(react_native_dir) + react_native_package_json_path = File.join(react_native_dir, 'package.json') if !File.exist?(react_native_package_json_path) return nil end