Skip to content

feat: remove top-level write concern options #2630

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

Conversation

HanaPearlman
Copy link
Contributor

Description

Code changes include: the WriteConcern type now has only one property: writeConcern: WriteConcern | WriteConcernSettings, where WriteConcernSettings (naming up for debate) encompasses the old top-level options. WriteConcern.fromOptions ignores the old top-level WC options.

The change to legalOptionNames in db.ts means the old top-level WC options will be filtered out when creating a Db. The change to validOptionNames in operations/connect.ts means it will either error or warn (configurable) if the old top-level WC options are passed to a MongoClient.

Test changes include everything from #2624 and now all options that are not being used to create a connection string use the writeConcern key.

@HanaPearlman HanaPearlman marked this pull request as ready for review November 24, 2020 19:21
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.

1 participant