Skip to content

Conversation

@antongolub
Copy link
Collaborator

  • Tests pass
  • Appropriate changes to README are included in PR

@antongolub antongolub added the refactoring Internal code improvements label Jul 20, 2025
@antongolub antongolub requested a review from Copilot July 20, 2025 08:18
Copy link

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

This pull request refactors the promisifyStream function to improve code organization and reduce duplication. The changes introduce a symbol constant for the 'end-piped-from' event and consolidate duplicate event handler logic.

  • Introduces a new symbol constant EPF to replace the magic string 'end-piped-from'
  • Consolidates duplicate event handler logic in promisifyStream by extracting a shared onend function
  • Updates size limits to reflect the reduced bundle size from the refactoring

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/core.ts Adds EPF symbol constant and refactors promisifyStream to reduce code duplication
build/core.cjs Compiled version of the TypeScript changes with the same refactoring
.size-limit.json Updates bundle size limits to reflect the smaller output from code optimization

@antongolub antongolub merged commit 40b817f into google:main Jul 20, 2025
28 checks passed
@antongolub antongolub deleted the refactor-promisify-stream branch July 20, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Internal code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant