Skip to content

Commit ab96eb3

Browse files
committed
Use concurrent root in RTR (#28498)
Based on - facebook/react#28497 - facebook/react#28419 Reusing the disableLegacyMode flag, we set ReactTestRenderer to always render with concurrent root where legacy APIs are no longer available. If disableLegacyMode is false, we continue to allow the unstable_isConcurrent option determine the root type. Also checking a global `IS_REACT_NATIVE_TEST_ENVIRONMENT` so we can maintain the existing behavior for RN until we remove legacy root support there. DiffTrain build for commit facebook/react@bb66aa3.
1 parent dd1d24b commit ab96eb3

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<270144e142689aae36510575078767a1>>
10+
* @generated SignedSource<<c87024931f160e9769cdcf58bdec1a68>>
1111
*/
1212

1313
"use strict";
@@ -148,6 +148,7 @@ if (__DEV__) {
148148
var enableLegacyHidden = false;
149149
var enableAsyncActions = true;
150150
var alwaysThrottleRetries = true;
151+
var disableLegacyMode = false;
151152
var enableBigIntSupport = false; // Flow magic to verify the exports of this file match the original version.
152153

153154
var FunctionComponent = 0;
@@ -25508,7 +25509,7 @@ if (__DEV__) {
2550825509
return root;
2550925510
}
2551025511

25511-
var ReactVersion = "19.0.0-canary-a9ccb423";
25512+
var ReactVersion = "19.0.0-canary-ab33cef8";
2551225513

2551325514
// Might add PROFILE later.
2551425515

@@ -26402,7 +26403,8 @@ if (__DEV__) {
2640226403

2640326404
function create(element, options) {
2640426405
var createNodeMock = defaultTestOptions.createNodeMock;
26405-
var isConcurrent = false;
26406+
var isConcurrentOnly = disableLegacyMode === true;
26407+
var isConcurrent = isConcurrentOnly;
2640626408
var isStrictMode = false;
2640726409
var concurrentUpdatesByDefault = null;
2640826410

@@ -26412,8 +26414,8 @@ if (__DEV__) {
2641226414
createNodeMock = options.createNodeMock;
2641326415
}
2641426416

26415-
if (options.unstable_isConcurrent === true) {
26416-
isConcurrent = true;
26417+
{
26418+
isConcurrent = options.unstable_isConcurrent;
2641726419
}
2641826420

2641926421
if (options.unstable_strictMode === true) {

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<a75b0d81ed7e65574a940500686411f9>>
10+
* @generated SignedSource<<9e59b85bab1889d947c7a99fc106a97b>>
1111
*/
1212

1313
"use strict";
@@ -9159,7 +9159,7 @@ var devToolsConfig$jscomp$inline_1023 = {
91599159
throw Error("TestRenderer does not support findFiberByHostInstance()");
91609160
},
91619161
bundleType: 0,
9162-
version: "19.0.0-canary-1b271a1b",
9162+
version: "19.0.0-canary-f55d214e",
91639163
rendererPackageName: "react-test-renderer"
91649164
};
91659165
var internals$jscomp$inline_1213 = {
@@ -9190,7 +9190,7 @@ var internals$jscomp$inline_1213 = {
91909190
scheduleRoot: null,
91919191
setRefreshHandler: null,
91929192
getCurrentFiber: null,
9193-
reconcilerVersion: "19.0.0-canary-1b271a1b"
9193+
reconcilerVersion: "19.0.0-canary-f55d214e"
91949194
};
91959195
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
91969196
var hook$jscomp$inline_1214 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9216,7 +9216,7 @@ exports.create = function (element, options) {
92169216
null !== options &&
92179217
("function" === typeof options.createNodeMock &&
92189218
(createNodeMock = options.createNodeMock),
9219-
!0 === options.unstable_isConcurrent && (isConcurrent = !0),
9219+
(isConcurrent = options.unstable_isConcurrent),
92209220
!0 === options.unstable_strictMode && (isStrictMode = !0),
92219221
void 0 !== options.unstable_concurrentUpdatesByDefault &&
92229222
(concurrentUpdatesByDefault =

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<e79f3ae88518b14f6808a7938d5b3e84>>
10+
* @generated SignedSource<<b2573824248edd9931bd15024b146aaa>>
1111
*/
1212

1313
"use strict";
@@ -9585,7 +9585,7 @@ var devToolsConfig$jscomp$inline_1065 = {
95859585
throw Error("TestRenderer does not support findFiberByHostInstance()");
95869586
},
95879587
bundleType: 0,
9588-
version: "19.0.0-canary-a6321e7c",
9588+
version: "19.0.0-canary-cdabf445",
95899589
rendererPackageName: "react-test-renderer"
95909590
};
95919591
var internals$jscomp$inline_1254 = {
@@ -9616,7 +9616,7 @@ var internals$jscomp$inline_1254 = {
96169616
scheduleRoot: null,
96179617
setRefreshHandler: null,
96189618
getCurrentFiber: null,
9619-
reconcilerVersion: "19.0.0-canary-a6321e7c"
9619+
reconcilerVersion: "19.0.0-canary-cdabf445"
96209620
};
96219621
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
96229622
var hook$jscomp$inline_1255 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9642,7 +9642,7 @@ exports.create = function (element, options) {
96429642
null !== options &&
96439643
("function" === typeof options.createNodeMock &&
96449644
(createNodeMock = options.createNodeMock),
9645-
!0 === options.unstable_isConcurrent && (isConcurrent = !0),
9645+
(isConcurrent = options.unstable_isConcurrent),
96469646
!0 === options.unstable_strictMode && (isStrictMode = !0),
96479647
void 0 !== options.unstable_concurrentUpdatesByDefault &&
96489648
(concurrentUpdatesByDefault =
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
84c84d72f11ff1961a103b3cd59919876e48f759
1+
bb66aa3cef4e42aee790200d03cf7a82659da121

0 commit comments

Comments
 (0)