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

fix: make tryNext and Batch public #2675

Merged
merged 7 commits into from Dec 16, 2020
Merged

Conversation

emadum
Copy link
Contributor

@emadum emadum commented Dec 11, 2020

Exposes the tryNext iteration helper on cursors and change streams.

NODE-2952

@emadum emadum marked this pull request as ready for review December 11, 2020 20:39
src/change_stream.ts Outdated Show resolved Hide resolved
Copy link
Member

@mbroadst mbroadst left a 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

src/change_stream.ts Outdated Show resolved Hide resolved
@emadum emadum requested a review from mbroadst December 15, 2020 19:45
Copy link
Member

@mbroadst mbroadst left a 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

package.json Outdated Show resolved Hide resolved
@emadum emadum merged commit 634ae4f into master Dec 16, 2020
@emadum emadum deleted the NODE-2952/make-trynext-public branch December 16, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants