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

feat: add semver range for mongodb node driver and bson versions #14916

Closed
wants to merge 2 commits into from

Conversation

vkarpov15
Copy link
Collaborator

Summary

Instead of hard-coding an exact version of the mongodb node driver, add a semver range. This should help with issues like #14877, where users want to use an older version of the mongodb node driver without downgrading Mongoose.

I also modified GitHub workflows to run tests against both the lowest mongodb node driver version in the semver range, and the latest version.

This is a fairly substantial change, I'll think about this some more over the weekend. Mongoose has pinned exact versions since before I became involved with the project, because historically Mongoose was a bit too tightly coupled to the MongoDB Node driver and patch releases in the MongoDB Node driver would create breaking changes in Mongoose on occasion. However, it has been years since we've seen that happen, both due to increased stability in the MongoDB Node driver and due to Mongoose no longer reaching into internal connection state regularly.

Examples

@vkarpov15 vkarpov15 added this to the 8.8 milestone Sep 27, 2024
Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

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

Looks good to me, though i think going this far is quite a substantial change, how about (at least until 9.0) allow all patch versions like ~6.9.0 instead of directly only 6.9.0? (though i am not familiar how heavy the performance degradation was between versions the versions in the mentioned issue)

@vkarpov15
Copy link
Collaborator Author

It looks like we have an alternative fix for #14877 with mongodb/node-mongodb-native#4249, so we should instead just bump to [email protected] when this PR lands: mongodb/node-mongodb-native#4241.

Given that change, I think it is reasonable to make Mongoose 8.8 rely on mongodb@~6.10.0 as a first step toward opening up the semver range as per @hasezoey's comments

@vkarpov15 vkarpov15 closed this Oct 6, 2024
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.

2 participants