Skip to content

streams: update .readable/.writable to false - #4083

Closed
mscdex wants to merge 1 commit into
nodejs:masterfrom
mscdex:fix-readable-writable
Closed

streams: update .readable/.writable to false#4083
mscdex wants to merge 1 commit into
nodejs:masterfrom
mscdex:fix-readable-writable

Conversation

@mscdex

Copy link
Copy Markdown
Contributor

These properties were initially used to determine stream status back in node v0.8 and earlier. Since streams2 however, these properties were always true, which can be misleading for example if you are trying to immediately determine whether a Writable stream is still writable or not (to avoid a "write after
end" exception).

This is #1217 targeting the master branch and with a couple of minor changes to fix a lint error and to help address a concern about .on().

These properties were initially used to determine stream status
back in node v0.8 and earlier. Since streams2 however, these
properties were *always* true, which can be misleading for
example if you are trying to immediately determine whether
a Writable stream is still writable or not (to avoid a "write after
end" exception).
@mscdexmscdex added the stream Issues and PRs related to the stream subsystem. label Dec 1, 2015
@mscdex

Copy link
Copy Markdown
ContributorAuthor

CI is all green.

@chrisdickinson I've replaced the additional conditional used in .on() instead of removing it now. Does this LGTY?

@chrisdickinson

Copy link
Copy Markdown
Contributor

LGTM!

mscdex added a commit that referenced this pull request Dec 2, 2015
These properties were initially used to determine stream status
back in node v0.8 and earlier. Since streams2 however, these
properties were *always* true, which can be misleading for
example if you are trying to immediately determine whether
a Writable stream is still writable or not (to avoid a "write after
end" exception).
PR-URL: #4083
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
@mscdex

Copy link
Copy Markdown
ContributorAuthor

Landed in cc0342a.

@mscdexmscdex closed this Dec 2, 2015
mscdex added a commit that referenced this pull request Dec 5, 2015
These properties were initially used to determine stream status
back in node v0.8 and earlier. Since streams2 however, these
properties were *always* true, which can be misleading for
example if you are trying to immediately determine whether
a Writable stream is still writable or not (to avoid a "write after
end" exception).
PR-URL: #4083
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
@rvaggrvagg mentioned this pull request Dec 17, 2015
@mscdex
mscdex deleted the fix-readable-writable branch December 17, 2015 17:58
@jasnell

Copy link
Copy Markdown
Member

@mscdex ... how would you rate the semver'iness of this change? Should this go into v4?

@jasnell

Copy link
Copy Markdown
Member

Marking this as lts-watch for v4 but please do not land in v4.x-staging until confirmed

@mscdex

Copy link
Copy Markdown
ContributorAuthor

@jasnell I would say no for v4 as it's more like a semver-major since it changes property values of existing properties (for readables it sets .readable = false sooner and for writables it actually sets .writable = false now).

@MylesBorinsMylesBorins added semver-major PRs that contain breaking changes and should be released in the next major version. and removed lts-watch-v4.x labels Dec 29, 2015
@MylesBorins

Copy link
Copy Markdown
Contributor

adding semver-major tag and removing LTS watch. Please feel free to update if I was incorrect in doing so

edit: if we do add it back to LTS we need to add the tag back to #4141 as well

@jasnelljasnell mentioned this pull request Mar 17, 2016
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
These properties were initially used to determine stream status
back in node v0.8 and earlier. Since streams2 however, these
properties were *always* true, which can be misleading for
example if you are trying to immediately determine whether
a Writable stream is still writable or not (to avoid a "write after
end" exception).
PR-URL: nodejs#4083
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-majorPRs that contain breaking changes and should be released in the next major version.streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@mscdex@chrisdickinson@jasnell@MylesBorins