Skip to content

Commit

Permalink
Enforce that the "react-server" build of "react" is used (#27436)
Browse files Browse the repository at this point in the history
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 [c7ba8c0](c7ba8c0)
  • Loading branch information
sebmarkbage committed Sep 29, 2023
1 parent c6d3f9a commit a67bc42
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d900fadbf9017063fecb2641b7e99303b82a6f17
c7ba8c098889b6dc47fa9c807bbba3975a658584
7 changes: 3 additions & 4 deletions compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -2177,7 +2177,7 @@ function setExtraStackFrame(stack) {
};
}

var ContextRegistry$1 = {};
var ContextRegistry = {};

var ReactSharedInternals = {
ReactCurrentDispatcher: ReactCurrentDispatcher$1,
Expand All @@ -2192,7 +2192,7 @@ var ReactSharedInternals = {
}

{
ReactSharedInternals.ContextRegistry = ContextRegistry$1;
ReactSharedInternals.ContextRegistry = ContextRegistry;
}

var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
Expand Down Expand Up @@ -2947,7 +2947,6 @@ function cloneElementWithValidation(element, props, children) {
return newElement;
}

var ContextRegistry = ReactSharedInternals.ContextRegistry;
function createServerContext(globalName, defaultValue) {
{
error(
Expand Down
7 changes: 3 additions & 4 deletions compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -2177,7 +2177,7 @@ function setExtraStackFrame(stack) {
};
}

var ContextRegistry$1 = {};
var ContextRegistry = {};

var ReactSharedInternals = {
ReactCurrentDispatcher: ReactCurrentDispatcher$1,
Expand All @@ -2192,7 +2192,7 @@ var ReactSharedInternals = {
}

{
ReactSharedInternals.ContextRegistry = ContextRegistry$1;
ReactSharedInternals.ContextRegistry = ContextRegistry;
}

var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
Expand Down Expand Up @@ -2913,7 +2913,6 @@ function cloneElementWithValidation(element, props, children) {
return newElement;
}

var ContextRegistry = ReactSharedInternals.ContextRegistry;
function createServerContext(globalName, defaultValue) {
{
error(
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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";
6 changes: 3 additions & 3 deletions compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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";
6 changes: 3 additions & 3 deletions compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 (
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactDOMTesting-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOMTesting-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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__;
Expand Down Expand Up @@ -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";
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOMTesting-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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__;
Expand Down Expand Up @@ -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";
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactTestRenderer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit a67bc42

Please sign in to comment.