FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fs: change streams to always emit close by default by ronag · Pull Request #31408 · nodejs/node · GitHub

/ node Public

fs: change streams to always emit close by default - #31408

Closed
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:fs-stream-emit-close
Closed

fs: change streams to always emit close by default#31408
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:fs-stream-emit-close

Conversation

ronag commented Jan 18, 2020

Copy link
Copy Markdown
Member

Previously due to compat reasons 'close' was only emitted if no 'error'.
This removes the compat behavior in order to properly follow expected
streams behavior.

Not sure why this compat behavior has remained for so long but I believe it should be possible to make fs stream consistent with normal streams in a semver-major.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

nodejs-github-bot added the fs Issues and PRs related to the fs subsystem / file system. label Jan 18, 2020
ronag force-pushed the fs-stream-emit-close branch from 8d236d7 to 009687a Compare January 18, 2020 13:59

ronag commented Jan 18, 2020

Copy link
Copy Markdown
Member Author

@Trott: semver-major, also a CITGM please

ronag requested a review from addaleax January 18, 2020 14:00
mscdex added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jan 18, 2020

nodejs-github-bot commented Jan 18, 2020
edited by addaleax
Loading

Copy link
Copy Markdown
Collaborator

Previously due to compat reasons 'close' was only emitted if no 'error'.
This removes the compat behavior in order to properly follow expected
streams behavior.

ronag commented Jan 20, 2020

Copy link
Copy Markdown
Member Author

rebased to fix conflict

ronag force-pushed the fs-stream-emit-close branch from 009687a to c3a49d7 Compare January 20, 2020 12:58

Copy link
Copy Markdown
Collaborator

Trott commented Jan 20, 2020

Copy link
Copy Markdown
Member

Is the compat behavior documented anywhere that will need to be updated?

ronag commented Jan 20, 2020

Copy link
Copy Markdown
Member Author

@Trott: I don't think so:

Event: 'close'#
Added in: v0.1.93
Emitted when the WriteStream's underlying file descriptor has been closed.

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jan 20, 2020

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Trott pushed a commit that referenced this pull request Jan 21, 2020
Previously due to compat reasons 'close' was only emitted if no 'error'.
This removes the compat behavior in order to properly follow expected
streams behavior.

PR-URL: #31408
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>

Trott commented Jan 21, 2020

Copy link
Copy Markdown
Member

Landed in f0d2df4

Trott closed this Jan 21, 2020
Trott pushed a commit to kevinoid/node that referenced this pull request Jan 2, 2021
The default for the `emitClose` option was changed from `false` to
`true` by nodejs#31408 which landed in f0d2df4 for v14.0.0.
This commit updates the fs doc to match the current behavior.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

PR-URL: nodejs#36653
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
danielleadams pushed a commit that referenced this pull request Jan 12, 2021
The default for the `emitClose` option was changed from `false` to
`true` by #31408 which landed in f0d2df4 for v14.0.0.
This commit updates the fs doc to match the current behavior.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

PR-URL: #36653
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
targos pushed a commit that referenced this pull request Aug 8, 2021
The default for the `emitClose` option was changed from `false` to
`true` by #31408 which landed in f0d2df4 for v14.0.0.
This commit updates the fs doc to match the current behavior.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

PR-URL: #36653
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
BethGriggs pushed a commit that referenced this pull request Aug 12, 2021
The default for the `emitClose` option was changed from `false` to
`true` by #31408 which landed in f0d2df4 for v14.0.0.
This commit updates the fs doc to match the current behavior.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

PR-URL: #36653
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. fs Issues and PRs related to the fs subsystem / file system. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL