Skip to content

Commit

Permalink
Enable debugRenderPhaseSideEffectsForStrictMode in test renderers (#3…
Browse files Browse the repository at this point in the history
…1761)

This flag controls the strict mode double invoke render/lifecycles/etc
behavior in Strict Mode.

The only place this flag is off is the test renderers, which it should
be on for.

If we can land this, we can follow up to remove the flag.

DiffTrain build for [975cea2](975cea2)
  • Loading branch information
rickhanlonii committed Dec 17, 2024
1 parent ec257f2 commit b8f981a
Show file tree
Hide file tree
Showing 23 changed files with 246 additions and 176 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.1.0-native-fb-909ed63e-20241216
19.1.0-native-fb-975cea2d-20241216
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<44e4f5406673c6231d47f72fef260769>>
* @generated SignedSource<<e048f8cd89cca0e46ea0fcb7345c56b7>>
*/

"use strict";
Expand Down Expand Up @@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-909ed63e-20241216";
exports.version = "19.1.0-native-fb-975cea2d-20241216";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c8a81d9a7e576754204782c77648dd2b>>
* @generated SignedSource<<b481fe7e6c4e04511e5ff7d9ab3b644f>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-909ed63e-20241216";
exports.version = "19.1.0-native-fb-975cea2d-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c8a81d9a7e576754204782c77648dd2b>>
* @generated SignedSource<<b481fe7e6c4e04511e5ff7d9ab3b644f>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-909ed63e-20241216";
exports.version = "19.1.0-native-fb-975cea2d-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c707975af10f43c0528f615f7581aab6>>
* @generated SignedSource<<0b99a133ca81f9811348bfa8586f852a>>
*/

/*
Expand Down Expand Up @@ -25891,11 +25891,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-909ed63e-20241216" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-975cea2d-20241216" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-native-fb-909ed63e-20241216\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-975cea2d-20241216\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25932,10 +25932,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-909ed63e-20241216",
version: "19.1.0-native-fb-975cea2d-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
reconcilerVersion: "19.1.0-native-fb-975cea2d-20241216"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26081,5 +26081,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-909ed63e-20241216";
exports.version = "19.1.0-native-fb-975cea2d-20241216";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<228efb504e000ca7558ff605a12df677>>
* @generated SignedSource<<c591083af671f994ec67ed51d1169407>>
*/

/*
Expand Down Expand Up @@ -15867,14 +15867,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1722 = React.version;
if (
"19.1.0-native-fb-909ed63e-20241216" !==
"19.1.0-native-fb-975cea2d-20241216" !==
isomorphicReactPackageVersion$jscomp$inline_1722
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1722,
"19.1.0-native-fb-909ed63e-20241216"
"19.1.0-native-fb-975cea2d-20241216"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15896,10 +15896,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2177 = {
bundleType: 0,
version: "19.1.0-native-fb-909ed63e-20241216",
version: "19.1.0-native-fb-975cea2d-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
reconcilerVersion: "19.1.0-native-fb-975cea2d-20241216"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2178 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16005,4 +16005,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-909ed63e-20241216";
exports.version = "19.1.0-native-fb-975cea2d-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<14a638f5f5b68ebb01e21b6696be6f4f>>
* @generated SignedSource<<5c9a74385ad8019f94ec9781bcecdaa5>>
*/

/*
Expand Down Expand Up @@ -16520,14 +16520,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1812 = React.version;
if (
"19.1.0-native-fb-909ed63e-20241216" !==
"19.1.0-native-fb-975cea2d-20241216" !==
isomorphicReactPackageVersion$jscomp$inline_1812
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1812,
"19.1.0-native-fb-909ed63e-20241216"
"19.1.0-native-fb-975cea2d-20241216"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16549,10 +16549,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1819 = {
bundleType: 0,
version: "19.1.0-native-fb-909ed63e-20241216",
version: "19.1.0-native-fb-975cea2d-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216",
reconcilerVersion: "19.1.0-native-fb-975cea2d-20241216",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16673,4 +16673,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-909ed63e-20241216";
exports.version = "19.1.0-native-fb-975cea2d-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<05fb79898af8114507aab32dbca135dd>>
* @generated SignedSource<<1b80a09688a21b18956a78d7e8a3af54>>
*/

/*
Expand Down Expand Up @@ -25952,11 +25952,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-909ed63e-20241216" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-975cea2d-20241216" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-native-fb-909ed63e-20241216\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-975cea2d-20241216\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25993,10 +25993,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-909ed63e-20241216",
version: "19.1.0-native-fb-975cea2d-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
reconcilerVersion: "19.1.0-native-fb-975cea2d-20241216"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26458,7 +26458,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-909ed63e-20241216";
exports.version = "19.1.0-native-fb-975cea2d-20241216";
"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
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<3e15f458c990e9583465d892a44e86aa>>
* @generated SignedSource<<97074b96f9aa740b7571d35224f8b912>>
*/

/*
Expand Down Expand Up @@ -15878,14 +15878,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1723 = React.version;
if (
"19.1.0-native-fb-909ed63e-20241216" !==
"19.1.0-native-fb-975cea2d-20241216" !==
isomorphicReactPackageVersion$jscomp$inline_1723
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1723,
"19.1.0-native-fb-909ed63e-20241216"
"19.1.0-native-fb-975cea2d-20241216"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15907,10 +15907,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2180 = {
bundleType: 0,
version: "19.1.0-native-fb-909ed63e-20241216",
version: "19.1.0-native-fb-975cea2d-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
reconcilerVersion: "19.1.0-native-fb-975cea2d-20241216"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2181 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16170,4 +16170,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-909ed63e-20241216";
exports.version = "19.1.0-native-fb-975cea2d-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9ad0c4c7e2b3e9b9295627713b8820d6>>
* @generated SignedSource<<9d57b01f83626d723beff0283f9cacf0>>
*/

/*
Expand Down Expand Up @@ -16535,14 +16535,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1813 = React.version;
if (
"19.1.0-native-fb-909ed63e-20241216" !==
"19.1.0-native-fb-975cea2d-20241216" !==
isomorphicReactPackageVersion$jscomp$inline_1813
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1813,
"19.1.0-native-fb-909ed63e-20241216"
"19.1.0-native-fb-975cea2d-20241216"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16564,10 +16564,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1820 = {
bundleType: 0,
version: "19.1.0-native-fb-909ed63e-20241216",
version: "19.1.0-native-fb-975cea2d-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216",
reconcilerVersion: "19.1.0-native-fb-975cea2d-20241216",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16842,7 +16842,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-909ed63e-20241216";
exports.version = "19.1.0-native-fb-975cea2d-20241216";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit b8f981a

Please sign in to comment.