From 65aa775d2417da352cd7e0e3130aec528eff382b Mon Sep 17 00:00:00 2001 From: sebmarkbage Date: Fri, 29 Sep 2023 22:29:01 +0000 Subject: [PATCH] Enforce that the "react-server" build of "react" is used (#27436) I do this by simply renaming the secret export name in the "subset" bundle and this renamed version is what the FlightServer uses. This requires us to be more diligent about always using the correct instance of "react" in our tests so there's a bunch of clean up for that. DiffTrain build for commit https://github.com/facebook/react/commit/c7ba8c098889b6dc47fa9c807bbba3975a658584. --- .../react-test-renderer/cjs/ReactTestRenderer-dev.js | 2 +- .../react-test-renderer/cjs/ReactTestRenderer-prod.js | 4 ++-- .../cjs/ReactTestRenderer-profiling.js | 4 ++-- .../xplat/js/RKJSModules/vendor/react/cjs/React-dev.js | 9 ++++----- .../xplat/js/RKJSModules/vendor/react/cjs/React-prod.js | 8 ++++---- .../js/RKJSModules/vendor/react/cjs/React-profiling.js | 8 ++++---- .../js/react-native-github/Libraries/Renderer/REVISION | 2 +- 7 files changed, 18 insertions(+), 19 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 c69988b12c..a61250bc53 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 @@ -23997,7 +23997,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-canary-d900fadbf-20230929"; +var ReactVersion = "18.3.0-canary-c7ba8c098-20230929"; // 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 e7ccba04c1..4ed8eedb3c 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 @@ -8623,7 +8623,7 @@ var devToolsConfig$jscomp$inline_1030 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-d900fadbf-20230929", + version: "18.3.0-canary-c7ba8c098-20230929", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1229 = { @@ -8654,7 +8654,7 @@ var internals$jscomp$inline_1229 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-d900fadbf-20230929" + reconcilerVersion: "18.3.0-canary-c7ba8c098-20230929" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1230 = __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 cdbf13aac1..47dc3cc7e6 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 @@ -9049,7 +9049,7 @@ var devToolsConfig$jscomp$inline_1072 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-d900fadbf-20230929", + version: "18.3.0-canary-c7ba8c098-20230929", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1270 = { @@ -9080,7 +9080,7 @@ var internals$jscomp$inline_1270 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-d900fadbf-20230929" + reconcilerVersion: "18.3.0-canary-c7ba8c098-20230929" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1271 = __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 f380929e47..93a13e9fc4 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<<8e6aba2a8a22d8a171df886dcebe4930>> + * @generated SignedSource<> */ 'use strict'; @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-canary-d900fadbf-20230929"; +var ReactVersion = "18.3.0-canary-c7ba8c098-20230929"; // ATTENTION // When adding new symbols to this file, @@ -159,7 +159,7 @@ var enableDebugTracing = false; var enableScopeAPI = false; var enableTransitionTracing = false; -var ContextRegistry$1 = {}; +var ContextRegistry = {}; var ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher, @@ -174,7 +174,7 @@ var ReactSharedInternals = { } { - ReactSharedInternals.ContextRegistry = ContextRegistry$1; + ReactSharedInternals.ContextRegistry = ContextRegistry; } // by calls to these methods by a Babel plugin. @@ -2704,7 +2704,6 @@ function cloneElementWithValidation(element, props, children) { return newElement; } -var ContextRegistry = ReactSharedInternals.ContextRegistry; function createServerContext(globalName, defaultValue) { { error( 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 e11dc984f2..7059366d2e 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 @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<22271ab359f8fb6e33230ec4e7180433>> */ "use strict"; @@ -282,14 +282,14 @@ function createCacheNode() { } var ReactCurrentDispatcher = { current: null }, ReactCurrentBatchConfig = { transition: null }, + ContextRegistry = {}, ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher, ReactCurrentCache: ReactCurrentCache, ReactCurrentBatchConfig: ReactCurrentBatchConfig, ReactCurrentOwner: ReactCurrentOwner$1, - ContextRegistry: {} + ContextRegistry: ContextRegistry }, - ContextRegistry = ReactSharedInternals.ContextRegistry, ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 }; function jsx$1(type, config, maybeKey) { @@ -616,4 +616,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-canary-d900fadbf-20230929"; +exports.version = "18.3.0-canary-c7ba8c098-20230929"; 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 be99108c0d..7fbc4d39f0 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 @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ @@ -260,14 +260,14 @@ function createCacheNode() { } var ReactCurrentDispatcher = { current: null }, ReactCurrentBatchConfig = { transition: null }, + ContextRegistry = {}, ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher, ReactCurrentCache: ReactCurrentCache, ReactCurrentBatchConfig: ReactCurrentBatchConfig, ReactCurrentOwner: ReactCurrentOwner$1, - ContextRegistry: {} + ContextRegistry: ContextRegistry }, - ContextRegistry = ReactSharedInternals.ContextRegistry, ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 }; function jsx$1(type, config, maybeKey) { @@ -619,7 +619,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-canary-d900fadbf-20230929"; +exports.version = "18.3.0-canary-c7ba8c098-20230929"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( 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 dc53ca6a6a..d1ffb5bbf9 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 @@ -d900fadbf9017063fecb2641b7e99303b82a6f17 +c7ba8c098889b6dc47fa9c807bbba3975a658584