Skip to content

Replace through2 with core stream.PassThrough#52

Merged
bendrucker merged 1 commit into
masterfrom
drop-through2
Jul 8, 2026
Merged

Replace through2 with core stream.PassThrough#52
bendrucker merged 1 commit into
masterfrom
drop-through2

Conversation

@bendrucker

Copy link
Copy Markdown
Owner

Removes the through2 dependency. It was used in one place: a no-arg passthrough stream for .json files in the browserify transform. Node's built-in stream.PassThrough is exactly that, so there's no reason to carry the dependency.

through2 5.0.0 is an ESM rewrite. Adopting it would mean either bumping the engine floor to Node 22.12+ (its require() support) or converting this package to ESM, and neither is warranted for a CommonJS-focused library in maintenance mode. Dropping through2 sidesteps that entirely and keeps everything CommonJS on the existing engines range.

Verified the .json passthrough emits input unchanged, and the full standard + tape suite passes (12/12).

Supersedes #51, which Dependabot should auto-close once this merges and the dependency is gone.

through2 was only used as a no-arg passthrough for .json files. Node's built-in stream.PassThrough does the same thing, so drop the dependency instead of chasing its v5 ESM rewrite. Keeps the package CommonJS and removes a maintenance dependency.
@bendrucker
bendrucker merged commit 17596c1 into master Jul 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant