Skip to content

stream.compose does not preserve 'readableObjectMode' from final stream to returned stream #46829

Description

@loganfsmyth

Version

v19.7.0

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

conststream=require("stream");consts=stream.compose(stream.Readable.from("0 1 2 3 4"),newstream.Transform({readableObjectMode: true,transform: function(val,enc,callback){for(constnumofval.toString().split(" ")){this.push(`${num}`);}callback();},}));s.on("readable",()=>{letdata;while((data=s.read())!==null){console.log("read:",`${data}`);}});s.on("end",()=>{console.log("done");});

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

Should output

read: 0read: 1read: 2read: 3read: 4done 

What do you see instead?

read: 01234read: nulldone

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    streamIssues and PRs related to the stream subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions