react-native 0.81.1 → 0.81.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.
Files changed (61) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/React/Base/RCTVersion.m +1 -1
  3. package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +12 -0
  4. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +18 -0
  5. package/ReactAndroid/build.gradle.kts +10 -1
  6. package/ReactAndroid/gradle.properties +1 -1
  7. package/ReactAndroid/hermes-engine/build.gradle.kts +6 -0
  8. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeArray.kt +9 -1
  9. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +13 -1
  10. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +21 -1
  11. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +5 -1
  12. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +5 -1
  13. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +23 -1
  14. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +5 -1
  15. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +5 -1
  16. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
  17. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TransformHelper.kt +19 -0
  18. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +29 -1
  19. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +7 -1
  20. package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +3 -1
  21. package/ReactAndroid/src/main/jni/react/jni/CMakeLists.txt +2 -1
  22. package/ReactAndroid/src/main/jni/react/jni/NativeArray.h +4 -0
  23. package/ReactAndroid/src/main/jni/react/jni/OnLoad-common.cpp +2 -0
  24. package/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.cpp +6 -0
  25. package/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.h +1 -0
  26. package/ReactAndroid/src/main/jni/react/jni/TransformHelper.cpp +60 -0
  27. package/ReactAndroid/src/main/jni/react/jni/TransformHelper.h +22 -0
  28. package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +3 -1
  29. package/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt +3 -1
  30. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  31. package/ReactCommon/hermes/executor/CMakeLists.txt +1 -1
  32. package/ReactCommon/hermes/inspector-modern/CMakeLists.txt +1 -1
  33. package/ReactCommon/jsinspector-modern/CMakeLists.txt +6 -4
  34. package/ReactCommon/react/debug/CMakeLists.txt +1 -1
  35. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +9 -1
  36. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +11 -1
  37. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +44 -8
  38. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +6 -2
  39. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +9 -1
  40. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +19 -1
  41. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +9 -1
  42. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +3 -1
  43. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +11 -1
  44. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +5 -1
  45. package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +8 -2
  46. package/ReactCommon/react/renderer/components/view/BaseViewProps.h +5 -0
  47. package/ReactCommon/react/runtime/CMakeLists.txt +3 -1
  48. package/ReactCommon/react/runtime/hermes/CMakeLists.txt +1 -1
  49. package/package.json +8 -8
  50. package/scripts/cocoapods/autolinking.rb +6 -0
  51. package/scripts/cocoapods/codegen_utils.rb +1 -1
  52. package/scripts/codegen/generate-artifacts-executor/index.js +5 -1
  53. package/scripts/codegen/generate-artifacts-executor/utils.js +41 -10
  54. package/scripts/replace-rncore-version.js +4 -2
  55. package/sdks/hermes-engine/utils/replace_hermes_version.js +4 -2
  56. package/sdks/hermesc/osx-bin/hermes +0 -0
  57. package/sdks/hermesc/osx-bin/hermesc +0 -0
  58. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  59. package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -1
  60. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -1
  61. package/third-party-podspecs/replace_dependencies_version.js +4 -2
@@ -17,7 +17,9 @@ add_library(rninstance
17
17
  )
18
18
 
19
19
  target_compile_reactnative_options(rninstance PRIVATE)
