Skip to content

Commit

Permalink
Clean up findFiberByHostInstance from DevTools Hook (#31711)
Browse files Browse the repository at this point in the history
The need for this was removed in
#30831

Since the new DevTools version has been released for a while and we
expect people to more or less auto-update. Future versions of React
don't need this.

Once we remove the remaining uses of `getInstanceFromNode` e.g. in the
deprecated internal `findDOMNode`/`findNodeHandle` and the event system,
we can completely remove the tagging of DOM nodes.

DiffTrain build for [3b597c0](3b597c0)
  • Loading branch information
sebmarkbage committed Dec 10, 2024
1 parent e3aab58 commit 0558177
Show file tree
Hide file tree
Showing 34 changed files with 96 additions and 130 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
de68d2f4a2403ad1ef46a3036ddc1f9080640588
3b597c0576977773910c77e075cc6d6308decb04
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
de68d2f4a2403ad1ef46a3036ddc1f9080640588
3b597c0576977773910c77e075cc6d6308decb04
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-de68d2f4-20241204";
exports.version = "19.0.0-www-classic-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-de68d2f4-20241204";
exports.version = "19.0.0-www-modern-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,4 +634,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-de68d2f4-20241204";
exports.version = "19.0.0-www-classic-3b597c05-20241210";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,4 +634,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-de68d2f4-20241204";
exports.version = "19.0.0-www-modern-3b597c05-20241210";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-de68d2f4-20241204";
exports.version = "19.0.0-www-classic-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-de68d2f4-20241204";
exports.version = "19.0.0-www-modern-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 3 additions & 7 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1281,9 +1281,6 @@ __DEV__ &&
(null == props.visible || props.visible) && instance.show();
}
function unhideTextInstance() {}
function getInstanceFromNode() {
return null;
}
function createCursor(defaultValue) {
return { current: defaultValue };
}
Expand Down Expand Up @@ -17129,11 +17126,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-classic-de68d2f4-20241204",
version: "19.0.0-www-classic-3b597c05-20241210",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-classic-3b597c05-20241210"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -17167,7 +17163,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-classic-de68d2f4-20241204";
exports.version = "19.0.0-www-classic-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 3 additions & 7 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1267,9 +1267,6 @@ __DEV__ &&
(null == props.visible || props.visible) && instance.show();
}
function unhideTextInstance() {}
function getInstanceFromNode() {
return null;
}
function createCursor(defaultValue) {
return { current: defaultValue };
}
Expand Down Expand Up @@ -16892,11 +16889,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-modern-de68d2f4-20241204",
version: "19.0.0-www-modern-3b597c05-20241210",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-modern-3b597c05-20241210"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -16930,7 +16926,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-modern-de68d2f4-20241204";
exports.version = "19.0.0-www-modern-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
9 changes: 3 additions & 6 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -10827,13 +10827,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1509 = {
bundleType: 0,
version: "19.0.0-www-classic-de68d2f4-20241204",
version: "19.0.0-www-classic-3b597c05-20241210",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function () {
return null;
},
reconcilerVersion: "19.0.0-www-classic-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-classic-3b597c05-20241210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1510 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10859,4 +10856,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-classic-de68d2f4-20241204";
exports.version = "19.0.0-www-classic-3b597c05-20241210";
9 changes: 3 additions & 6 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -10543,13 +10543,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1488 = {
bundleType: 0,
version: "19.0.0-www-modern-de68d2f4-20241204",
version: "19.0.0-www-modern-3b597c05-20241210",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function () {
return null;
},
reconcilerVersion: "19.0.0-www-modern-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-modern-3b597c05-20241210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1489 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10575,4 +10572,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-modern-de68d2f4-20241204";
exports.version = "19.0.0-www-modern-3b597c05-20241210";
11 changes: 5 additions & 6 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -27569,11 +27569,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-de68d2f4-20241204" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-3b597c05-20241210" !== 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.0.0-www-classic-de68d2f4-20241204\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-3b597c05-20241210\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27616,11 +27616,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-classic-de68d2f4-20241204",
version: "19.0.0-www-classic-3b597c05-20241210",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-classic-3b597c05-20241210"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -28225,7 +28224,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-de68d2f4-20241204";
exports.version = "19.0.0-www-classic-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
11 changes: 5 additions & 6 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27348,11 +27348,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-de68d2f4-20241204" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-3b597c05-20241210" !== 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.0.0-www-modern-de68d2f4-20241204\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-3b597c05-20241210\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27395,11 +27395,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-modern-de68d2f4-20241204",
version: "19.0.0-www-modern-3b597c05-20241210",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-modern-3b597c05-20241210"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -28004,7 +28003,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-de68d2f4-20241204";
exports.version = "19.0.0-www-modern-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
11 changes: 5 additions & 6 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17277,14 +17277,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1774 = React.version;
if (
"19.0.0-www-classic-de68d2f4-20241204" !==
"19.0.0-www-classic-3b597c05-20241210" !==
isomorphicReactPackageVersion$jscomp$inline_1774
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1774,
"19.0.0-www-classic-de68d2f4-20241204"
"19.0.0-www-classic-3b597c05-20241210"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17302,11 +17302,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2315 = {
bundleType: 0,
version: "19.0.0-www-classic-de68d2f4-20241204",
version: "19.0.0-www-classic-3b597c05-20241210",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-classic-3b597c05-20241210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2316 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17669,4 +17668,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-de68d2f4-20241204";
exports.version = "19.0.0-www-classic-3b597c05-20241210";
11 changes: 5 additions & 6 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -17008,14 +17008,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1764 = React.version;
if (
"19.0.0-www-modern-de68d2f4-20241204" !==
"19.0.0-www-modern-3b597c05-20241210" !==
isomorphicReactPackageVersion$jscomp$inline_1764
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1764,
"19.0.0-www-modern-de68d2f4-20241204"
"19.0.0-www-modern-3b597c05-20241210"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17033,11 +17033,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2297 = {
bundleType: 0,
version: "19.0.0-www-modern-de68d2f4-20241204",
version: "19.0.0-www-modern-3b597c05-20241210",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-modern-3b597c05-20241210"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2298 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17400,4 +17399,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-de68d2f4-20241204";
exports.version = "19.0.0-www-modern-3b597c05-20241210";
11 changes: 5 additions & 6 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17966,14 +17966,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1867 = React.version;
if (
"19.0.0-www-classic-de68d2f4-20241204" !==
"19.0.0-www-classic-3b597c05-20241210" !==
isomorphicReactPackageVersion$jscomp$inline_1867
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1867,
"19.0.0-www-classic-de68d2f4-20241204"
"19.0.0-www-classic-3b597c05-20241210"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17991,11 +17991,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1869 = {
bundleType: 0,
version: "19.0.0-www-classic-de68d2f4-20241204",
version: "19.0.0-www-classic-3b597c05-20241210",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-classic-3b597c05-20241210"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1869.getLaneLabelMap = getLaneLabelMap),
Expand Down Expand Up @@ -18361,7 +18360,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-de68d2f4-20241204";
exports.version = "19.0.0-www-classic-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
11 changes: 5 additions & 6 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -17696,14 +17696,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1857 = React.version;
if (
"19.0.0-www-modern-de68d2f4-20241204" !==
"19.0.0-www-modern-3b597c05-20241210" !==
isomorphicReactPackageVersion$jscomp$inline_1857
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1857,
"19.0.0-www-modern-de68d2f4-20241204"
"19.0.0-www-modern-3b597c05-20241210"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17721,11 +17721,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1859 = {
bundleType: 0,
version: "19.0.0-www-modern-de68d2f4-20241204",
version: "19.0.0-www-modern-3b597c05-20241210",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-de68d2f4-20241204"
reconcilerVersion: "19.0.0-www-modern-3b597c05-20241210"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1859.getLaneLabelMap = getLaneLabelMap),
Expand Down Expand Up @@ -18091,7 +18090,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-de68d2f4-20241204";
exports.version = "19.0.0-www-modern-3b597c05-20241210";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactDOMServer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -8991,5 +8991,5 @@ __DEV__ &&
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "19.0.0-www-classic-de68d2f4-20241204";
exports.version = "19.0.0-www-classic-3b597c05-20241210";
})();
Loading

0 comments on commit 0558177

Please sign in to comment.