react-native 0.79.0-rc.3 → 0.79.0

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.
@@ -5,13 +5,14 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
9
- #import <react/runtime/JSRuntimeFactoryCAPI.h>
10
-
11
8
  #pragma once
12
9
 
13
10
  NS_ASSUME_NONNULL_BEGIN
14
11
 
12
+ // Forward declarations for umbrella headers.
13
+ // In implementations, import `<react/runtime/JSRuntimeFactoryCAPI.h>` to obtain the actual type.
14
+ typedef void *JSRuntimeFactoryRef;
15
+
15
16
  @protocol RCTJSRuntimeConfiguratorProtocol
16
17
 
17
18
  - (JSRuntimeFactoryRef)createJSRuntimeFactory;
@@ -32,6 +32,7 @@
32
32
  #import <react/renderer/runtimescheduler/RuntimeScheduler.h>
33
33
  #import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
34
34
  #import <react/runtime/JSRuntimeFactory.h>
35
+ #import <react/runtime/JSRuntimeFactoryCAPI.h>
35
36
 
36
37
  @implementation RCTRootViewFactoryConfiguration
37
38
 
@@ -17,5 +17,5 @@ export const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 79,
19
19
  patch: 0,
20
- prerelease: 'rc.3',
20
+ prerelease: null,
21
21
  };
@@ -49,13 +49,8 @@ RCT_EXPORT_MODULE()
49
49
  _queue.maxConcurrentOperationCount = 2;
50
50
  }
51
51
 
52
- __weak NSBlockOperation *weakOp;
53
- NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
54
- NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
55
- if (strongOp == nil || [strongOp isCancelled]) {
56
- return;
57
- }
58
-
52
+ __weak __block NSBlockOperation *weakOp;
53
+ __block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
59
54
  // Get mime type
60
55
  NSRange firstSemicolon = [request.URL.resourceSpecifier rangeOfString:@";"];
61
56
  NSString *mimeType =
@@ -67,15 +62,15 @@ RCT_EXPORT_MODULE()
67
62
  expectedContentLength:-1
68
63
  textEncodingName:nil];
69
64
 
70
- [delegate URLRequest:strongOp didReceiveResponse:response];
65
+ [delegate URLRequest:weakOp didReceiveResponse:response];
71
66
 
72
67
  // Load data
73
68
  NSError *error;
74
69
  NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
75
70
  if (data) {
76
- [delegate URLRequest:strongOp didReceiveData:data];
71
+ [delegate URLRequest:weakOp didReceiveData:data];
77
72
  }
78
- [delegate URLRequest:strongOp didCompleteWithError:error];
73
+ [delegate URLRequest:weakOp didCompleteWithError:error];
79
74
  }];
80
75
 
81
76
  weakOp = op;
@@ -53,19 +53,14 @@ RCT_EXPORT_MODULE()
53
53
  _fileQueue.maxConcurrentOperationCount = 4;
54
54
  }
55
55
 
56
- __weak NSBlockOperation *weakOp;
57
- NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
58
- NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
59
- if (strongOp == nil || [strongOp isCancelled]) {
60
- return;
61
- }
62
-
56
+ __weak __block NSBlockOperation *weakOp;
57
+ __block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
63
58
  // Get content length
64
59
  NSError *error = nil;
65
60
  NSFileManager *fileManager = [NSFileManager new];
66
61
  NSDictionary<NSString *, id> *fileAttributes = [fileManager attributesOfItemAtPath:request.URL.path error:&error];
67
62
  if (!fileAttributes) {
68
- [delegate URLRequest:strongOp didCompleteWithError:error];
63
+ [delegate URLRequest:weakOp didCompleteWithError:error];
69
64
  return;
70
65
  }
71
66
 
@@ -82,14 +77,14 @@ RCT_EXPORT_MODULE()
82
77
  expectedContentLength:[fileAttributes[NSFileSize] ?: @-1 integerValue]
83
78
  textEncodingName:nil];
84
79
 
85
- [delegate URLRequest:strongOp didReceiveResponse:response];
80
+ [delegate URLRequest:weakOp didReceiveResponse:response];
86
81
 
87
82
  // Load data
88
83
  NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
89
84
  if (data) {
90
- [delegate URLRequest:strongOp didReceiveData:data];
85
+ [delegate URLRequest:weakOp didReceiveData:data];
91
86
  }
92
- [delegate URLRequest:strongOp didCompleteWithError:error];
87
+ [delegate URLRequest:weakOp didCompleteWithError:error];
93
88
  }];
94
89
 
95
90
  weakOp = op;
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(79),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.3",
27
+ RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.79.0-rc.3
1
+ VERSION_NAME=0.79.0
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -173,7 +173,7 @@ public class FabricUIManager
173
173
  private final CopyOnWriteArrayList<UIManagerListener> mListeners = new CopyOnWriteArrayList<>();
174
174
 
175
175
  private boolean mMountNotificationScheduled = false;
176
- private final List<Integer> mMountedSurfaceIds = new ArrayList<>();
176
+ private List<Integer> mSurfaceIdsWithPendingMountNotification = new ArrayList<>();
177
177
 
178
178
  @ThreadConfined(UI)
179
179
  @NonNull
@@ -1254,12 +1254,15 @@ public class FabricUIManager
1254
1254
 
1255
1255
  // Collect surface IDs for all the mount items
