How often does it reproduce? Is there a required condition?
Reproduces in all versions of Node tested, 16+.
What is the expected behavior?
For a zero-length string to be able to be used as a source/first argument. Strings with non-zero lengths work correctly.
What do you see instead?
TypeError [ERR_INVALID_ARG_TYPE]: The "source" argument must be of type function or an instance of Stream, Iterable, or AsyncIterable. Received type string ('')
at Function.pipeline (internal/streams/pipeline.js:202:15)
at main (REPL8:2:18)
at REPL10:1:1
at Script.runInThisContext (vm.js:133:18)
at REPLServer.defaultEval (repl.js:486:29)
at bound (domain.js:416:15)
at REPLServer.runBound [as eval] (domain.js:427:12)
at REPLServer.onLine (repl.js:819:10)
at REPLServer.emit (events.js:388:22)
at REPLServer.emit (domain.js:470:12) {
code: 'ERR_INVALID_ARG_TYPE'
}
What steps will reproduce the bug?
This corner-case issue is another continuation of #36437. Although Iterables are now supported, zero-length strings are not.
How often does it reproduce? Is there a required condition?
Reproduces in all versions of Node tested, 16+.
What is the expected behavior?
For a zero-length string to be able to be used as a source/first argument. Strings with non-zero lengths work correctly.
What do you see instead?
Additional information