20
- target_compile_options(rninstance PRIVATE $<$<CONFIG:Debug>:-DHERMES_ENABLE_DEBUGGER=1>)
20
+ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
21
+ target_compile_options(rninstance PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
22
+ endif ()
21
23
 
22
24
  target_merge_so(rninstance)
23
25
  target_include_directories(rninstance PUBLIC .)
@@ -14,14 +14,14 @@
14
14
 
15
15
  #define REACT_NATIVE_VERSION_MAJOR 0
16
16
  #define REACT_NATIVE_VERSION_MINOR 81
17
- #define REACT_NATIVE_VERSION_PATCH 1
17
+ #define REACT_NATIVE_VERSION_PATCH 2
18
18
 
19
19
  namespace facebook::react {
20
20
 
21
21
  constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 81;
24
- int32_t Patch = 1;
24
+ int32_t Patch = 2;
25
25
  std::string_view Prerelease = "";
26
26
  } ReactNativeVersion;
27
27
 
@@ -26,7 +26,7 @@ target_link_libraries(hermes_executor_common
26
26
  )
27
27
 
28
28
  target_compile_reactnative_options(hermes_executor_common PRIVATE)
29
- if(${CMAKE_BUILD_TYPE} MATCHES Debug)
29
+ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
30
30
  target_compile_options(
31
31
  hermes_executor_common
32
32
  PRIVATE
@@ -17,7 +17,7 @@ add_library(hermes_inspector_modern
17
17
 
18
18
  target_compile_reactnative_options(hermes_inspector_modern PRIVATE)
19
19
 
20
- if(${CMAKE_BUILD_TYPE} MATCHES Debug)
20
+ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
21
21
  target_compile_options(
22
22
  hermes_inspector_modern
23
23
  PRIVATE
@@ -27,7 +27,9 @@ target_link_libraries(jsinspector
27
27
  runtimeexecutor
28
28
  )
29
29
  target_compile_reactnative_options(jsinspector PRIVATE)
30
- target_compile_options(jsinspector PRIVATE
31
- $<$<CONFIG:Debug>:-DREACT_NATIVE_DEBUGGER_ENABLED=1>
32
- $<$<CONFIG:Debug>:-DREACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1>
33
- )
30
+ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
31
+ target_compile_options(jsinspector PRIVATE
32
+ -DREACT_NATIVE_DEBUGGER_ENABLED=1
33
+ -DREACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1
34
+ )
35
+ endif ()
@@ -21,6 +21,6 @@ endif()
21
21
 
22
22
  target_compile_reactnative_options(react_debug PRIVATE)
23
23
  target_compile_options(react_debug PRIVATE -Wpedantic)
24
- if(NOT ${CMAKE_BUILD_TYPE} MATCHES Debug)
24
+ if(NOT ${CMAKE_BUILD_TYPE} MATCHES Debug AND NOT REACT_NATIVE_DEBUG_OPTIMIZED)
25
25
  target_compile_options(react_debug PUBLIC -DNDEBUG)
26
26
  endif()
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<f73bbcd926a835c09b70d814c6662dbb>>
7
+ * @generated SignedSource<<2cabd888b74b84201ff027457efc6007>>
8
8
  */
9
9
 
10
10
  /**
@@ -234,6 +234,14 @@ bool ReactNativeFeatureFlags::useFabricInterop() {
234
234
  return getAccessor().useFabricInterop();
235
235
  }
236
236
 
237
+ bool ReactNativeFeatureFlags::useNativeEqualsInNativeReadableArrayAndroid() {
238
+ return getAccessor().useNativeEqualsInNativeReadableArrayAndroid();
239
+ }
240
+
241
+ bool ReactNativeFeatureFlags::useNativeTransformHelperAndroid() {
242
+ return getAccessor().useNativeTransformHelperAndroid();
243
+ }
244
+
237
245
  bool ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode() {
238
246
  return getAccessor().useNativeViewConfigsInBridgelessMode();
239
247
  }
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<da14545268455bfd4cd35e5c2ecf81ee>>
7
+ * @generated SignedSource<<e26a0c35f1499abf24e46275bbcbe06d>>
8
8
  */
9
9
 
10
10
  /**
@@ -299,6 +299,16 @@ class ReactNativeFeatureFlags {
299
299
  */
300
300
  RN_EXPORT static bool useFabricInterop();
301
301
 
302
+ /**
303
+ * Use a native implementation of equals in NativeReadableArray.
304
+ */
305
+ RN_EXPORT static bool useNativeEqualsInNativeReadableArrayAndroid();
306
+
307
+ /**
308
+ * Use a native implementation of TransformHelper
309
+ */
310
+ RN_EXPORT static bool useNativeTransformHelperAndroid();
311
+
302
312
  /**
303
313
  * When enabled, the native view configs are used in bridgeless mode.
304
314
  */
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<681bff71eb87886a108f67b3162b030c>>
7
+ * @generated SignedSource<<7ae9a203a94e3a22197bc9eda69b741c>>
8
8
  */
9
9
 
10
10
  /**
@@ -965,6 +965,42 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
965
965
  return flagValue.value();
966
966
  }
967
967
 
968
+ bool ReactNativeFeatureFlagsAccessor::useNativeEqualsInNativeReadableArrayAndroid() {
969
+ auto flagValue = useNativeEqualsInNativeReadableArrayAndroid_.load();
970
+
971
+ if (!flagValue.has_value()) {
972
+ // This block is not exclusive but it is not necessary.
973
+ // If multiple threads try to initialize the feature flag, we would only
974
+ // be accessing the provider multiple times but the end state of this
975
+ // instance and the returned flag value would be the same.
976
+
977
+ markFlagAsAccessed(52, "useNativeEqualsInNativeReadableArrayAndroid");
978
+
979
+ flagValue = currentProvider_->useNativeEqualsInNativeReadableArrayAndroid();
980
+ useNativeEqualsInNativeReadableArrayAndroid_ = flagValue;
981
+ }
982
+
983
+ return flagValue.value();
984
+ }
985
+
986
+ bool ReactNativeFeatureFlagsAccessor::useNativeTransformHelperAndroid() {
987
+ auto flagValue = useNativeTransformHelperAndroid_.load();
988
+
989
+ if (!flagValue.has_value()) {
990
+ // This block is not exclusive but it is not necessary.
991
+ // If multiple threads try to initialize the feature flag, we would only
992
+ // be accessing the provider multiple times but the end state of this
993
+ // instance and the returned flag value would be the same.
994
+
995
+ markFlagAsAccessed(53, "useNativeTransformHelperAndroid");
996
+
997
+ flagValue = currentProvider_->useNativeTransformHelperAndroid();
998
+ useNativeTransformHelperAndroid_ = flagValue;
999
+ }
1000
+
1001
+ return flagValue.value();
1002
+ }
1003
+
968
1004
  bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
969
1005
  auto flagValue = useNativeViewConfigsInBridgelessMode_.load();
970
1006
 
@@ -974,7 +1010,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
974
1010
  // be accessing the provider multiple times but the end state of this
975
1011
  // instance and the returned flag value would be the same.
976
1012
 
977
- markFlagAsAccessed(52, "useNativeViewConfigsInBridgelessMode");
1013
+ markFlagAsAccessed(54, "useNativeViewConfigsInBridgelessMode");
978
1014
 
979
1015
  flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
980
1016
  useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -992,7 +1028,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
992
1028
  // be accessing the provider multiple times but the end state of this
993
1029
  // instance and the returned flag value would be the same.
994
1030
 
995
- markFlagAsAccessed(53, "useOptimizedEventBatchingOnAndroid");
1031
+ markFlagAsAccessed(55, "useOptimizedEventBatchingOnAndroid");
996
1032
 
997
1033
  flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
998
1034
  useOptimizedEventBatchingOnAndroid_ = flagValue;
@@ -1010,7 +1046,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
1010
1046
  // be accessing the provider multiple times but the end state of this
1011
1047
  // instance and the returned flag value would be the same.
1012
1048
 
1013
- markFlagAsAccessed(54, "useRawPropsJsiValue");
1049
+ markFlagAsAccessed(56, "useRawPropsJsiValue");
1014
1050
 
1015
1051
  flagValue = currentProvider_->useRawPropsJsiValue();
1016
1052
  useRawPropsJsiValue_ = flagValue;
@@ -1028,7 +1064,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
1028
1064
  // be accessing the provider multiple times but the end state of this
1029
1065
  // instance and the returned flag value would be the same.
1030
1066
 
1031
- markFlagAsAccessed(55, "useShadowNodeStateOnClone");
1067
+ markFlagAsAccessed(57, "useShadowNodeStateOnClone");
1032
1068
 
1033
1069
  flagValue = currentProvider_->useShadowNodeStateOnClone();
1034
1070
  useShadowNodeStateOnClone_ = flagValue;
@@ -1046,7 +1082,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
1046
1082
  // be accessing the provider multiple times but the end state of this
1047
1083
  // instance and the returned flag value would be the same.
1048
1084
 
1049
- markFlagAsAccessed(56, "useTurboModuleInterop");
1085
+ markFlagAsAccessed(58, "useTurboModuleInterop");
1050
1086
 
1051
1087
  flagValue = currentProvider_->useTurboModuleInterop();
1052
1088
  useTurboModuleInterop_ = flagValue;
@@ -1064,7 +1100,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
1064
1100
  // be accessing the provider multiple times but the end state of this
1065
1101
  // instance and the returned flag value would be the same.
1066
1102
 
1067
- markFlagAsAccessed(57, "useTurboModules");
1103
+ markFlagAsAccessed(59, "useTurboModules");
1068
1104
 
1069
1105
  flagValue = currentProvider_->useTurboModules();
1070
1106
  useTurboModules_ = flagValue;
@@ -1082,7 +1118,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
1082
1118
  // be accessing the provider multiple times but the end state of this
1083
1119
  // instance and the returned flag value would be the same.
1084
1120
 
1085
- markFlagAsAccessed(58, "virtualViewPrerenderRatio");
1121
+ markFlagAsAccessed(60, "virtualViewPrerenderRatio");
1086
1122
 
1087
1123
  flagValue = currentProvider_->virtualViewPrerenderRatio();
1088
1124
  virtualViewPrerenderRatio_ = flagValue;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<e5a8a196b35c010d92d3f616979891a9>>
7
+ * @generated SignedSource<<74560113d0b23c05d7822eeba1c0dee4>>
8
8
  */
9
9
 
10
10
  /**
@@ -84,6 +84,8 @@ class ReactNativeFeatureFlagsAccessor {
84
84
  bool updateRuntimeShadowNodeReferencesOnCommit();
85
85
  bool useAlwaysAvailableJSErrorHandling();
86
86
  bool useFabricInterop();
87
+ bool useNativeEqualsInNativeReadableArrayAndroid();
88
+ bool useNativeTransformHelperAndroid();
87
89
  bool useNativeViewConfigsInBridgelessMode();
88
90
  bool useOptimizedEventBatchingOnAndroid();
89
91
  bool useRawPropsJsiValue();
@@ -102,7 +104,7 @@ class ReactNativeFeatureFlagsAccessor {
102
104
  std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
103
105
  bool wasOverridden_;
104
106
 
105
- std::array<std::atomic<const char*>, 59> accessedFeatureFlags_;
107
+ std::array<std::atomic<const char*>, 61> accessedFeatureFlags_;
106
108
 
107
109
  std::atomic<std::optional<bool>> commonTestFlag_;
108
110
  std::atomic<std::optional<bool>> animatedShouldSignalBatch_;
@@ -156,6 +158,8 @@ class ReactNativeFeatureFlagsAccessor {
156
158
  std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommit_;
157
159
  std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
158
160
  std::atomic<std::optional<bool>> useFabricInterop_;
161
+ std::atomic<std::optional<bool>> useNativeEqualsInNativeReadableArrayAndroid_;
162
+ std::atomic<std::optional<bool>> useNativeTransformHelperAndroid_;
159
163
  std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
160
164
  std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
161
165
  std::atomic<std::optional<bool>> useRawPropsJsiValue_;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<9832c18e4c7ccf232b7222e2356f99d9>>
7
+ * @generated SignedSource<<1a54000b8eb51cb91304902c7f722d45>>
8
8
  */
9
9
 
10
10
  /**
@@ -235,6 +235,14 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
235
235
  return true;
236
236
  }
237
237
 
238
+ bool useNativeEqualsInNativeReadableArrayAndroid() override {
239
+ return false;
240
+ }
241
+
242
+ bool useNativeTransformHelperAndroid() override {
243
+ return false;
244
+ }
245
+
238
246
  bool useNativeViewConfigsInBridgelessMode() override {
239
247
  return false;
240
248
  }
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<19f0a48bcfa8f8ffaf634e85301adc7e>>
7
+ * @generated SignedSource<<244db790cc754f31402981967cd902b5>>
8
8
  */
9
9
 
10
10
  /**
@@ -513,6 +513,24 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
513
513
  return ReactNativeFeatureFlagsDefaults::useFabricInterop();
514
514
  }
515
515
 
516
+ bool useNativeEqualsInNativeReadableArrayAndroid() override {
517
+ auto value = values_["useNativeEqualsInNativeReadableArrayAndroid"];
518
+ if (!value.isNull()) {
519
+ return value.getBool();
520
+ }
521
+
522
+ return ReactNativeFeatureFlagsDefaults::useNativeEqualsInNativeReadableArrayAndroid();
523
+ }
524
+
525
+ bool useNativeTransformHelperAndroid() override {
526
+ auto value = values_["useNativeTransformHelperAndroid"];
527
+ if (!value.isNull()) {
528
+ return value.getBool();
529
+ }
530
+
531
+ return ReactNativeFeatureFlagsDefaults::useNativeTransformHelperAndroid();
532
+ }
533
+
516
534
  bool useNativeViewConfigsInBridgelessMode() override {
517
535
  auto value = values_["useNativeViewConfigsInBridgelessMode"];
518
536
  if (!value.isNull()) {
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<f33ea0f19a27ec6124d8dbf1a043b4ce>>
7
+ * @generated SignedSource<<a045579d42e45fa80831856734a063aa>>
8
8
  */
9
9
 
10
10
  /**
@@ -30,6 +30,14 @@ class ReactNativeFeatureFlagsOverridesOSSExperimental : public ReactNativeFeatur
30
30
  bool preventShadowTreeCommitExhaustion() override {
31
31
  return true;
32
32
  }
33
+
34
+ bool useNativeEqualsInNativeReadableArrayAndroid() override {
35
+ return true;
36
+ }
37
+
38
+ bool useNativeTransformHelperAndroid() override {
39
+ return true;
40
+ }
33
41
  };
34
42
 
35
43
  } // namespace facebook::react
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<815769cc8d08e19b2598dd1862ed5060>>
7
+ * @generated SignedSource<<2387ed12fe46fb5b606ad13a17511f03>>
8
8
  */
9
9
 
10
10
  /**
@@ -77,6 +77,8 @@ class ReactNativeFeatureFlagsProvider {
77
77
  virtual bool updateRuntimeShadowNodeReferencesOnCommit() = 0;
78
78
  virtual bool useAlwaysAvailableJSErrorHandling() = 0;
79
79
  virtual bool useFabricInterop() = 0;
80
+ virtual bool useNativeEqualsInNativeReadableArrayAndroid() = 0;
81
+ virtual bool useNativeTransformHelperAndroid() = 0;
80
82
  virtual bool useNativeViewConfigsInBridgelessMode() = 0;
81
83
  virtual bool useOptimizedEventBatchingOnAndroid() = 0;
82
84
  virtual bool useRawPropsJsiValue() = 0;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<474a64af739969acebb4bb9bb1005168>>
7
+ * @generated SignedSource<<45e1b08fd2438b27af82591b5cfa5744>>
8
8
  */
9
9
 
10
10
  /**
@@ -304,6 +304,16 @@ bool NativeReactNativeFeatureFlags::useFabricInterop(
304
304
  return ReactNativeFeatureFlags::useFabricInterop();
305
305
  }
306
306
 
307
+ bool NativeReactNativeFeatureFlags::useNativeEqualsInNativeReadableArrayAndroid(
308
+ jsi::Runtime& /*runtime*/) {
309
+ return ReactNativeFeatureFlags::useNativeEqualsInNativeReadableArrayAndroid();
310
+ }
311
+
312
+ bool NativeReactNativeFeatureFlags::useNativeTransformHelperAndroid(
313
+ jsi::Runtime& /*runtime*/) {
314
+ return ReactNativeFeatureFlags::useNativeTransformHelperAndroid();
315
+ }
316
+
307
317
  bool NativeReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode(
308
318
  jsi::Runtime& /*runtime*/) {
309
319
  return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode();
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<bfaa3cc7ab3eeff306337b06b7ae978a>>
7
+ * @generated SignedSource<<d1862a9ce3cfeda5d140941fcd3b25bc>>
8
8
  */
9
9
 
10
10
  /**
@@ -140,6 +140,10 @@ class NativeReactNativeFeatureFlags
140
140
 
141
141
  bool useFabricInterop(jsi::Runtime& runtime);
142
142
 
143
+ bool useNativeEqualsInNativeReadableArrayAndroid(jsi::Runtime& runtime);
144
+
145
+ bool useNativeTransformHelperAndroid(jsi::Runtime& runtime);
146
+
143
147
  bool useNativeViewConfigsInBridgelessMode(jsi::Runtime& runtime);
144
148
 
145
149
  bool useOptimizedEventBatchingOnAndroid(jsi::Runtime& runtime);
@@ -550,6 +550,13 @@ BorderMetrics BaseViewProps::resolveBorderMetrics(
550
550
  Transform BaseViewProps::resolveTransform(
551
551
  const LayoutMetrics& layoutMetrics) const {
552
552
  const auto& frameSize = layoutMetrics.frame.size;
553
+ return resolveTransform(frameSize, transform, transformOrigin);
554
+ }
555
+
556
+ Transform BaseViewProps::resolveTransform(
557
+ const Size& frameSize,
558
+ const Transform& transform,
559
+ const TransformOrigin& transformOrigin) {
553
560
  auto transformMatrix = Transform{};
554
561
  if (frameSize.width == 0 && frameSize.height == 0) {
555
562
  return transformMatrix;
@@ -562,8 +569,7 @@ Transform BaseViewProps::resolveTransform(
562
569
  } else {
563
570
  for (const auto& operation : transform.operations) {
564
571
  transformMatrix = transformMatrix *
565
- Transform::FromTransformOperation(
566
- operation, layoutMetrics.frame.size, transform);
572
+ Transform::FromTransformOperation(operation, frameSize, transform);
567
573
  }
568
574
  }
569
575
 
@@ -115,6 +115,11 @@ class BaseViewProps : public YogaStylableProps, public AccessibilityProps {
115
115
  Transform resolveTransform(const LayoutMetrics& layoutMetrics) const;
116
116
  bool getClipsContentToBounds() const;
117
117
 
118
+ static Transform resolveTransform(
119
+ const Size& frameSize,
120
+ const Transform& transform,
121
+ const TransformOrigin& transformOrigin);
122
+
118
123
  #if RN_DEBUG_STRING_CONVERTIBLE
119
124
  SharedDebugStringConvertibleList getDebugProps() const override;
120
125
  #endif
@@ -16,7 +16,9 @@ add_library(bridgeless
16
16
  ${bridgeless_SRC}
17
17
  )
18
18
  target_compile_reactnative_options(bridgeless PRIVATE)
19
- target_compile_options(bridgeless PRIVATE $<$<CONFIG:Debug>:-DHERMES_ENABLE_DEBUGGER=1>)
19
+ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
20
+ target_compile_options(bridgeless PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
21
+ endif ()
20
22
  target_include_directories(bridgeless PUBLIC .)
21
23
 
22
24
  react_native_android_selector(fabricjni fabricjni "")
@@ -29,7 +29,7 @@ target_link_libraries(bridgelesshermes
29
29
  )
30
30
 
31
31
  target_compile_reactnative_options(bridgelesshermes PRIVATE)
32
- if(${CMAKE_BUILD_TYPE} MATCHES Debug)
32
+ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
33
33
  target_compile_options(
34
34
  bridgelesshermes
35
35
  PRIVATE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.81.1",
3
+ "version": "0.81.2",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -162,13 +162,13 @@
162
162
  },
163
163
  "dependencies": {
164
164
  "@jest/create-cache-key-function": "^29.7.0",
165
- "@react-native/assets-registry": "0.81.1",
166
- "@react-native/codegen": "0.81.1",
167
- "@react-native/community-cli-plugin": "0.81.1",
168
- "@react-native/gradle-plugin": "0.81.1",
169
- "@react-native/js-polyfills": "0.81.1",
170
- "@react-native/normalize-colors": "0.81.1",
171
- "@react-native/virtualized-lists": "0.81.1",
165
+ "@react-native/assets-registry": "0.81.2",
166
+ "@react-native/codegen": "0.81.2",
167
+ "@react-native/community-cli-plugin": "0.81.2",
168
+ "@react-native/gradle-plugin": "0.81.2",
169
+ "@react-native/js-polyfills": "0.81.2",
170
+ "@react-native/normalize-colors": "0.81.2",
171
+ "@react-native/virtualized-lists": "0.81.2",
172
172
  "abort-controller": "^3.0.0",
173
173
  "anser": "^1.4.9",
174
174
  "ansi-regex": "^5.0.0",
@@ -40,6 +40,12 @@ def list_native_modules!(config_command)
40
40
  packages = config["dependencies"]
41
41
  ios_project_root = Pathname.new(config["project"]["ios"]["sourceDir"])
42
42
  react_native_path = Pathname.new(config["reactNativePath"])
43
+ codegen_output_path = ios_project_root.join("build/generated/autolinking/autolinking.json")
44
+
45
+ # Write autolinking react-native-config output to codegen folder
46
+ FileUtils.mkdir_p(File.dirname(codegen_output_path))
47
+ File.write(codegen_output_path, json)
48
+
43
49
  found_pods = []
44
50
 
45
51
  packages.each do |package_name, package|
@@ -87,7 +87,7 @@ class CodegenUtils
87
87
  codegen_path = file_manager.join(ios_folder, codegen_dir)
88
88
  return if !dir_manager.exist?(codegen_path)
89
89
 
90
- FileUtils.rm_rf(dir_manager.glob("#{codegen_path}/*"))
90
+ FileUtils.rm_rf("#{codegen_path}")
91
91
  base_provider_path = file_manager.join(rn_path, 'React', 'Fabric', 'RCTThirdPartyFabricComponentsProvider')
92
92
  FileUtils.rm_rf("#{base_provider_path}.h")
93
93
  FileUtils.rm_rf("#{base_provider_path}.mm")
@@ -86,10 +86,14 @@ function execute(
86
86
  buildCodegenIfNeeded();
87
87
  }
88
88
 
89
- const reactNativeConfig = readReactNativeConfig(projectRoot);
89
+ const reactNativeConfig = readReactNativeConfig(
90
+ projectRoot,
91
+ baseOutputPath,
92
+ );
90
93
  const codegenEnabledLibraries = findCodegenEnabledLibraries(
91
94
  pkgJson,
92
95
  projectRoot,
96
+ baseOutputPath,
93
97
  reactNativeConfig,
94
98
  );
95
99
 
@@ -97,15 +97,40 @@ function cleanupEmptyFilesAndFolders(filepath /*: string */) {
97
97
  }
98
98
  }
99
99
 
100
- function readReactNativeConfig(projectRoot /*: string */) /*: $FlowFixMe */ {
101
- const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
100
+ function readGeneratedAutolinkingOutput(
101
+ baseOutputPath /*: string */,
102
+ ) /*: $FlowFixMe */ {
103
+ // NOTE: Generated by scripts/cocoapods/autolinking.rb in list_native_modules (called by use_native_modules)
104
+ const autolinkingGeneratedPath = path.resolve(
105
+ baseOutputPath,
106
+ 'build/generated/autolinking/autolinking.json',
107
+ );
108
+ if (fs.existsSync(autolinkingGeneratedPath)) {
109
+ // $FlowFixMe[unsupported-syntax]
110
+ return require(autolinkingGeneratedPath);
111
+ } else {
112
+ codegenLog(
113
+ `Could not find generated autolinking output at: ${autolinkingGeneratedPath}`,
114
+ );
115
+ return null;
116
+ }
117
+ }
102
118
 
103
- if (!fs.existsSync(rnConfigFilePath)) {
119
+ function readReactNativeConfig(
120
+ projectRoot /*: string */,
121
+ baseOutputPath /*: string */,
122
+ ) /*: $FlowFixMe */ {
123
+ const autolinkingOutput = readGeneratedAutolinkingOutput(baseOutputPath);
124
+ const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
125
+ if (autolinkingOutput) {
126
+ return autolinkingOutput;
127
+ } else if (fs.existsSync(rnConfigFilePath)) {
128
+ // $FlowIgnore[unsupported-syntax]
129
+ return require(rnConfigFilePath);
130
+ } else {
131
+ codegenLog(`Could not find React Native config at: ${rnConfigFilePath}`);
104
132
  return {};
105
133
  }
106
-
107
- // $FlowIgnore[unsupported-syntax]
108
- return require(rnConfigFilePath);
109
134
  }
110
135
 
111
136
  /**
@@ -114,17 +139,23 @@ function readReactNativeConfig(projectRoot /*: string */) /*: $FlowFixMe */ {
114
139
  function findCodegenEnabledLibraries(
115
140
  pkgJson /*: $FlowFixMe */,
116
141
  projectRoot /*: string */,
142
+ baseOutputPath /*: string */,
117
143
  reactNativeConfig /*: $FlowFixMe */,
118
144
  ) /*: Array<$FlowFixMe> */ {
119
145
  const projectLibraries = findProjectRootLibraries(pkgJson, projectRoot);
120
146
  if (pkgJsonIncludesGeneratedCode(pkgJson)) {
121
147
  return projectLibraries;
122
148
  } else {
123
- return [
124
- ...projectLibraries,
125
- ...findExternalLibraries(pkgJson, projectRoot),
149
+ const libraries = [...projectLibraries];
150
+ // If we ran autolinking, we shouldn't try to run our own "autolinking-like"
151
+ // library discovery
152
+ if (!readGeneratedAutolinkingOutput(baseOutputPath)) {
153
+ libraries.push(...findExternalLibraries(pkgJson, projectRoot));
154
+ }
155
+ libraries.push(
126
156
  ...findLibrariesFromReactNativeConfig(projectRoot, reactNativeConfig),
127
- ];
157
+ );
158
+ return libraries;
128
159
  }
129
160
  }
130
161
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- const {execSync} = require('child_process');
13
+ const {spawnSync} = require('child_process');
14
14
  const fs = require('fs');
15
15
  const yargs = require('yargs');
16
16
 
@@ -67,7 +67,9 @@ function replaceRNCoreConfiguration(
67
67
  fs.mkdirSync(finalLocation, {recursive: true});
68
68
 
69
69
  console.log('Extracting the tarball', tarballURLPath);
70
- execSync(`tar -xf ${tarballURLPath} -C ${finalLocation}`);
70
+ spawnSync('tar', ['-xf', tarballURLPath, '-C', finalLocation], {
71
+ stdio: 'inherit',
72
+ });
71
73
  }
72
74
 
73
75
  function updateLastBuildConfiguration(configuration /*: string */) {