react-native-macos 0.77.1 → 0.77.2

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.
@@ -16,7 +16,7 @@ const version: $ReadOnly<{
16
16
  }> = {
17
17
  major: 0,
18
18
  minor: 77,
19
- patch: 1,
19
+ patch: 2,
20
20
  prerelease: null,
21
21
  };
22
22
 
@@ -38,15 +38,13 @@ RCT_EXPORT_MODULE()
38
38
  _queue.maxConcurrentOperationCount = 2;
39
39
  }
40
40
 
41
- __weak __block NSBlockOperation *weakOp;
42
- __block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
43
- // [macOS
44
- NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
41
+ NSBlockOperation *op = [NSBlockOperation new];
42
+ __weak NSBlockOperation *weakOp = op;
43
+ [op addExecutionBlock:^{
44
+ NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
45
45
  if (strongOp == nil || [strongOp isCancelled]) {
46
46
  return;
47
47
  }
48
- // macOS]
49
-
50
48
  // Get mime type
51
49
  NSRange firstSemicolon = [request.URL.resourceSpecifier rangeOfString:@";"];
52
50
  NSString *mimeType =
@@ -58,18 +56,17 @@ RCT_EXPORT_MODULE()
58
56
  expectedContentLength:-1
59
57
  textEncodingName:nil];
60
58
 
61
- [delegate URLRequest:strongOp didReceiveResponse:response]; // [macOS]
59
+ [delegate URLRequest:strongOp didReceiveResponse:response];
62
60
 
63
61
  // Load data
64
62
  NSError *error;
65
63
  NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
66
64
  if (data) {
67
- [delegate URLRequest:strongOp didReceiveData:data]; // [macOS]
65
+ [delegate URLRequest:strongOp didReceiveData:data];
68
66
  }
69
- [delegate URLRequest:strongOp didCompleteWithError:error]; // [macOS]
67
+ [delegate URLRequest:strongOp didCompleteWithError:error];
70
68
  }];
71
69
 
72
- weakOp = op;
73
70
  [_queue addOperation:op];
74
71
  return op;
75
72
  }
@@ -46,21 +46,19 @@ RCT_EXPORT_MODULE()
46
46
  _fileQueue.maxConcurrentOperationCount = 4;
47
47
  }
48
48
 
49
- __weak __block NSBlockOperation *weakOp;
50
- __block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
51
- // [macOS
52
- NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
49
+ NSBlockOperation *op = [NSBlockOperation new];
50
+ __weak NSBlockOperation *weakOp = op;
51
+ [op addExecutionBlock:^{
52
+ NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
53
53
  if (strongOp == nil || [strongOp isCancelled]) {
54
54
  return;
55
55
  }
56
- // macOS]
57
-
58
56
  // Get content length
59
57
  NSError *error = nil;
60
58
  NSFileManager *fileManager = [NSFileManager new];
61
59
  NSDictionary<NSString *, id> *fileAttributes = [fileManager attributesOfItemAtPath:request.URL.path error:&error];
62
60
  if (!fileAttributes) {
63
- [delegate URLRequest:strongOp didCompleteWithError:error]; // [macOS]
61
+ [delegate URLRequest:strongOp didCompleteWithError:error];
64
62
  return;
65
63
  }
66
64
 
@@ -77,17 +75,16 @@ RCT_EXPORT_MODULE()
77
75
  expectedContentLength:[fileAttributes[NSFileSize] ?: @-1 integerValue]
78
76
  textEncodingName:nil];
79
77
 
80
- [delegate URLRequest:strongOp didReceiveResponse:response]; // [macOS]
78
+ [delegate URLRequest:strongOp didReceiveResponse:response];
81
79
 
82
80
  // Load data
83
81
  NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
84
82
  if (data) {
85
- [delegate URLRequest:strongOp didReceiveData:data]; // [macOS]
83
+ [delegate URLRequest:strongOp didReceiveData:data];
86
84
  }
87
- [delegate URLRequest:strongOp didCompleteWithError:error]; // [macOS]
85
+ [delegate URLRequest:strongOp didCompleteWithError:error];
88
86
  }];
89
87
 
90
- weakOp = op;
91
88
  [_fileQueue addOperation:op];
92
89
  return op;
93
90
  }
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(77),
26
- RCTVersionPatch: @(1),
26
+ RCTVersionPatch: @(2),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.77.1
1
+ VERSION_NAME=0.77.2
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", 77,
20
- "patch", 1,
20
+ "patch", 2,
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 = 77;
20
- int32_t Patch = 1;
20
+ int32_t Patch = 2;
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.77.1",
3
+ "version": "0.77.2",
4
4
  "description": "React Native for macOS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -110,7 +110,7 @@
110
110
  },
111
111
  "dependencies": {
112
112
  "@jest/create-cache-key-function": "^29.6.3",
113
- "@react-native-mac/virtualized-lists": "0.77.1",
113
+ "@react-native-mac/virtualized-lists": "0.77.2",
114
114
  "@react-native/assets-registry": "0.77.0",
115
115
  "@react-native/codegen": "0.77.0",
116
116
  "@react-native/community-cli-plugin": "0.77.0",
@@ -189,6 +189,6 @@ class NewArchitectureHelper
189
189
  end
190
190
 
191
191
  def self.new_arch_enabled
192
- return ENV["RCT_NEW_ARCH_ENABLED"] == nil || ENV["RCT_NEW_ARCH_ENABLED"] == "1"
192
+ return ENV["RCT_NEW_ARCH_ENABLED"] == "1" # [macOS] Disable Fabric by default till macOS supports it
193
193
  end
194
194
  end