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 commit c7ba8c0.
  • Loading branch information
sebmarkbage committed Sep 29, 2023
1 parent a49e06d commit 65aa775
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8e6aba2a8a22d8a171df886dcebe4930>>
* @generated SignedSource<<e3459cf1c934729db6159301ee96abb3>>
*/

'use strict';
Expand All @@ -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,
Expand Down Expand Up @@ -159,7 +159,7 @@ var enableDebugTracing = false;
var enableScopeAPI = false;
var enableTransitionTracing = false;

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

var ReactSharedInternals = {
ReactCurrentDispatcher: ReactCurrentDispatcher,
Expand All @@ -174,7 +174,7 @@ var ReactSharedInternals = {
}

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

// by calls to these methods by a Babel plugin.
Expand Down Expand Up @@ -2704,7 +2704,6 @@ function cloneElementWithValidation(element, props, children) {
return newElement;
}

var ContextRegistry = ReactSharedInternals.ContextRegistry;
function createServerContext(globalName, defaultValue) {
{
error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<baa752d40dc19ca131b74496ee679c02>>
* @generated SignedSource<<22271ab359f8fb6e33230ec4e7180433>>
*/

"use strict";
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<fc291aa88e57315493fc94dd7aab82be>>
* @generated SignedSource<<c82cbcaf7bd2b54bba5420820659796c>>
*/


Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d900fadbf9017063fecb2641b7e99303b82a6f17
c7ba8c098889b6dc47fa9c807bbba3975a658584

0 comments on commit 65aa775

Please sign in to comment.