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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(deps): remove stream-events dependency #2022
Conversation
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.
Looks straightforward enough! @danielbankhead pls take a look as well though
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.
Looks good so far
private shouldEmitReading = true; | ||
private shouldEmitWriting = true; |
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.
Looking at this further, 'reading' and 'writing' are called on every _read
and _write
event - to be fully backwards-compatible this class should do the same
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.
Ah good catch, I misread the stream-events / stubs code. Will fix.
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.
Actually I do believe it is only called once: https://github.com/stephenplusplus/stubs/blob/580b4d8b3a34c1193d5ec10e0db0d6ea4b4c0ec5/index.js#L30 it looks like after the number of calls is exhausted we revert to the cached function and stream-events would stop emitting reading / writing.
6a62184
to
46494ce
Compare
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #1916 馃