-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix: make tryNext and Batch public #2675
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.
This LGTM with one nitpick. It might also be worth filing a ticket for duplicate maybePromise
: ChangeStream#next|tryNext|hasNext
all are top-level API which ultimately delegate to the underlying cursor (if possible) so maybePromise
is called twice in the happy path. It may be possible to refactor the cursors to allow you to bypass one of those calls
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.
LGTM, mod one comment about the use of mocha's --exit
Exposes the
tryNext
iteration helper on cursors and change streams.NODE-2952