Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream: consolidate common code from readable push and unshift helper… #50402

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wa-Nadoo
Copy link

… functions

#50173 brings too many code duplication. Trying to reduce it a bit.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Oct 26, 2023
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 26, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 26, 2023
@nodejs-github-bot
Copy link
Collaborator

@wa-Nadoo
Copy link
Author

I am working on fix

@wa-Nadoo
Copy link
Author

Fixed

@rluvaton rluvaton added request-ci Add this label to start a Jenkins CI on a PR. needs-benchmark-ci PR that need a benchmark CI run. labels Oct 26, 2023
@rluvaton
Copy link
Member

rluvaton commented Oct 26, 2023

Hey, I'm the author of the original PR

I'm pretty sure this will break this change the behavior as you move code from the middle of the function to the start

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 26, 2023
@nodejs-github-bot
Copy link
Collaborator

lib/internal/streams/readable.js Show resolved Hide resolved
lib/internal/streams/readable.js Outdated Show resolved Hide resolved
lib/internal/streams/readable.js Outdated Show resolved Hide resolved
Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

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

I think this changes behavior. Not only deduplicating code.

@wa-Nadoo
Copy link
Author

From my understanding of data flow inside Readable stream, the changes would be safe. I was wrong. All breaking changes are already reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants