-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
fs,net: standardize pending
stream property
#24067
Conversation
Use the same property name as http2 does to indicate that the stream is in the state before the `ready` event is emitted.
@mscdex Done, addressed all 3 comments. |
@lpinca Thanks for catching those, done! |
@@ -488,6 +488,16 @@ argument to `fs.createReadStream()`. If `path` is passed as a string, then | |||
`readStream.path` will be a string. If `path` is passed as a `Buffer`, then | |||
`readStream.path` will be a `Buffer`. | |||
|
|||
### readStream.pending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better to name this .isPending
. When you read .pending
, it could either mean it contains a pending object or a boolean of whether it's pending. That's not clear from just reading the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.pending
I think fits the style of other pre-existing properties like .connecting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s also what HTTP/2 already uses for this purpose…
Any other thoughts/reviewers? |
Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/18605/ |
Landed in 0e06b35 |
Use the same property name as http2 does to indicate that the stream is in the state before the `ready` event is emitted. PR-URL: nodejs#24067 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Use the same property name as http2 does to indicate that the stream is in the state before the `ready` event is emitted. PR-URL: #24067 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Use the same property name as http2 does to indicate that the stream is in the state before the `ready` event is emitted. PR-URL: nodejs#24067 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Use the same property name as http2 does to indicate that the stream is in the state before the `ready` event is emitted. PR-URL: #24067 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Use the same property name as http2 does to indicate that the stream is in the state before the `ready` event is emitted. PR-URL: #24067 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Use the same property name as http2 does to indicate that the stream is in the state before the `ready` event is emitted. PR-URL: #24067 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Use the same property name as http2 does to indicate that the stream is in the state before the `ready` event is emitted. PR-URL: #24067 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Use the same property name as http2 does to indicate that
the stream is in the state before the
ready
event is emitted.(This is semver-minor. If people feel that we should absolutely not have this in our public API, I’m probably going to incorporate this into a later PR using a Symbol rather than an “official” property.)
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes