Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
Documentation/Add 'close' events to fs.ReadStream, fs.WriteStream, etc per Issue #6484#6499
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
doc/api/stream.md Outdated
| *[child process stdin][] | ||
| *[`process.stdout`][], [`process.stderr`][] | ||
| Event: 'close' |
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.
This needs to be prefixed with ####.
jennabelle commented May 1, 2016
@mscdex made those changes you requested let me know if anything further is needed |
doc/api/fs.md Outdated
| ### Event: 'close' | ||
| Emitted when the ReadStream's underlying file descriptor has been closed. Comes from fs.close() method. |
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.
Can you add a "the" in front of fs.close(). Also, please put fs.close() in backticks.
jasnellMay 1, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
Suggested rewording (note also the addition of the backticks )
Emitted when the `ReadStream`'s underlying file descriptor has been closed using `fs.close()`. (same below for WriteStream also)
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.
Is the note about fs.close() really that helpful/useful? Maybe we could just drop that part entirely?
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.
I'm good with it either way
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.
The reason I ask is because either way we're wording it makes it kind of sound like the end user is expected to call fs.close()/stream.close() to see this event.
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.
I do not think 'close' is emitted only with fs.close(), or am I wrong?
cjihrig commented May 1, 2016
Can you wrap long lines at 80 characters. |
jasnell commented May 1, 2016
LGTM with nits addressed |
jasnell commented May 1, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@nodejs/documentation @nodejs/streams |
doc/api/stream.md Outdated
| Emitted when the stream and any of its underlying resources (a file descriptor, for example) have been closed. The event indicates that no more events will be emitted, and no further computation will occur. | ||
| Not all streams will emit the `'close'` event. |
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.
I will say this is an optional event for implementors.
mcollina commented May 2, 2016
Good work @jennabelle! We need more of these, keep them coming. All the streams API needs a lot of help anyway, and we need to tackle the "big" challenge of documenting the whole state machine. If you like, join us in our monthly meeting: nodejs/readable-stream#196. |
jennabelle commented May 2, 2016
@mcollina Thank you! I am a new contributor so any tips and feedback are welcome. Looking forward to collaborating more! |
mscdex commented May 2, 2016
LGTM |
jasnell commented May 3, 2016
Is this ready to land? |
eljefedelrodeodeljefe commented May 3, 2016
Sorry to be so nitty but the last line is 81 chars. Otherwise LGTM. |
eljefedelrodeodeljefe commented May 3, 2016
Thanks for the effort @jennabelle |
addaleax commented May 3, 2016
LGTM with wrapped lines, too. Thanks! |
addaleax commented May 3, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Btw, the |
jasnell commented May 3, 2016
@eljefedelrodeodeljefe@addaleax ... that can be fixed quickly by whomever lands the PR :-) |
eljefedelrodeodeljefe commented May 3, 2016
Didn't know that we are allowed and ecouraged to edit contents except commit messages while landing. Good to know. Then let's do it. |
addaleax commented May 3, 2016
@eljefedelrodeodeljefe Care to do the honours? 😉 |
jasnell commented May 3, 2016
It's generally preferable to have the author of the PR edit the nits overall but for extremely minor stuff fixing on landing is fine, especially when they're just linting or linewrap issues. Just make sure you squash the additional commit and maintain the original author. |
Add 'close' event to doc/api/fs.md --> fs.ReadStream Add 'close' event to doc/api/fs.md --> fs.WriteStream Add 'close event to doc/api/stream.md --> stream.Writable From squashed history: Add 'close' event to stream.Writable per Issue #6484 Add #### prefix to Event: 'close' and backticks to 'close' similar to stream.Readable event: 'close' section Add more specifics to 'close' events for fs.ReadStream and fs.WriteStream Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream' wrapped long lines at 80 chars, reworded per Issue #6484 including the 'close' event as optional add 'close' event as optional in stream.Readable per issue #6484 doc: Add 'close' events to fs.ReadStream, 80char nit Fixes: #6484 PR-URL: #6499 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
mcollina commented May 3, 2016
Can we get a couple more LGTMs from @nodejs/streams? @mafintosh can you have a look? |
eljefedelrodeodeljefe commented May 3, 2016
Thanks. Landed in 2aa3769. |
mcollina commented May 3, 2016
@mafintosh can you have a look anyway? :) |
eljefedelrodeodeljefe commented May 3, 2016
Yeh, sorry :) Give me a ping if somethings wrong @mafintosh |
addaleax commented May 3, 2016
@eljefedelrodeodeljefe Btw, I think the |
Add 'close' event to doc/api/fs.md --> fs.ReadStream Add 'close' event to doc/api/fs.md --> fs.WriteStream Add 'close event to doc/api/stream.md --> stream.Writable From squashed history: Add 'close' event to stream.Writable per Issue #6484 Add #### prefix to Event: 'close' and backticks to 'close' similar to stream.Readable event: 'close' section Add more specifics to 'close' events for fs.ReadStream and fs.WriteStream Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream' wrapped long lines at 80 chars, reworded per Issue #6484 including the 'close' event as optional add 'close' event as optional in stream.Readable per issue #6484 doc: Add 'close' events to fs.ReadStream, 80char nit Fixes: #6484 PR-URL: #6499 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Add 'close' event to doc/api/fs.md --> fs.ReadStream Add 'close' event to doc/api/fs.md --> fs.WriteStream Add 'close event to doc/api/stream.md --> stream.Writable From squashed history: Add 'close' event to stream.Writable per Issue nodejs#6484 Add #### prefix to Event: 'close' and backticks to 'close' similar to stream.Readable event: 'close' section Add more specifics to 'close' events for fs.ReadStream and fs.WriteStream Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream' wrapped long lines at 80 chars, reworded per Issue nodejs#6484 including the 'close' event as optional add 'close' event as optional in stream.Readable per issue nodejs#6484 doc: Add 'close' events to fs.ReadStream, 80char nit Fixes: nodejs#6484 PR-URL: nodejs#6499 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Add 'close' event to doc/api/fs.md --> fs.ReadStream Add 'close' event to doc/api/fs.md --> fs.WriteStream Add 'close event to doc/api/stream.md --> stream.Writable From squashed history: Add 'close' event to stream.Writable per Issue nodejs#6484 Add #### prefix to Event: 'close' and backticks to 'close' similar to stream.Readable event: 'close' section Add more specifics to 'close' events for fs.ReadStream and fs.WriteStream Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream' wrapped long lines at 80 chars, reworded per Issue nodejs#6484 including the 'close' event as optional add 'close' event as optional in stream.Readable per issue nodejs#6484 doc: Add 'close' events to fs.ReadStream, 80char nit Fixes: nodejs#6484 PR-URL: nodejs#6499 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Add 'close' event to doc/api/fs.md --> fs.ReadStream Add 'close' event to doc/api/fs.md --> fs.WriteStream Add 'close event to doc/api/stream.md --> stream.Writable From squashed history: Add 'close' event to stream.Writable per Issue #6484 Add #### prefix to Event: 'close' and backticks to 'close' similar to stream.Readable event: 'close' section Add more specifics to 'close' events for fs.ReadStream and fs.WriteStream Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream' wrapped long lines at 80 chars, reworded per Issue #6484 including the 'close' event as optional add 'close' event as optional in stream.Readable per issue #6484 doc: Add 'close' events to fs.ReadStream, 80char nit Fixes: #6484 PR-URL: #6499 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Add 'close' event to doc/api/fs.md --> fs.ReadStream Add 'close' event to doc/api/fs.md --> fs.WriteStream Add 'close event to doc/api/stream.md --> stream.Writable From squashed history: Add 'close' event to stream.Writable per Issue #6484 Add #### prefix to Event: 'close' and backticks to 'close' similar to stream.Readable event: 'close' section Add more specifics to 'close' events for fs.ReadStream and fs.WriteStream Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream' wrapped long lines at 80 chars, reworded per Issue #6484 including the 'close' event as optional add 'close' event as optional in stream.Readable per issue #6484 doc: Add 'close' events to fs.ReadStream, 80char nit Fixes: #6484 PR-URL: #6499 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Add 'close' event to doc/api/fs.md --> fs.ReadStream Add 'close' event to doc/api/fs.md --> fs.WriteStream Add 'close event to doc/api/stream.md --> stream.Writable From squashed history: Add 'close' event to stream.Writable per Issue #6484 Add #### prefix to Event: 'close' and backticks to 'close' similar to stream.Readable event: 'close' section Add more specifics to 'close' events for fs.ReadStream and fs.WriteStream Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream' wrapped long lines at 80 chars, reworded per Issue #6484 including the 'close' event as optional add 'close' event as optional in stream.Readable per issue #6484 doc: Add 'close' events to fs.ReadStream, 80char nit Fixes: #6484 PR-URL: #6499 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Add 'close' event to doc/api/fs.md --> fs.ReadStream Add 'close' event to doc/api/fs.md --> fs.WriteStream Add 'close event to doc/api/stream.md --> stream.Writable From squashed history: Add 'close' event to stream.Writable per Issue #6484 Add #### prefix to Event: 'close' and backticks to 'close' similar to stream.Readable event: 'close' section Add more specifics to 'close' events for fs.ReadStream and fs.WriteStream Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream' wrapped long lines at 80 chars, reworded per Issue #6484 including the 'close' event as optional add 'close' event as optional in stream.Readable per issue #6484 doc: Add 'close' events to fs.ReadStream, 80char nit Fixes: #6484 PR-URL: #6499 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Checklist
Affected core subsystem(s)
Description of change
Per Issue #6484