next.js
11246441 - refactor: split stream-ops and debug-channel into node/web compile-time switchers

Commit
16 days ago
refactor: split stream-ops and debug-channel into node/web compile-time switchers Extract stream-ops.ts and debug-channel-server.ts into node/web variants with compile-time .js switchers gated on __NEXT_USE_NODE_STREAMS. This keeps node:stream imports out of standard bundles while the nodestreams bundles get native Node.js stream operations. Key changes: - stream-ops.node.ts: uses pipeable stream APIs via ComponentMod bridge - stream-ops.web.ts: uses ReadableStream APIs via ComponentMod bridge - debug-channel-server.node.ts/web.ts: same pattern for debug channels - entry-base.ts: exports renderToPipeableStream/prerenderToNodeStream behind __NEXT_USE_NODE_STREAMS guard for react-server layer access - app-render.tsx: uses stream-ops abstraction layer, adds ComponentMod as first arg to renderToFlightStream/getServerPrerender - node-stream-helpers.ts: new Node-native continue/chain/buffer helpers - node-web-streams-helper.ts: Node-to-web conversion via Readable.toWeb()
Author
Committer
Parents
Loading