Skip to content

Conversation

@ronag
Copy link
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-botnodejs-github-bot added the fs Issues and PRs related to the fs subsystem / file system. label Jan 18, 2020
@ronagronagforce-pushed the fs-stream-emit-close branch from 8d236d7 to 009687aCompareJanuary 18, 2020 13:59
@ronag
Copy link
MemberAuthor

@Trott: semver-major, also a CITGM please

@ronagronag requested a review from addaleaxJanuary 18, 2020 14:00
@mscdexmscdex 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
Copy link
Collaborator

nodejs-github-bot commented Jan 18, 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.
@ronag
Copy link
MemberAuthor

rebased to fix conflict

@ronagronagforce-pushed the fs-stream-emit-close branch from 009687a to c3a49d7CompareJanuary 20, 2020 12:58
@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

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

@ronag
Copy link
MemberAuthor

@Trott: I don't think so:

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

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 20, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]>
@Trott
Copy link
Member

Landed in f0d2df4

@TrottTrott 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 <[email protected]> PR-URL: nodejs#36653 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
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 <[email protected]> PR-URL: #36653 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
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 <[email protected]> PR-URL: #36653 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
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 <[email protected]> PR-URL: #36653 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 31, 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 <[email protected]> PR-URL: #36653 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 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 <[email protected]> PR-URL: nodejs#36653 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.fsIssues and PRs related to the fs subsystem / file system.semver-majorPRs 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

@ronag@nodejs-github-bot@Trott@addaleax@lpinca@BridgeAR@mscdex