dillon1000/react
Commit
Browse files [Flight] Add `debugChannel` option to Edge and Node clients (#34236)
When a debug channel is used between the Flight server and a browser Flight client, we want to allow the same RSC stream to be used for server-side rendering. To support this, the Edge and Node Flight clients also need to accept a `debugChannel` option. Without it, debug information would be missing (e.g. for SSR error stacks), and in some cases this could result in `Connection closed` errors. This PR adds support for the `debugChannel` option in the Edge and Node clients for ESM, Parcel, Turbopack, and Webpack. Unlike the browser clients, these clients only support a one-way channel, since the Flight server’s return protocol is not designed for multiple clients. The implementation follows the approach used in the browser clients, but excludes the writable parts.
Changed paths11 files
First-parent comparisonpackages/react-server-dom-esm/src/client/ReactFlightDOMClientNode.js ModifiedM packages/react-server-dom-parcel/src/client/ReactFlightDOMClientEdge.js ModifiedM packages/react-server-dom-parcel/src/client/ReactFlightDOMClientNode.js ModifiedM packages/react-server-dom-turbopack/src/__tests__/ReactFlightTurbopackDOMEdge-test.js ModifiedM packages/react-server-dom-turbopack/src/__tests__/ReactFlightTurbopackDOMNode-test.js ModifiedM packages/react-server-dom-turbopack/src/client/ReactFlightDOMClientEdge.js ModifiedM packages/react-server-dom-turbopack/src/client/ReactFlightDOMClientNode.js ModifiedM packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMEdge-test.js ModifiedM packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMNode-test.js ModifiedM packages/react-server-dom-webpack/src/client/ReactFlightDOMClientEdge.js ModifiedM packages/react-server-dom-webpack/src/client/ReactFlightDOMClientNode.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…