You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
π Bug Report β Runtime APIs: console.log()/util.inspect() of a stream shows no state with typescript_implemented_streamsΒ #8048
With typescript_implemented_streams, util.inspect() shows nothing about a stream's state, and neither does console.log(), which uses it. You get ReadableStream {}, WritableStream {} and TransformStream {}. The C++ implementation shows locked, [state], [supportsBYOB] and [length], plus readable/writable for a TransformStream. Logging response.body is a common way to debug a stuck or already-used body. Under the flag it shows nothing useful.
Reproduction
worker.js:
import{inspect}from"node:util";exportdefault{asynctest(){conststream=newReadableStream({start(controller){controller.enqueue(newUint8Array(3));}});stream.getReader();consttext=inspect(stream);console.log(text);console.log(inspect(newTransformStream()));console.log(inspect(newResponse("body").body));if(!text.includes("locked"))thrownewError("inspect() shows none of the stream's state");},};
config.capnp:
using Workerd = import"/workerd/workerd.capnp";
const config :Workerd.Config = (
services = [(name = "main", worker = .main)],
# typescript_implemented_streams only starts with this autogate.
autogates = ["workerd-autogate-per-isolate-javascript-bootstrap"],
);
const main :Workerd.Worker = (
modules = [(name = "worker", esModule = embed "worker.js")],
compatibilityDate = "2026-10-27",
compatibilityFlags = ["typescript_implemented_streams"],
);
workerd test --experimental config.capnp
With the flag (workerd 2026-10-27, @cloudflare/workerd-darwin-arm64@1.20261027.1):
ReadableStream {}
TransformStream {}
ReadableStream {}
[ FAIL ] main
inspect()/console.log() of a stream shows the same state as with the C++ implementation, for example through a Symbol.for('nodejs.util.inspect.custom') method on the TypeScript classes.
Correction: this is already a known, pinned divergence. src/tests/streams/inspect/AGENTS.md records that the TypeScript implementation has no custom inspect and pins both shapes. I missed it because my checkout of src/tests/streams was partial. Closing this as a duplicate of that ledger entry. Sorry for the noise.
Activity
james-elicx commentedon Oct 27, 2026
Correction: this is already a known, pinned divergence.
src/tests/streams/inspect/AGENTS.mdrecords that the TypeScript implementation has no custom inspect and pins both shapes. I missed it because my checkout ofsrc/tests/streamswas partial. Closing this as a duplicate of that ledger entry. Sorry for the noise.jasnell commentedon Oct 27, 2026
Yep, known item. I'll be revisiting this but it's not on my critical list before going live.