From 004bb7fe6ff7584d0a636f1029e907d5a5c74409 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Mon, 11 Mar 2024 21:16:40 +0000 Subject: [PATCH] Remove ReactTestUtils from refs-destruction-test (#28532) ```diff -expect(ReactTestUtils.isDOMComponent(maybeElement)).toBe(true); +expect(maybeElement).toBeInstanceOf(Element); ``` It's not equivalent since `isDOMComponent` checks `maybeElement.nodeType === Element.ELEMENT_NODE && !!maybeElement.tagName` but `instanceof` check seems sufficient here. Checking `nodeType` is mostly for cross-realm checks and checking falsy `tagName` seems like a check specifically for incomplete DOM implementations because tagName can't be empty by spec I believe. DiffTrain build for commit https://github.com/facebook/react/commit/9c48fb25ecc467b37abb3e145c6e25e311dcdde5. --- .../vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js | 2 +- .../vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js | 4 ++-- .../react-test-renderer/cjs/ReactTestRenderer-profiling.js | 4 ++-- .../xplat/js/RKJSModules/vendor/react/cjs/React-dev.js | 2 +- .../xplat/js/RKJSModules/vendor/react/cjs/React-prod.js | 2 +- .../xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js | 2 +- .../xplat/js/react-native-github/Libraries/Renderer/REVISION | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js index 0f8829c241080..6139c312c565c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -25677,7 +25677,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-canary-7d6f1e3c1-20240311"; + var ReactVersion = "18.3.0-canary-9c48fb25e-20240311"; // Might add PROFILE later. diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js index fbb806f1a970d..26c5be01bd22b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -9147,7 +9147,7 @@ var devToolsConfig$jscomp$inline_1016 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-7d6f1e3c1-20240311", + version: "18.3.0-canary-9c48fb25e-20240311", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1194 = { @@ -9178,7 +9178,7 @@ var internals$jscomp$inline_1194 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-7d6f1e3c1-20240311" + reconcilerVersion: "18.3.0-canary-9c48fb25e-20240311" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1195 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js index cbe009b22180c..2e177f42449c3 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -9575,7 +9575,7 @@ var devToolsConfig$jscomp$inline_1058 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-7d6f1e3c1-20240311", + version: "18.3.0-canary-9c48fb25e-20240311", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1235 = { @@ -9606,7 +9606,7 @@ var internals$jscomp$inline_1235 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-7d6f1e3c1-20240311" + reconcilerVersion: "18.3.0-canary-9c48fb25e-20240311" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1236 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js index b47c1cd7b9295..b0bb4803c103c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js @@ -26,7 +26,7 @@ if (__DEV__) { } var dynamicFlags = require("ReactNativeInternalFeatureFlags"); - var ReactVersion = "18.3.0-canary-7d6f1e3c1-20240311"; + var ReactVersion = "18.3.0-canary-9c48fb25e-20240311"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js index 8123789d4a3fd..17ab0731b15c8 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js @@ -628,4 +628,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-canary-7d6f1e3c1-20240311"; +exports.version = "18.3.0-canary-9c48fb25e-20240311"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js index b46e2ab35b0c2..01a1d5403d123 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js @@ -624,7 +624,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-canary-7d6f1e3c1-20240311"; +exports.version = "18.3.0-canary-9c48fb25e-20240311"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index a81b9c17f236e..14d26e1eafbf7 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -7d6f1e3c13686272c1d76813992d4e782fcb84e6 +9c48fb25ecc467b37abb3e145c6e25e311dcdde5