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

Add support for MongoDB 6 #53

Closed
wants to merge 8 commits into from

Conversation

sebamarynissen
Copy link

This PR adds support for mongodb@6. Agenda is incompatible with version 6 of the driver because findOneAndUpdate() now no longer returns a ModifyResult by default, unless you specify includeResultMetadata: true - see https://www.mongodb.com/blog/post/behavioral-changes-find-one-family-apis-node-js-driver-6-0-0.

I've used this opportunity to make mongodb@6 the default as well since the module was still using version 4 if no mongo client was specified manually.

I've changed the tests so that they run with version 4, 5 and 6 of the mongodb driver, so it should be backwards compatible. The only problem here was getting this to work with TypeScript. I'm no TypeScript wizard, but it looks like it's working.

@sebamarynissen
Copy link
Author

Closing in favor of #55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant