Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shaky-meals-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@callstack/react-native-brownfield': patch
---

make EXUpdates as a dependency only when installed
14 changes: 13 additions & 1 deletion packages/react-native-brownfield/ReactBrownfield.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

expo_updates_installed = lambda do
Pod::Executable.execute_command('node', [
'-p',
'require.resolve("expo-updates/package.json", { paths: [process.argv[1]] })',
Pod::Config.instance.installation_root.to_s,
])

true
rescue
false
Comment thread
hurali97 marked this conversation as resolved.
end

Pod::Spec.new do |spec|
spec.name = "ReactBrownfield"
spec.version = package['version']
Expand Down Expand Up @@ -33,7 +45,7 @@ Pod::Spec.new do |spec|

if ENV['REACT_NATIVE_BROWNFIELD_USE_EXPO_HOST'] == '1'
spec.dependency 'Expo'
spec.dependency 'EXUpdates'
spec.dependency 'EXUpdates' if expo_updates_installed.call
end

install_modules_dependencies(spec)
Expand Down
Loading