Skip to content

Commit

Permalink
DevTools: Rely on sourcemaps to compute hook name of built-in hooks i…
Browse files Browse the repository at this point in the history
…n newer versions (#28593)

DiffTrain build for [4f5c812](4f5c812)
  • Loading branch information
kassens committed Apr 15, 2024
1 parent baf3dfb commit 5735300
Show file tree
Hide file tree
Showing 23 changed files with 514 additions and 523 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9defcd56bc3cd53ac2901ed93f29218007010434
4f5c812a3c4e52d9ea5d908a27a317ac0f26590a
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "19.0.0-www-classic-e168c427";
var ReactVersion = "19.0.0-www-classic-1d4ea768";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -14302,7 +14302,7 @@ if (__DEV__) {
// We may have already copied the props object above to remove ref. If so,
// we can modify that. Otherwise, copy the props object with Object.assign.
if (newProps === baseProps) {
newProps = assign({}, newProps);
newProps = assign({}, newProps, baseProps);
} // Taken from old JSX runtime, where this used to live.

for (var _propName in defaultProps) {
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "19.0.0-www-modern-604f1bb4";
var ReactVersion = "19.0.0-www-modern-ecaff604";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -14012,7 +14012,7 @@ if (__DEV__) {
// We may have already copied the props object above to remove ref. If so,
// we can modify that. Otherwise, copy the props object with Object.assign.
if (newProps === baseProps) {
newProps = assign({}, newProps);
newProps = assign({}, newProps, baseProps);
} // Taken from old JSX runtime, where this used to live.

for (var _propName in defaultProps) {
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -3937,7 +3937,7 @@ function resolveClassComponentProps(
(Component = Component.defaultProps) &&
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
) {
newProps === baseProps && (newProps = assign({}, newProps));
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
for (var propName$36 in Component)
void 0 === newProps[propName$36] &&
(newProps[propName$36] = Component[propName$36]);
Expand Down Expand Up @@ -10619,7 +10619,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-classic-e5fcf28b",
version: "19.0.0-www-classic-ce4ebc75",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1322 = {
Expand Down Expand Up @@ -10650,7 +10650,7 @@ var internals$jscomp$inline_1322 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-e5fcf28b"
reconcilerVersion: "19.0.0-www-classic-ce4ebc75"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1323 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -3673,7 +3673,7 @@ function resolveClassComponentProps(
(Component = Component.defaultProps) &&
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
) {
newProps === baseProps && (newProps = assign({}, newProps));
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
for (var propName$36 in Component)
void 0 === newProps[propName$36] &&
(newProps[propName$36] = Component[propName$36]);
Expand Down Expand Up @@ -10098,7 +10098,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-modern-20a4f736",
version: "19.0.0-www-modern-3bbc0838",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1307 = {
Expand Down Expand Up @@ -10129,7 +10129,7 @@ var internals$jscomp$inline_1307 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-20a4f736"
reconcilerVersion: "19.0.0-www-modern-3bbc0838"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1308 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -19083,7 +19083,7 @@ if (__DEV__) {
// We may have already copied the props object above to remove ref. If so,
// we can modify that. Otherwise, copy the props object with Object.assign.
if (newProps === baseProps) {
newProps = assign({}, newProps);
newProps = assign({}, newProps, baseProps);
} // Taken from old JSX runtime, where this used to live.

for (var _propName in defaultProps) {
Expand Down Expand Up @@ -36250,7 +36250,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-classic-ccb6967b";
var ReactVersion = "19.0.0-www-classic-45bbbf3f";

function createPortal$1(
children,
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -32161,7 +32161,7 @@ if (__DEV__) {
// We may have already copied the props object above to remove ref. If so,
// we can modify that. Otherwise, copy the props object with Object.assign.
if (newProps === baseProps) {
newProps = assign({}, newProps);
newProps = assign({}, newProps, baseProps);
} // Taken from old JSX runtime, where this used to live.

for (var _propName in defaultProps) {
Expand Down Expand Up @@ -45766,7 +45766,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-modern-f3e31fa4";
var ReactVersion = "19.0.0-www-modern-ffeb51f8";

function createPortal$1(
children,
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -4788,7 +4788,7 @@ function resolveClassComponentProps(
(Component = Component.defaultProps) &&
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
) {
newProps === baseProps && (newProps = assign({}, newProps));
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
for (var propName$63 in Component)
void 0 === newProps[propName$63] &&
(newProps[propName$63] = Component[propName$63]);
Expand Down Expand Up @@ -17033,7 +17033,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1729 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-38c43cf6",
version: "19.0.0-www-classic-2ccb4542",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2160 = {
Expand Down Expand Up @@ -17063,7 +17063,7 @@ var internals$jscomp$inline_2160 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-38c43cf6"
reconcilerVersion: "19.0.0-www-classic-2ccb4542"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2161 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17529,4 +17529,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-38c43cf6";
exports.version = "19.0.0-www-classic-2ccb4542";
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -9904,7 +9904,7 @@ function resolveClassComponentProps(
(Component = Component.defaultProps) &&
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
) {
newProps === baseProps && (newProps = assign({}, newProps));
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
for (var propName$174 in Component)
void 0 === newProps[propName$174] &&
(newProps[propName$174] = Component[propName$174]);
Expand Down Expand Up @@ -16395,7 +16395,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1722 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-1217c10a",
version: "19.0.0-www-modern-1ef16194",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2162 = {
Expand Down Expand Up @@ -16425,7 +16425,7 @@ var internals$jscomp$inline_2162 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-1217c10a"
reconcilerVersion: "19.0.0-www-modern-1ef16194"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2163 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16733,4 +16733,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-1217c10a";
exports.version = "19.0.0-www-modern-1ef16194";
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -4996,7 +4996,7 @@ function resolveClassComponentProps(
(Component = Component.defaultProps) &&
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
) {
newProps === baseProps && (newProps = assign({}, newProps));
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
for (var propName$68 in Component)
void 0 === newProps[propName$68] &&
(newProps[propName$68] = Component[propName$68]);
Expand Down Expand Up @@ -17781,7 +17781,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1815 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-a7d2fb9b",
version: "19.0.0-www-classic-2c470496",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17825,7 +17825,7 @@ var devToolsConfig$jscomp$inline_1815 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-a7d2fb9b"
reconcilerVersion: "19.0.0-www-classic-2c470496"
});
var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog");
if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog)
Expand Down Expand Up @@ -18278,7 +18278,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-a7d2fb9b";
exports.version = "19.0.0-www-classic-2c470496";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -10135,7 +10135,7 @@ function resolveClassComponentProps(
(Component = Component.defaultProps) &&
(disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps)
) {
newProps === baseProps && (newProps = assign({}, newProps));
newProps === baseProps && (newProps = assign({}, newProps, baseProps));
for (var propName$180 in Component)
void 0 === newProps[propName$180] &&
(newProps[propName$180] = Component[propName$180]);
Expand Down Expand Up @@ -17126,7 +17126,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1808 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-1e359311",
version: "19.0.0-www-modern-98727eae",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17170,7 +17170,7 @@ var devToolsConfig$jscomp$inline_1808 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-1e359311"
reconcilerVersion: "19.0.0-www-modern-98727eae"
});
var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog");
if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog)
Expand Down Expand Up @@ -17465,7 +17465,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-1e359311";
exports.version = "19.0.0-www-modern-98727eae";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
20 changes: 9 additions & 11 deletions compiled/facebook-www/ReactDOMServer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "19.0.0-www-classic-bf1258d7";
var ReactVersion = "19.0.0-www-classic-bad327f1";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -14369,24 +14369,22 @@ if (__DEV__) {
// until the sink tells us to stop. When we should stop, we still finish writing
// that item fully and then yield. At that point we remove the already completed
// items up until the point we completed them.
if (request.pendingRootTasks > 0) {
// When there are pending root tasks we don't want to flush anything
return;
}

var i;
var completedRootSegment = request.completedRootSegment;

if (completedRootSegment !== null) {
if (completedRootSegment.status === POSTPONED) {
// We postponed the root, so we write nothing.
return;
} else if (request.pendingRootTasks === 0) {
flushPreamble(request, destination, completedRootSegment);
flushSegment(request, destination, completedRootSegment, null);
request.completedRootSegment = null;
writeCompletedRoot(destination, request.renderState);
} else {
// We haven't flushed the root yet so we don't need to check any other branches further down
return;
}

flushPreamble(request, destination, completedRootSegment);
flushSegment(request, destination, completedRootSegment, null);
request.completedRootSegment = null;
writeCompletedRoot(destination, request.renderState);
}

writeHoistables(
Expand Down
20 changes: 9 additions & 11 deletions compiled/facebook-www/ReactDOMServer-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "19.0.0-www-modern-d9b30156";
var ReactVersion = "19.0.0-www-modern-d8e2224b";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -14274,24 +14274,22 @@ if (__DEV__) {
// until the sink tells us to stop. When we should stop, we still finish writing
// that item fully and then yield. At that point we remove the already completed
// items up until the point we completed them.
if (request.pendingRootTasks > 0) {
// When there are pending root tasks we don't want to flush anything
return;
}

var i;
var completedRootSegment = request.completedRootSegment;

if (completedRootSegment !== null) {
if (completedRootSegment.status === POSTPONED) {
// We postponed the root, so we write nothing.
return;
} else if (request.pendingRootTasks === 0) {
flushPreamble(request, destination, completedRootSegment);
flushSegment(request, destination, completedRootSegment, null);
request.completedRootSegment = null;
writeCompletedRoot(destination, request.renderState);
} else {
// We haven't flushed the root yet so we don't need to check any other branches further down
return;
}

flushPreamble(request, destination, completedRootSegment);
flushSegment(request, destination, completedRootSegment, null);
request.completedRootSegment = null;
writeCompletedRoot(destination, request.renderState);
}

writeHoistables(
Expand Down
Loading

0 comments on commit 5735300

Please sign in to comment.