Skip to content

Commit

Permalink
Remove deprecated methods from react-is (#28224)
Browse files Browse the repository at this point in the history
These aren't being used anywhere and don't even correspond to real APIs.

DiffTrain build for commit 35b2c28.
  • Loading branch information
gaearon committed Feb 11, 2024
1 parent 1544bf4 commit 2142970
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<5b6ff80f7667876576d71d875716de3c>>
* @generated SignedSource<<99069a73679761ba23b9ab688e792429>>
*/

"use strict";
Expand Down Expand Up @@ -134,37 +134,6 @@ if (__DEV__) {
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated

function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint

console["warn"](
"The ReactIs.isAsyncMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}

return false;
}
function isConcurrentMode(object) {
{
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint

console["warn"](
"The ReactIs.isConcurrentMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}

return false;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
Expand Down Expand Up @@ -218,8 +187,6 @@ if (__DEV__) {
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.SuspenseList = SuspenseList;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9d53980cc5930d508194f32bc4d63656>>
* @generated SignedSource<<41fcb3aed2a769fa81ed6b7a5c498689>>
*/

"use strict";
Expand Down Expand Up @@ -67,12 +67,6 @@ exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
exports.isAsyncMode = function () {
return !1;
};
exports.isConcurrentMode = function () {
return !1;
};
exports.isContextConsumer = function (object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9d53980cc5930d508194f32bc4d63656>>
* @generated SignedSource<<41fcb3aed2a769fa81ed6b7a5c498689>>
*/

"use strict";
Expand Down Expand Up @@ -67,12 +67,6 @@ exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
exports.isAsyncMode = function () {
return !1;
};
exports.isConcurrentMode = function () {
return !1;
};
exports.isContextConsumer = function (object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25721,7 +25721,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "18.3.0-canary-06e410ec6-20240209";
var ReactVersion = "18.3.0-canary-35b2c2817-20240211";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9173,7 +9173,7 @@ var devToolsConfig$jscomp$inline_1023 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-06e410ec6-20240209",
version: "18.3.0-canary-35b2c2817-20240211",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1204 = {
Expand Down Expand Up @@ -9204,7 +9204,7 @@ var internals$jscomp$inline_1204 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-06e410ec6-20240209"
reconcilerVersion: "18.3.0-canary-35b2c2817-20240211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1205 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9601,7 +9601,7 @@ var devToolsConfig$jscomp$inline_1065 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-06e410ec6-20240209",
version: "18.3.0-canary-35b2c2817-20240211",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1245 = {
Expand Down Expand Up @@ -9632,7 +9632,7 @@ var internals$jscomp$inline_1245 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-06e410ec6-20240209"
reconcilerVersion: "18.3.0-canary-35b2c2817-20240211"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1246 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.0-canary-06e410ec6-20240209";
var ReactVersion = "18.3.0-canary-35b2c2817-20240211";

// ATTENTION
// When adding new symbols to this file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,4 +551,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-06e410ec6-20240209";
exports.version = "18.3.0-canary-35b2c2817-20240211";
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-06e410ec6-20240209";
exports.version = "18.3.0-canary-35b2c2817-20240211";
"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 @@
06e410ec608820b65d81536bb4630228b4e04d48
35b2c28178bf4f79898d11dce0bc2a7ce675f670

0 comments on commit 2142970

Please sign in to comment.