[pull] canary from vercel:canary#1100
Merged
Merged
Conversation
Fixed two typos in `contributing/core/testing.md`: - `sett` → `setting` (`Consider also setting NEXT_E2E_TEST_TIMEOUT=0`) - `again` → `against` (`run a test against both Turbopack and Webpack`)
With Node streams enabled (now the default), the dev-only React debug channel was still being round-tripped through web streams repeatedly. The Node variant of `teeStream` wrapped the readable with `Readable.toWeb`, teed it, then unwrapped with `Readable.fromWeb`, applied up to twice as the channel was split for validation and then for SSR and the browser, and `connectReactDebugChannel` additionally converted the readable to a web `ReadableStream` and ran every chunk through a web `TransformStream` batcher before forwarding it over HMR. Each conversion allocates web-stream wrappers and adds per-chunk microtask scheduling that contends for CPU with the render, which is wasteful because the debug payload is non-trivial in dev (async debug info, console replay, large debug strings) and the whole point of the Node streams flag is to avoid that overhead. This change keeps the channel Node-native whenever Node streams are in use. The Node variant of `teeStream` now fans out through `ReplayableNodeStream` instead of the web round-trip, which fixes every Node-mode caller at once. The Cache Components Node render path, which needs three independent consumers (validation, SSR, and the browser), fans out through a single `ReplayableNodeStream` directly rather than nesting binary tees. `connectReactDebugChannel` now branches on the stream type and, for Node input, batches with a Node `Transform` (`createNodeBufferedTransformStream`, now exported with a byte-length cap to match the web batcher) consumed via `data`/`end`/`error` events, with no `toWeb` conversion. A `NodeDebugChannelPair` type narrows the client-side readable to a Node `Readable` so Node call sites can consume it without casting `AnyStream` down. The web path is left untouched and remains conversion-free.
### What? Pin the dependency versions used by the Material UI new-link-behavior fixture. ### Why? The fixture currently installs `latest`, which now resolves `@mui/material` to 9.0.1. That version causes an SWC source-map panic while compiling the fixture, so an unrelated link behavior test fails before reaching its assertion. ### How? Replace the floating dependency versions with the known-good Material UI 5.11.16, Emotion 11, and prop-types versions previously used by the fixture. ### Verification - `pnpm build-all` - `pnpm prettier --with-node-modules --ignore-path .prettierignore --write test/e2e/new-link-behavior/material-ui.test.ts` - `npx eslint --config eslint.config.mjs --fix test/e2e/new-link-behavior/material-ui.test.ts` - `NEXT_TEST_PREFER_OFFLINE=1 pnpm test-dev-webpack test/e2e/new-link-behavior/material-ui.test.ts` <!-- NEXT_JS_LLM_PR -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )