Skip to content
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

stream: unify writableErrored and readableErrored #40799

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ added:
Number of times [`writable.uncork()`][stream-uncork] needs to be
called in order to fully uncork the stream.

##### `writable.writableErrored`
##### `writable.errored`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs changes: entries?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These props have never made it to any release... is that really necessary?


<!-- YAML
added:
Expand Down Expand Up @@ -1377,7 +1377,7 @@ added: v12.9.0

Becomes `true` when [`'end'`][] event is emitted.

##### `readable.readableErrored`
##### `readable.errored`

<!-- YAML
added:
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/streams/readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ ObjectDefineProperties(Readable.prototype, {
}
},

readableErrored: {
errored: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the readableErrored and writableErrored need to go through a deprecation cycle first? Those should likely be runtime deprecated aliases, yes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. They haven’t been in any release.

enumerable: false,
get() {
return this._readableState ? this._readableState.errored : null;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/streams/writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ ObjectDefineProperties(Writable.prototype, {
}
},

writableErrored: {
errored: {
enumerable: false,
get() {
return this._writableState ? this._writableState.errored : null;
Expand Down