react-native 0.79.2 → 0.79.4

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 (51) hide show
  1. package/Libraries/AppDelegate/RCTReactNativeFactory.mm +0 -4
  2. package/Libraries/Core/ReactNativeVersion.js +1 -1
  3. package/React/Base/RCTVersion.m +1 -1
  4. package/React/CoreModules/RCTDeviceInfo.mm +50 -20
  5. package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +0 -6
  6. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +0 -9
  7. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +18 -4
  8. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +1 -1
  9. package/ReactAndroid/gradle.properties +1 -1
  10. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +1 -7
  11. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +1 -11
  12. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +1 -3
  13. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +1 -3
  14. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +1 -12
  15. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android.kt +0 -2
  16. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +1 -3
  17. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  18. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderRadiusStyle.kt +2 -2
  19. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +19 -36
  20. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +1 -1
  21. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +0 -3
  22. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +1 -15
  23. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +1 -4
  24. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  25. package/ReactCommon/jsc/React-jsc.podspec +1 -1
  26. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +1 -5
  27. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +1 -6
  28. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +8 -26
  29. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +2 -4
  30. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +1 -5
  31. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +1 -10
  32. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +1 -2
  33. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +1 -6
  34. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +1 -3
  35. package/ReactCommon/react/runtime/TimerManager.cpp +6 -4
  36. package/ReactCommon/react/runtime/TimerManager.h +3 -1
  37. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +0 -1
  38. package/ReactCommon/react/runtime/tests/cxx/ReactInstanceTest.cpp +9 -5
  39. package/package.json +9 -8
  40. package/scripts/codegen/generate-artifacts-executor.js +55 -18
  41. package/sdks/.hermesversion +1 -1
  42. package/sdks/hermesc/osx-bin/hermes +0 -0
  43. package/sdks/hermesc/osx-bin/hermesc +0 -0
  44. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  45. package/sdks/hermesc/win64-bin/msvcp140.dll +0 -0
  46. package/sdks/hermesc/win64-bin/vcruntime140.dll +0 -0
  47. package/sdks/hermesc/win64-bin/vcruntime140_1.dll +0 -0
  48. package/src/private/featureflags/ReactNativeFeatureFlags.js +1 -6
  49. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -2
  50. package/types/index.d.ts +1 -1
  51. package/types/tsconfig.test.json +16 -0
@@ -14,14 +14,14 @@
14
14
 
15
15
  #define REACT_NATIVE_VERSION_MAJOR 0
16
16
  #define REACT_NATIVE_VERSION_MINOR 79
17
- #define REACT_NATIVE_VERSION_PATCH 2
17
+ #define REACT_NATIVE_VERSION_PATCH 4
18
18
 
19
19
  namespace facebook::react {
20
20
 
21
21
  constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 79;
24
- int32_t Patch = 2;
24
+ int32_t Patch = 4;
25
25
  std::string_view Prerelease = "";
26
26
  } ReactNativeVersion;
27
27
 
@@ -32,6 +32,6 @@ Pod::Spec.new do |s|
32
32
  s.dependency "React-jsi", version
33
33
 
34
34
  s.subspec "Fabric" do |ss|
35
- ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)" }
35
+ ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)", "DEFINES_MODULE" => "YES" }
36
36
  end
37
37
  end
@@ -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<<661a4193f9ba7af0c963bc13751deb15>>
7
+ * @generated SignedSource<<1c90106ded5dc5f08cdec4dede695341>>
8
8
  */
9
9
 
10
10
  /**
@@ -174,10 +174,6 @@ bool ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling() {
174
174
  return getAccessor().useAlwaysAvailableJSErrorHandling();
175
175
  }
176
176
 
177
- bool ReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior() {
178
- return getAccessor().useEditTextStockAndroidFocusBehavior();
179
- }
180
-
181
177
  bool ReactNativeFeatureFlags::useFabricInterop() {
182
178
  return getAccessor().useFabricInterop();
183
179
  }
@@ -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<<53e965423f2957b37e0470c607cc45a4>>
7
+ * @generated SignedSource<<ce2f5895234f1cfb30374c72db54ccce>>
8
8
  */
9
9
 
10
10
  /**
@@ -224,11 +224,6 @@ class ReactNativeFeatureFlags {
224
224
  */
225
225
  RN_EXPORT static bool useAlwaysAvailableJSErrorHandling();
226
226
 
227
- /**
228
- * If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
229
- */
230
- RN_EXPORT static bool useEditTextStockAndroidFocusBehavior();
231
-
232
227
  /**
233
228
  * Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
234
229
  */
@@ -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<<5ff3ac57eb17d9b6642d98f2fc35bd9d>>
7
+ * @generated SignedSource<<f975f6ffd2d6ec5d9057585ac0613c23>>
8
8
  */
9
9
 
10
10
  /**
@@ -695,24 +695,6 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
695
695
  return flagValue.value();
696
696
  }
697
697
 
698
- bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() {
699
- auto flagValue = useEditTextStockAndroidFocusBehavior_.load();
700
-
701
- if (!flagValue.has_value()) {
702
- // This block is not exclusive but it is not necessary.
703
- // If multiple threads try to initialize the feature flag, we would only
704
- // be accessing the provider multiple times but the end state of this
705
- // instance and the returned flag value would be the same.
706
-
707
- markFlagAsAccessed(37, "useEditTextStockAndroidFocusBehavior");
708
-
709
- flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
710
- useEditTextStockAndroidFocusBehavior_ = flagValue;
711
- }
712
-
713
- return flagValue.value();
714
- }
715
-
716
698
  bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
717
699
  auto flagValue = useFabricInterop_.load();
718
700
 
@@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
722
704
  // be accessing the provider multiple times but the end state of this
723
705
  // instance and the returned flag value would be the same.
724
706
 
725
- markFlagAsAccessed(38, "useFabricInterop");
707
+ markFlagAsAccessed(37, "useFabricInterop");
726
708
 
727
709
  flagValue = currentProvider_->useFabricInterop();
728
710
  useFabricInterop_ = flagValue;
@@ -740,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
740
722
  // be accessing the provider multiple times but the end state of this
741
723
  // instance and the returned flag value would be the same.
742
724
 
743
- markFlagAsAccessed(39, "useNativeViewConfigsInBridgelessMode");
725
+ markFlagAsAccessed(38, "useNativeViewConfigsInBridgelessMode");
744
726
 
745
727
  flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
746
728
  useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
758
740
  // be accessing the provider multiple times but the end state of this
759
741
  // instance and the returned flag value would be the same.
760
742
 
761
- markFlagAsAccessed(40, "useOptimizedEventBatchingOnAndroid");
743
+ markFlagAsAccessed(39, "useOptimizedEventBatchingOnAndroid");
762
744
 
763
745
  flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
764
746
  useOptimizedEventBatchingOnAndroid_ = flagValue;
@@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
776
758
  // be accessing the provider multiple times but the end state of this
777
759
  // instance and the returned flag value would be the same.
778
760
 
779
- markFlagAsAccessed(41, "useRawPropsJsiValue");
761
+ markFlagAsAccessed(40, "useRawPropsJsiValue");
780
762
 
781
763
  flagValue = currentProvider_->useRawPropsJsiValue();
782
764
  useRawPropsJsiValue_ = flagValue;
@@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
794
776
  // be accessing the provider multiple times but the end state of this
795
777
  // instance and the returned flag value would be the same.
796
778
 
797
- markFlagAsAccessed(42, "useShadowNodeStateOnClone");
779
+ markFlagAsAccessed(41, "useShadowNodeStateOnClone");
798
780
 
799
781
  flagValue = currentProvider_->useShadowNodeStateOnClone();
800
782
  useShadowNodeStateOnClone_ = flagValue;
@@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
812
794
  // be accessing the provider multiple times but the end state of this
813
795
  // instance and the returned flag value would be the same.
814
796
 
815
- markFlagAsAccessed(43, "useTurboModuleInterop");
797
+ markFlagAsAccessed(42, "useTurboModuleInterop");
816
798
 
817
799
  flagValue = currentProvider_->useTurboModuleInterop();
818
800
  useTurboModuleInterop_ = flagValue;
@@ -830,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
830
812
  // be accessing the provider multiple times but the end state of this
831
813
  // instance and the returned flag value would be the same.
832
814
 
833
- markFlagAsAccessed(44, "useTurboModules");
815
+ markFlagAsAccessed(43, "useTurboModules");
834
816
 
835
817
  flagValue = currentProvider_->useTurboModules();
836
818
  useTurboModules_ = 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<<267385c8df88a5d1eb7f1e2478209d39>>
7
+ * @generated SignedSource<<978f828e7368b8802f8eaa5194e86e2f>>
8
8
  */
