Set disableLegacyMode to true for www (#29871)

Set disableLegacyMode to true for www

DiffTrain build for [fb9a90fa48](https://github.com/facebook/react/commit/fb9a90fa480efce40ac2a845478817467f965ddc)
This commit is contained in:
kassens
2024-06-14 13:58:57 +00:00
parent bf7873152c
commit dc2c2d7bb9
35 changed files with 9129 additions and 13239 deletions
@@ -418,9 +418,6 @@ __DEV__ &&
return "SuspenseList";
case 25:
return "TracingMarker";
case 17:
case 28:
if (disableLegacyMode) break;
case 1:
case 0:
case 14:
@@ -809,10 +806,9 @@ __DEV__ &&
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
disableDefaultPropsExceptForClasses =
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
enableFastJSX = dynamicFeatureFlags.enableFastJSX,
disableLegacyMode = dynamicFeatureFlags.disableLegacyMode,
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
dynamicFeatureFlags.disableDefaultPropsExceptForClasses;
dynamicFeatureFlags = dynamicFeatureFlags.enableFastJSX;
var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
@@ -857,7 +853,7 @@ __DEV__ &&
specialPropKeyWarningShown;
var didWarnAboutStringRefs = {};
var didWarnAboutElementRef = {};
var enableFastJSXWithStringRefs = enableFastJSX && !0,
var enableFastJSXWithStringRefs = dynamicFeatureFlags && !0,
enableFastJSXWithoutStringRefs = enableFastJSXWithStringRefs && !1,
didWarnAboutKeySpread = {},
ownerHasKeyUseWarning = {};
+1 -1
View File
@@ -1 +1 @@
50e89ec9f2d44ab140e771e585226f7771da9652
fb9a90fa480efce40ac2a845478817467f965ddc
+1 -1
View File
@@ -1 +1 @@
50e89ec9f2d44ab140e771e585226f7771da9652
fb9a90fa480efce40ac2a845478817467f965ddc
+5 -25
View File
@@ -504,9 +504,6 @@ __DEV__ &&
return "SuspenseList";
case 25:
return "TracingMarker";
case 17:
case 28:
if (disableLegacyMode) break;
case 1:
case 0:
case 14:
@@ -1199,7 +1196,6 @@ __DEV__ &&
disableDefaultPropsExceptForClasses =
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
enableFastJSX = dynamicFeatureFlags.enableFastJSX,
disableLegacyMode = dynamicFeatureFlags.disableLegacyMode,
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
@@ -1398,36 +1394,20 @@ __DEV__ &&
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
ReactSharedInternals;
exports.act = function (callback) {
var prevIsBatchingLegacy = disableLegacyMode
? !1
: ReactSharedInternals.isBatchingLegacy,
prevActQueue = ReactSharedInternals.actQueue,
var prevActQueue = ReactSharedInternals.actQueue,
prevActScopeDepth = actScopeDepth;
actScopeDepth++;
var queue = (ReactSharedInternals.actQueue =
null !== prevActQueue ? prevActQueue : []);
disableLegacyMode || (ReactSharedInternals.isBatchingLegacy = !0);
var didAwaitActCall = !1;
null !== prevActQueue ? prevActQueue : []),
didAwaitActCall = !1;
try {
disableLegacyMode ||
(ReactSharedInternals.didScheduleLegacyUpdate = !1);
var result = callback();
var didScheduleLegacyUpdate = disableLegacyMode
? !1
: ReactSharedInternals.didScheduleLegacyUpdate;
!prevIsBatchingLegacy &&
didScheduleLegacyUpdate &&
flushActQueue(queue);
disableLegacyMode ||
(ReactSharedInternals.isBatchingLegacy = prevIsBatchingLegacy);
} catch (error$3) {
ReactSharedInternals.thrownErrors.push(error$3);
}
if (0 < ReactSharedInternals.thrownErrors.length)
throw (
(disableLegacyMode ||
(ReactSharedInternals.isBatchingLegacy = prevIsBatchingLegacy),
popActScope(prevActQueue, prevActScopeDepth),
(popActScope(prevActQueue, prevActScopeDepth),
(callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
(ReactSharedInternals.thrownErrors.length = 0),
callback)
@@ -1987,7 +1967,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-50e89ec9f2-20240612";
exports.version = "19.0.0-www-classic-fb9a90fa48-20240614";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+1 -1
View File
@@ -1967,7 +1967,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+1 -1
View File
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-50e89ec9f2-20240612";
exports.version = "19.0.0-www-classic-fb9a90fa48-20240614";
+1 -1
View File
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-50e89ec9f2-20240612";
exports.version = "19.0.0-www-classic-fb9a90fa48-20240614";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -16364,14 +16364,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-modern-50e89ec9f2-20240612",
version: "19.0.0-www-modern-fb9a90fa48-20240614",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
File diff suppressed because it is too large Load Diff
@@ -10162,7 +10162,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-modern-50e89ec9f2-20240612",
version: "19.0.0-www-modern-fb9a90fa48-20240614",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1372 = {
@@ -10193,7 +10193,7 @@ var internals$jscomp$inline_1372 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1373 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -26497,11 +26497,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-50e89ec9f2-20240612" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-fb9a90fa48-20240614" !== 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-50e89ec9f2-20240612\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-fb9a90fa48-20240614\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -26566,12 +26566,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-modern-50e89ec9f2-20240612",
version: "19.0.0-www-modern-fb9a90fa48-20240614",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
@@ -27167,7 +27167,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
File diff suppressed because it is too large Load Diff
@@ -16464,14 +16464,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1740 = React.version;
if (
"19.0.0-www-modern-50e89ec9f2-20240612" !==
"19.0.0-www-modern-fb9a90fa48-20240614" !==
isomorphicReactPackageVersion$jscomp$inline_1740
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1740,
"19.0.0-www-modern-50e89ec9f2-20240612"
"19.0.0-www-modern-fb9a90fa48-20240614"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -16490,7 +16490,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1742 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-50e89ec9f2-20240612",
version: "19.0.0-www-modern-fb9a90fa48-20240614",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2211 = {
@@ -16520,7 +16520,7 @@ var internals$jscomp$inline_2211 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2212 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16891,4 +16891,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
File diff suppressed because it is too large Load Diff
@@ -17214,14 +17214,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1827 = React.version;
if (
"19.0.0-www-modern-50e89ec9f2-20240612" !==
"19.0.0-www-modern-fb9a90fa48-20240614" !==
isomorphicReactPackageVersion$jscomp$inline_1827
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1827,
"19.0.0-www-modern-50e89ec9f2-20240612"
"19.0.0-www-modern-fb9a90fa48-20240614"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17240,7 +17240,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1829 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-50e89ec9f2-20240612",
version: "19.0.0-www-modern-fb9a90fa48-20240614",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -17284,7 +17284,7 @@ var devToolsConfig$jscomp$inline_1829 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
});
function ReactDOMRoot(internalRoot) {
this._internalRoot = internalRoot;
@@ -17642,7 +17642,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -8721,5 +8721,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-50e89ec9f2-20240612";
exports.version = "19.0.0-www-classic-fb9a90fa48-20240614";
})();
@@ -8677,5 +8677,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-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
})();
@@ -5719,4 +5719,4 @@ exports.renderToString = function (children, options) {
'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-50e89ec9f2-20240612";
exports.version = "19.0.0-www-classic-fb9a90fa48-20240614";
@@ -5697,4 +5697,4 @@ exports.renderToString = function (children, options) {
'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-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
File diff suppressed because it is too large Load Diff
@@ -26831,11 +26831,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-50e89ec9f2-20240612" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-fb9a90fa48-20240614" !== 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-50e89ec9f2-20240612\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-fb9a90fa48-20240614\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -26900,12 +26900,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-modern-50e89ec9f2-20240612",
version: "19.0.0-www-modern-fb9a90fa48-20240614",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
@@ -27667,5 +27667,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
})();
File diff suppressed because it is too large Load Diff
@@ -16852,14 +16852,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1770 = React.version;
if (
"19.0.0-www-modern-50e89ec9f2-20240612" !==
"19.0.0-www-modern-fb9a90fa48-20240614" !==
isomorphicReactPackageVersion$jscomp$inline_1770
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1770,
"19.0.0-www-modern-50e89ec9f2-20240612"
"19.0.0-www-modern-fb9a90fa48-20240614"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -16878,7 +16878,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1772 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-50e89ec9f2-20240612",
version: "19.0.0-www-modern-fb9a90fa48-20240614",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2246 = {
@@ -16908,7 +16908,7 @@ var internals$jscomp$inline_2246 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2247 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17430,4 +17430,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-50e89ec9f2-20240612";
exports.version = "19.0.0-www-modern-fb9a90fa48-20240614";
File diff suppressed because it is too large Load Diff
@@ -18371,7 +18371,7 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
});
};
exports.isAlreadyRendering = function () {
File diff suppressed because it is too large Load Diff
@@ -12188,7 +12188,7 @@ module.exports = function ($$$config) {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
};
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
devToolsConfig = !1;
@@ -14712,14 +14712,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-classic-fb9a90fa48-20240614"
});
})({
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 1,
version: "19.0.0-www-classic-50e89ec9f2-20240612",
version: "19.0.0-www-classic-fb9a90fa48-20240614",
rendererPackageName: "react-test-renderer"
});
exports._Scheduler = Scheduler;
@@ -14712,14 +14712,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-50e89ec9f2-20240612"
reconcilerVersion: "19.0.0-www-modern-fb9a90fa48-20240614"
});
})({
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 1,
version: "19.0.0-www-modern-50e89ec9f2-20240612",
version: "19.0.0-www-modern-fb9a90fa48-20240614",
rendererPackageName: "react-test-renderer"
});
exports._Scheduler = Scheduler;
+1 -1
View File
@@ -1 +1 @@
19.0.0-www-classic-50e89ec9f2-20240612
19.0.0-www-classic-fb9a90fa48-20240614
+1 -1
View File
@@ -1 +1 @@
19.0.0-www-modern-50e89ec9f2-20240612
19.0.0-www-modern-fb9a90fa48-20240614