Repository navigation
Replace concat-stream w/ node:stream/consumers - #93
Open
ChristianMurphy wants to merge 1 commit into
Open
ChristianMurphy wants to merge 1 commit into
ChristianMurphy wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #93 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 23 23
Lines 3214 3212 -2
=========================================
- Hits 3214 3212 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
can you tag your issues/prs with patch/minor/major labels btw? Makes it easier to not have accidents! |
Member
Author
|
On it 🫡 |
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial checklist
Description of changes
Closes GH-92.
stdin.jsnow readsstreamInwithtext()fromnode:stream/consumersinstead of piping it intoconcat-stream.concat-streamand@types/concat-streamleavedependencies, so CLI users no longer install them.The
stdin.jsdiff is easier to read with whitespace hidden: the callback body moved one indent level.nextis the second argument to.then(), as inlib/finder.js, not a.catch().trough runs
nextonce, so a.catch(next)would silently drop a throw that happens afternext().With
.then(), that throw stays visible as an unhandled rejection.Behavior changes:
streamInnow rejects the engine with that error.Before,
.pipe()did not forward it and the process crashed with an uncaught exception.The new test in
test/input.jscovers this and fails onmain.text()decodes withTextDecoder, which drops a leading UTF-8 byte order mark (BOM) on stdin.Files read from disk keep theirs.
micromark and parse5 strip a BOM when parsing, so remark and rehype output stays the same.
streamInnow rejects with aTypeError.concat-streamturned such chunks into[object Object].Symbol.asyncIterator, such as a barenew Stream(), now rejects withTypeError: stream is not async iterable.streamInaccepts aNodeJS.ReadableStream, and that interface already requiresSymbol.asyncIterator.Callers can wrap such a stream with
new Readable().wrap(stream).node:stream/consumerslanded.CI runs Node.js 18 and latest.