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: use Buffer.from when constructor is a Buffer #49250

Merged

Conversation

KhafraDev
Copy link
Member

When using BYOB streams, it's possible for the constructor in
readableByteStreamControllerConvertPullIntoDescriptor to be a node
Buffer. If it is, use Buffer.from over new ctor.

Fixes #49245

When using BYOB streams, it's possible for the constructor in
readableByteStreamControllerConvertPullIntoDescriptor to be a node
Buffer. If it is, use `Buffer.from` over `new ctor`.

Fixes nodejs#49245
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. web streams labels Aug 19, 2023
@debadree25 debadree25 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Aug 20, 2023
@debadree25 debadree25 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Aug 20, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@debadree25 debadree25 added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 26, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 26, 2023
@nodejs-github-bot nodejs-github-bot merged commit 4ba7370 into nodejs:main Aug 26, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 4ba7370

@KhafraDev KhafraDev deleted the streams-byob-deprecation-warning branch August 26, 2023 13:48
@KhafraDev
Copy link
Member Author

thank you @debadree25 for dealing with the CI ❤️

UlisesGascon pushed a commit that referenced this pull request Sep 10, 2023
When using BYOB streams, it's possible for the constructor in
readableByteStreamControllerConvertPullIntoDescriptor to be a node
Buffer. If it is, use `Buffer.from` over `new ctor`.

Fixes #49245

PR-URL: #49250
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
@UlisesGascon UlisesGascon mentioned this pull request Sep 10, 2023
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
When using BYOB streams, it's possible for the constructor in
readableByteStreamControllerConvertPullIntoDescriptor to be a node
Buffer. If it is, use `Buffer.from` over `new ctor`.

Fixes nodejs#49245

PR-URL: nodejs#49250
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
targos pushed a commit that referenced this pull request Nov 27, 2023
When using BYOB streams, it's possible for the constructor in
readableByteStreamControllerConvertPullIntoDescriptor to be a node
Buffer. If it is, use `Buffer.from` over `new ctor`.

Fixes #49245

PR-URL: #49250
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
When using BYOB streams, it's possible for the constructor in
readableByteStreamControllerConvertPullIntoDescriptor to be a node
Buffer. If it is, use `Buffer.from` over `new ctor`.

Fixes nodejs/node#49245

PR-URL: nodejs/node#49250
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
When using BYOB streams, it's possible for the constructor in
readableByteStreamControllerConvertPullIntoDescriptor to be a node
Buffer. If it is, use `Buffer.from` over `new ctor`.

Fixes nodejs/node#49245

PR-URL: nodejs/node#49250
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. web streams
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeprecatedWarning for Buffer when using the following API ReadableStreamBYOBReader in stream
5 participants