Initial checklist
Problem
Node now ships text() in node:stream/consumers, which reads a whole stream into a string.
That's all we use concat-stream for, reading streamIn in lib/file-set-pipeline/stdin.js.
Every remark-cli/rehype-cli/etc user installs concat-stream, plus its transitive tree.
Current solutions
Proposed solutions
text() was added in Node 16.7.0, so it fits our policy of keeping ^11 compatible with Node 16, and doesn't need to wait for a major.
Things to watch for:
text() rejects when the stream errors, concat-stream never calls back, so that path needs wiring into next(error) and a test to keep coverage at 100%
Thoughts?
Initial checklist
Problem
Node now ships
text()innode:stream/consumers, which reads a whole stream into a string.That's all we use
concat-streamfor, readingstreamIninlib/file-set-pipeline/stdin.js.Every
remark-cli/rehype-cli/etc user installsconcat-stream, plus its transitive tree.Current solutions
concat-streamProposed solutions
concat-streamfortext()fromnode:stream/consumerstext()was added in Node 16.7.0, so it fits our policy of keeping^11compatible with Node 16, and doesn't need to wait for a major.Things to watch for:
text()rejects when the stream errors,concat-streamnever calls back, so that path needs wiring intonext(error)and a test to keep coverage at 100%Thoughts?