From 86ff1918cc7b419af8bf132a9a817bdd359d3968 Mon Sep 17 00:00:00 2001 From: jackpope Date: Fri, 23 Feb 2024 16:37:57 +0000 Subject: [PATCH] [RTR] Add usage warning behind flag (#27903) ## Summary Moving towards deprecation of ReactTestRenderer. Log a warning on each render so we can remove the exports in a future major version. We can enable this flag in web RTR without disrupting RN tests by flipping the flag in `packages/shared/forks/ReactFeatureFlags.test-renderer.js` ## How did you test this change? `yarn test packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.js` DiffTrain build for commit https://github.com/facebook/react/commit/66c8346401d271588e4c400921c5dab5478fc623. --- .../vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js | 2 +- .../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 | 6 +++--- .../xplat/js/RKJSModules/vendor/react/cjs/React-prod.js | 2 +- .../js/RKJSModules/vendor/react/cjs/React-profiling.js | 2 +- .../js/react-native-github/Libraries/Renderer/REVISION | 2 +- 7 files changed, 11 insertions(+), 11 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 ddddd69e4e6cf..935b75109b852 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 @@ -25707,7 +25707,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-canary-98b8359f6-20240223"; + var ReactVersion = "18.3.0-canary-66c834640-20240223"; // 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 efb67c0416931..649c308f61766 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 @@ -9171,7 +9171,7 @@ var devToolsConfig$jscomp$inline_1014 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-98b8359f6-20240223", + version: "18.3.0-canary-66c834640-20240223", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1195 = { @@ -9202,7 +9202,7 @@ var internals$jscomp$inline_1195 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-98b8359f6-20240223" + reconcilerVersion: "18.3.0-canary-66c834640-20240223" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1196 = __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 b86aa5f54ffa0..8d45e5156147c 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 @@ -9599,7 +9599,7 @@ var devToolsConfig$jscomp$inline_1056 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-98b8359f6-20240223", + version: "18.3.0-canary-66c834640-20240223", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1236 = { @@ -9630,7 +9630,7 @@ var internals$jscomp$inline_1236 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-98b8359f6-20240223" + reconcilerVersion: "18.3.0-canary-66c834640-20240223" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1237 = __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 e0f240e86bd47..c2f0738dcc27d 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 @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9822eaee5afe3b1d507e431443913bd4>> + * @generated SignedSource<<0ecfa00d9e6316d213c0fcd6bd2fed34>> */ "use strict"; @@ -26,7 +26,7 @@ if (__DEV__) { } var dynamicFlags = require("ReactNativeInternalFeatureFlags"); - var ReactVersion = "18.3.0-canary-98b8359f6-20240223"; + var ReactVersion = "18.3.0-canary-66c834640-20240223"; // ATTENTION // When adding new symbols to this file, @@ -577,7 +577,7 @@ if (__DEV__) { var enableTransitionTracing = false; // because JSX is an extremely hot path. - var enableRefAsProp = false; // Flow magic to verify the exports of this file match the original version. + var enableRefAsProp = false; function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; 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 bf6843f08b17b..e780b862379de 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 @@ -600,4 +600,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-canary-98b8359f6-20240223"; +exports.version = "18.3.0-canary-66c834640-20240223"; 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 7eb55f2a79030..8d4cc388387ba 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 @@ -596,7 +596,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-canary-98b8359f6-20240223"; +exports.version = "18.3.0-canary-66c834640-20240223"; "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 9ea9d247c916e..64c6cf9d2de3d 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 @@ -98b8359f656ef714cc44828d7bfd2409ca16b9b3 +66c8346401d271588e4c400921c5dab5478fc623