From 9429ec9a838e91e10ea6320a75de55663152c11d Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Mon, 17 Apr 2023 16:24:29 -0400 Subject: [PATCH] Revert "Implements wiring for Flight to have it's own "HostConfig" (#26590)" This reverts commit f4f873f6282e6f2e584990c00fb2aae86db85a8b. --- .../forks/ReactFlightClientConfig.dom-browser.js | 1 - .../src/forks/ReactFlightClientConfig.dom-bun.js | 1 - .../ReactFlightClientConfig.dom-edge-webpack.js | 1 - .../src/forks/ReactFlightClientConfig.dom-legacy.js | 1 - .../ReactFlightClientConfig.dom-node-webpack.js | 1 - .../src/forks/ReactFlightClientConfig.dom-node.js | 1 - .../src/forks/ReactFlightClientConfig.dom-relay.js | 1 - .../src/server/ReactFlightServerConfigDOM.js | 12 ------------ .../src/shared/ReactFlightClientConfigDOM.js | 13 ------------- packages/react-server/src/ReactFlightNewContext.js | 2 +- .../forks/ReactFlightServerConfig.dom-browser.js | 1 - .../src/forks/ReactFlightServerConfig.dom-bun.js | 1 - .../ReactFlightServerConfig.dom-edge-webpack.js | 1 - .../src/forks/ReactFlightServerConfig.dom-legacy.js | 1 - .../ReactFlightServerConfig.dom-node-webpack.js | 1 - .../src/forks/ReactFlightServerConfig.dom-node.js | 1 - .../src/forks/ReactFlightServerConfig.dom-relay.js | 1 - 17 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 packages/react-dom-bindings/src/server/ReactFlightServerConfigDOM.js delete mode 100644 packages/react-dom-bindings/src/shared/ReactFlightClientConfigDOM.js diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-browser.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-browser.js index 8de1c06df33fc..4abcda77430d1 100644 --- a/packages/react-client/src/forks/ReactFlightClientConfig.dom-browser.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-browser.js @@ -10,4 +10,3 @@ export * from 'react-client/src/ReactFlightClientConfigBrowser'; export * from 'react-client/src/ReactFlightClientConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler'; -export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-bun.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-bun.js index a1c0a72c129b1..fa2084f946ff6 100644 --- a/packages/react-client/src/forks/ReactFlightClientConfig.dom-bun.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-bun.js @@ -9,7 +9,6 @@ export * from 'react-client/src/ReactFlightClientConfigBrowser'; export * from 'react-client/src/ReactFlightClientConfigStream'; -export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; 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 index 8de1c06df33fc..4abcda77430d1 100644 --- a/packages/react-client/src/forks/ReactFlightClientConfig.dom-edge-webpack.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-edge-webpack.js @@ -10,4 +10,3 @@ export * from 'react-client/src/ReactFlightClientConfigBrowser'; export * from 'react-client/src/ReactFlightClientConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler'; -export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js index 8de1c06df33fc..4abcda77430d1 100644 --- a/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js @@ -10,4 +10,3 @@ export * from 'react-client/src/ReactFlightClientConfigBrowser'; export * from 'react-client/src/ReactFlightClientConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler'; -export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js index dba506435584e..a70684ccd226e 100644 --- a/packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js @@ -10,4 +10,3 @@ export * from 'react-client/src/ReactFlightClientConfigNode'; export * from 'react-client/src/ReactFlightClientConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler'; -export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js index a8aaffa969c4a..b2aeaf25dd0a6 100644 --- a/packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js @@ -10,4 +10,3 @@ export * from 'react-client/src/ReactFlightClientConfigNode'; export * from 'react-client/src/ReactFlightClientConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightClientConfigNodeBundler'; -export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-relay.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-relay.js index 17540fb203718..e59ffbe0725b6 100644 --- a/packages/react-client/src/forks/ReactFlightClientConfig.dom-relay.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-relay.js @@ -9,4 +9,3 @@ export * from 'react-server-dom-relay/src/ReactFlightClientConfigDOMRelay'; export * from '../ReactFlightClientConfigNoStream'; -export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; diff --git a/packages/react-dom-bindings/src/server/ReactFlightServerConfigDOM.js b/packages/react-dom-bindings/src/server/ReactFlightServerConfigDOM.js deleted file mode 100644 index e2daf606c8ebd..0000000000000 --- a/packages/react-dom-bindings/src/server/ReactFlightServerConfigDOM.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 - */ - -// Used to distinguish these contexts from ones used in other renderers. -// E.g. this can be used to distinguish legacy renderers from this modern one. -export const isPrimaryRenderer = true; diff --git a/packages/react-dom-bindings/src/shared/ReactFlightClientConfigDOM.js b/packages/react-dom-bindings/src/shared/ReactFlightClientConfigDOM.js deleted file mode 100644 index d92d7d50ea060..0000000000000 --- a/packages/react-dom-bindings/src/shared/ReactFlightClientConfigDOM.js +++ /dev/null @@ -1,13 +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 - */ - -// This client file is in the shared folder because it applies to both SSR and browser contexts. -// It is the configuraiton of the FlightClient behavior which can run in either environment. - -// In a future update this is where we will implement `dispatchDirective` such as for Float methods diff --git a/packages/react-server/src/ReactFlightNewContext.js b/packages/react-server/src/ReactFlightNewContext.js index 6412e7c2c7e8c..1775110f13dc2 100644 --- a/packages/react-server/src/ReactFlightNewContext.js +++ b/packages/react-server/src/ReactFlightNewContext.js @@ -13,7 +13,7 @@ import type { } from 'shared/ReactTypes'; import {REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED} from 'shared/ReactSymbols'; -import {isPrimaryRenderer} from './ReactFlightServerConfig'; +import {isPrimaryRenderer} from './ReactServerFormatConfig'; let rendererSigil; if (__DEV__) { diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-browser.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-browser.js index 5304ae8c21af8..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-browser.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-browser.js @@ -9,4 +9,3 @@ export * from '../ReactFlightServerConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; -export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-bun.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-bun.js index 3778ad89ee89c..8cc2ba0d6c9f0 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-bun.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-bun.js @@ -9,4 +9,3 @@ export * from '../ReactFlightServerConfigStream'; export * from '../ReactFlightServerConfigBundlerCustom'; -export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM'; 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 5304ae8c21af8..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-edge-webpack.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-edge-webpack.js @@ -9,4 +9,3 @@ export * from '../ReactFlightServerConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; -export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js index 5304ae8c21af8..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js @@ -9,4 +9,3 @@ export * from '../ReactFlightServerConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; -export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM'; 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 5304ae8c21af8..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-node-webpack.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-node-webpack.js @@ -9,4 +9,3 @@ export * from '../ReactFlightServerConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; -export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-node.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-node.js index 5304ae8c21af8..4a166f6518ac1 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-node.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-node.js @@ -9,4 +9,3 @@ export * from '../ReactFlightServerConfigStream'; export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; -export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM'; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-relay.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-relay.js index 13963e1a286c2..3a3b72672fe5f 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-relay.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-relay.js @@ -8,4 +8,3 @@ */ export * from 'react-server-dom-relay/src/ReactFlightServerConfigDOMRelay'; -export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM';