From ffb8eaca5966fc7733bd0a23f4055e26d2cc59d7 Mon Sep 17 00:00:00 2001 From: Josh Story Date: Mon, 10 Apr 2023 14:54:26 -0700 Subject: [PATCH] Rename ReactServerFormatConfig to ReactFizzConfig (#26591) part of https://github.com/facebook/react/pull/26571 merging separately to improve tracking of file renames --- ...OMServerFormatConfig.js => ReactFizzConfigDOM.js} | 0 ...cyFormatConfig.js => ReactFizzConfigDOMLegacy.js} | 12 ++++++------ .../src/server/ReactDOMFizzServerBrowser.js | 4 ++-- .../react-dom/src/server/ReactDOMFizzServerBun.js | 4 ++-- .../react-dom/src/server/ReactDOMFizzServerEdge.js | 4 ++-- .../react-dom/src/server/ReactDOMFizzServerNode.js | 4 ++-- .../src/server/ReactDOMFizzStaticBrowser.js | 4 ++-- .../react-dom/src/server/ReactDOMFizzStaticEdge.js | 4 ++-- .../react-dom/src/server/ReactDOMFizzStaticNode.js | 4 ++-- .../react-dom/src/server/ReactDOMLegacyServerImpl.js | 4 ++-- .../src/server/ReactDOMLegacyServerNodeStream.js | 2 +- ...erverFormatConfig.js => ReactFizzConfigNative.js} | 0 .../react-server-dom-relay/src/ReactDOMServerFB.js | 4 ++-- ...ReactServerFormatConfig.js => ReactFizzConfig.js} | 0 packages/react-server/src/ReactFizzHooks.js | 4 ++-- packages/react-server/src/ReactFizzNewContext.js | 2 +- packages/react-server/src/ReactFizzServer.js | 4 ++-- ...matConfig.custom.js => ReactFizzConfig.custom.js} | 0 ...ode-webpack.js => ReactFizzConfig.dom-browser.js} | 2 +- ...fig.dom-browser.js => ReactFizzConfig.dom-bun.js} | 2 +- ...om-bun.js => ReactFizzConfig.dom-edge-webpack.js} | 2 +- ...edge-webpack.js => ReactFizzConfig.dom-legacy.js} | 2 +- .../src/forks/ReactFizzConfig.dom-node-webpack.js | 10 ++++++++++ .../src/forks/ReactFizzConfig.dom-node.js | 10 ++++++++++ .../src/forks/ReactFizzConfig.dom-relay.js | 10 ++++++++++ .../src/forks/ReactFizzConfig.native-relay.js | 10 ++++++++++ .../src/forks/ReactServerFormatConfig.dom-legacy.js | 10 ---------- .../src/forks/ReactServerFormatConfig.dom-node.js | 10 ---------- .../src/forks/ReactServerFormatConfig.dom-relay.js | 10 ---------- .../forks/ReactServerFormatConfig.native-relay.js | 10 ---------- scripts/flow/createFlowConfigs.js | 2 +- scripts/jest/setupHostConfigs.js | 8 ++++---- scripts/rollup/forks.js | 6 +++--- 33 files changed, 82 insertions(+), 82 deletions(-) rename packages/react-dom-bindings/src/server/{ReactDOMServerFormatConfig.js => ReactFizzConfigDOM.js} (100%) rename packages/react-dom-bindings/src/server/{ReactDOMServerLegacyFormatConfig.js => ReactFizzConfigDOMLegacy.js} (96%) rename packages/react-native-renderer/src/server/{ReactNativeServerFormatConfig.js => ReactFizzConfigNative.js} (100%) rename packages/react-server/src/{ReactServerFormatConfig.js => ReactFizzConfig.js} (100%) rename packages/react-server/src/forks/{ReactServerFormatConfig.custom.js => ReactFizzConfig.custom.js} (100%) rename packages/react-server/src/forks/{ReactServerFormatConfig.dom-node-webpack.js => ReactFizzConfig.dom-browser.js} (73%) rename packages/react-server/src/forks/{ReactServerFormatConfig.dom-browser.js => ReactFizzConfig.dom-bun.js} (73%) rename packages/react-server/src/forks/{ReactServerFormatConfig.dom-bun.js => ReactFizzConfig.dom-edge-webpack.js} (73%) rename packages/react-server/src/forks/{ReactServerFormatConfig.dom-edge-webpack.js => ReactFizzConfig.dom-legacy.js} (73%) create mode 100644 packages/react-server/src/forks/ReactFizzConfig.dom-node-webpack.js create mode 100644 packages/react-server/src/forks/ReactFizzConfig.dom-node.js create mode 100644 packages/react-server/src/forks/ReactFizzConfig.dom-relay.js create mode 100644 packages/react-server/src/forks/ReactFizzConfig.native-relay.js delete mode 100644 packages/react-server/src/forks/ReactServerFormatConfig.dom-legacy.js delete mode 100644 packages/react-server/src/forks/ReactServerFormatConfig.dom-node.js delete mode 100644 packages/react-server/src/forks/ReactServerFormatConfig.dom-relay.js delete mode 100644 packages/react-server/src/forks/ReactServerFormatConfig.native-relay.js diff --git a/packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js similarity index 100% rename from packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js rename to packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js diff --git a/packages/react-dom-bindings/src/server/ReactDOMServerLegacyFormatConfig.js b/packages/react-dom-bindings/src/server/ReactFizzConfigDOMLegacy.js similarity index 96% rename from packages/react-dom-bindings/src/server/ReactDOMServerLegacyFormatConfig.js rename to packages/react-dom-bindings/src/server/ReactFizzConfigDOMLegacy.js index 5ca51fbcbbac0..1707b4d2c13e3 100644 --- a/packages/react-dom-bindings/src/server/ReactDOMServerLegacyFormatConfig.js +++ b/packages/react-dom-bindings/src/server/ReactFizzConfigDOMLegacy.js @@ -12,7 +12,7 @@ import type { FormatContext, StreamingFormat, InstructionState, -} from './ReactDOMServerFormatConfig'; +} from './ReactFizzConfigDOM'; import { createResponseState as createResponseStateImpl, @@ -23,7 +23,7 @@ import { writeEndCompletedSuspenseBoundary as writeEndCompletedSuspenseBoundaryImpl, writeEndClientRenderedSuspenseBoundary as writeEndClientRenderedSuspenseBoundaryImpl, HTML_MODE, -} from './ReactDOMServerFormatConfig'; +} from './ReactFizzConfigDOM'; import type { Destination, @@ -34,7 +34,7 @@ import type { export const isPrimaryRenderer = false; export type ResponseState = { - // Keep this in sync with ReactDOMServerFormatConfig + // Keep this in sync with ReactFizzConfigDOM bootstrapChunks: Array, placeholderPrefix: PrecomputedChunk, segmentPrefix: PrecomputedChunk, @@ -71,7 +71,7 @@ export function createResponseState( externalRuntimeConfig, ); return { - // Keep this in sync with ReactDOMServerFormatConfig + // Keep this in sync with ReactFizzConfigDOM bootstrapChunks: responseState.bootstrapChunks, placeholderPrefix: responseState.placeholderPrefix, segmentPrefix: responseState.segmentPrefix, @@ -109,7 +109,7 @@ export type { BoundaryResources, FormatContext, SuspenseBoundaryID, -} from './ReactDOMServerFormatConfig'; +} from './ReactFizzConfigDOM'; export { getChildFormatContext, @@ -139,7 +139,7 @@ export { setCurrentlyRenderingBoundaryResourcesTarget, prepareToRender, cleanupAfterRender, -} from './ReactDOMServerFormatConfig'; +} from './ReactFizzConfigDOM'; import {stringToChunk} from 'react-server/src/ReactServerStreamConfig'; diff --git a/packages/react-dom/src/server/ReactDOMFizzServerBrowser.js b/packages/react-dom/src/server/ReactDOMFizzServerBrowser.js index a6c27a28ffde3..2c4080b61234d 100644 --- a/packages/react-dom/src/server/ReactDOMFizzServerBrowser.js +++ b/packages/react-dom/src/server/ReactDOMFizzServerBrowser.js @@ -8,7 +8,7 @@ */ import type {ReactNodeList} from 'shared/ReactTypes'; -import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; import ReactVersion from 'shared/ReactVersion'; @@ -22,7 +22,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; type Options = { identifierPrefix?: string, diff --git a/packages/react-dom/src/server/ReactDOMFizzServerBun.js b/packages/react-dom/src/server/ReactDOMFizzServerBun.js index 4187903875da7..686c839296ff7 100644 --- a/packages/react-dom/src/server/ReactDOMFizzServerBun.js +++ b/packages/react-dom/src/server/ReactDOMFizzServerBun.js @@ -8,7 +8,7 @@ */ import type {ReactNodeList} from 'shared/ReactTypes'; -import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; import ReactVersion from 'shared/ReactVersion'; @@ -22,7 +22,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; type Options = { identifierPrefix?: string, diff --git a/packages/react-dom/src/server/ReactDOMFizzServerEdge.js b/packages/react-dom/src/server/ReactDOMFizzServerEdge.js index a6c27a28ffde3..2c4080b61234d 100644 --- a/packages/react-dom/src/server/ReactDOMFizzServerEdge.js +++ b/packages/react-dom/src/server/ReactDOMFizzServerEdge.js @@ -8,7 +8,7 @@ */ import type {ReactNodeList} from 'shared/ReactTypes'; -import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; import ReactVersion from 'shared/ReactVersion'; @@ -22,7 +22,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; type Options = { identifierPrefix?: string, diff --git a/packages/react-dom/src/server/ReactDOMFizzServerNode.js b/packages/react-dom/src/server/ReactDOMFizzServerNode.js index 7fa6d6a9cc0b4..566f181feda91 100644 --- a/packages/react-dom/src/server/ReactDOMFizzServerNode.js +++ b/packages/react-dom/src/server/ReactDOMFizzServerNode.js @@ -10,7 +10,7 @@ import type {Request} from 'react-server/src/ReactFizzServer'; import type {ReactNodeList} from 'shared/ReactTypes'; import type {Writable} from 'stream'; -import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; import type {Destination} from 'react-server/src/ReactServerStreamConfigNode'; import ReactVersion from 'shared/ReactVersion'; @@ -25,7 +25,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; function createDrainHandler(destination: Destination, request: Request) { return () => startFlowing(request, destination); diff --git a/packages/react-dom/src/server/ReactDOMFizzStaticBrowser.js b/packages/react-dom/src/server/ReactDOMFizzStaticBrowser.js index e9af36547d8b1..b568e1bec4a89 100644 --- a/packages/react-dom/src/server/ReactDOMFizzStaticBrowser.js +++ b/packages/react-dom/src/server/ReactDOMFizzStaticBrowser.js @@ -8,7 +8,7 @@ */ import type {ReactNodeList} from 'shared/ReactTypes'; -import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; import ReactVersion from 'shared/ReactVersion'; @@ -22,7 +22,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; type Options = { identifierPrefix?: string, diff --git a/packages/react-dom/src/server/ReactDOMFizzStaticEdge.js b/packages/react-dom/src/server/ReactDOMFizzStaticEdge.js index e9af36547d8b1..b568e1bec4a89 100644 --- a/packages/react-dom/src/server/ReactDOMFizzStaticEdge.js +++ b/packages/react-dom/src/server/ReactDOMFizzStaticEdge.js @@ -8,7 +8,7 @@ */ import type {ReactNodeList} from 'shared/ReactTypes'; -import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; import ReactVersion from 'shared/ReactVersion'; @@ -22,7 +22,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; type Options = { identifierPrefix?: string, diff --git a/packages/react-dom/src/server/ReactDOMFizzStaticNode.js b/packages/react-dom/src/server/ReactDOMFizzStaticNode.js index beccc2e7b5feb..f9291cb5648db 100644 --- a/packages/react-dom/src/server/ReactDOMFizzStaticNode.js +++ b/packages/react-dom/src/server/ReactDOMFizzStaticNode.js @@ -8,7 +8,7 @@ */ import type {ReactNodeList} from 'shared/ReactTypes'; -import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; import {Writable, Readable} from 'stream'; @@ -24,7 +24,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; type Options = { identifierPrefix?: string, diff --git a/packages/react-dom/src/server/ReactDOMLegacyServerImpl.js b/packages/react-dom/src/server/ReactDOMLegacyServerImpl.js index 2d9fed4a556f1..fe6e8f9a54b4d 100644 --- a/packages/react-dom/src/server/ReactDOMLegacyServerImpl.js +++ b/packages/react-dom/src/server/ReactDOMLegacyServerImpl.js @@ -10,7 +10,7 @@ import ReactVersion from 'shared/ReactVersion'; import type {ReactNodeList} from 'shared/ReactTypes'; -import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; import { createRequest, @@ -22,7 +22,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-dom-bindings/src/server/ReactDOMServerLegacyFormatConfig'; +} from 'react-dom-bindings/src/server/ReactFizzConfigDOMLegacy'; type ServerOptions = { identifierPrefix?: string, diff --git a/packages/react-dom/src/server/ReactDOMLegacyServerNodeStream.js b/packages/react-dom/src/server/ReactDOMLegacyServerNodeStream.js index 90af0a2c633e7..8b493b0bda3ef 100644 --- a/packages/react-dom/src/server/ReactDOMLegacyServerNodeStream.js +++ b/packages/react-dom/src/server/ReactDOMLegacyServerNodeStream.js @@ -21,7 +21,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-dom-bindings/src/server/ReactDOMServerLegacyFormatConfig'; +} from 'react-dom-bindings/src/server/ReactFizzConfigDOMLegacy'; import {Readable} from 'stream'; diff --git a/packages/react-native-renderer/src/server/ReactNativeServerFormatConfig.js b/packages/react-native-renderer/src/server/ReactFizzConfigNative.js similarity index 100% rename from packages/react-native-renderer/src/server/ReactNativeServerFormatConfig.js rename to packages/react-native-renderer/src/server/ReactFizzConfigNative.js diff --git a/packages/react-server-dom-relay/src/ReactDOMServerFB.js b/packages/react-server-dom-relay/src/ReactDOMServerFB.js index 34f8862127ce0..5944cb00bee7d 100644 --- a/packages/react-server-dom-relay/src/ReactDOMServerFB.js +++ b/packages/react-server-dom-relay/src/ReactDOMServerFB.js @@ -12,7 +12,7 @@ import type {ReactNodeList} from 'shared/ReactTypes'; import type {Request} from 'react-server/src/ReactFizzServer'; import type {Destination} from 'react-server/src/ReactServerStreamConfig'; -import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; import { createRequest, @@ -25,7 +25,7 @@ import { import { createResponseState, createRootFormatContext, -} from 'react-server/src/ReactServerFormatConfig'; +} from 'react-server/src/ReactFizzConfig'; type Options = { identifierPrefix?: string, diff --git a/packages/react-server/src/ReactServerFormatConfig.js b/packages/react-server/src/ReactFizzConfig.js similarity index 100% rename from packages/react-server/src/ReactServerFormatConfig.js rename to packages/react-server/src/ReactFizzConfig.js diff --git a/packages/react-server/src/ReactFizzHooks.js b/packages/react-server/src/ReactFizzHooks.js index 78d6c0f84f70c..a389c092618ed 100644 --- a/packages/react-server/src/ReactFizzHooks.js +++ b/packages/react-server/src/ReactFizzHooks.js @@ -19,7 +19,7 @@ import type { Usable, } from 'shared/ReactTypes'; -import type {ResponseState} from './ReactServerFormatConfig'; +import type {ResponseState} from './ReactFizzConfig'; import type {Task} from './ReactFizzServer'; import type {ThenableState} from './ReactFizzThenable'; @@ -27,7 +27,7 @@ import {readContext as readContextImpl} from './ReactFizzNewContext'; import {getTreeId} from './ReactFizzTreeContext'; import {createThenableState, trackUsedThenable} from './ReactFizzThenable'; -import {makeId} from './ReactServerFormatConfig'; +import {makeId} from './ReactFizzConfig'; import { enableCache, diff --git a/packages/react-server/src/ReactFizzNewContext.js b/packages/react-server/src/ReactFizzNewContext.js index 298b9005ab395..a2107b573e152 100644 --- a/packages/react-server/src/ReactFizzNewContext.js +++ b/packages/react-server/src/ReactFizzNewContext.js @@ -10,7 +10,7 @@ import type {ReactContext} from 'shared/ReactTypes'; import {REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED} from 'shared/ReactSymbols'; -import {isPrimaryRenderer} from './ReactServerFormatConfig'; +import {isPrimaryRenderer} from './ReactFizzConfig'; let rendererSigil; if (__DEV__) { diff --git a/packages/react-server/src/ReactFizzServer.js b/packages/react-server/src/ReactFizzServer.js index 3bd4f1d02d9d0..eab8c6c50e366 100644 --- a/packages/react-server/src/ReactFizzServer.js +++ b/packages/react-server/src/ReactFizzServer.js @@ -27,7 +27,7 @@ import type { FormatContext, Resources, BoundaryResources, -} from './ReactServerFormatConfig'; +} from './ReactFizzConfig'; import type {ContextSnapshot} from './ReactFizzNewContext'; import type {ComponentStackNode} from './ReactFizzComponentStack'; import type {TreeContext} from './ReactFizzTreeContext'; @@ -76,7 +76,7 @@ import { setCurrentlyRenderingBoundaryResourcesTarget, createResources, createBoundaryResources, -} from './ReactServerFormatConfig'; +} from './ReactFizzConfig'; import { constructClassInstance, mountClassInstance, diff --git a/packages/react-server/src/forks/ReactServerFormatConfig.custom.js b/packages/react-server/src/forks/ReactFizzConfig.custom.js similarity index 100% rename from packages/react-server/src/forks/ReactServerFormatConfig.custom.js rename to packages/react-server/src/forks/ReactFizzConfig.custom.js diff --git a/packages/react-server/src/forks/ReactServerFormatConfig.dom-node-webpack.js b/packages/react-server/src/forks/ReactFizzConfig.dom-browser.js similarity index 73% rename from packages/react-server/src/forks/ReactServerFormatConfig.dom-node-webpack.js rename to packages/react-server/src/forks/ReactFizzConfig.dom-browser.js index 485793a6893ee..f2cf57ab5942f 100644 --- a/packages/react-server/src/forks/ReactServerFormatConfig.dom-node-webpack.js +++ b/packages/react-server/src/forks/ReactFizzConfig.dom-browser.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +export * from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; diff --git a/packages/react-server/src/forks/ReactServerFormatConfig.dom-browser.js b/packages/react-server/src/forks/ReactFizzConfig.dom-bun.js similarity index 73% rename from packages/react-server/src/forks/ReactServerFormatConfig.dom-browser.js rename to packages/react-server/src/forks/ReactFizzConfig.dom-bun.js index 485793a6893ee..f2cf57ab5942f 100644 --- a/packages/react-server/src/forks/ReactServerFormatConfig.dom-browser.js +++ b/packages/react-server/src/forks/ReactFizzConfig.dom-bun.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +export * from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; diff --git a/packages/react-server/src/forks/ReactServerFormatConfig.dom-bun.js b/packages/react-server/src/forks/ReactFizzConfig.dom-edge-webpack.js similarity index 73% rename from packages/react-server/src/forks/ReactServerFormatConfig.dom-bun.js rename to packages/react-server/src/forks/ReactFizzConfig.dom-edge-webpack.js index 485793a6893ee..f2cf57ab5942f 100644 --- a/packages/react-server/src/forks/ReactServerFormatConfig.dom-bun.js +++ b/packages/react-server/src/forks/ReactFizzConfig.dom-edge-webpack.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +export * from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; diff --git a/packages/react-server/src/forks/ReactServerFormatConfig.dom-edge-webpack.js b/packages/react-server/src/forks/ReactFizzConfig.dom-legacy.js similarity index 73% rename from packages/react-server/src/forks/ReactServerFormatConfig.dom-edge-webpack.js rename to packages/react-server/src/forks/ReactFizzConfig.dom-legacy.js index 485793a6893ee..4760bb843ea89 100644 --- a/packages/react-server/src/forks/ReactServerFormatConfig.dom-edge-webpack.js +++ b/packages/react-server/src/forks/ReactFizzConfig.dom-legacy.js @@ -7,4 +7,4 @@ * @flow */ -export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig'; +export * from 'react-dom-bindings/src/server/ReactFizzConfigDOMLegacy'; diff --git a/packages/react-server/src/forks/ReactFizzConfig.dom-node-webpack.js b/packages/react-server/src/forks/ReactFizzConfig.dom-node-webpack.js new file mode 100644 index 0000000000000..f2cf57ab5942f --- /dev/null +++ b/packages/react-server/src/forks/ReactFizzConfig.dom-node-webpack.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 * from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; diff --git a/packages/react-server/src/forks/ReactFizzConfig.dom-node.js b/packages/react-server/src/forks/ReactFizzConfig.dom-node.js new file mode 100644 index 0000000000000..f2cf57ab5942f --- /dev/null +++ b/packages/react-server/src/forks/ReactFizzConfig.dom-node.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 * from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; diff --git a/packages/react-server/src/forks/ReactFizzConfig.dom-relay.js b/packages/react-server/src/forks/ReactFizzConfig.dom-relay.js new file mode 100644 index 0000000000000..f2cf57ab5942f --- /dev/null +++ b/packages/react-server/src/forks/ReactFizzConfig.dom-relay.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 * from 'react-dom-bindings/src/server/ReactFizzConfigDOM'; diff --git a/packages/react-server/src/forks/ReactFizzConfig.native-relay.js b/packages/react-server/src/forks/ReactFizzConfig.native-relay.js new file mode 100644 index 0000000000000..c4981f9edf140 --- /dev/null +++ b/packages/react-server/src/forks/ReactFizzConfig.native-relay.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 * from 'react-native-renderer/src/server/ReactFizzConfigNative'; diff --git a/packages/react-server/src/forks/ReactServerFormatConfig.dom-legacy.js b/packages/react-server/src/forks/ReactServerFormatConfig.dom-legacy.js deleted file mode 100644 index 7fe33c0b99572..0000000000000 --- a/packages/react-server/src/forks/ReactServerFormatConfig.dom-legacy.js +++ /dev/null @@ -1,10 +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-dom-bindings/src/server/ReactDOMServerLegacyFormatConfig'; diff --git a/packages/react-server/src/forks/ReactServerFormatConfig.dom-node.js b/packages/react-server/src/forks/ReactServerFormatConfig.dom-node.js deleted file mode 100644 index 485793a6893ee..0000000000000 --- a/packages/react-server/src/forks/ReactServerFormatConfig.dom-node.js +++ /dev/null @@ -1,10 +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-dom-bindings/src/server/ReactDOMServerFormatConfig'; diff --git a/packages/react-server/src/forks/ReactServerFormatConfig.dom-relay.js b/packages/react-server/src/forks/ReactServerFormatConfig.dom-relay.js deleted file mode 100644 index 485793a6893ee..0000000000000 --- a/packages/react-server/src/forks/ReactServerFormatConfig.dom-relay.js +++ /dev/null @@ -1,10 +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-dom-bindings/src/server/ReactDOMServerFormatConfig'; diff --git a/packages/react-server/src/forks/ReactServerFormatConfig.native-relay.js b/packages/react-server/src/forks/ReactServerFormatConfig.native-relay.js deleted file mode 100644 index c02082f497a7b..0000000000000 --- a/packages/react-server/src/forks/ReactServerFormatConfig.native-relay.js +++ /dev/null @@ -1,10 +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-native-renderer/src/server/ReactNativeServerFormatConfig'; diff --git a/scripts/flow/createFlowConfigs.js b/scripts/flow/createFlowConfigs.js index 29cdde34e2f18..0193f323dc1f9 100644 --- a/scripts/flow/createFlowConfigs.js +++ b/scripts/flow/createFlowConfigs.js @@ -53,7 +53,7 @@ function writeConfig(renderer, rendererInfo, isServerSupported) { ` module.name_mapper='ReactFiberHostConfig$$' -> 'forks/ReactFiberHostConfig.${renderer}' module.name_mapper='ReactServerStreamConfig$$' -> 'forks/ReactServerStreamConfig.${serverRenderer}' -module.name_mapper='ReactServerFormatConfig$$' -> 'forks/ReactServerFormatConfig.${serverRenderer}' +module.name_mapper='ReactFizzConfig$$' -> 'forks/ReactFizzConfig.${serverRenderer}' module.name_mapper='ReactFlightServerConfig$$' -> 'forks/ReactFlightServerConfig.${serverRenderer}' module.name_mapper='ReactFlightClientConfig$$' -> 'forks/ReactFlightClientConfig.${serverRenderer}' module.name_mapper='react-devtools-feature-flags' -> 'react-devtools-shared/src/config/DevToolsFeatureFlags.default' diff --git a/scripts/jest/setupHostConfigs.js b/scripts/jest/setupHostConfigs.js index e78fc3ce34d39..ae19851df93e7 100644 --- a/scripts/jest/setupHostConfigs.js +++ b/scripts/jest/setupHostConfigs.js @@ -68,19 +68,19 @@ jest.mock('react-reconciler', () => { }; }); const shimServerStreamConfigPath = 'react-server/src/ReactServerStreamConfig'; -const shimServerFormatConfigPath = 'react-server/src/ReactServerFormatConfig'; +const shimServerConfigPath = 'react-server/src/ReactFizzConfig'; const shimFlightServerConfigPath = 'react-server/src/ReactFlightServerConfig'; jest.mock('react-server', () => { return config => { jest.mock(shimServerStreamConfigPath, () => config); - jest.mock(shimServerFormatConfigPath, () => config); + jest.mock(shimServerConfigPath, () => config); return jest.requireActual('react-server'); }; }); jest.mock('react-server/flight', () => { return config => { jest.mock(shimServerStreamConfigPath, () => config); - jest.mock(shimServerFormatConfigPath, () => config); + jest.mock(shimServerConfigPath, () => config); jest.mock('react-server/src/ReactFlightServerConfigBundlerCustom', () => ({ isClientReference: config.isClientReference, isServerReference: config.isServerReference, @@ -107,7 +107,7 @@ const configPaths = [ 'react-reconciler/src/ReactFiberHostConfig', 'react-client/src/ReactFlightClientConfig', 'react-server/src/ReactServerStreamConfig', - 'react-server/src/ReactServerFormatConfig', + 'react-server/src/ReactFizzConfig', 'react-server/src/ReactFlightServerConfig', ]; diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js index 55d4409fe957c..5f6c984604266 100644 --- a/scripts/rollup/forks.js +++ b/scripts/rollup/forks.js @@ -299,7 +299,7 @@ const forks = Object.freeze({ ); }, - './packages/react-server/src/ReactServerFormatConfig.js': ( + './packages/react-server/src/ReactFizzConfig.js': ( bundleType, entry, dependencies, @@ -317,11 +317,11 @@ const forks = Object.freeze({ if (!rendererInfo.isServerSupported) { return null; } - return `./packages/react-server/src/forks/ReactServerFormatConfig.${rendererInfo.shortName}.js`; + return `./packages/react-server/src/forks/ReactFizzConfig.${rendererInfo.shortName}.js`; } } throw new Error( - 'Expected ReactServerFormatConfig to always be replaced with a shim, but ' + + 'Expected ReactFizzConfig 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?' );