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

refactor(NODE-1812)!: replace returnOriginal with returnDocument option #2803

Merged

Conversation

dariakp
Copy link
Contributor

@dariakp dariakp commented May 10, 2021

Description

NODE-1812

BREAKING: returnOriginal option no longer supported for findOneAndReplace() and findOneAndUpdate() collection methods, use the new returnDocument enum instead.

Replaced returnOriginal with returnDocument option in order to conform with shared drivers spec.

@dariakp dariakp changed the base branch from 3.6 to 4.0 May 10, 2021 21:29
@dariakp dariakp force-pushed the NODE-1812/4.0/replace-returnOriginal-with-returnDocument-option branch from d75d36f to 6991e10 Compare May 11, 2021 18:45
@dariakp dariakp force-pushed the NODE-1812/4.0/replace-returnOriginal-with-returnDocument-option branch from 52f5ef4 to 0694585 Compare May 12, 2021 15:32
@dariakp dariakp marked this pull request as ready for review May 12, 2021 19:01
@dariakp dariakp requested review from a team, durran, emadum and nbbeeken and removed request for a team May 12, 2021 19:16
@dariakp dariakp changed the title NODE-1812 replace returnOriginal with returnDocument option refactor(NODE-1812)!: replace returnOriginal with returnDocument option May 12, 2021
@dariakp
Copy link
Contributor Author

dariakp commented May 12, 2021

The corresponding deprecation for 3.6 is here: #2808

Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

Some suggestions:

src/operations/find_and_modify.ts Show resolved Hide resolved
test/functional/unified-spec-runner/operations.ts Outdated Show resolved Hide resolved
@dariakp dariakp force-pushed the NODE-1812/4.0/replace-returnOriginal-with-returnDocument-option branch from 0694585 to 235dc7c Compare May 13, 2021 20:04
@dariakp dariakp requested a review from nbbeeken May 13, 2021 20:49
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@dariakp dariakp merged commit 1cdc8a8 into 4.0 May 13, 2021
@dariakp dariakp deleted the NODE-1812/4.0/replace-returnOriginal-with-returnDocument-option branch May 13, 2021 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants