From b837833c8ce43cd711db7b04728d5bb3d0e366bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Thu, 14 May 2026 22:53:56 +0200 Subject: [PATCH] Add Sonatype snapshot CocoaPods proxy support --- .../lib/expo_cocoapods_proxy/proxy.rb | 1 + .../spec/expo_cocoapods_proxy/proxy_spec.rb | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/packages/expo-cocoapods-proxy/lib/expo_cocoapods_proxy/proxy.rb b/packages/expo-cocoapods-proxy/lib/expo_cocoapods_proxy/proxy.rb index 0a35898a86..cf6b1a4813 100644 --- a/packages/expo-cocoapods-proxy/lib/expo_cocoapods_proxy/proxy.rb +++ b/packages/expo-cocoapods-proxy/lib/expo_cocoapods_proxy/proxy.rb @@ -17,6 +17,7 @@ class Http %r{https?://(api\.)?github\.com/}, %r{https?://sourceforge\.net/}, %r{https?://repo1\.maven\.org/}, + %r{https?://central\.sonatype\.com/}, %r{https?://boostorg\.jfrog\.io/}, %r{https?://www\.sqlite\.org/}, %r{https?://download\.videolan\.org/}, diff --git a/packages/expo-cocoapods-proxy/spec/expo_cocoapods_proxy/proxy_spec.rb b/packages/expo-cocoapods-proxy/spec/expo_cocoapods_proxy/proxy_spec.rb index 41dbc3e49c..0d326737ac 100644 --- a/packages/expo-cocoapods-proxy/spec/expo_cocoapods_proxy/proxy_spec.rb +++ b/packages/expo-cocoapods-proxy/spec/expo_cocoapods_proxy/proxy_spec.rb @@ -142,6 +142,17 @@ downloader.download_file(path.to_s) end + it 'fetches Sonatype snapshot artifacts via proxy' do + path = Pathname.new('some/fake/path') + url = 'https://central.sonatype.com/repository/maven-snapshots/com/facebook/react/react-native-artifacts/0.82.0-SNAPSHOT/maven-metadata.xml' + opts = {} + downloader = Pod::Downloader::Http.new(path, url, opts) + + expect(downloader).to receive(:download_file_via_proxy).once {} + + downloader.download_file(path.to_s) + end + it 'does not proxy when url doesn\'t match an allowlist regex' do path = Pathname.new('some/fake/path') url = 'https://not-github.com/expo/test-repo/archive/main.tar.gz'