1256
1256
  for (MountItem mountItem : mountItems) {
1257
- if (mountItem != null && !mMountedSurfaceIds.contains(mountItem.getSurfaceId())) {
1258
- mMountedSurfaceIds.add(mountItem.getSurfaceId());
1257
+ if (mountItem != null
1258
+ && !mSurfaceIdsWithPendingMountNotification.contains(mountItem.getSurfaceId())) {
1259
+ mSurfaceIdsWithPendingMountNotification.add(mountItem.getSurfaceId());
1259
1260
  }
1260
1261
  }
1261
1262
 
1262
- if (!mMountNotificationScheduled && !mMountedSurfaceIds.isEmpty()) {
1263
+ if (!mMountNotificationScheduled && !mSurfaceIdsWithPendingMountNotification.isEmpty()) {
1264
+ mMountNotificationScheduled = true;
1265
+
1263
1266
  // Notify mount when the effects are visible and prevent mount hooks to
1264
1267
  // delay paint.
1265
1268
  UiThreadUtil.getUiThreadHandler()
@@ -1269,17 +1272,19 @@ public class FabricUIManager
1269
1272
  public void run() {
1270
1273
  mMountNotificationScheduled = false;
1271
1274
 
1275
+ // Create a copy in case mount hooks trigger more mutations
1276
+ final List<Integer> surfaceIdsToReportMount =
1277
+ mSurfaceIdsWithPendingMountNotification;
1278
+ mSurfaceIdsWithPendingMountNotification = new ArrayList<>();
1279
+
1272
1280
  final @Nullable FabricUIManagerBinding binding = mBinding;
1273
1281
  if (binding == null || mDestroyed) {
1274
- mMountedSurfaceIds.clear();
1275
1282
  return;
1276
1283
  }
1277
1284
 
1278
- for (int surfaceId : mMountedSurfaceIds) {
1285
+ for (int surfaceId : surfaceIdsToReportMount) {
1279
1286
  binding.reportMount(surfaceId);
1280
1287
  }
1281
-
1282
- mMountedSurfaceIds.clear();
1283
1288
  }
1284
1289
  });
1285
1290
  }
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 79,
20
20
  "patch", 0,
21
- "prerelease", "rc.3");
21
+ "prerelease", null);
22
22
  }
@@ -22,7 +22,7 @@ constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 79;
24
24
  int32_t Patch = 0;
25
- std::string_view Prerelease = "rc.3";
25
+ std::string_view Prerelease = "";
26
26
  } ReactNativeVersion;
27
27
 
28
28
  } // namespace facebook::react
@@ -38,7 +38,8 @@ Pod::Spec.new do |s|
38
38
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
39
39
  s.pod_target_xcconfig = {
40
40
  "HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/hermes-engine/destroot/include\" \"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
41
- "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
41
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
42
+ "DEFINES_MODULE" => "YES",
42
43
  }
43
44
  s.header_dir = "reacthermes"
44
45
  s.dependency "React-cxxreact", version
@@ -48,8 +48,11 @@ Pod::Spec.new do |s|
48
48
  s.header_mappings_dir = "./"
49
49
  end
50
50
 
51
- s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
52
- "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
51
+ s.pod_target_xcconfig = {
52
+ "HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
53
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
54
+ "DEFINES_MODULE" => "YES",
55
+ }
53
56
 
54
57
  s.dependency "React-cxxreact", version
55
58
  s.dependency "React-jsi", version
@@ -7,6 +7,8 @@
7
7
 
8
8
  #pragma once
9
9
 
10
+ #ifdef __cplusplus
11
+
10
12
  #include <ReactCommon/RuntimeExecutor.h>
11
13
  #include <cxxreact/MessageQueueThread.h>
12
14
  #include <jsi/jsi.h>
@@ -72,3 +74,5 @@ class JSIRuntimeHolder : public JSRuntime {
72
74
  };
73
75
 
74
76
  } // namespace facebook::react
77
+
78
+ #endif // __cplusplus
@@ -36,7 +36,9 @@ Pod::Spec.new do |s|
36
36
  s.exclude_files = "tests"
37
37
  s.pod_target_xcconfig = {
38
38
  "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
39
- "HEADER_SEARCH_PATHS" => header_search_paths.join(' ')}
39
+ "HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
40
+ "DEFINES_MODULE" => "YES",
41
+ }
40
42
 
41
43
  if ENV['USE_FRAMEWORKS']
42
44
  s.module_name = "React_renderercss"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.79.0-rc.3",
3
+ "version": "0.79.0",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -108,13 +108,13 @@
108
108
  },
109
109
  "dependencies": {
110
110
  "@jest/create-cache-key-function": "^29.7.0",
111
- "@react-native/assets-registry": "0.79.0-rc.3",
112
- "@react-native/codegen": "0.79.0-rc.3",
113
- "@react-native/community-cli-plugin": "0.79.0-rc.3",
114
- "@react-native/gradle-plugin": "0.79.0-rc.3",
115
- "@react-native/js-polyfills": "0.79.0-rc.3",
116
- "@react-native/normalize-colors": "0.79.0-rc.3",
117
- "@react-native/virtualized-lists": "0.79.0-rc.3",
111
+ "@react-native/assets-registry": "0.79.0",
112
+ "@react-native/codegen": "0.79.0",
113
+ "@react-native/community-cli-plugin": "0.79.0",
114
+ "@react-native/gradle-plugin": "0.79.0",
115
+ "@react-native/js-polyfills": "0.79.0",
116
+ "@react-native/normalize-colors": "0.79.0",
117
+ "@react-native/virtualized-lists": "0.79.0",
118
118
  "abort-controller": "^3.0.0",
119
119
  "anser": "^1.4.9",
120
120
  "ansi-regex": "^5.0.0",
Binary file
Binary file
Binary file