-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
[v13.x backport] zlib: align with streams #32371
Conversation
- Ensure automatic destruction only happens after both 'end' and 'finish' has been emitted through autoDestroy. - Ensure close() callback is always invoked. - Ensure 'error' is only emitted once. PR-URL: nodejs#32220 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Backport-PR-URL: nodejs#32371
dc563f1
to
76fd0e5
Compare
also there are a ton of failures PTAL |
I think most of the failures is due to the fact we don't emit |
ts.on('close', common.mustCall(() => { | ||
ts.close(common.mustCall()); | ||
})); | ||
ts.on('close', common.mustCall()); |
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.
finished
does not invoke callback on closed stream, this was a semver-major fix does not land on 13
name: 'Error', | ||
message: 'Cannot call write after a stream was destroyed' | ||
} | ||
); |
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 a little unsure how exactly this could throw before.
assert.throws( | ||
() => gunzip.write({}), | ||
TypeError | ||
); |
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 a little unsure how exactly this could throw before.
PR was just labeled as semver-major so I guess this should not be backported. |
PR-URL: #32220
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes