react-native-macos 0.73.6 → 0.73.8

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: 8,
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: @(8),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.73.6
1
+ VERSION_NAME=0.73.8
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", 8,
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 = 8;
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.8",
4
4
  "description": "React Native for macOS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -340,10 +340,12 @@ class ReactNativePodsUtils
340
340
  config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] :
341
341
  Helpers::Constants.min_ios_version_supported
342
342
  config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = [Helpers::Constants.min_ios_version_supported.to_f, old_iphone_deploy_target.to_f].max.to_s
343
+ # [macOS
343
344
  old_macos_deploy_target = config.build_settings["MACOSX_DEPLOYMENT_TARGET"] ?
344
345
  config.build_settings["MACOSX_DEPLOYMENT_TARGET"] :
345
346
  Helpers::Constants.min_macos_version_supported
346
347
  config.build_settings["MACOSX_DEPLOYMENT_TARGET"] = [Helpers::Constants.min_macos_version_supported.to_f, old_macos_deploy_target.to_f].max.to_s
348
+ # macOS]
347
349
  end
348
350
  end
349
351
  end
@@ -47,15 +47,11 @@ def min_macos_version_supported
47
47
  end
48
48
  # macOS]
49
49
 
50
- def min_supported_versions
51
- return { :ios => min_ios_version_supported, :osx => min_macos_version_supported } # [macOS]
52
- end
53
-
54
50
  # This function returns the min supported OS versions supported by React Native
55
51
  # By using this function, you won't have to manually change your Podfile
56
52
  # when we change the minimum version supported by the framework.
57
53
  def min_supported_versions
58
- return { :ios => min_ios_version_supported, :osx => '10.15'} # [macOS]
54
+ return { :ios => min_ios_version_supported, :osx => min_macos_version_supported} # [macOS]
59
55
  end
60
56
 
61
57
  # This function prepares the project for React Native, before processing
@@ -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
  #