dillon1000/react
Commit
Browse files Use undici polyfill for tests in old Node versions (#28887)
We currently don't test FormData / File dependent features in CI because we use an old Node.js version in CI. We should probably upgrade to 18 since that's really the minimum version that supports all the features out of the box. JSDOM is not a faithful/compatible implementation of these APIs. The recommended way to use Flight together with FormData/Blob/File in older Node.js versions, is to polyfill using the `undici` library. However, even in these versions the Blob implementation isn't quite faithful so the Reply client needs a slight tweak for multi-byte typed arrays.
Changed paths6 files
First-parent comparisonpackage.json ModifiedM packages/react-client/src/ReactFlightReplyClient.js ModifiedM packages/react-client/src/__tests__/ReactFlight-test.js ModifiedM packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMEdge-test.js ModifiedM packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMReplyEdge-test.js ModifiedM yarn.lock ModifiedPatch
Files changed
Rendering syntax-highlighted changes…