react-native-macos 0.73.6 → 0.73.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +4 -1
- package/sdks/hermes-engine/hermes-utils.rb +23 -0
package/React/Base/RCTVersion.m
CHANGED
package/package.json
CHANGED
|
@@ -10,7 +10,10 @@ react_native_path = File.join(__dir__, "..", "..")
|
|
|
10
10
|
|
|
11
11
|
# package.json
|
|
12
12
|
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
|
|
13
|
-
|
|
13
|
+
# [macOS
|
|
14
|
+
rn_version = package['version']
|
|
15
|
+
version = findLastestVersionWithArtifact(rn_version) || rn_version
|
|
16
|
+
# macOS]
|
|
14
17
|
|
|
15
18
|
source_type = hermes_source_type(version, react_native_path)
|
|
16
19
|
source = podspec_source(source_type, version, react_native_path)
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
require 'net/http'
|
|
7
7
|
require 'rexml/document'
|
|
8
|
+
require 'open3' # [macOS]
|
|
8
9
|
|
|
9
10
|
HERMES_GITHUB_URL = "https://github.com/facebook/hermes.git"
|
|
10
11
|
|
|
@@ -233,6 +234,28 @@ def resolve_url_redirects(url)
|
|
|
233
234
|
return (`curl -Ls -o /dev/null -w %{url_effective} \"#{url}\"`)
|
|
234
235
|
end
|
|
235
236
|
|
|
237
|
+
# [macOS react-native-macos does not publish macos specific hermes artifacts
|
|
238
|
+
# so we attempt to find the latest patch version of the iOS artifacts and use that
|
|
239
|
+
def findLastestVersionWithArtifact(version)
|
|
240
|
+
versionWithoutPatch = version.match(/^(\d+\.\d+)/)
|
|
241
|
+
xml_data, = Open3.capture3("curl -s https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/maven-metadata.xml")
|
|
242
|
+
|
|
243
|
+
metadata = REXML::Document.new(xml_data)
|
|
244
|
+
versions = metadata.elements.to_a('//metadata/versioning/versions/version')
|
|
245
|
+
|
|
246
|
+
# Extract version numbers and sort them
|
|
247
|
+
filtered_versions = versions.select { |version| version.text.match?(/^#{versionWithoutPatch}\.\d+$/) }
|
|
248
|
+
if filtered_versions.empty?
|
|
249
|
+
return
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
version_numbers = filtered_versions.map { |version| version.text }
|
|
253
|
+
sorted_versions = version_numbers.sort_by { |v| Gem::Version.new(v) }
|
|
254
|
+
|
|
255
|
+
return sorted_versions.last
|
|
256
|
+
end
|
|
257
|
+
# macOS]
|
|
258
|
+
|
|
236
259
|
# This function checks that Hermes artifact exists.
|
|
237
260
|
# As of now it should check it on the Maven repo.
|
|
238
261
|
#
|