From a67bc42eca8d136a0790a682510d9b7491afa3aa Mon Sep 17 00:00:00 2001 From: sebmarkbage Date: Fri, 29 Sep 2023 22:29:11 +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 [c7ba8c098889b6dc47fa9c807bbba3975a658584](https://github.com/facebook/react/commit/c7ba8c098889b6dc47fa9c807bbba3975a658584) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/React-dev.classic.js | 7 +++---- compiled/facebook-www/React-dev.modern.js | 7 +++---- compiled/facebook-www/React-prod.classic.js | 6 +++--- compiled/facebook-www/React-prod.modern.js | 6 +++--- compiled/facebook-www/React-profiling.classic.js | 6 +++--- compiled/facebook-www/React-profiling.modern.js | 6 +++--- compiled/facebook-www/ReactDOMTesting-dev.modern.js | 2 +- compiled/facebook-www/ReactDOMTesting-prod.classic.js | 6 +++--- compiled/facebook-www/ReactDOMTesting-prod.modern.js | 6 +++--- compiled/facebook-www/ReactTestRenderer-dev.classic.js | 2 +- 11 files changed, 27 insertions(+), 29 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index dc53ca6a6a..d1ffb5bbf9 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -d900fadbf9017063fecb2641b7e99303b82a6f17 +c7ba8c098889b6dc47fa9c807bbba3975a658584 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 794eba3c28..8b2a3c6967 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-classic-d42cdbcf"; +var ReactVersion = "18.3.0-www-classic-591e80f2"; // ATTENTION // When adding new symbols to this file, @@ -2177,7 +2177,7 @@ function setExtraStackFrame(stack) { }; } -var ContextRegistry$1 = {}; +var ContextRegistry = {}; var ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher$1, @@ -2192,7 +2192,7 @@ var ReactSharedInternals = { } { - ReactSharedInternals.ContextRegistry = ContextRegistry$1; + ReactSharedInternals.ContextRegistry = ContextRegistry; } var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; @@ -2947,7 +2947,6 @@ function cloneElementWithValidation(element, props, children) { return newElement; } -var ContextRegistry = ReactSharedInternals.ContextRegistry; function createServerContext(globalName, defaultValue) { { error( diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index b0e2a6fa19..c50d491fc7 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-modern-df3e4079"; +var ReactVersion = "18.3.0-www-modern-3b1c1c68"; // ATTENTION // When adding new symbols to this file, @@ -2177,7 +2177,7 @@ function setExtraStackFrame(stack) { }; } -var ContextRegistry$1 = {}; +var ContextRegistry = {}; var ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher$1, @@ -2192,7 +2192,7 @@ var ReactSharedInternals = { } { - ReactSharedInternals.ContextRegistry = ContextRegistry$1; + ReactSharedInternals.ContextRegistry = ContextRegistry; } var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; @@ -2913,7 +2913,6 @@ function cloneElementWithValidation(element, props, children) { return newElement; } -var ContextRegistry = ReactSharedInternals.ContextRegistry; function createServerContext(globalName, defaultValue) { { error( diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 163c74b315..0f3f118995 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -284,14 +284,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) { @@ -623,4 +623,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-classic-f8e56db8"; +exports.version = "18.3.0-www-classic-810b328a"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index d30dea3a39..e00693959c 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -251,14 +251,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) { @@ -615,4 +615,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-modern-34d9e517"; +exports.version = "18.3.0-www-modern-96829b2e"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 038d7a89fa..630f37daa6 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -295,14 +295,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) { @@ -634,7 +634,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-classic-797bb5c7"; +exports.version = "18.3.0-www-classic-309fcb47"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 92608c579e..34f058aad8 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -262,14 +262,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) { @@ -626,7 +626,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-modern-a77dd006"; +exports.version = "18.3.0-www-modern-1a772a6d"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index a82d0c930d..38c4fa2c3e 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -34434,7 +34434,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-34d9e517"; +var ReactVersion = "18.3.0-www-modern-96829b2e"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 9682cdcd5f..c0e6a4ce51 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -16704,7 +16704,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1808 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-d42cdbcf", + version: "18.3.0-www-classic-591e80f2", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2157 = { @@ -16734,7 +16734,7 @@ var internals$jscomp$inline_2157 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-d42cdbcf" + reconcilerVersion: "18.3.0-www-classic-591e80f2" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2158 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17222,4 +17222,4 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-www-classic-d42cdbcf"; +exports.version = "18.3.0-www-classic-591e80f2"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 0cb2b57b68..0d5b8263c7 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -16281,7 +16281,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1767 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-a77dd006", + version: "18.3.0-www-modern-1a772a6d", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2121 = { @@ -16312,7 +16312,7 @@ var internals$jscomp$inline_2121 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-a77dd006" + reconcilerVersion: "18.3.0-www-modern-1a772a6d" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2122 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -16728,4 +16728,4 @@ exports.unstable_createEventHandle = function (type, options) { return eventHandle; }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-www-modern-a77dd006"; +exports.version = "18.3.0-www-modern-1a772a6d"; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index e8e9de5cda..2abc14c558 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -24359,7 +24359,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-f8e56db8"; +var ReactVersion = "18.3.0-www-classic-810b328a"; // Might add PROFILE later.