Skip to content

chore: remove split2 - #36

Merged
rvagg merged 1 commit into
nodejs:mainfrom
trivikr:remove-split2
Nov 2, 2026
Merged

rvagg merged 1 commit into
nodejs:mainfrom
trivikr:remove-split2

Conversation

@trivikr

@trivikr trivikr commented Nov 2, 2026

Copy link
Copy Markdown
Member

Replaces split2 with Node's built-in node:readline for splitting git log output into lines. split2 was only used in the tests and the README example, so the published package is unaffected.

gitToList in test.js now waits for both the child process to close and the commit list callback to run before ending a test, because readline adds async delay that could otherwise let a test finish before its assertions ran.

Comment thread test.js
pipeline(
child.stdout,
split2(),
Readable.from(createInterface({ input: child.stdout, crlfDelay: Infinity })),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pipeline accepts async iterables so you shouldn't need the Readable.from

@rvagg rvagg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll follow this up with a couple of minor improvements

@rvagg
rvagg merged commit d67bff9 into nodejs:main Nov 2, 2026
7 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 2, 2026
## [2.2.7](v2.2.6...v2.2.7) (2026-11-02)

### Trivial Changes

* remove split2 ([#36](#36)) ([d67bff9](d67bff9))
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.2.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants