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.
@@ -12,6 +12,6 @@
12
12
  exports.version = {
13
13
  major: 0,
14
14
  minor: 73,
15
- patch: 6,
15
+ patch: 7,
16
16
  prerelease: null,
17
17
  };
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(73),
26
- RCTVersionPatch: @(6),
26
+ RCTVersionPatch: @(7),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.73.6
1
+ VERSION_NAME=0.73.7
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 73,
20
- "patch", 6,
20
+ "patch", 7,
21
21
  "prerelease", null);
22
22
  }
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 73;
20
- int32_t Patch = 6;
20
+ int32_t Patch = 7;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.73.6",
3
+ "version": "0.73.7",
4
4
  "description": "React Native for macOS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -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
- version = package['version']
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
  #