9
9
 
10
10
  /**
@@ -69,7 +69,6 @@ class ReactNativeFeatureFlagsAccessor {
69
69
  bool traceTurboModulePromiseRejectionsOnAndroid();
70
70
  bool updateRuntimeShadowNodeReferencesOnCommit();
71
71
  bool useAlwaysAvailableJSErrorHandling();
72
- bool useEditTextStockAndroidFocusBehavior();
73
72
  bool useFabricInterop();
74
73
  bool useNativeViewConfigsInBridgelessMode();
75
74
  bool useOptimizedEventBatchingOnAndroid();
@@ -88,7 +87,7 @@ class ReactNativeFeatureFlagsAccessor {
88
87
  std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
89
88
  bool wasOverridden_;
90
89
 
91
- std::array<std::atomic<const char*>, 45> accessedFeatureFlags_;
90
+ std::array<std::atomic<const char*>, 44> accessedFeatureFlags_;
92
91
 
93
92
  std::atomic<std::optional<bool>> commonTestFlag_;
94
93
  std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
@@ -127,7 +126,6 @@ class ReactNativeFeatureFlagsAccessor {
127
126
  std::atomic<std::optional<bool>> traceTurboModulePromiseRejectionsOnAndroid_;
128
127
  std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommit_;
129
128
  std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
130
- std::atomic<std::optional<bool>> useEditTextStockAndroidFocusBehavior_;
131
129
  std::atomic<std::optional<bool>> useFabricInterop_;
132
130
  std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
133
131
  std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
@@ -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<<48bb4ea50c42676aee161ea1594a6aec>>
7
+ * @generated SignedSource<<643c1fd24fbc1a77ef109e712023f9d5>>
8
8
  */
9
9
 
10
10
  /**
@@ -175,10 +175,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
175
175
  return false;
176
176
  }
177
177
 
178
- bool useEditTextStockAndroidFocusBehavior() override {
179
- return true;
180
- }
181
-
182
178
  bool useFabricInterop() override {
183
179
  return false;
184
180
  }
@@ -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<<e92353bf22b82344bc6ab97f08ca724c>>
7
+ * @generated SignedSource<<a0aeb1ef5255e98ab3df8e892a6147f4>>
8
8
  */
9
9
 
10
10
  /**
@@ -378,15 +378,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
378
378
  return ReactNativeFeatureFlagsDefaults::useAlwaysAvailableJSErrorHandling();
379
379
  }
380
380
 
381
- bool useEditTextStockAndroidFocusBehavior() override {
382
- auto value = values_["useEditTextStockAndroidFocusBehavior"];
383
- if (!value.isNull()) {
384
- return value.getBool();
385
- }
386
-
387
- return ReactNativeFeatureFlagsDefaults::useEditTextStockAndroidFocusBehavior();
388
- }
389
-
390
381
  bool useFabricInterop() override {
391
382
  auto value = values_["useFabricInterop"];
392
383
  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<<d8f7773c6f24c715a6c0e0ab703677fd>>
7
+ * @generated SignedSource<<4db2ff36701f0dbcd3dd59fa5879a612>>
8
8
  */
9
9
 
10
10
  /**
@@ -62,7 +62,6 @@ class ReactNativeFeatureFlagsProvider {
62
62
  virtual bool traceTurboModulePromiseRejectionsOnAndroid() = 0;
63
63
  virtual bool updateRuntimeShadowNodeReferencesOnCommit() = 0;
64
64
  virtual bool useAlwaysAvailableJSErrorHandling() = 0;
65
- virtual bool useEditTextStockAndroidFocusBehavior() = 0;
66
65
  virtual bool useFabricInterop() = 0;
67
66
  virtual bool useNativeViewConfigsInBridgelessMode() = 0;
68
67
  virtual bool useOptimizedEventBatchingOnAndroid() = 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<<76f1f689940817c1df6ace2f8dd062e7>>
7
+ * @generated SignedSource<<4f6ee8b8bae8ea84fab77eb9feb63f9d>>
8
8
  */
