diff --git a/packages/react-client/src/ReactFlightClient.js b/packages/react-client/src/ReactFlightClient.js index 32fb4f1c907db..e14b6a7699951 100644 --- a/packages/react-client/src/ReactFlightClient.js +++ b/packages/react-client/src/ReactFlightClient.js @@ -16,14 +16,14 @@ import type { UninitializedModel, Response, SSRManifest, -} from './ReactFlightClientHostConfig'; +} from './ReactFlightClientConfig'; import { resolveClientReference, preloadModule, requireModule, parseModel, -} from './ReactFlightClientHostConfig'; +} from './ReactFlightClientConfig'; import {knownServerReferences} from './ReactFlightServerReferenceRegistry'; diff --git a/packages/react-client/src/ReactFlightClientHostConfig.js b/packages/react-client/src/ReactFlightClientConfig.js similarity index 100% rename from packages/react-client/src/ReactFlightClientHostConfig.js rename to packages/react-client/src/ReactFlightClientConfig.js diff --git a/packages/react-client/src/ReactFlightClientHostConfigBrowser.js b/packages/react-client/src/ReactFlightClientConfigBrowser.js similarity index 100% rename from packages/react-client/src/ReactFlightClientHostConfigBrowser.js rename to packages/react-client/src/ReactFlightClientConfigBrowser.js diff --git a/packages/react-client/src/ReactFlightClientHostConfigNoStream.js b/packages/react-client/src/ReactFlightClientConfigNoStream.js similarity index 100% rename from packages/react-client/src/ReactFlightClientHostConfigNoStream.js rename to packages/react-client/src/ReactFlightClientConfigNoStream.js diff --git a/packages/react-client/src/ReactFlightClientHostConfigNode.js b/packages/react-client/src/ReactFlightClientConfigNode.js similarity index 100% rename from packages/react-client/src/ReactFlightClientHostConfigNode.js rename to packages/react-client/src/ReactFlightClientConfigNode.js diff --git a/packages/react-client/src/ReactFlightClientHostConfigStream.js b/packages/react-client/src/ReactFlightClientConfigStream.js similarity index 89% rename from packages/react-client/src/ReactFlightClientHostConfigStream.js rename to packages/react-client/src/ReactFlightClientConfigStream.js index 1a06961a1109e..62a8b248d78c7 100644 --- a/packages/react-client/src/ReactFlightClientHostConfigStream.js +++ b/packages/react-client/src/ReactFlightClientConfigStream.js @@ -8,7 +8,7 @@ */ import type {ResponseBase} from './ReactFlightClient'; -import type {StringDecoder} from './ReactFlightClientHostConfig'; +import type {StringDecoder} from './ReactFlightClientConfig'; export type Response = ResponseBase & { _partialRow: string, diff --git a/packages/react-client/src/ReactFlightClientStream.js b/packages/react-client/src/ReactFlightClientStream.js index 56772ec4a42b3..81633e696696d 100644 --- a/packages/react-client/src/ReactFlightClientStream.js +++ b/packages/react-client/src/ReactFlightClientStream.js @@ -8,8 +8,8 @@ */ import type {CallServerCallback} from './ReactFlightClient'; -import type {Response} from './ReactFlightClientHostConfigStream'; -import type {SSRManifest} from './ReactFlightClientHostConfig'; +import type {Response} from './ReactFlightClientConfigStream'; +import type {SSRManifest} from './ReactFlightClientConfig'; import { resolveModule, @@ -26,7 +26,7 @@ import { readFinalStringChunk, supportsBinaryStreams, createStringDecoder, -} from './ReactFlightClientHostConfig'; +} from './ReactFlightClientConfig'; export type {Response}; diff --git a/packages/react-client/src/forks/ReactFlightClientHostConfig.custom.js b/packages/react-client/src/forks/ReactFlightClientConfig.custom.js similarity index 100% rename from packages/react-client/src/forks/ReactFlightClientHostConfig.custom.js rename to packages/react-client/src/forks/ReactFlightClientConfig.custom.js diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-browser.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-browser.js new file mode 100644 index 0000000000000..4abcda77430d1 --- /dev/null +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-browser.js @@ -0,0 +1,12 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-client/src/ReactFlightClientConfigBrowser'; +export * from 'react-client/src/ReactFlightClientConfigStream'; +export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler'; diff --git a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-bun.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-bun.js similarity index 83% rename from packages/react-client/src/forks/ReactFlightClientHostConfig.dom-bun.js rename to packages/react-client/src/forks/ReactFlightClientConfig.dom-bun.js index 28a1f34997f91..fa2084f946ff6 100644 --- a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-bun.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-bun.js @@ -7,8 +7,8 @@ * @flow */ -export * from 'react-client/src/ReactFlightClientHostConfigBrowser'; -export * from 'react-client/src/ReactFlightClientHostConfigStream'; +export * from 'react-client/src/ReactFlightClientConfigBrowser'; +export * from 'react-client/src/ReactFlightClientConfigStream'; export type Response = any; export opaque type SSRManifest = mixed; diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-edge-webpack.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-edge-webpack.js new file mode 100644 index 0000000000000..4abcda77430d1 --- /dev/null +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-edge-webpack.js @@ -0,0 +1,12 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-client/src/ReactFlightClientConfigBrowser'; +export * from 'react-client/src/ReactFlightClientConfigStream'; +export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler'; diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js new file mode 100644 index 0000000000000..4abcda77430d1 --- /dev/null +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js @@ -0,0 +1,12 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-client/src/ReactFlightClientConfigBrowser'; +export * from 'react-client/src/ReactFlightClientConfigStream'; +export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler'; diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js new file mode 100644 index 0000000000000..a70684ccd226e --- /dev/null +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js @@ -0,0 +1,12 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-client/src/ReactFlightClientConfigNode'; +export * from 'react-client/src/ReactFlightClientConfigStream'; +export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler'; diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js new file mode 100644 index 0000000000000..b2aeaf25dd0a6 --- /dev/null +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js @@ -0,0 +1,12 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export * from 'react-client/src/ReactFlightClientConfigNode'; +export * from 'react-client/src/ReactFlightClientConfigStream'; +export * from 'react-server-dom-webpack/src/ReactFlightClientConfigNodeBundler'; diff --git a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-relay.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-relay.js similarity index 60% rename from packages/react-client/src/forks/ReactFlightClientHostConfig.dom-relay.js rename to packages/react-client/src/forks/ReactFlightClientConfig.dom-relay.js index ccde93cb29597..e59ffbe0725b6 100644 --- a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-relay.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-relay.js @@ -7,5 +7,5 @@ * @flow */ -export * from 'react-server-dom-relay/src/ReactFlightDOMRelayClientHostConfig'; -export * from '../ReactFlightClientHostConfigNoStream'; +export * from 'react-server-dom-relay/src/ReactFlightClientConfigDOMRelay'; +export * from '../ReactFlightClientConfigNoStream'; diff --git a/packages/react-client/src/forks/ReactFlightClientHostConfig.native-relay.js b/packages/react-client/src/forks/ReactFlightClientConfig.native-relay.js similarity index 58% rename from packages/react-client/src/forks/ReactFlightClientHostConfig.native-relay.js rename to packages/react-client/src/forks/ReactFlightClientConfig.native-relay.js index 7916d16829d04..b0110b5ffe687 100644 --- a/packages/react-client/src/forks/ReactFlightClientHostConfig.native-relay.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.native-relay.js @@ -7,5 +7,5 @@ * @flow */ -export * from 'react-server-native-relay/src/ReactFlightNativeRelayClientHostConfig'; -export * from '../ReactFlightClientHostConfigNoStream'; +export * from 'react-server-native-relay/src/ReactFlightClientConfigNativeRelay'; +export * from '../ReactFlightClientConfigNoStream'; diff --git a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-browser.js b/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-browser.js deleted file mode 100644 index 4aae8141fd56e..0000000000000 --- a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-browser.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-client/src/ReactFlightClientHostConfigBrowser'; -export * from 'react-client/src/ReactFlightClientHostConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig'; diff --git a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-edge-webpack.js b/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-edge-webpack.js deleted file mode 100644 index 4aae8141fd56e..0000000000000 --- a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-edge-webpack.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-client/src/ReactFlightClientHostConfigBrowser'; -export * from 'react-client/src/ReactFlightClientHostConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig'; diff --git a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-legacy.js b/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-legacy.js deleted file mode 100644 index 4aae8141fd56e..0000000000000 --- a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-legacy.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-client/src/ReactFlightClientHostConfigBrowser'; -export * from 'react-client/src/ReactFlightClientHostConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig'; diff --git a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-node-webpack.js b/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-node-webpack.js deleted file mode 100644 index 8b9b2defedff5..0000000000000 --- a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-node-webpack.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-client/src/ReactFlightClientHostConfigNode'; -export * from 'react-client/src/ReactFlightClientHostConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig'; diff --git a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-node.js b/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-node.js deleted file mode 100644 index 5c20adb286414..0000000000000 --- a/packages/react-client/src/forks/ReactFlightClientHostConfig.dom-node.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export * from 'react-client/src/ReactFlightClientHostConfigNode'; -export * from 'react-client/src/ReactFlightClientHostConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightClientNodeBundlerConfig'; diff --git a/packages/react-native-renderer/src/server/ReactFlightServerConfigNative.js b/packages/react-native-renderer/src/server/ReactFlightServerConfigNative.js new file mode 100644 index 0000000000000..cc92e90d8b342 --- /dev/null +++ b/packages/react-native-renderer/src/server/ReactFlightServerConfigNative.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +export const isPrimaryRenderer = true; diff --git a/packages/react-server-dom-relay/src/ReactFlightDOMRelayClientHostConfig.js b/packages/react-server-dom-relay/src/ReactFlightClientConfigDOMRelay.js similarity index 100% rename from packages/react-server-dom-relay/src/ReactFlightDOMRelayClientHostConfig.js rename to packages/react-server-dom-relay/src/ReactFlightClientConfigDOMRelay.js diff --git a/packages/react-server-dom-relay/src/ReactFlightDOMRelayServer.js b/packages/react-server-dom-relay/src/ReactFlightDOMRelayServer.js index 7ecd37cca3c69..e5255fbf894a9 100644 --- a/packages/react-server-dom-relay/src/ReactFlightDOMRelayServer.js +++ b/packages/react-server-dom-relay/src/ReactFlightDOMRelayServer.js @@ -11,7 +11,7 @@ import type {ReactClientValue} from 'react-server/src/ReactFlightServer'; import type { ClientManifest, Destination, -} from './ReactFlightDOMRelayServerHostConfig'; +} from './ReactFlightServerConfigDOMRelay'; import { createRequest, diff --git a/packages/react-server-dom-relay/src/ReactFlightDOMRelayServerHostConfig.js b/packages/react-server-dom-relay/src/ReactFlightServerConfigDOMRelay.js similarity index 100% rename from packages/react-server-dom-relay/src/ReactFlightDOMRelayServerHostConfig.js rename to packages/react-server-dom-relay/src/ReactFlightServerConfigDOMRelay.js diff --git a/packages/react-server-dom-webpack/src/ReactFlightClientNodeBundlerConfig.js b/packages/react-server-dom-webpack/src/ReactFlightClientConfigNodeBundler.js similarity index 100% rename from packages/react-server-dom-webpack/src/ReactFlightClientNodeBundlerConfig.js rename to packages/react-server-dom-webpack/src/ReactFlightClientConfigNodeBundler.js diff --git a/packages/react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js b/packages/react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler.js similarity index 100% rename from packages/react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js rename to packages/react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler.js diff --git a/packages/react-server-dom-webpack/src/ReactFlightDOMClientEdge.js b/packages/react-server-dom-webpack/src/ReactFlightDOMClientEdge.js index 9a68b21f6c63a..3cab54060c5ba 100644 --- a/packages/react-server-dom-webpack/src/ReactFlightDOMClientEdge.js +++ b/packages/react-server-dom-webpack/src/ReactFlightDOMClientEdge.js @@ -11,7 +11,7 @@ import type {Thenable} from 'shared/ReactTypes.js'; import type {Response as FlightResponse} from 'react-client/src/ReactFlightClientStream'; -import type {SSRManifest} from './ReactFlightClientWebpackBundlerConfig'; +import type {SSRManifest} from './ReactFlightClientConfigWebpackBundler'; import { createResponse, diff --git a/packages/react-server-dom-webpack/src/ReactFlightDOMClientNode.js b/packages/react-server-dom-webpack/src/ReactFlightDOMClientNode.js index 09502a7bf5479..aff48cf073777 100644 --- a/packages/react-server-dom-webpack/src/ReactFlightDOMClientNode.js +++ b/packages/react-server-dom-webpack/src/ReactFlightDOMClientNode.js @@ -11,7 +11,7 @@ import type {Thenable} from 'shared/ReactTypes.js'; import type {Response} from 'react-client/src/ReactFlightClientStream'; -import type {SSRManifest} from 'react-client/src/ReactFlightClientHostConfig'; +import type {SSRManifest} from 'react-client/src/ReactFlightClientConfig'; import type {Readable} from 'stream'; diff --git a/packages/react-server-dom-webpack/src/ReactFlightDOMServerBrowser.js b/packages/react-server-dom-webpack/src/ReactFlightDOMServerBrowser.js index 5884f18cb30cb..d549c10693c55 100644 --- a/packages/react-server-dom-webpack/src/ReactFlightDOMServerBrowser.js +++ b/packages/react-server-dom-webpack/src/ReactFlightDOMServerBrowser.js @@ -9,8 +9,8 @@ import type {ReactClientValue} from 'react-server/src/ReactFlightServer'; import type {ServerContextJSONValue, Thenable} from 'shared/ReactTypes'; -import type {ClientManifest} from './ReactFlightServerWebpackBundlerConfig'; -import type {ServerManifest} from 'react-client/src/ReactFlightClientHostConfig'; +import type {ClientManifest} from './ReactFlightServerConfigWebpackBundler'; +import type {ServerManifest} from 'react-client/src/ReactFlightClientConfig'; import { createRequest, diff --git a/packages/react-server-dom-webpack/src/ReactFlightDOMServerEdge.js b/packages/react-server-dom-webpack/src/ReactFlightDOMServerEdge.js index 5884f18cb30cb..d549c10693c55 100644 --- a/packages/react-server-dom-webpack/src/ReactFlightDOMServerEdge.js +++ b/packages/react-server-dom-webpack/src/ReactFlightDOMServerEdge.js @@ -9,8 +9,8 @@ import type {ReactClientValue} from 'react-server/src/ReactFlightServer'; import type {ServerContextJSONValue, Thenable} from 'shared/ReactTypes'; -import type {ClientManifest} from './ReactFlightServerWebpackBundlerConfig'; -import type {ServerManifest} from 'react-client/src/ReactFlightClientHostConfig'; +import type {ClientManifest} from './ReactFlightServerConfigWebpackBundler'; +import type {ServerManifest} from 'react-client/src/ReactFlightClientConfig'; import { createRequest, diff --git a/packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js b/packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js index f2653dca98c46..98d4291de9847 100644 --- a/packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js +++ b/packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js @@ -12,8 +12,8 @@ import type { ReactClientValue, } from 'react-server/src/ReactFlightServer'; import type {Destination} from 'react-server/src/ReactServerStreamConfigNode'; -import type {ClientManifest} from './ReactFlightServerWebpackBundlerConfig'; -import type {ServerManifest} from 'react-client/src/ReactFlightClientHostConfig'; +import type {ClientManifest} from './ReactFlightServerConfigWebpackBundler'; +import type {ServerManifest} from 'react-client/src/ReactFlightClientConfig'; import type {Busboy} from 'busboy'; import type {Writable} from 'stream'; import type {ServerContextJSONValue, Thenable} from 'shared/ReactTypes'; diff --git a/packages/react-server-dom-webpack/src/ReactFlightServerWebpackBundlerConfig.js b/packages/react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler.js similarity index 100% rename from packages/react-server-dom-webpack/src/ReactFlightServerWebpackBundlerConfig.js rename to packages/react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler.js diff --git a/packages/react-server-native-relay/src/ReactFlightNativeRelayClientHostConfig.js b/packages/react-server-native-relay/src/ReactFlightClientConfigNativeRelay.js similarity index 100% rename from packages/react-server-native-relay/src/ReactFlightNativeRelayClientHostConfig.js rename to packages/react-server-native-relay/src/ReactFlightClientConfigNativeRelay.js diff --git a/packages/react-server-native-relay/src/ReactFlightNativeRelayServer.js b/packages/react-server-native-relay/src/ReactFlightNativeRelayServer.js index 5e049368f72f2..c3cc85c1cce9f 100644 --- a/packages/react-server-native-relay/src/ReactFlightNativeRelayServer.js +++ b/packages/react-server-native-relay/src/ReactFlightNativeRelayServer.js @@ -11,7 +11,7 @@ import type {ReactClientValue} from 'react-server/src/ReactFlightServer'; import type { ClientManifest, Destination, -} from './ReactFlightNativeRelayServerHostConfig'; +} from './ReactFlightServerConfigNativeRelay'; import { createRequest, diff --git a/packages/react-server-native-relay/src/ReactFlightNativeRelayServerHostConfig.js b/packages/react-server-native-relay/src/ReactFlightServerConfigNativeRelay.js similarity index 100% rename from packages/react-server-native-relay/src/ReactFlightNativeRelayServerHostConfig.js rename to packages/react-server-native-relay/src/ReactFlightServerConfigNativeRelay.js diff --git a/packages/react-server/src/ReactFlightReplyServer.js b/packages/react-server/src/ReactFlightReplyServer.js index 83318c418df28..7c7dce1e0e9e9 100644 --- a/packages/react-server/src/ReactFlightReplyServer.js +++ b/packages/react-server/src/ReactFlightReplyServer.js @@ -16,13 +16,13 @@ import type { ServerReferenceId, ServerManifest, ClientReference as ServerReference, -} from 'react-client/src/ReactFlightClientHostConfig'; +} from 'react-client/src/ReactFlightClientConfig'; import { resolveServerReference, preloadModule, requireModule, -} from 'react-client/src/ReactFlightClientHostConfig'; +} from 'react-client/src/ReactFlightClientConfig'; export type JSONValue = | number diff --git a/packages/react-server/src/ReactFlightServerBundlerConfigCustom.js b/packages/react-server/src/ReactFlightServerConfigBundlerCustom.js similarity index 100% rename from packages/react-server/src/ReactFlightServerBundlerConfigCustom.js rename to packages/react-server/src/ReactFlightServerConfigBundlerCustom.js diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.custom.js b/packages/react-server/src/forks/ReactFlightServerConfig.custom.js index f85cfb5f78b25..28977b2357cc6 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.custom.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.custom.js @@ -8,4 +8,6 @@ */ export * from '../ReactFlightServerConfigStream'; -export * from '../ReactFlightServerBundlerConfigCustom'; +export * from '../ReactFlightServerConfigBundlerCustom'; + +export const isPrimaryRenderer = false; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-browser.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-browser.js index 99c541a937d63..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-browser.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-browser.js @@ -8,4 +8,4 @@ */ export * from '../ReactFlightServerConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightServerWebpackBundlerConfig'; +export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-bun.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-bun.js index f85cfb5f78b25..8cc2ba0d6c9f0 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-bun.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-bun.js @@ -8,4 +8,4 @@ */ export * from '../ReactFlightServerConfigStream'; -export * from '../ReactFlightServerBundlerConfigCustom'; +export * from '../ReactFlightServerConfigBundlerCustom'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-edge-webpack.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-edge-webpack.js index 99c541a937d63..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-edge-webpack.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-edge-webpack.js @@ -8,4 +8,4 @@ */ export * from '../ReactFlightServerConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightServerWebpackBundlerConfig'; +export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js index 99c541a937d63..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js @@ -8,4 +8,4 @@ */ export * from '../ReactFlightServerConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightServerWebpackBundlerConfig'; +export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-node-webpack.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-node-webpack.js index 99c541a937d63..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-node-webpack.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-node-webpack.js @@ -8,4 +8,4 @@ */ export * from '../ReactFlightServerConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightServerWebpackBundlerConfig'; +export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-node.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-node.js index 99c541a937d63..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-node.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-node.js @@ -8,4 +8,4 @@ */ export * from '../ReactFlightServerConfigStream'; -export * from 'react-server-dom-webpack/src/ReactFlightServerWebpackBundlerConfig'; +export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-relay.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-relay.js index a6ad653f3a7a1..3a3b72672fe5f 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-relay.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-relay.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-server-dom-relay/src/ReactFlightDOMRelayServerHostConfig'; +export * from 'react-server-dom-relay/src/ReactFlightServerConfigDOMRelay'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.native-relay.js b/packages/react-server/src/forks/ReactFlightServerConfig.native-relay.js index ab64c4324654f..1eacc4516fe1d 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.native-relay.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.native-relay.js @@ -7,4 +7,5 @@ * @flow */ -export * from 'react-server-native-relay/src/ReactFlightNativeRelayServerHostConfig'; +export * from 'react-server-native-relay/src/ReactFlightServerConfigNativeRelay'; +export * from 'react-native-renderer/src/server/ReactFlightServerConfigNative'; diff --git a/scripts/flow/createFlowConfigs.js b/scripts/flow/createFlowConfigs.js index 4a657ee2e6568..29cdde34e2f18 100644 --- a/scripts/flow/createFlowConfigs.js +++ b/scripts/flow/createFlowConfigs.js @@ -55,7 +55,7 @@ module.name_mapper='ReactFiberHostConfig$$' -> 'forks/ReactFiberHostConfig.${ren module.name_mapper='ReactServerStreamConfig$$' -> 'forks/ReactServerStreamConfig.${serverRenderer}' module.name_mapper='ReactServerFormatConfig$$' -> 'forks/ReactServerFormatConfig.${serverRenderer}' module.name_mapper='ReactFlightServerConfig$$' -> 'forks/ReactFlightServerConfig.${serverRenderer}' -module.name_mapper='ReactFlightClientHostConfig$$' -> 'forks/ReactFlightClientHostConfig.${serverRenderer}' +module.name_mapper='ReactFlightClientConfig$$' -> 'forks/ReactFlightClientConfig.${serverRenderer}' module.name_mapper='react-devtools-feature-flags' -> 'react-devtools-shared/src/config/DevToolsFeatureFlags.default' `.trim(), ) diff --git a/scripts/jest/setupHostConfigs.js b/scripts/jest/setupHostConfigs.js index 14c62ca4b4d92..e78fc3ce34d39 100644 --- a/scripts/jest/setupHostConfigs.js +++ b/scripts/jest/setupHostConfigs.js @@ -81,7 +81,7 @@ jest.mock('react-server/flight', () => { return config => { jest.mock(shimServerStreamConfigPath, () => config); jest.mock(shimServerFormatConfigPath, () => config); - jest.mock('react-server/src/ReactFlightServerBundlerConfigCustom', () => ({ + jest.mock('react-server/src/ReactFlightServerConfigBundlerCustom', () => ({ isClientReference: config.isClientReference, isServerReference: config.isServerReference, getClientReferenceKey: config.getClientReferenceKey, @@ -95,18 +95,17 @@ jest.mock('react-server/flight', () => { return jest.requireActual('react-server/flight'); }; }); -const shimFlightClientHostConfigPath = - 'react-client/src/ReactFlightClientHostConfig'; +const shimFlightClientConfigPath = 'react-client/src/ReactFlightClientConfig'; jest.mock('react-client/flight', () => { return config => { - jest.mock(shimFlightClientHostConfigPath, () => config); + jest.mock(shimFlightClientConfigPath, () => config); return jest.requireActual('react-client/flight'); }; }); const configPaths = [ 'react-reconciler/src/ReactFiberHostConfig', - 'react-client/src/ReactFlightClientHostConfig', + 'react-client/src/ReactFlightClientConfig', 'react-server/src/ReactServerStreamConfig', 'react-server/src/ReactServerFormatConfig', 'react-server/src/ReactFlightServerConfig', diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js index 21217ec50a377..55d4409fe957c 100644 --- a/scripts/rollup/forks.js +++ b/scripts/rollup/forks.js @@ -355,7 +355,7 @@ const forks = Object.freeze({ ); }, - './packages/react-client/src/ReactFlightClientHostConfig.js': ( + './packages/react-client/src/ReactFlightClientConfig.js': ( bundleType, entry, dependencies, @@ -373,11 +373,11 @@ const forks = Object.freeze({ if (!rendererInfo.isServerSupported) { return null; } - return `./packages/react-client/src/forks/ReactFlightClientHostConfig.${rendererInfo.shortName}.js`; + return `./packages/react-client/src/forks/ReactFlightClientConfig.${rendererInfo.shortName}.js`; } } throw new Error( - 'Expected ReactFlightClientHostConfig to always be replaced with a shim, but ' + + 'Expected ReactFlightClientConfig to always be replaced with a shim, but ' + `found no mention of "${entry}" entry point in ./scripts/shared/inlinedHostConfigs.js. ` + 'Did you mean to add it there to associate it with a specific renderer?' );