Skip to content

stream: support dispose in writable - #48547

Merged
nodejs-github-bot merged 2 commits into
mainfrom
add-abortsignal-writable
Jun 15, 2024
Merged

stream: support dispose in writable#48547
nodejs-github-bot merged 2 commits into
mainfrom
add-abortsignal-writable

Conversation

@benjamingr

Copy link
Copy Markdown
Member

Add support to Symbol.asyncDispose in writable streams. Additionally add a test for writable, transform and duplex streams (that inherit from readable/writable) to avoid breakage.

cc @nodejs/streams @MoLow@atlowChemi

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Jun 25, 2023
@benjamingr
benjamingrforce-pushed the add-abortsignal-writable branch from f38134b to 63aad0aCompareJune 25, 2023 17:16
@benjamingrbenjamingr added stream Issues and PRs related to the stream subsystem. request-ci Add this label to start a Jenkins CI on a PR. labels Jun 25, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 25, 2023
@nodejs-github-bot

This comment was marked as outdated.

@atlowChemiatlowChemi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment threadtest/parallel/test-stream-transform-destroy.js Outdated
@benjamingrbenjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 25, 2023
Comment threadlib/internal/streams/writable.js Outdated
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 25, 2023
@nodejs-github-bot

This comment was marked as outdated.

@benjamingrbenjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 25, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 25, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

});
let count = 0;
duplex.on('error', common.mustCall((e) => {
assert.strictEqual(count++, 0); // Ensure not called twice

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

common.mustCall accepts a count argument: common.mustCall(fn, times)

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threadlib/internal/streams/writable.js Outdated
@benjamingrbenjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 29, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 29, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95

Copy link
Copy Markdown
Contributor

This needs a rebase.

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

Comment threadlib/internal/streams/writable.js Outdated
Add support to Symbol.asyncDispose in writable streams.
Additionally add a test for writable, transform and duplex streams
who inherit from readable/writable to avoid breakage.
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: atlowChemi <chemi@atlow.co.il>
@atlowChemi
atlowChemiforce-pushed the add-abortsignal-writable branch from 0ec7691 to 271a702CompareJune 14, 2024 15:20

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@atlowChemiatlowChemi added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 14, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 14, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@atlowChemiatlowChemi added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 15, 2024
@atlowChemi

Copy link
Copy Markdown
Member

@benjamingr as we discussed, moved this PR forward, would you mind taking a look? 🙂

@benjamingrbenjamingr left a comment

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

LGTM 😅

@atlowChemiatlowChemi added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 15, 2024
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 15, 2024
@nodejs-github-bot
nodejs-github-bot merged commit 75fe4f3 into mainJun 15, 2024
@nodejs-github-bot
nodejs-github-bot deleted the add-abortsignal-writable branch June 15, 2024 23:42
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 75fe4f3

targos pushed a commit that referenced this pull request Jun 20, 2024
Add support to Symbol.asyncDispose in writable streams.
Additionally add a test for writable, transform and duplex streams
who inherit from readable/writable to avoid breakage.
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: atlowChemi <chemi@atlow.co.il>
PR-URL: #48547
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
soophoo pushed a commit to soophoo/node that referenced this pull request Jun 20, 2024
Add support to Symbol.asyncDispose in writable streams.
Additionally add a test for writable, transform and duplex streams
who inherit from readable/writable to avoid breakage.
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: atlowChemi <chemi@atlow.co.il>
PR-URL: nodejs#48547
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@targostargos mentioned this pull request Jun 25, 2024
marco-ippolito pushed a commit that referenced this pull request Jul 19, 2024
Add support to Symbol.asyncDispose in writable streams.
Additionally add a test for writable, transform and duplex streams
who inherit from readable/writable to avoid breakage.
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: atlowChemi <chemi@atlow.co.il>
PR-URL: #48547
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@marco-ippolitomarco-ippolito mentioned this pull request Jul 19, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.needs-ciPRs that need a full CI run.streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@benjamingr@nodejs-github-bot@aduh95@atlowChemi@mcollina@ronag@MoLow