Skip to content

Conversation

@jennabelle
Copy link
Contributor

Checklist
  • [ x ] documentation is changed or added
  • [ x ] the commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Per Issue #6484

  1. Add 'close' event to doc/api/fs.md --> fs.ReadStream
  2. Add 'close' event to doc/api/fs.md --> fs.WriteStream
  3. Add 'close event to doc/api/stream.md --> stream.Writable

@nodejs-github-botnodejs-github-bot added the doc Issues and PRs related to the documentations. label May 1, 2016
@mscdexmscdex added fs Issues and PRs related to the fs subsystem / file system. stream Issues and PRs related to the stream subsystem. labels May 1, 2016
*[child process stdin][]
*[`process.stdout`][], [`process.stderr`][]

Event: 'close'
Copy link
Contributor

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
Copy link
ContributorAuthor

@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.
Copy link
Contributor

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.

Copy link
Member

@jasnelljasnellMay 1, 2016

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)

Copy link
Contributor

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?

Copy link
Member

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

Copy link
Contributor

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.

Copy link
Member

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
Copy link
Contributor

Can you wrap long lines at 80 characters.

@jasnell
Copy link
Member

LGTM with nits addressed

@jasnell
Copy link
Member

jasnell commented May 1, 2016

@nodejs/documentation @nodejs/streams


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.
Copy link
Member

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
Copy link
Member

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
Copy link
ContributorAuthor

@mcollina Thank you! I am a new contributor so any tips and feedback are welcome. Looking forward to collaborating more!

@mscdex
Copy link
Contributor

LGTM

@jasnell
Copy link
Member

Is this ready to land?

@eljefedelrodeodeljefe
Copy link
Contributor

Sorry to be so nitty but the last line is 81 chars. Otherwise LGTM.

@eljefedelrodeodeljefe
Copy link
Contributor

Thanks for the effort @jennabelle

@addaleax
Copy link
Member

LGTM with wrapped lines, too. Thanks!

@addaleax
Copy link
Member

addaleax commented May 3, 2016

Btw, the .close() method itself is currently undocumented, but I guess that doesn’t have to happen here. And ping @Trott because he talked about that in irc.

@jasnell
Copy link
Member

@eljefedelrodeodeljefe@addaleax ... that can be fixed quickly by whomever lands the PR :-)

@eljefedelrodeodeljefe
Copy link
Contributor

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
Copy link
Member

@eljefedelrodeodeljefe Care to do the honours? 😉

@jasnell
Copy link
Member

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.

eljefedelrodeodeljefe pushed a commit that referenced this pull request May 3, 2016
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
Copy link
Member

Can we get a couple more LGTMs from @nodejs/streams?

@mafintosh can you have a look?

@eljefedelrodeodeljefe
Copy link
Contributor

Thanks. Landed in 2aa3769.

@mcollina
Copy link
Member

@mafintosh can you have a look anyway? :)

@eljefedelrodeodeljefe
Copy link
Contributor

Yeh, sorry :) Give me a ping if somethings wrong @mafintosh

@addaleax
Copy link
Member

@eljefedelrodeodeljefe Btw, I think the Fixes: field should contain the full issue URL, too. :)

Fishrock123 pushed a commit that referenced this pull request May 4, 2016
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]>
joelostrowski pushed a commit to joelostrowski/node that referenced this pull request May 4, 2016
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]>
@addaleaxaddaleax mentioned this pull request Jul 12, 2016
addaleax pushed a commit to addaleax/node that referenced this pull request Jul 12, 2016
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]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
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]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
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]>
@MylesBorinsMylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
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]>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
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]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@jennabelle@cjihrig@jasnell@mcollina@mscdex@eljefedelrodeodeljefe@addaleax@MylesBorins@nodejs-github-bot