Skip to content

Commit f994737

Browse files
authored
[Flight] Allow temporary references in decodeReplyFromBusboy (facebook#29219)
1 parent 3ac551e commit f994737

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

packages/react-server-dom-esm/src/ReactFlightDOMServerNode.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,13 @@ function renderToPipeableStream(
126126
function decodeReplyFromBusboy<T>(
127127
busboyStream: Busboy,
128128
moduleBasePath: ServerManifest,
129+
options?: {temporaryReferences?: TemporaryReferenceSet},
129130
): Thenable<T> {
130-
const response = createResponse(moduleBasePath, '');
131+
const response = createResponse(
132+
moduleBasePath,
133+
'',
134+
options ? options.temporaryReferences : undefined,
135+
);
131136
let pendingFiles = 0;
132137
const queuedFields: Array<string> = [];
133138
busboyStream.on('field', (name, value) => {

packages/react-server-dom-turbopack/src/ReactFlightDOMServerNode.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,13 @@ function renderToPipeableStream(
127127
function decodeReplyFromBusboy<T>(
128128
busboyStream: Busboy,
129129
turbopackMap: ServerManifest,
130+
options?: {temporaryReferences?: TemporaryReferenceSet},
130131
): Thenable<T> {
131-
const response = createResponse(turbopackMap, '');
132+
const response = createResponse(
133+
turbopackMap,
134+
'',
135+
options ? options.temporaryReferences : undefined,
136+
);
132137
let pendingFiles = 0;
133138
const queuedFields: Array<string> = [];
134139
busboyStream.on('field', (name, value) => {

packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,13 @@ function renderToPipeableStream(
127127
function decodeReplyFromBusboy<T>(
128128
busboyStream: Busboy,
129129
webpackMap: ServerManifest,
130+
options?: {temporaryReferences?: TemporaryReferenceSet},
130131
): Thenable<T> {
131-
const response = createResponse(webpackMap, '');
132+
const response = createResponse(
133+
webpackMap,
134+
'',
135+
options ? options.temporaryReferences : undefined,
136+
);
132137
let pendingFiles = 0;
133138
const queuedFields: Array<string> = [];
134139
busboyStream.on('field', (name, value) => {

0 commit comments

Comments
 (0)