9
9
 
10
10
  /**
@@ -229,11 +229,6 @@ bool NativeReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling(
229
229
  return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
230
230
  }
231
231
 
232
- bool NativeReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior(
233
- jsi::Runtime& /*runtime*/) {
234
- return ReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior();
235
- }
236
-
237
232
  bool NativeReactNativeFeatureFlags::useFabricInterop(
238
233
  jsi::Runtime& /*runtime*/) {
239
234
  return ReactNativeFeatureFlags::useFabricInterop();
@@ -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<<af8c15575ff94feff9dadaaf8becdf18>>
7
+ * @generated SignedSource<<0009cf8a05d254e3695e7ce57fc5f8af>>
8
8
  */
9
9
 
10
10
  /**
@@ -111,8 +111,6 @@ class NativeReactNativeFeatureFlags
111
111
 
112
112
  bool useAlwaysAvailableJSErrorHandling(jsi::Runtime& runtime);
113
113
 
114
- bool useEditTextStockAndroidFocusBehavior(jsi::Runtime& runtime);
115
-
116
114
  bool useFabricInterop(jsi::Runtime& runtime);
117
115
 
118
116
  bool useNativeViewConfigsInBridgelessMode(jsi::Runtime& runtime);
@@ -242,8 +242,9 @@ void TimerManager::attachGlobals(jsi::Runtime& runtime) {
242
242
  }
243
243
 
244
244
  if (!args[0].isObject() || !args[0].asObject(rt).isFunction(rt)) {
245
- // Do not throw any error to match web spec
246
- return timerIndex_++;
245
+ // Do not throw any error to match web spec; instead return 0, an
246
+ // invalid timer id
247
+ return 0;
247
248
  }
248
249
 
249
250
  auto callback = args[0].getObject(rt).getFunction(rt);
@@ -300,8 +301,9 @@ void TimerManager::attachGlobals(jsi::Runtime& runtime) {
300
301
  }
301
302
 
302
303
  if (!args[0].isObject() || !args[0].asObject(rt).isFunction(rt)) {
303
- throw jsi::JSError(
304
- rt, "The first argument to setInterval must be a function.");
304
+ // Do not throw any error to match web spec; instead return 0, an
305
+ // invalid timer id
306
+ return 0;
305
307
  }
306
308
  auto callback = args[0].getObject(rt).getFunction(rt);
307
309
  auto delay = count > 1
@@ -93,7 +93,9 @@ class TimerManager {
93
93
 
94
94
  // Each timeout that is registered on this queue gets a sequential id. This
95
95
  // is the global count from which those are assigned.
96
- TimerHandle timerIndex_{0};
96
+ // As per WHATWG HTML 8.6.1 (Timers) ids must be greater than zero, i.e. start
97
+ // at 1
98
+ TimerHandle timerIndex_{1};
97
99
 
98
100
  // The React Native microtask queue is used to back public APIs including
99
101
  // `queueMicrotask`, `clearImmediate`, and `setImmediate` (which is used by
@@ -474,7 +474,6 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
474
474
 
475
475
  if (error) {
476
476
  [strongSelf handleBundleLoadingError:error];
477
- [strongSelf invalidate];
478
477
  return;
479
478
  }
480
479
  // DevSettings module is needed by _loadScriptFromSource's callback so prior initialization is required
@@ -267,7 +267,9 @@ TEST_F(ReactInstanceTest, testSetTimeoutWithoutDelay) {
267
267
  EXPECT_CALL(
268
268
  *mockRegistry_,
269
269
  createTimer(_, 0)); // If delay is not provided, it should use 0
270
- eval("setTimeout(() => {});");
270
+ auto val = eval("setTimeout(() => {});");
271
+ expectNoError();
272
+ EXPECT_EQ(val.asNumber(), 1); // First timer id should start at 1
271
273
  }
272
274
 
273
275
  TEST_F(ReactInstanceTest, testSetTimeoutWithPassThroughArgs) {
@@ -299,8 +301,9 @@ TEST_F(ReactInstanceTest, testSetTimeoutWithInvalidArgs) {
299
301
  getErrorMessage("setTimeout();"),
300
302
  "setTimeout must be called with at least one argument (the function to call).");
301
303
 
302
- eval("setTimeout('invalid');");
304
+ auto val = eval("setTimeout('invalid')");
303
305
  expectNoError();
306
+ EXPECT_EQ(val.asNumber(), 0);
304
307
 
305
308
  eval("setTimeout(() => {}, 'invalid');");
306
309
  expectNoError();
@@ -417,9 +420,10 @@ TEST_F(ReactInstanceTest, testSetIntervalWithInvalidArgs) {
417
420
  EXPECT_EQ(
418
421
  getErrorMessage("setInterval();"),
419
422
  "setInterval must be called with at least one argument (the function to call).");
420
- EXPECT_EQ(
421
- getErrorMessage("setInterval('invalid', 100);"),
422
- "The first argument to setInterval must be a function.");
423
+
424
+ auto val = eval("setInterval('invalid', 100)");
425
+ expectNoError();
426
+ EXPECT_EQ(val.asNumber(), 0);
423
427
  }
424
428
 
425
429
  TEST_F(ReactInstanceTest, testClearInterval) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.79.2",
3
+ "version": "0.79.4",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -39,6 +39,7 @@
39
39
  "gradle.properties",
40
40
  "gradle/libs.versions.toml",
41
41
  "index.js",
42
+ "index.flow.js",
42
43
  "interface.js",
43
44
  "jest-preset.js",
44
45
  "jest",
@@ -108,13 +109,13 @@
108
109
  },
109
110
  "dependencies": {
110
111
  "@jest/create-cache-key-function": "^29.7.0",
111
- "@react-native/assets-registry": "0.79.2",
112
- "@react-native/codegen": "0.79.2",
113
- "@react-native/community-cli-plugin": "0.79.2",
114
- "@react-native/gradle-plugin": "0.79.2",
115
- "@react-native/js-polyfills": "0.79.2",
116
- "@react-native/normalize-colors": "0.79.2",
117
- "@react-native/virtualized-lists": "0.79.2",
112
+ "@react-native/assets-registry": "0.79.4",
113
+ "@react-native/codegen": "0.79.4",
114
+ "@react-native/community-cli-plugin": "0.79.4",
115
+ "@react-native/gradle-plugin": "0.79.4",
116
+ "@react-native/js-polyfills": "0.79.4",
117
+ "@react-native/normalize-colors": "0.79.4",
118
+ "@react-native/virtualized-lists": "0.79.4",
118
119
  "abort-controller": "^3.0.0",
119
120
  "anser": "^1.4.9",
120
121
  "ansi-regex": "^5.0.0",
@@ -198,6 +198,7 @@ function printDeprecationWarningIfNeeded(dependency) {
198
198
  function extractLibrariesFromConfigurationArray(configFile, dependencyPath) {
199
199
  return configFile.codegenConfig.libraries.map(config => {
200
200
  return {
201
+ name: config.name,
201
202
  config,
202
203
  libraryPath: dependencyPath,
203
204
  };
@@ -213,6 +214,7 @@ function extractLibrariesFromJSON(configFile, dependencyPath) {
213
214
  const config = configFile.codegenConfig;
214
215
  return [
215
216
  {
217
+ name: configFile.name,
216
218
  config,
217
219
  libraryPath: dependencyPath,
218
220
  },
@@ -325,22 +327,13 @@ function findExternalLibraries(pkgJson, projectRoot) {
325
327
  });
326
328
  }
327
329
 
328
- function findLibrariesFromReactNativeConfig(projectRoot) {
329
- const rnConfigFileName = 'react-native.config.js';
330
-
330
+ function findLibrariesFromReactNativeConfig(projectRoot, rnConfig) {
331
331
  codegenLog(
332
- `Searching for codegen-enabled libraries in ${rnConfigFileName}`,
332
+ `Searching for codegen-enabled libraries in react-native.config.js`,
333
333
  true,
334
334
  );
335
335
 
336
- const rnConfigFilePath = path.resolve(projectRoot, rnConfigFileName);
337
-
338
- if (!fs.existsSync(rnConfigFilePath)) {
339
- return [];
340
- }
341
- const rnConfig = require(rnConfigFilePath);
342
-
343
- if (rnConfig.dependencies == null) {
336
+ if (!rnConfig.dependencies) {
344
337
  return [];
345
338
  }
346
339
  return Object.keys(rnConfig.dependencies).flatMap(name => {
@@ -364,6 +357,19 @@ function findLibrariesFromReactNativeConfig(projectRoot) {
364
357
  });
365
358
  }
366
359
 
360
+ /**
361
+ * Finds all disabled libraries by platform based the react native config.
362
+ *
363
+ * This is needed when selectively disabling libraries in react-native.config.js since codegen should exclude those libraries as well.
364
+ */
365
+ function findDisabledLibrariesByPlatform(reactNativeConfig, platform) {
366
+ const dependencies = reactNativeConfig.dependencies ?? {};
367
+
368
+ return Object.keys(dependencies).filter(
369
+ dependency => dependencies[dependency].platforms?.[platform] === null,
370
+ );
371
+ }
372
+
367
373
  function findProjectRootLibraries(pkgJson, projectRoot) {
368
374
  codegenLog('Searching for codegen-enabled libraries in the app.', true);
369
375
 
@@ -592,7 +598,7 @@ function mustGenerateNativeCode(includeLibraryPath, schemaInfo) {
592
598
  );
593
599
  }
594
600
 
595
- function findCodegenEnabledLibraries(pkgJson, projectRoot) {
601
+ function findCodegenEnabledLibraries(pkgJson, projectRoot, reactNativeConfig) {
596
602
  const projectLibraries = findProjectRootLibraries(pkgJson, projectRoot);
597
603
  if (pkgJsonIncludesGeneratedCode(pkgJson)) {
598
604
  return projectLibraries;
@@ -600,11 +606,21 @@ function findCodegenEnabledLibraries(pkgJson, projectRoot) {
600
606
  return [
601
607
  ...projectLibraries,
602
608
  ...findExternalLibraries(pkgJson, projectRoot),
603
- ...findLibrariesFromReactNativeConfig(projectRoot),
609
+ ...findLibrariesFromReactNativeConfig(projectRoot, reactNativeConfig),
604
610
  ];
605
611
  }
606
612
  }
607
613
 
614
+ function readReactNativeConfig(projectRoot) {
615
+ const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
616
+
617
+ if (!fs.existsSync(rnConfigFilePath)) {
618
+ return {};
619
+ }
620
+
621
+ return require(rnConfigFilePath);
622
+ }
623
+
608
624
  function generateCustomURLHandlers(libraries, outputDir) {
609
625
  const customImageURLLoaderClasses = libraries
610
626
  .flatMap(
@@ -833,8 +849,11 @@ function findFilesWithExtension(filePath, extension) {
833
849
  return null;
834
850
  }
835
851
 
836
- // Skip hidden folders, that starts with `.`
837
- if (absolutePath.includes(`${path.sep}.`)) {
852
+ // Skip hidden folders, that starts with `.` but allow `.pnpm`
853
+ if (
854
+ absolutePath.includes(`${path.sep}.`) &&
855
+ !absolutePath.includes(`${path.sep}.pnpm`)
856
+ ) {
838
857
  return null;
839
858
  }
840
859
 
@@ -1053,9 +1072,14 @@ function execute(projectRoot, targetPlatform, baseOutputPath, source) {
1053
1072
 
1054
1073
  buildCodegenIfNeeded();
1055
1074
 
1056
- const libraries = findCodegenEnabledLibraries(pkgJson, projectRoot);
1075
+ const reactNativeConfig = readReactNativeConfig(projectRoot);
1076
+ const codegenEnabledLibraries = findCodegenEnabledLibraries(
1077
+ pkgJson,
1078
+ projectRoot,
1079
+ reactNativeConfig,
1080
+ );
1057
1081
 
1058
- if (libraries.length === 0) {
1082
+ if (codegenEnabledLibraries.length === 0) {
1059
1083
  codegenLog('No codegen-enabled libraries found.', true);
1060
1084
  return;
1061
1085
  }
@@ -1064,6 +1088,19 @@ function execute(projectRoot, targetPlatform, baseOutputPath, source) {
1064
1088
  targetPlatform === 'all' ? supportedPlatforms : [targetPlatform];
1065
1089
 
1066
1090
  for (const platform of platforms) {
1091
+ const disabledLibraries = findDisabledLibrariesByPlatform(
1092
+ reactNativeConfig,
1093
+ platform,
1094
+ );
1095
+
1096
+ const libraries = codegenEnabledLibraries.filter(
1097
+ ({name}) => !disabledLibraries.includes(name),
1098
+ );
1099
+
1100
+ if (!libraries.length) {
1101
+ continue;
1102
+ }
1103
+
1067
1104
  const outputPath = computeOutputPath(
1068
1105
  projectRoot,
1069
1106
  baseOutputPath,
@@ -1 +1 @@
1
- hermes-2025-03-03-RNv0.79.0-bc17d964d03743424823d7dd1a9f37633459c5c5
1
+ hermes-2025-06-04-RNv0.79.3-7f9a871eefeb2c3852365ee80f0b6733ec12ac3b
Binary file
Binary file
Binary file
Binary file
@@ -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<<5b1d3ba6712de7a927eeeb8602ee2a8f>>
7
+ * @generated SignedSource<<a28a3b729eaeee7ba3b1c2105d277286>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -86,7 +86,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
86
86
  traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
87
87
  updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
88
88
  useAlwaysAvailableJSErrorHandling: Getter<boolean>,
89
- useEditTextStockAndroidFocusBehavior: Getter<boolean>,
90
89
  useFabricInterop: Getter<boolean>,
91
90
  useNativeViewConfigsInBridgelessMode: Getter<boolean>,
92
91
  useOptimizedEventBatchingOnAndroid: Getter<boolean>,
@@ -323,10 +322,6 @@ export const updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean> = create
323
322
  * In Bridgeless mode, use the always available javascript error reporting pipeline.
324
323
  */
325
324
  export const useAlwaysAvailableJSErrorHandling: Getter<boolean> = createNativeFlagGetter('useAlwaysAvailableJSErrorHandling', false);
326
- /**
327
- * If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
328
- */
329
- export const useEditTextStockAndroidFocusBehavior: Getter<boolean> = createNativeFlagGetter('useEditTextStockAndroidFocusBehavior', true);
330
325
  /**
331
326
  * Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
332
327
  */
@@ -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<<f8da5261357616749d6319190ed0139d>>
7
+ * @generated SignedSource<<2499cbe243c048d9e3647342ebec3544>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -61,7 +61,6 @@ export interface Spec extends TurboModule {
61
61
  +traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
62
62
  +updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
63
63
  +useAlwaysAvailableJSErrorHandling?: () => boolean;
64
- +useEditTextStockAndroidFocusBehavior?: () => boolean;
65
64
  +useFabricInterop?: () => boolean;
66
65
  +useNativeViewConfigsInBridgelessMode?: () => boolean;
67
66
  +useOptimizedEventBatchingOnAndroid?: () => boolean;
package/types/index.d.ts CHANGED
@@ -68,7 +68,7 @@
68
68
  /// <reference path="modules/BatchedBridge.d.ts" />
69
69
  /// <reference path="modules/Codegen.d.ts" />
70
70
  /// <reference path="modules/Devtools.d.ts" />
71
- /// <reference types="../src/types/globals.d.ts" />
71
+ /// <reference path="../src/types/globals.d.ts" />
72
72
  /// <reference path="modules/LaunchScreen.d.ts" />
73
73
 
74
74
  export * from '../Libraries/ActionSheetIOS/ActionSheetIOS';
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "lib": ["es6"],
5
+ "noImplicitAny": true,
6
+ "noImplicitThis": true,
7
+ "strictFunctionTypes": true,
8
+ "strictNullChecks": true,
9
+ "types": [],
10
+ "jsx": "react",
11
+ "noEmit": true,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "paths": {"react-native": ["."]}
14
+ },
15
+ "include": ["../**/*.d.ts", "__typetests__/**/*"]
16
+ }