Skip to content

Commit

Permalink
fix[react-devtools/store-test]: fork the test to represent current be… (
Browse files Browse the repository at this point in the history
#29777)

## Summary

The test started to fail after
#29088.

Fork the test and the expected store state for:
- React 18.x, to represent the previous behavior
- React >= 19, to represent the current RDT behavior, where error can't
be connected to the fiber, because it was not yet mounted and shared
with DevTools.

Ideally, DevTools should start keeping track of such fibers, but also
distinguish them from some that haven't mounted due to Suspense or error
boundaries.

DiffTrain build for commit fe5ce4e.
  • Loading branch information
hoxyq committed Jun 6, 2024
1 parent 4134bf7 commit d7d9c34
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.0.0-native-fb-90499a730e-20240606
19.0.0-native-fb-fe5ce4e3e9-20240606
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<be383566412946213c8153721a6230d0>>
* @generated SignedSource<<79b96a4fc869a84ced8571ec9aca49db>>
*/

'use strict';
Expand Down Expand Up @@ -23580,7 +23580,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-native-fb-90499a730e-20240606';
var ReactVersion = '19.0.0-native-fb-fe5ce4e3e9-20240606';

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a070166acaf42f333a0dfdce9d9230fd>>
* @generated SignedSource<<dd8051da918517c61c075d2fc18202d6>>
*/

"use strict";
Expand Down Expand Up @@ -9336,7 +9336,7 @@ var devToolsConfig$jscomp$inline_1048 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-90499a730e-20240606",
version: "19.0.0-native-fb-fe5ce4e3e9-20240606",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1235 = {
Expand Down Expand Up @@ -9367,7 +9367,7 @@ var internals$jscomp$inline_1235 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-90499a730e-20240606"
reconcilerVersion: "19.0.0-native-fb-fe5ce4e3e9-20240606"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1236 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<fbdf5d0dcfde6dbd7f7fcc797988178e>>
* @generated SignedSource<<f4609115453dfff1d070b472ee4c65ca>>
*/

"use strict";
Expand Down Expand Up @@ -9958,7 +9958,7 @@ var devToolsConfig$jscomp$inline_1131 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-90499a730e-20240606",
version: "19.0.0-native-fb-fe5ce4e3e9-20240606",
rendererPackageName: "react-test-renderer"
};
(function (internals) {
Expand Down Expand Up @@ -10002,7 +10002,7 @@ var devToolsConfig$jscomp$inline_1131 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-90499a730e-20240606"
reconcilerVersion: "19.0.0-native-fb-fe5ce4e3e9-20240606"
});
exports._Scheduler = Scheduler;
exports.act = act;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c4f90c3cb7a65db418cb24b9508982d6>>
* @generated SignedSource<<93337348c12276aa93054ba1825fec71>>
*/

'use strict';
Expand All @@ -24,7 +24,7 @@ if (
}
var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags');

var ReactVersion = '19.0.0-native-fb-90499a730e-20240606';
var ReactVersion = '19.0.0-native-fb-fe5ce4e3e9-20240606';

// Re-export dynamic flags from the internal module.
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<db39302cceaa9ba2859850a5ee335b97>>
* @generated SignedSource<<87ebec9d5b39b75bcc2aa62aac2d4035>>
*/

"use strict";
Expand Down Expand Up @@ -604,4 +604,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-90499a730e-20240606";
exports.version = "19.0.0-native-fb-fe5ce4e3e9-20240606";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<30b42907323f93c2cd0b4d26ddb19244>>
* @generated SignedSource<<98a105f1ba00ae86ccf86db6ce3be7f4>>
*/

"use strict";
Expand Down Expand Up @@ -608,7 +608,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-90499a730e-20240606";
exports.version = "19.0.0-native-fb-fe5ce4e3e9-20240606";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
90499a730ed53c29c2321faaf19e77b4ebeeada4
fe5ce4e3e969aca4705b9973a6fdb5f132e03025
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ea52ad1b5a20f277702c19a8d7b5cc74>>
* @generated SignedSource<<3d8f4a54e6c0dd5a88266eed23105ef6>>
*/

'use strict';
Expand Down Expand Up @@ -26316,7 +26316,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-native-fb-90499a730e-20240606';
var ReactVersion = '19.0.0-native-fb-fe5ce4e3e9-20240606';

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6ab03d25170d97d426ce057b1f91adff>>
* @generated SignedSource<<b2f0771bf06d8c268fe704d80550efec>>
*/

"use strict";
Expand Down Expand Up @@ -10591,7 +10591,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1125 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-native-fb-90499a730e-20240606",
version: "19.0.0-native-fb-fe5ce4e3e9-20240606",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10634,7 +10634,7 @@ var internals$jscomp$inline_1351 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-90499a730e-20240606"
reconcilerVersion: "19.0.0-native-fb-fe5ce4e3e9-20240606"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1352 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f17c4e51ef89b8fad745a53b7f9a8f20>>
* @generated SignedSource<<6980344698cf7856d715fe0a0451eaa4>>
*/

"use strict";
Expand Down Expand Up @@ -11297,7 +11297,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1206 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-native-fb-90499a730e-20240606",
version: "19.0.0-native-fb-fe5ce4e3e9-20240606",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -11353,7 +11353,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-90499a730e-20240606"
reconcilerVersion: "19.0.0-native-fb-fe5ce4e3e9-20240606"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<dd6ce1756059c9638a4958048d13513f>>
* @generated SignedSource<<62091ee9a5bc84b8b4ceda073e4f473d>>
*/

'use strict';
Expand Down Expand Up @@ -26671,7 +26671,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-native-fb-90499a730e-20240606';
var ReactVersion = '19.0.0-native-fb-fe5ce4e3e9-20240606';

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a121e0f7aff4dd07669cd58e5700a84b>>
* @generated SignedSource<<b7d1cb86359b003551cee7b7742c26cc>>
*/

"use strict";
Expand Down Expand Up @@ -10734,11 +10734,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
traverseOwnerTreeUp(hierarchy, instance);
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-90499a730e-20240606" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-fe5ce4e3e9-20240606" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-90499a730e-20240606\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-fe5ce4e3e9-20240606\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -10788,7 +10788,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1193 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-native-fb-90499a730e-20240606",
version: "19.0.0-native-fb-fe5ce4e3e9-20240606",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10831,7 +10831,7 @@ var internals$jscomp$inline_1440 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-90499a730e-20240606"
reconcilerVersion: "19.0.0-native-fb-fe5ce4e3e9-20240606"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1441 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<75b2ff32994f5c264b6dd3f858393732>>
* @generated SignedSource<<005cfb467001929534e7123cbbac0460>>
*/

"use strict";
Expand Down Expand Up @@ -11441,11 +11441,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
traverseOwnerTreeUp(hierarchy, instance);
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-90499a730e-20240606" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-fe5ce4e3e9-20240606" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-90499a730e-20240606\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-fe5ce4e3e9-20240606\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -11495,7 +11495,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1274 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-native-fb-90499a730e-20240606",
version: "19.0.0-native-fb-fe5ce4e3e9-20240606",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -11551,7 +11551,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-90499a730e-20240606"
reconcilerVersion: "19.0.0-native-fb-fe5ce4e3e9-20240606"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {
Expand Down

0 comments on commit d7d9c34

Please sign in to comment.