react-native-macos 0.72.8 → 0.72.10

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: 72,
15
- patch: 8,
15
+ patch: 10,
16
16
  prerelease: null,
17
17
  };
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(72),
26
- RCTVersionPatch: @(8),
26
+ RCTVersionPatch: @(10),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -64,12 +64,15 @@ static NSURL *getOpenUrlEndpoint(NSURL *bundleURL)
64
64
  RCT_NOT_IMPLEMENTED(-(instancetype)init)
65
65
 
66
66
  static NSMutableDictionary<NSString *, RCTInspectorPackagerConnection *> *socketConnections = nil;
67
+ static NSLock *connectionsLock = [NSLock new];
67
68
 
68
69
  static void sendEventToAllConnections(NSString *event)
69
70
  {
71
+ [connectionsLock lock]; // [macOS]
70
72
  for (NSString *socketId in socketConnections) {
71
73
  [socketConnections[socketId] sendEventToAllConnections:event];
72
74
  }
75
+ [connectionsLock unlock]; // [macOS]
73
76
  }
74
77
 
75
78
  + (void)openURL:(NSString *)url withBundleURL:(NSURL *)bundleURL withErrorMessage:(NSString *)errorMessage
@@ -105,9 +108,11 @@ static void sendEventToAllConnections(NSString *event)
105
108
  // Note, using a static dictionary isn't really the greatest design, but
106
109
  // the packager connection does the same thing, so it's at least consistent.
107
110
  // This is a static map that holds different inspector clients per the inspectorURL
111
+ [connectionsLock lock]; // [macOS]
108
112
  if (socketConnections == nil) {
109
113
  socketConnections = [NSMutableDictionary new];
110
114
  }
115
+ [connectionsLock unlock]; // [macOS]
111
116
 
112
117
  NSString *key = [inspectorURL absoluteString];
113
118
  // [macOS safety check to avoid a crash
@@ -116,18 +121,23 @@ static void sendEventToAllConnections(NSString *event)
116
121
  return nil;
117
122
  }
118
123
  // macOS]
119
- RCTInspectorPackagerConnection *connection = socketConnections[key];
124
+
125
+ RCTInspectorPackagerConnection *connection;
126
+
127
+ [connectionsLock lock]; // [macOS]
128
+ connection = socketConnections[key];
120
129
  if (!connection || !connection.isConnected) {
121
130
  connection = [[RCTInspectorPackagerConnection alloc] initWithURL:inspectorURL];
122
131
  // [macOS safety check to avoid a crash
123
- if (connection == nil) {
132
+ if (connection != nil) {
133
+ socketConnections[key] = connection;
134
+ [connection connect];
135
+ } else {
124
136
  RCTLogError(@"failed to initialize RCTInspectorPackagerConnection");
125
- return nil;
126
137
  }
127
138
  // macOS]
128
- socketConnections[key] = connection;
129
- [connection connect];
130
139
  }
140
+ [connectionsLock unlock]; // [macOS]
131
141
 
132
142
  return connection;
133
143
  }
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.72.8
1
+ VERSION_NAME=0.72.10
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  # JVM Versions
@@ -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", 72,
20
- "patch", 8,
20
+ "patch", 10,
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 = 72;
20
- int32_t Patch = 8;
20
+ int32_t Patch = 10;
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.72.8",
3
+ "version": "0.72.10",
4
4
  "bin": "./cli.js",
5
5
  "description": "React Native for macOS",
6
6
  "license": "MIT",
@@ -11,23 +11,12 @@
11
11
  # - dir_manager: a class that implements the `Dir` interface. Defaults to `Dir`, the Dependency can be injected for testing purposes.
12
12
  # @throws an error if it could not find the codegen folder.
13
13
  def build_codegen!(react_native_path, relative_installation_root, dir_manager: Dir)
14
- codegen_repo_path = "#{relative_installation_root}/#{react_native_path}/../react-native-codegen";
15
- codegen_npm_path = "#{relative_installation_root}/#{react_native_path}/../@react-native/codegen";
16
- codegen_cli_path = ""
14
+ codegen_repo_path = "#{relative_installation_root}/#{react_native_path}/../react-native-codegen";
15
+ return unless dir_manager.exist?(codegen_repo_path) && !dir_manager.exist?("#{codegen_repo_path}/lib")
17
16
 
18
- if dir_manager.exist?(codegen_repo_path)
19
- codegen_cli_path = codegen_repo_path
20
- elsif dir_manager.exist?(codegen_npm_path)
21
- codegen_cli_path = codegen_npm_path
22
- else
23
- raise "[codegen] Could not find react-native-codegen."
24
- end
25
-
26
- if !dir_manager.exist?("#{codegen_cli_path}/lib")
27
- Pod::UI.puts "[Codegen] building #{codegen_cli_path}."
28
- system("#{codegen_cli_path}/scripts/oss/build.sh")
29
- end
30
- end
17
+ Pod::UI.puts "[Codegen] building #{codegen_repo_path}"
18
+ system("#{codegen_repo_path}/scripts/oss/build.sh")
19
+ end
31
20
 
32
21
  # It generates an empty `ThirdPartyProvider`, required by Fabric to load the components
33
22
  #
@@ -13,7 +13,7 @@
13
13
  "dependencies": {
14
14
  "react": "18.2.0",
15
15
  "react-native-macos": "1000.0.0",
16
- "react-native": "0.72.8"
16
+ "react-native": "0.72.10"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@babel/core": "^7.20.0",