react-native 0.83.6 → 0.83.7
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.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTJscSafeUrl+Internal.h +23 -0
- package/React/CoreModules/RCTJscSafeUrl.mm +38 -0
- package/React/CoreModules/RCTRedBox+Internal.h +42 -0
- package/React/CoreModules/RCTRedBox.mm +30 -450
- package/React/CoreModules/RCTRedBox2AnsiParser+Internal.h +22 -0
- package/React/CoreModules/RCTRedBox2AnsiParser.mm +55 -0
- package/React/CoreModules/RCTRedBox2Controller+Internal.h +34 -0
- package/React/CoreModules/RCTRedBox2Controller.mm +764 -0
- package/React/CoreModules/RCTRedBox2ErrorParser+Internal.h +46 -0
- package/React/CoreModules/RCTRedBox2ErrorParser.mm +57 -0
- package/React/CoreModules/RCTRedBoxController+Internal.h +31 -0
- package/React/CoreModules/RCTRedBoxController.mm +447 -0
- package/React/CoreModules/RCTRedBoxHMRClient+Internal.h +26 -0
- package/React/CoreModules/RCTRedBoxHMRClient.mm +125 -0
- package/React/CoreModules/React-CoreModules.podspec +1 -0
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +16 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +13 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +21 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +23 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +29 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +7 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/react/debug/CMakeLists.txt +2 -1
- package/ReactCommon/react/debug/React-debug.podspec +7 -1
- package/ReactCommon/react/debug/redbox/AnsiParser.cpp +139 -0
- package/ReactCommon/react/debug/redbox/AnsiParser.h +35 -0
- package/ReactCommon/react/debug/redbox/JscSafeUrl.cpp +179 -0
- package/ReactCommon/react/debug/redbox/JscSafeUrl.h +27 -0
- package/ReactCommon/react/debug/redbox/RedBoxErrorParser.cpp +171 -0
- package/ReactCommon/react/debug/redbox/RedBoxErrorParser.h +40 -0
- package/ReactCommon/react/debug/redbox/tests/AnsiParserTest.cpp +97 -0
- package/ReactCommon/react/debug/redbox/tests/JscSafeUrlTest.cpp +173 -0
- package/ReactCommon/react/debug/redbox/tests/RedBoxErrorParserTest.cpp +107 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +9 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +11 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +58 -22
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +6 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +9 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +19 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +3 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +11 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +5 -1
- package/package.json +8 -8
- package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#include <gtest/gtest.h>
|
|
9
|
+
#include <react/debug/redbox/RedBoxErrorParser.h>
|
|
10
|
+
|
|
11
|
+
using namespace facebook::react::unstable_redbox;
|
|
12
|
+
|
|
13
|
+
TEST(RedBoxErrorParserTest, ParsesBabelTransformError) {
|
|
14
|
+
auto result = parseErrorMessage(
|
|
15
|
+
"SyntaxError: /path/to/file.js: Unexpected token (10:5)\n\n"
|
|
16
|
+
"> 10 | const x = {\n"
|
|
17
|
+
" | ^");
|
|
18
|
+
|
|
19
|
+
EXPECT_EQ(result.title, "Syntax Error");
|
|
20
|
+
EXPECT_EQ(result.message, "Unexpected token");
|
|
21
|
+
ASSERT_TRUE(result.codeFrame.has_value());
|
|
22
|
+
EXPECT_EQ(result.codeFrame->fileName, "/path/to/file.js");
|
|
23
|
+
EXPECT_EQ(result.codeFrame->row, 10);
|
|
24
|
+
EXPECT_EQ(result.codeFrame->column, 5);
|
|
25
|
+
EXPECT_TRUE(result.isCompileError);
|
|
26
|
+
EXPECT_TRUE(result.isRetryable);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
TEST(RedBoxErrorParserTest, ParsesMetroError) {
|
|
30
|
+
auto result = parseErrorMessage(
|
|
31
|
+
"InternalError Metro has encountered an error: "
|
|
32
|
+
"BundleError: Unable to resolve module (1:0)\n\n"
|
|
33
|
+
"code frame here");
|
|
34
|
+
|
|
35
|
+
EXPECT_EQ(result.title, "BundleError");
|
|
36
|
+
EXPECT_EQ(result.message, "Unable to resolve module");
|
|
37
|
+
ASSERT_TRUE(result.codeFrame.has_value());
|
|
38
|
+
EXPECT_EQ(result.codeFrame->row, 1);
|
|
39
|
+
EXPECT_TRUE(result.isCompileError);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
TEST(RedBoxErrorParserTest, ParsesBundleLoadError_SyntaxError) {
|
|
43
|
+
auto result = parseErrorMessage(
|
|
44
|
+
"SyntaxError in /app/index.js: Unexpected token (3:10)\ncode frame");
|
|
45
|
+
|
|
46
|
+
EXPECT_EQ(result.title, "Syntax Error");
|
|
47
|
+
EXPECT_EQ(result.message, "Unexpected token");
|
|
48
|
+
ASSERT_TRUE(result.codeFrame.has_value());
|
|
49
|
+
EXPECT_EQ(result.codeFrame->fileName, "/app/index.js");
|
|
50
|
+
EXPECT_EQ(result.codeFrame->row, 3);
|
|
51
|
+
EXPECT_EQ(result.codeFrame->column, 10);
|
|
52
|
+
EXPECT_TRUE(result.isCompileError);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
TEST(RedBoxErrorParserTest, ParsesBundleLoadError_UnableToResolve) {
|
|
56
|
+
auto result = parseErrorMessage(
|
|
57
|
+
"UnableToResolveError in /app/index.js: Cannot find module (1:0)");
|
|
58
|
+
|
|
59
|
+
EXPECT_EQ(result.title, "Module Not Found");
|
|
60
|
+
EXPECT_TRUE(result.isCompileError);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
TEST(RedBoxErrorParserTest, ParsesGenericTransformError) {
|
|
64
|
+
auto result = parseErrorMessage("TransformError some error message");
|
|
65
|
+
|
|
66
|
+
EXPECT_EQ(result.title, "Syntax Error");
|
|
67
|
+
EXPECT_EQ(result.message, "TransformError some error message");
|
|
68
|
+
EXPECT_FALSE(result.codeFrame.has_value());
|
|
69
|
+
EXPECT_TRUE(result.isCompileError);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
TEST(RedBoxErrorParserTest, DefaultsToUncaughtError) {
|
|
73
|
+
auto result = parseErrorMessage("TypeError: undefined is not a function");
|
|
74
|
+
|
|
75
|
+
EXPECT_EQ(result.title, "Uncaught Error");
|
|
76
|
+
EXPECT_EQ(result.message, "TypeError: undefined is not a function");
|
|
77
|
+
EXPECT_FALSE(result.codeFrame.has_value());
|
|
78
|
+
EXPECT_FALSE(result.isCompileError);
|
|
79
|
+
EXPECT_TRUE(result.isRetryable);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
TEST(RedBoxErrorParserTest, UsesNameForTitle) {
|
|
83
|
+
auto result = parseErrorMessage("something broke", "CustomError");
|
|
84
|
+
|
|
85
|
+
EXPECT_EQ(result.title, "CustomError");
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
TEST(RedBoxErrorParserTest, UsesRenderErrorForComponentStack) {
|
|
89
|
+
auto result =
|
|
90
|
+
parseErrorMessage("something broke", "", "in MyComponent\nin App");
|
|
91
|
+
|
|
92
|
+
EXPECT_EQ(result.title, "Render Error");
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
TEST(RedBoxErrorParserTest, NonFatalDefaultsToError) {
|
|
96
|
+
auto result = parseErrorMessage("warning message", "", "", false);
|
|
97
|
+
|
|
98
|
+
EXPECT_EQ(result.title, "Error");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
TEST(RedBoxErrorParserTest, HandlesEmptyMessage) {
|
|
102
|
+
auto result = parseErrorMessage("");
|
|
103
|
+
|
|
104
|
+
EXPECT_EQ(result.title, "Uncaught Error");
|
|
105
|
+
EXPECT_EQ(result.message, "");
|
|
106
|
+
EXPECT_FALSE(result.codeFrame.has_value());
|
|
107
|
+
}
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<9ceab23bb1cb8d569411222993ef9f1e>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -290,6 +290,14 @@ bool ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion() {
|
|
|
290
290
|
return getAccessor().preventShadowTreeCommitExhaustion();
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
+
bool ReactNativeFeatureFlags::redBoxV2Android() {
|
|
294
|
+
return getAccessor().redBoxV2Android();
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
bool ReactNativeFeatureFlags::redBoxV2IOS() {
|
|
298
|
+
return getAccessor().redBoxV2IOS();
|
|
299
|
+
}
|
|
300
|
+
|
|
293
301
|
bool ReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover() {
|
|
294
302
|
return getAccessor().shouldPressibilityUseW3CPointerEventsForHover();
|
|
295
303
|
}
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<26b7504c2446d37c6540609a620854cb>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -369,6 +369,16 @@ class ReactNativeFeatureFlags {
|
|
|
369
369
|
*/
|
|
370
370
|
RN_EXPORT static bool preventShadowTreeCommitExhaustion();
|
|
371
371
|
|
|
372
|
+
/**
|
|
373
|
+
* Use the redesigned RedBox error overlay on Android, styled to match the LogBox visual language.
|
|
374
|
+
*/
|
|
375
|
+
RN_EXPORT static bool redBoxV2Android();
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Use the redesigned RedBox error overlay on iOS, styled to match the LogBox visual language.
|
|
379
|
+
*/
|
|
380
|
+
RN_EXPORT static bool redBoxV2IOS();
|
|
381
|
+
|
|
372
382
|
/**
|
|
373
383
|
* Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
|
|
374
384
|
*/
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<71a8a1e9b86beb41e91532bc07831dba>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1217,6 +1217,42 @@ bool ReactNativeFeatureFlagsAccessor::preventShadowTreeCommitExhaustion() {
|
|
|
1217
1217
|
return flagValue.value();
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
|
+
bool ReactNativeFeatureFlagsAccessor::redBoxV2Android() {
|
|
1221
|
+
auto flagValue = redBoxV2Android_.load();
|
|
1222
|
+
|
|
1223
|
+
if (!flagValue.has_value()) {
|
|
1224
|
+
// This block is not exclusive but it is not necessary.
|
|
1225
|
+
// If multiple threads try to initialize the feature flag, we would only
|
|
1226
|
+
// be accessing the provider multiple times but the end state of this
|
|
1227
|
+
// instance and the returned flag value would be the same.
|
|
1228
|
+
|
|
1229
|
+
markFlagAsAccessed(66, "redBoxV2Android");
|
|
1230
|
+
|
|
1231
|
+
flagValue = currentProvider_->redBoxV2Android();
|
|
1232
|
+
redBoxV2Android_ = flagValue;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
return flagValue.value();
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
bool ReactNativeFeatureFlagsAccessor::redBoxV2IOS() {
|
|
1239
|
+
auto flagValue = redBoxV2IOS_.load();
|
|
1240
|
+
|
|
1241
|
+
if (!flagValue.has_value()) {
|
|
1242
|
+
// This block is not exclusive but it is not necessary.
|
|
1243
|
+
// If multiple threads try to initialize the feature flag, we would only
|
|
1244
|
+
// be accessing the provider multiple times but the end state of this
|
|
1245
|
+
// instance and the returned flag value would be the same.
|
|
1246
|
+
|
|
1247
|
+
markFlagAsAccessed(67, "redBoxV2IOS");
|
|
1248
|
+
|
|
1249
|
+
flagValue = currentProvider_->redBoxV2IOS();
|
|
1250
|
+
redBoxV2IOS_ = flagValue;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
return flagValue.value();
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1220
1256
|
bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHover() {
|
|
1221
1257
|
auto flagValue = shouldPressibilityUseW3CPointerEventsForHover_.load();
|
|
1222
1258
|
|
|
@@ -1226,7 +1262,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHo
|
|
|
1226
1262
|
// be accessing the provider multiple times but the end state of this
|
|
1227
1263
|
// instance and the returned flag value would be the same.
|
|
1228
1264
|
|
|
1229
|
-
markFlagAsAccessed(
|
|
1265
|
+
markFlagAsAccessed(68, "shouldPressibilityUseW3CPointerEventsForHover");
|
|
1230
1266
|
|
|
1231
1267
|
flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover();
|
|
1232
1268
|
shouldPressibilityUseW3CPointerEventsForHover_ = flagValue;
|
|
@@ -1244,7 +1280,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldTriggerResponderTransferOnScrollAndr
|
|
|
1244
1280
|
// be accessing the provider multiple times but the end state of this
|
|
1245
1281
|
// instance and the returned flag value would be the same.
|
|
1246
1282
|
|
|
1247
|
-
markFlagAsAccessed(
|
|
1283
|
+
markFlagAsAccessed(69, "shouldTriggerResponderTransferOnScrollAndroid");
|
|
1248
1284
|
|
|
1249
1285
|
flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid();
|
|
1250
1286
|
shouldTriggerResponderTransferOnScrollAndroid_ = flagValue;
|
|
@@ -1262,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause()
|
|
|
1262
1298
|
// be accessing the provider multiple times but the end state of this
|
|
1263
1299
|
// instance and the returned flag value would be the same.
|
|
1264
1300
|
|
|
1265
|
-
markFlagAsAccessed(
|
|
1301
|
+
markFlagAsAccessed(70, "skipActivityIdentityAssertionOnHostPause");
|
|
1266
1302
|
|
|
1267
1303
|
flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause();
|
|
1268
1304
|
skipActivityIdentityAssertionOnHostPause_ = flagValue;
|
|
@@ -1280,7 +1316,7 @@ bool ReactNativeFeatureFlagsAccessor::sweepActiveTouchOnChildNativeGesturesAndro
|
|
|
1280
1316
|
// be accessing the provider multiple times but the end state of this
|
|
1281
1317
|
// instance and the returned flag value would be the same.
|
|
1282
1318
|
|
|
1283
|
-
markFlagAsAccessed(
|
|
1319
|
+
markFlagAsAccessed(71, "sweepActiveTouchOnChildNativeGesturesAndroid");
|
|
1284
1320
|
|
|
1285
1321
|
flagValue = currentProvider_->sweepActiveTouchOnChildNativeGesturesAndroid();
|
|
1286
1322
|
sweepActiveTouchOnChildNativeGesturesAndroid_ = flagValue;
|
|
@@ -1298,7 +1334,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
|
|
|
1298
1334
|
// be accessing the provider multiple times but the end state of this
|
|
1299
1335
|
// instance and the returned flag value would be the same.
|
|
1300
1336
|
|
|
1301
|
-
markFlagAsAccessed(
|
|
1337
|
+
markFlagAsAccessed(72, "traceTurboModulePromiseRejectionsOnAndroid");
|
|
1302
1338
|
|
|
1303
1339
|
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
|
|
1304
1340
|
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
|
|
@@ -1316,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
|
|
|
1316
1352
|
// be accessing the provider multiple times but the end state of this
|
|
1317
1353
|
// instance and the returned flag value would be the same.
|
|
1318
1354
|
|
|
1319
|
-
markFlagAsAccessed(
|
|
1355
|
+
markFlagAsAccessed(73, "updateRuntimeShadowNodeReferencesOnCommit");
|
|
1320
1356
|
|
|
1321
1357
|
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
|
|
1322
1358
|
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
|
|
@@ -1334,7 +1370,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
|
|
|
1334
1370
|
// be accessing the provider multiple times but the end state of this
|
|
1335
1371
|
// instance and the returned flag value would be the same.
|
|
1336
1372
|
|
|
1337
|
-
markFlagAsAccessed(
|
|
1373
|
+
markFlagAsAccessed(74, "useAlwaysAvailableJSErrorHandling");
|
|
1338
1374
|
|
|
1339
1375
|
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
|
|
1340
1376
|
useAlwaysAvailableJSErrorHandling_ = flagValue;
|
|
@@ -1352,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
|
|
|
1352
1388
|
// be accessing the provider multiple times but the end state of this
|
|
1353
1389
|
// instance and the returned flag value would be the same.
|
|
1354
1390
|
|
|
1355
|
-
markFlagAsAccessed(
|
|
1391
|
+
markFlagAsAccessed(75, "useFabricInterop");
|
|
1356
1392
|
|
|
1357
1393
|
flagValue = currentProvider_->useFabricInterop();
|
|
1358
1394
|
useFabricInterop_ = flagValue;
|
|
@@ -1370,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeEqualsInNativeReadableArrayAndroi
|
|
|
1370
1406
|
// be accessing the provider multiple times but the end state of this
|
|
1371
1407
|
// instance and the returned flag value would be the same.
|
|
1372
1408
|
|
|
1373
|
-
markFlagAsAccessed(
|
|
1409
|
+
markFlagAsAccessed(76, "useNativeEqualsInNativeReadableArrayAndroid");
|
|
1374
1410
|
|
|
1375
1411
|
flagValue = currentProvider_->useNativeEqualsInNativeReadableArrayAndroid();
|
|
1376
1412
|
useNativeEqualsInNativeReadableArrayAndroid_ = flagValue;
|
|
@@ -1388,7 +1424,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeTransformHelperAndroid() {
|
|
|
1388
1424
|
// be accessing the provider multiple times but the end state of this
|
|
1389
1425
|
// instance and the returned flag value would be the same.
|
|
1390
1426
|
|
|
1391
|
-
markFlagAsAccessed(
|
|
1427
|
+
markFlagAsAccessed(77, "useNativeTransformHelperAndroid");
|
|
1392
1428
|
|
|
1393
1429
|
flagValue = currentProvider_->useNativeTransformHelperAndroid();
|
|
1394
1430
|
useNativeTransformHelperAndroid_ = flagValue;
|
|
@@ -1406,7 +1442,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
|
|
|
1406
1442
|
// be accessing the provider multiple times but the end state of this
|
|
1407
1443
|
// instance and the returned flag value would be the same.
|
|
1408
1444
|
|
|
1409
|
-
markFlagAsAccessed(
|
|
1445
|
+
markFlagAsAccessed(78, "useNativeViewConfigsInBridgelessMode");
|
|
1410
1446
|
|
|
1411
1447
|
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
|
1412
1448
|
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
|
@@ -1424,7 +1460,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
|
|
|
1424
1460
|
// be accessing the provider multiple times but the end state of this
|
|
1425
1461
|
// instance and the returned flag value would be the same.
|
|
1426
1462
|
|
|
1427
|
-
markFlagAsAccessed(
|
|
1463
|
+
markFlagAsAccessed(79, "useOptimizedEventBatchingOnAndroid");
|
|
1428
1464
|
|
|
1429
1465
|
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
|
1430
1466
|
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
|
@@ -1442,7 +1478,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
|
|
|
1442
1478
|
// be accessing the provider multiple times but the end state of this
|
|
1443
1479
|
// instance and the returned flag value would be the same.
|
|
1444
1480
|
|
|
1445
|
-
markFlagAsAccessed(
|
|
1481
|
+
markFlagAsAccessed(80, "useRawPropsJsiValue");
|
|
1446
1482
|
|
|
1447
1483
|
flagValue = currentProvider_->useRawPropsJsiValue();
|
|
1448
1484
|
useRawPropsJsiValue_ = flagValue;
|
|
@@ -1460,7 +1496,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
|
|
|
1460
1496
|
// be accessing the provider multiple times but the end state of this
|
|
1461
1497
|
// instance and the returned flag value would be the same.
|
|
1462
1498
|
|
|
1463
|
-
markFlagAsAccessed(
|
|
1499
|
+
markFlagAsAccessed(81, "useShadowNodeStateOnClone");
|
|
1464
1500
|
|
|
1465
1501
|
flagValue = currentProvider_->useShadowNodeStateOnClone();
|
|
1466
1502
|
useShadowNodeStateOnClone_ = flagValue;
|
|
@@ -1478,7 +1514,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() {
|
|
|
1478
1514
|
// be accessing the provider multiple times but the end state of this
|
|
1479
1515
|
// instance and the returned flag value would be the same.
|
|
1480
1516
|
|
|
1481
|
-
markFlagAsAccessed(
|
|
1517
|
+
markFlagAsAccessed(82, "useSharedAnimatedBackend");
|
|
1482
1518
|
|
|
1483
1519
|
flagValue = currentProvider_->useSharedAnimatedBackend();
|
|
1484
1520
|
useSharedAnimatedBackend_ = flagValue;
|
|
@@ -1496,7 +1532,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() {
|
|
|
1496
1532
|
// be accessing the provider multiple times but the end state of this
|
|
1497
1533
|
// instance and the returned flag value would be the same.
|
|
1498
1534
|
|
|
1499
|
-
markFlagAsAccessed(
|
|
1535
|
+
markFlagAsAccessed(83, "useTraitHiddenOnAndroid");
|
|
1500
1536
|
|
|
1501
1537
|
flagValue = currentProvider_->useTraitHiddenOnAndroid();
|
|
1502
1538
|
useTraitHiddenOnAndroid_ = flagValue;
|
|
@@ -1514,7 +1550,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
|
|
|
1514
1550
|
// be accessing the provider multiple times but the end state of this
|
|
1515
1551
|
// instance and the returned flag value would be the same.
|
|
1516
1552
|
|
|
1517
|
-
markFlagAsAccessed(
|
|
1553
|
+
markFlagAsAccessed(84, "useTurboModuleInterop");
|
|
1518
1554
|
|
|
1519
1555
|
flagValue = currentProvider_->useTurboModuleInterop();
|
|
1520
1556
|
useTurboModuleInterop_ = flagValue;
|
|
@@ -1532,7 +1568,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
|
|
|
1532
1568
|
// be accessing the provider multiple times but the end state of this
|
|
1533
1569
|
// instance and the returned flag value would be the same.
|
|
1534
1570
|
|
|
1535
|
-
markFlagAsAccessed(
|
|
1571
|
+
markFlagAsAccessed(85, "useTurboModules");
|
|
1536
1572
|
|
|
1537
1573
|
flagValue = currentProvider_->useTurboModules();
|
|
1538
1574
|
useTurboModules_ = flagValue;
|
|
@@ -1550,7 +1586,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() {
|
|
|
1550
1586
|
// be accessing the provider multiple times but the end state of this
|
|
1551
1587
|
// instance and the returned flag value would be the same.
|
|
1552
1588
|
|
|
1553
|
-
markFlagAsAccessed(
|
|
1589
|
+
markFlagAsAccessed(86, "viewCullingOutsetRatio");
|
|
1554
1590
|
|
|
1555
1591
|
flagValue = currentProvider_->viewCullingOutsetRatio();
|
|
1556
1592
|
viewCullingOutsetRatio_ = flagValue;
|
|
@@ -1568,7 +1604,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewHysteresisRatio() {
|
|
|
1568
1604
|
// be accessing the provider multiple times but the end state of this
|
|
1569
1605
|
// instance and the returned flag value would be the same.
|
|
1570
1606
|
|
|
1571
|
-
markFlagAsAccessed(
|
|
1607
|
+
markFlagAsAccessed(87, "virtualViewHysteresisRatio");
|
|
1572
1608
|
|
|
1573
1609
|
flagValue = currentProvider_->virtualViewHysteresisRatio();
|
|
1574
1610
|
virtualViewHysteresisRatio_ = flagValue;
|
|
@@ -1586,7 +1622,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
|
|
|
1586
1622
|
// be accessing the provider multiple times but the end state of this
|
|
1587
1623
|
// instance and the returned flag value would be the same.
|
|
1588
1624
|
|
|
1589
|
-
markFlagAsAccessed(
|
|
1625
|
+
markFlagAsAccessed(88, "virtualViewPrerenderRatio");
|
|
1590
1626
|
|
|
1591
1627
|
flagValue = currentProvider_->virtualViewPrerenderRatio();
|
|
1592
1628
|
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<<
|
|
7
|
+
* @generated SignedSource<<7286fc61200f969c22910f37180ad481>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -98,6 +98,8 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
98
98
|
bool perfMonitorV2Enabled();
|
|
99
99
|
double preparedTextCacheSize();
|
|
100
100
|
bool preventShadowTreeCommitExhaustion();
|
|
101
|
+
bool redBoxV2Android();
|
|
102
|
+
bool redBoxV2IOS();
|
|
101
103
|
bool shouldPressibilityUseW3CPointerEventsForHover();
|
|
102
104
|
bool shouldTriggerResponderTransferOnScrollAndroid();
|
|
103
105
|
bool skipActivityIdentityAssertionOnHostPause();
|
|
@@ -130,7 +132,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
130
132
|
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
|
131
133
|
bool wasOverridden_;
|
|
132
134
|
|
|
133
|
-
std::array<std::atomic<const char*>,
|
|
135
|
+
std::array<std::atomic<const char*>, 89> accessedFeatureFlags_;
|
|
134
136
|
|
|
135
137
|
std::atomic<std::optional<bool>> commonTestFlag_;
|
|
136
138
|
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
|
|
@@ -198,6 +200,8 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
198
200
|
std::atomic<std::optional<bool>> perfMonitorV2Enabled_;
|
|
199
201
|
std::atomic<std::optional<double>> preparedTextCacheSize_;
|
|
200
202
|
std::atomic<std::optional<bool>> preventShadowTreeCommitExhaustion_;
|
|
203
|
+
std::atomic<std::optional<bool>> redBoxV2Android_;
|
|
204
|
+
std::atomic<std::optional<bool>> redBoxV2IOS_;
|
|
201
205
|
std::atomic<std::optional<bool>> shouldPressibilityUseW3CPointerEventsForHover_;
|
|
202
206
|
std::atomic<std::optional<bool>> shouldTriggerResponderTransferOnScrollAndroid_;
|
|
203
207
|
std::atomic<std::optional<bool>> skipActivityIdentityAssertionOnHostPause_;
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<0118a824a779b337399cb008d2c40af2>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -291,6 +291,14 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
291
291
|
return false;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
+
bool redBoxV2Android() override {
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
bool redBoxV2IOS() override {
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
|
|
294
302
|
bool shouldPressibilityUseW3CPointerEventsForHover() override {
|
|
295
303
|
return false;
|
|
296
304
|
}
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<1434eae86af219c2c989aade2e59968d>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -639,6 +639,24 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
|
|
639
639
|
return ReactNativeFeatureFlagsDefaults::preventShadowTreeCommitExhaustion();
|
|
640
640
|
}
|
|
641
641
|
|
|
642
|
+
bool redBoxV2Android() override {
|
|
643
|
+
auto value = values_["redBoxV2Android"];
|
|
644
|
+
if (!value.isNull()) {
|
|
645
|
+
return value.getBool();
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
return ReactNativeFeatureFlagsDefaults::redBoxV2Android();
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
bool redBoxV2IOS() override {
|
|
652
|
+
auto value = values_["redBoxV2IOS"];
|
|
653
|
+
if (!value.isNull()) {
|
|
654
|
+
return value.getBool();
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
return ReactNativeFeatureFlagsDefaults::redBoxV2IOS();
|
|
658
|
+
}
|
|
659
|
+
|
|
642
660
|
bool shouldPressibilityUseW3CPointerEventsForHover() override {
|
|
643
661
|
auto value = values_["shouldPressibilityUseW3CPointerEventsForHover"];
|
|
644
662
|
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<<
|
|
7
|
+
* @generated SignedSource<<990b3d661a81316160046f01bba5e683>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -91,6 +91,8 @@ class ReactNativeFeatureFlagsProvider {
|
|
|
91
91
|
virtual bool perfMonitorV2Enabled() = 0;
|
|
92
92
|
virtual double preparedTextCacheSize() = 0;
|
|
93
93
|
virtual bool preventShadowTreeCommitExhaustion() = 0;
|
|
94
|
+
virtual bool redBoxV2Android() = 0;
|
|
95
|
+
virtual bool redBoxV2IOS() = 0;
|
|
94
96
|
virtual bool shouldPressibilityUseW3CPointerEventsForHover() = 0;
|
|
95
97
|
virtual bool shouldTriggerResponderTransferOnScrollAndroid() = 0;
|
|
96
98
|
virtual bool skipActivityIdentityAssertionOnHostPause() = 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<<
|
|
7
|
+
* @generated SignedSource<<1e23ab5dd844fae335eb7bfc2953794a>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -374,6 +374,16 @@ bool NativeReactNativeFeatureFlags::preventShadowTreeCommitExhaustion(
|
|
|
374
374
|
return ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion();
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
+
bool NativeReactNativeFeatureFlags::redBoxV2Android(
|
|
378
|
+
jsi::Runtime& /*runtime*/) {
|
|
379
|
+
return ReactNativeFeatureFlags::redBoxV2Android();
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
bool NativeReactNativeFeatureFlags::redBoxV2IOS(
|
|
383
|
+
jsi::Runtime& /*runtime*/) {
|
|
384
|
+
return ReactNativeFeatureFlags::redBoxV2IOS();
|
|
385
|
+
}
|
|
386
|
+
|
|
377
387
|
bool NativeReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover(
|
|
378
388
|
jsi::Runtime& /*runtime*/) {
|
|
379
389
|
return ReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover();
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<6d3c44622ffc5392e446a19ce48b1e61>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -168,6 +168,10 @@ class NativeReactNativeFeatureFlags
|
|
|
168
168
|
|
|
169
169
|
bool preventShadowTreeCommitExhaustion(jsi::Runtime& runtime);
|
|
170
170
|
|
|
171
|
+
bool redBoxV2Android(jsi::Runtime& runtime);
|
|
172
|
+
|
|
173
|
+
bool redBoxV2IOS(jsi::Runtime& runtime);
|
|
174
|
+
|
|
171
175
|
bool shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime& runtime);
|
|
172
176
|
|
|
173
177
|
bool shouldTriggerResponderTransferOnScrollAndroid(jsi::Runtime& runtime);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.83.
|
|
3
|
+
"version": "0.83.7",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -160,13 +160,13 @@
|
|
|
160
160
|
},
|
|
161
161
|
"dependencies": {
|
|
162
162
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
163
|
-
"@react-native/assets-registry": "0.83.
|
|
164
|
-
"@react-native/codegen": "0.83.
|
|
165
|
-
"@react-native/community-cli-plugin": "0.83.
|
|
166
|
-
"@react-native/gradle-plugin": "0.83.
|
|
167
|
-
"@react-native/js-polyfills": "0.83.
|
|
168
|
-
"@react-native/normalize-colors": "0.83.
|
|
169
|
-
"@react-native/virtualized-lists": "0.83.
|
|
163
|
+
"@react-native/assets-registry": "0.83.7",
|
|
164
|
+
"@react-native/codegen": "0.83.7",
|
|
165
|
+
"@react-native/community-cli-plugin": "0.83.7",
|
|
166
|
+
"@react-native/gradle-plugin": "0.83.7",
|
|
167
|
+
"@react-native/js-polyfills": "0.83.7",
|
|
168
|
+
"@react-native/normalize-colors": "0.83.7",
|
|
169
|
+
"@react-native/virtualized-lists": "0.83.7",
|
|
170
170
|
"abort-controller": "^3.0.0",
|
|
171
171
|
"anser": "^1.4.9",
|
|
172
172
|
"ansi-regex": "^5.0.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<<
|
|
7
|
+
* @generated SignedSource<<67f332fc91b30e629da8919f82044079>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -116,6 +116,8 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
116
116
|
perfMonitorV2Enabled: Getter<boolean>,
|
|
117
117
|
preparedTextCacheSize: Getter<number>,
|
|
118
118
|
preventShadowTreeCommitExhaustion: Getter<boolean>,
|
|
119
|
+
redBoxV2Android: Getter<boolean>,
|
|
120
|
+
redBoxV2IOS: Getter<boolean>,
|
|
119
121
|
shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean>,
|
|
120
122
|
shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean>,
|
|
121
123
|
skipActivityIdentityAssertionOnHostPause: Getter<boolean>,
|
|
@@ -482,6 +484,14 @@ export const preparedTextCacheSize: Getter<number> = createNativeFlagGetter('pre
|
|
|
482
484
|
* Enables a new mechanism in ShadowTree to prevent problems caused by multiple threads trying to commit concurrently. If a thread tries to commit a few times unsuccessfully, it will acquire a lock and try again.
|
|
483
485
|
*/
|
|
484
486
|
export const preventShadowTreeCommitExhaustion: Getter<boolean> = createNativeFlagGetter('preventShadowTreeCommitExhaustion', false);
|
|
487
|
+
/**
|
|
488
|
+
* Use the redesigned RedBox error overlay on Android, styled to match the LogBox visual language.
|
|
489
|
+
*/
|
|
490
|
+
export const redBoxV2Android: Getter<boolean> = createNativeFlagGetter('redBoxV2Android', false);
|
|
491
|
+
/**
|
|
492
|
+
* Use the redesigned RedBox error overlay on iOS, styled to match the LogBox visual language.
|
|
493
|
+
*/
|
|
494
|
+
export const redBoxV2IOS: Getter<boolean> = createNativeFlagGetter('redBoxV2IOS', false);
|
|
485
495
|
/**
|
|
486
496
|
* Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
|
|
487
497
|
*/
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<76ee0fb7c942f84965cece244a891d7f>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -91,6 +91,8 @@ export interface Spec extends TurboModule {
|
|
|
91
91
|
+perfMonitorV2Enabled?: () => boolean;
|
|
92
92
|
+preparedTextCacheSize?: () => number;
|
|
93
93
|
+preventShadowTreeCommitExhaustion?: () => boolean;
|
|
94
|
+
+redBoxV2Android?: () => boolean;
|
|
95
|
+
+redBoxV2IOS?: () => boolean;
|
|
94
96
|
+shouldPressibilityUseW3CPointerEventsForHover?: () => boolean;
|
|
95
97
|
+shouldTriggerResponderTransferOnScrollAndroid?: () => boolean;
|
|
96
98
|
+skipActivityIdentityAssertionOnHostPause?: () => boolean;
|