Rename ReactServerFormatConfig to ReactFizzConfig (#26591)
part of https://github.com/facebook/react/pull/26571 merging separately to improve tracking of file renames
Josh Story committed
Apr 10, 2023 at 14:54 UTC
ffb8eaca5966fc7733bd0a23f4055e26d2cc59d7
33 files changed
+82
-82
packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
renamed
packages/react-dom-bindings/src/server/ReactFizzConfigDOMLegacy.js
renamed
+6
-6
@@ -12,7 +12,7 @@ import type {
12
FormatContext,
13
StreamingFormat,
14
InstructionState,
15
-} from './ReactDOMServerFormatConfig';
15
+} from './ReactFizzConfigDOM';
16
17
import {
18
createResponseState as createResponseStateImpl,
@@ -23,7 +23,7 @@ import {
23
writeEndCompletedSuspenseBoundary as writeEndCompletedSuspenseBoundaryImpl,
24
writeEndClientRenderedSuspenseBoundary as writeEndClientRenderedSuspenseBoundaryImpl,
25
HTML_MODE,
26
-} from './ReactDOMServerFormatConfig';
26
+} from './ReactFizzConfigDOM';
27
28
import type {
29
Destination,
@@ -34,7 +34,7 @@ import type {
34
export const isPrimaryRenderer = false;
35
36
export type ResponseState = {
37
- // Keep this in sync with ReactDOMServerFormatConfig
37
+ // Keep this in sync with ReactFizzConfigDOM
38
bootstrapChunks: Array<Chunk | PrecomputedChunk>,
39
placeholderPrefix: PrecomputedChunk,
40
segmentPrefix: PrecomputedChunk,
@@ -71,7 +71,7 @@ export function createResponseState(
71
externalRuntimeConfig,
72
);
73
return {
74
- // Keep this in sync with ReactDOMServerFormatConfig
74
+ // Keep this in sync with ReactFizzConfigDOM
75
bootstrapChunks: responseState.bootstrapChunks,
76
placeholderPrefix: responseState.placeholderPrefix,
77
segmentPrefix: responseState.segmentPrefix,
@@ -109,7 +109,7 @@ export type {
109
BoundaryResources,
110
FormatContext,
111
SuspenseBoundaryID,
112
-} from './ReactDOMServerFormatConfig';
112
+} from './ReactFizzConfigDOM';
113
114
export {
115
getChildFormatContext,
@@ -139,7 +139,7 @@ export {
139
setCurrentlyRenderingBoundaryResourcesTarget,
140
prepareToRender,
141
cleanupAfterRender,
142
-} from './ReactDOMServerFormatConfig';
142
+} from './ReactFizzConfigDOM';
143
144
import {stringToChunk} from 'react-server/src/ReactServerStreamConfig';
145
packages/react-dom/src/server/ReactDOMFizzServerBrowser.js
+2
-2
@@ -8,7 +8,7 @@
8
*/
9
10
import type {ReactNodeList} from 'shared/ReactTypes';
11
-import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
11
+import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
12
13
import ReactVersion from 'shared/ReactVersion';
14
@@ -22,7 +22,7 @@ import {
22
import {
23
createResponseState,
24
createRootFormatContext,
25
-} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
25
+} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
26
27
type Options = {
28
identifierPrefix?: string,
packages/react-dom/src/server/ReactDOMFizzServerBun.js
+2
-2
@@ -8,7 +8,7 @@
8
*/
9
10
import type {ReactNodeList} from 'shared/ReactTypes';
11
-import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
11
+import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
12
13
import ReactVersion from 'shared/ReactVersion';
14
@@ -22,7 +22,7 @@ import {
22
import {
23
createResponseState,
24
createRootFormatContext,
25
-} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
25
+} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
26
27
type Options = {
28
identifierPrefix?: string,
packages/react-dom/src/server/ReactDOMFizzServerEdge.js
+2
-2
@@ -8,7 +8,7 @@
8
*/
9
10
import type {ReactNodeList} from 'shared/ReactTypes';
11
-import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
11
+import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
12
13
import ReactVersion from 'shared/ReactVersion';
14
@@ -22,7 +22,7 @@ import {
22
import {
23
createResponseState,
24
createRootFormatContext,
25
-} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
25
+} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
26
27
type Options = {
28
identifierPrefix?: string,
packages/react-dom/src/server/ReactDOMFizzServerNode.js
+2
-2
@@ -10,7 +10,7 @@
10
import type {Request} from 'react-server/src/ReactFizzServer';
11
import type {ReactNodeList} from 'shared/ReactTypes';
12
import type {Writable} from 'stream';
13
-import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
13
+import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
14
import type {Destination} from 'react-server/src/ReactServerStreamConfigNode';
15
16
import ReactVersion from 'shared/ReactVersion';
@@ -25,7 +25,7 @@ import {
25
import {
26
createResponseState,
27
createRootFormatContext,
28
-} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
28
+} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
29
30
function createDrainHandler(destination: Destination, request: Request) {
31
return () => startFlowing(request, destination);
packages/react-dom/src/server/ReactDOMFizzStaticBrowser.js
+2
-2
@@ -8,7 +8,7 @@
8
*/
9
10
import type {ReactNodeList} from 'shared/ReactTypes';
11
-import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
11
+import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
12
13
import ReactVersion from 'shared/ReactVersion';
14
@@ -22,7 +22,7 @@ import {
22
import {
23
createResponseState,
24
createRootFormatContext,
25
-} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
25
+} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
26
27
type Options = {
28
identifierPrefix?: string,
packages/react-dom/src/server/ReactDOMFizzStaticEdge.js
+2
-2
@@ -8,7 +8,7 @@
8
*/
9
10
import type {ReactNodeList} from 'shared/ReactTypes';
11
-import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
11
+import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
12
13
import ReactVersion from 'shared/ReactVersion';
14
@@ -22,7 +22,7 @@ import {
22
import {
23
createResponseState,
24
createRootFormatContext,
25
-} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
25
+} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
26
27
type Options = {
28
identifierPrefix?: string,
packages/react-dom/src/server/ReactDOMFizzStaticNode.js
+2
-2
@@ -8,7 +8,7 @@
8
*/
9
10
import type {ReactNodeList} from 'shared/ReactTypes';
11
-import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
11
+import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
12
13
import {Writable, Readable} from 'stream';
14
@@ -24,7 +24,7 @@ import {
24
import {
25
createResponseState,
26
createRootFormatContext,
27
-} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
27
+} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
28
29
type Options = {
30
identifierPrefix?: string,
packages/react-dom/src/server/ReactDOMLegacyServerImpl.js
+2
-2
@@ -10,7 +10,7 @@
10
import ReactVersion from 'shared/ReactVersion';
11
12
import type {ReactNodeList} from 'shared/ReactTypes';
13
-import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
13
+import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
14
15
import {
16
createRequest,
@@ -22,7 +22,7 @@ import {
22
import {
23
createResponseState,
24
createRootFormatContext,
25
-} from 'react-dom-bindings/src/server/ReactDOMServerLegacyFormatConfig';
25
+} from 'react-dom-bindings/src/server/ReactFizzConfigDOMLegacy';
26
27
type ServerOptions = {
28
identifierPrefix?: string,
packages/react-dom/src/server/ReactDOMLegacyServerNodeStream.js
+1
-1
@@ -21,7 +21,7 @@ import {
21
import {
22
createResponseState,
23
createRootFormatContext,
24
-} from 'react-dom-bindings/src/server/ReactDOMServerLegacyFormatConfig';
24
+} from 'react-dom-bindings/src/server/ReactFizzConfigDOMLegacy';
25
26
import {Readable} from 'stream';
27
packages/react-native-renderer/src/server/ReactFizzConfigNative.js
renamed
packages/react-server-dom-relay/src/ReactDOMServerFB.js
+2
-2
@@ -12,7 +12,7 @@ import type {ReactNodeList} from 'shared/ReactTypes';
12
import type {Request} from 'react-server/src/ReactFizzServer';
13
14
import type {Destination} from 'react-server/src/ReactServerStreamConfig';
15
-import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
15
+import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
16
17
import {
18
createRequest,
@@ -25,7 +25,7 @@ import {
25
import {
26
createResponseState,
27
createRootFormatContext,
28
-} from 'react-server/src/ReactServerFormatConfig';
28
+} from 'react-server/src/ReactFizzConfig';
29
30
type Options = {
31
identifierPrefix?: string,
packages/react-server/src/ReactFizzConfig.js
renamed
packages/react-server/src/ReactFizzHooks.js
+2
-2
@@ -19,7 +19,7 @@ import type {
19
Usable,
20
} from 'shared/ReactTypes';
21
22
-import type {ResponseState} from './ReactServerFormatConfig';
22
+import type {ResponseState} from './ReactFizzConfig';
23
import type {Task} from './ReactFizzServer';
24
import type {ThenableState} from './ReactFizzThenable';
25
@@ -27,7 +27,7 @@ import {readContext as readContextImpl} from './ReactFizzNewContext';
27
import {getTreeId} from './ReactFizzTreeContext';
28
import {createThenableState, trackUsedThenable} from './ReactFizzThenable';
29
30
-import {makeId} from './ReactServerFormatConfig';
30
+import {makeId} from './ReactFizzConfig';
31
32
import {
33
enableCache,
packages/react-server/src/ReactFizzNewContext.js
+1
-1
@@ -10,7 +10,7 @@
10
import type {ReactContext} from 'shared/ReactTypes';
11
12
import {REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED} from 'shared/ReactSymbols';
13
-import {isPrimaryRenderer} from './ReactServerFormatConfig';
13
+import {isPrimaryRenderer} from './ReactFizzConfig';
14
15
let rendererSigil;
16
if (__DEV__) {
packages/react-server/src/ReactFizzServer.js
+2
-2
@@ -27,7 +27,7 @@ import type {
27
FormatContext,
28
Resources,
29
BoundaryResources,
30
-} from './ReactServerFormatConfig';
30
+} from './ReactFizzConfig';
31
import type {ContextSnapshot} from './ReactFizzNewContext';
32
import type {ComponentStackNode} from './ReactFizzComponentStack';
33
import type {TreeContext} from './ReactFizzTreeContext';
@@ -76,7 +76,7 @@ import {
76
setCurrentlyRenderingBoundaryResourcesTarget,
77
createResources,
78
createBoundaryResources,
79
-} from './ReactServerFormatConfig';
79
+} from './ReactFizzConfig';
80
import {
81
constructClassInstance,
82
mountClassInstance,
packages/react-server/src/forks/ReactFizzConfig.custom.js
renamed
packages/react-server/src/forks/ReactFizzConfig.dom-browser.js
renamed
+1
-1
@@ -7,4 +7,4 @@
7
* @flow
8
*/
9
10
-export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
10
+export * from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
packages/react-server/src/forks/ReactFizzConfig.dom-bun.js
renamed
+1
-1
@@ -7,4 +7,4 @@
7
* @flow
8
*/
9
10
-export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
10
+export * from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
packages/react-server/src/forks/ReactFizzConfig.dom-edge-webpack.js
renamed
+1
-1
@@ -7,4 +7,4 @@
7
* @flow
8
*/
9
10
-export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
10
+export * from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
packages/react-server/src/forks/ReactFizzConfig.dom-legacy.js
renamed
+1
-1
@@ -7,4 +7,4 @@
7
* @flow
8
*/
9
10
-export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
10
+export * from 'react-dom-bindings/src/server/ReactFizzConfigDOMLegacy';
packages/react-server/src/forks/ReactFizzConfig.dom-node-webpack.js
new
+10
@@ -0,0 +1,10 @@
1
+/**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow
8
+ */
9
+
10
+export * from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
packages/react-server/src/forks/ReactFizzConfig.dom-node.js
new
+10
@@ -0,0 +1,10 @@
1
+/**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow
8
+ */
9
+
10
+export * from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
packages/react-server/src/forks/ReactFizzConfig.dom-relay.js
new
+10
@@ -0,0 +1,10 @@
1
+/**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow
8
+ */
9
+
10
+export * from 'react-dom-bindings/src/server/ReactFizzConfigDOM';
packages/react-server/src/forks/ReactFizzConfig.native-relay.js
new
+10
@@ -0,0 +1,10 @@
1
+/**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow
8
+ */
9
+
10
+export * from 'react-native-renderer/src/server/ReactFizzConfigNative';
packages/react-server/src/forks/ReactServerFormatConfig.dom-legacy.js
deleted
-10
@@ -1,10 +0,0 @@
1
-/**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
- */
9
-
10
-export * from 'react-dom-bindings/src/server/ReactDOMServerLegacyFormatConfig';
packages/react-server/src/forks/ReactServerFormatConfig.dom-node.js
deleted
-10
@@ -1,10 +0,0 @@
1
-/**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
- */
9
-
10
-export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
packages/react-server/src/forks/ReactServerFormatConfig.dom-relay.js
deleted
-10
@@ -1,10 +0,0 @@
1
-/**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
- */
9
-
10
-export * from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';
packages/react-server/src/forks/ReactServerFormatConfig.native-relay.js
deleted
-10
@@ -1,10 +0,0 @@
1
-/**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
- */
9
-
10
-export * from 'react-native-renderer/src/server/ReactNativeServerFormatConfig';
scripts/flow/createFlowConfigs.js
+1
-1
@@ -53,7 +53,7 @@ function writeConfig(renderer, rendererInfo, isServerSupported) {
53
`
54
module.name_mapper='ReactFiberHostConfig$$' -> 'forks/ReactFiberHostConfig.${renderer}'
55
module.name_mapper='ReactServerStreamConfig$$' -> 'forks/ReactServerStreamConfig.${serverRenderer}'
56
-module.name_mapper='ReactServerFormatConfig$$' -> 'forks/ReactServerFormatConfig.${serverRenderer}'
56
+module.name_mapper='ReactFizzConfig$$' -> 'forks/ReactFizzConfig.${serverRenderer}'
57
module.name_mapper='ReactFlightServerConfig$$' -> 'forks/ReactFlightServerConfig.${serverRenderer}'
58
module.name_mapper='ReactFlightClientConfig$$' -> 'forks/ReactFlightClientConfig.${serverRenderer}'
59
module.name_mapper='react-devtools-feature-flags' -> 'react-devtools-shared/src/config/DevToolsFeatureFlags.default'
scripts/jest/setupHostConfigs.js
+4
-4
@@ -68,19 +68,19 @@ jest.mock('react-reconciler', () => {
68
};
69
});
70
const shimServerStreamConfigPath = 'react-server/src/ReactServerStreamConfig';
71
-const shimServerFormatConfigPath = 'react-server/src/ReactServerFormatConfig';
71
+const shimServerConfigPath = 'react-server/src/ReactFizzConfig';
72
const shimFlightServerConfigPath = 'react-server/src/ReactFlightServerConfig';
73
jest.mock('react-server', () => {
74
return config => {
75
jest.mock(shimServerStreamConfigPath, () => config);
76
- jest.mock(shimServerFormatConfigPath, () => config);
76
+ jest.mock(shimServerConfigPath, () => config);
77
return jest.requireActual('react-server');
78
};
79
});
80
jest.mock('react-server/flight', () => {
81
return config => {
82
jest.mock(shimServerStreamConfigPath, () => config);
83
- jest.mock(shimServerFormatConfigPath, () => config);
83
+ jest.mock(shimServerConfigPath, () => config);
84
jest.mock('react-server/src/ReactFlightServerConfigBundlerCustom', () => ({
85
isClientReference: config.isClientReference,
86
isServerReference: config.isServerReference,
@@ -107,7 +107,7 @@ const configPaths = [
107
'react-reconciler/src/ReactFiberHostConfig',
108
'react-client/src/ReactFlightClientConfig',
109
'react-server/src/ReactServerStreamConfig',
110
- 'react-server/src/ReactServerFormatConfig',
110
+ 'react-server/src/ReactFizzConfig',
111
'react-server/src/ReactFlightServerConfig',
112
];
113
scripts/rollup/forks.js
+3
-3
@@ -299,7 +299,7 @@ const forks = Object.freeze({
299
);
300
},
301
302
- './packages/react-server/src/ReactServerFormatConfig.js': (
302
+ './packages/react-server/src/ReactFizzConfig.js': (
303
bundleType,
304
entry,
305
dependencies,
@@ -317,11 +317,11 @@ const forks = Object.freeze({
317
if (!rendererInfo.isServerSupported) {
318
return null;
319
}
320
- return `./packages/react-server/src/forks/ReactServerFormatConfig.${rendererInfo.shortName}.js`;
320
+ return `./packages/react-server/src/forks/ReactFizzConfig.${rendererInfo.shortName}.js`;
321
}
322
}
323
throw new Error(
324
- 'Expected ReactServerFormatConfig to always be replaced with a shim, but ' +
324
+ 'Expected ReactFizzConfig to always be replaced with a shim, but ' +
325
`found no mention of "${entry}" entry point in ./scripts/shared/inlinedHostConfigs.js. ` +
326
'Did you mean to add it there to associate it with a specific renderer?'
327
);