Skip to content

chore: drop stream-buffers in favor of a generator#1101

Merged
ferhatelmas merged 1 commit into
masterfrom
ferhat/drop-stream-buffers
May 12, 2026
Merged

chore: drop stream-buffers in favor of a generator#1101
ferhatelmas merged 1 commit into
masterfrom
ferhat/drop-stream-buffers

Conversation

@ferhatelmas
Copy link
Copy Markdown
Member

@ferhatelmas ferhatelmas commented May 12, 2026

What kind of change does this PR introduce?

Refactor

What is the current behavior?

stream-buffers dependency is used for a test to construct a stream that emits slow chunks.

What is the new behavior?

Replace it with a generator that sleeps in between since extended API of the dependency isn't needed.

Additional context

Less dependencies is better.

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
Copilot AI review requested due to automatic review settings May 12, 2026 11:23
@ferhatelmas ferhatelmas requested a review from a team as a code owner May 12, 2026 11:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the stream-buffers dependency by rewriting the one test case that needed a “slow-chunking” readable stream to use a native async generator + Readable.from, keeping the same behavioral intent while reducing supply-chain surface area.

Changes:

  • Replaced ReadableStreamBuffer usage in the S3 protocol test with Readable.from(async function* ...) and a timed delay between chunks.
  • Removed stream-buffers and its type package from package.json / package-lock.json.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
src/test/s3-protocol.test.ts Replaces the slow-chunk stream construction with a native generator-based readable stream.
package.json Drops stream-buffers and @types/stream-buffers dependencies.
package-lock.json Removes the corresponding locked dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 25731246483

Coverage increased (+0.006%) to 74.378%

Details

  • Coverage increased (+0.006%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 10297
Covered Lines: 8066
Line Coverage: 78.33%
Relevant Branches: 5951
Covered Branches: 4019
Branch Coverage: 67.53%
Branches in Coverage %: Yes
Coverage Strength: 410.86 hits per line

💛 - Coveralls

@ferhatelmas ferhatelmas merged commit defbbb6 into master May 12, 2026
29 of 31 checks passed
@ferhatelmas ferhatelmas deleted the ferhat/drop-stream-buffers branch May 12, 2026 12:55
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.

4 participants