react-native-macos 0.74.22 → 0.74.24

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: 74,
19
- patch: 22,
19
+ patch: 24,
20
20
  prerelease: null,
21
21
  };
22
22
 
@@ -40,6 +40,13 @@ RCT_EXPORT_MODULE()
40
40
 
41
41
  __weak __block NSBlockOperation *weakOp;
42
42
  __block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
43
+ // [macOS
44
+ NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
45
+ if (strongOp == nil || [strongOp isCancelled]) {
46
+ return;
47
+ }
48
+ // macOS]
49
+
43
50
  // Get mime type
44
51
  NSRange firstSemicolon = [request.URL.resourceSpecifier rangeOfString:@";"];
45
52
  NSString *mimeType =
@@ -51,15 +58,15 @@ RCT_EXPORT_MODULE()
51
58
  expectedContentLength:-1
52
59
  textEncodingName:nil];
53
60
 
54
- [delegate URLRequest:weakOp didReceiveResponse:response];
61
+ [delegate URLRequest:strongOp didReceiveResponse:response]; // [macOS]
55
62
 
56
63
  // Load data
57
64
  NSError *error;
58
65
  NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
59
66
  if (data) {
60
- [delegate URLRequest:weakOp didReceiveData:data];
67
+ [delegate URLRequest:strongOp didReceiveData:data]; // [macOS]
61
68
  }
62
- [delegate URLRequest:weakOp didCompleteWithError:error];
69
+ [delegate URLRequest:strongOp didCompleteWithError:error]; // [macOS]
63
70
  }];
64
71
 
65
72
  weakOp = op;
@@ -48,12 +48,19 @@ RCT_EXPORT_MODULE()
48
48
 
49
49
  __weak __block NSBlockOperation *weakOp;
50
50
  __block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
51
+ // [macOS
52
+ NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
53
+ if (strongOp == nil || [strongOp isCancelled]) {
54
+ return;
55
+ }
56
+ // macOS]
57
+
51
58
  // Get content length
52
59
  NSError *error = nil;
53
60
  NSFileManager *fileManager = [NSFileManager new];
54
61
  NSDictionary<NSString *, id> *fileAttributes = [fileManager attributesOfItemAtPath:request.URL.path error:&error];
55
62
  if (!fileAttributes) {
56
- [delegate URLRequest:weakOp didCompleteWithError:error];
63
+ [delegate URLRequest:strongOp didCompleteWithError:error]; // [macOS]
57
64
  return;
58
65
  }
59
66
 
@@ -70,14 +77,14 @@ RCT_EXPORT_MODULE()
70
77
  expectedContentLength:[fileAttributes[NSFileSize] ?: @-1 integerValue]
71
78
  textEncodingName:nil];
72
79
 
73
- [delegate URLRequest:weakOp didReceiveResponse:response];
80
+ [delegate URLRequest:strongOp didReceiveResponse:response]; // [macOS]
74
81
 
75
82
  // Load data
76
83
  NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
77
84
  if (data) {
78
- [delegate URLRequest:weakOp didReceiveData:data];
85
+ [delegate URLRequest:strongOp didReceiveData:data]; // [macOS]
79
86
  }
80
- [delegate URLRequest:weakOp didCompleteWithError:error];
87
+ [delegate URLRequest:strongOp didCompleteWithError:error]; // [macOS]
81
88
  }];
82
89
 
83
90
  weakOp = op;
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(74),
26
- RCTVersionPatch: @(22),
26
+ RCTVersionPatch: @(24),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.74.22
1
+ VERSION_NAME=0.74.24
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", 74,
20
- "patch", 22,
20
+ "patch", 24,
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 = 74;
20
- int32_t Patch = 22;
20
+ int32_t Patch = 24;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
@@ -89,9 +89,9 @@ inline static NSUnderlineStyle RCTNSUnderlineStyleFromTextDecorationStyle(
89
89
  case facebook::react::TextDecorationStyle::Double:
90
90
  return NSUnderlineStyleDouble;
91
91
  case facebook::react::TextDecorationStyle::Dashed:
92
- return NSUnderlinePatternDash | NSUnderlineStyleSingle;
92
+ return NSUnderlineStylePatternDash | NSUnderlineStyleSingle; // [macOS]
93
93
  case facebook::react::TextDecorationStyle::Dotted:
94
- return NSUnderlinePatternDot | NSUnderlineStyleSingle;
94
+ return NSUnderlineStylePatternDot | NSUnderlineStyleSingle; // [macOS]
95
95
  }
96
96
  }
97
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.74.22",
3
+ "version": "0.74.24",
4
4
  "description": "React Native for macOS",
5
5
  "license": "MIT",
6
6
  "repository": {