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

Upgrade mongoose 6.x to 8.x #377

Open
yehudab opened this issue Dec 9, 2023 · 0 comments · May be fixed by #378
Open

Upgrade mongoose 6.x to 8.x #377

yehudab opened this issue Dec 9, 2023 · 0 comments · May be fixed by #378

Comments

@yehudab
Copy link
Contributor

yehudab commented Dec 9, 2023

🐣 Is your feature request related to a problem? Please describe.

I use MongoDB Atlas to host my database, and recently received an email regarding upcoming upgrade of my instance to version 7.0.

Message highlights:

Your M0/M2/M5 Atlas cluster(s) will be automatically upgraded to MongoDB 7.0 in February 2024.
...
To ensure a seamless transition, we recommend updating your driver version to ensure continued compatibility with your applications

💡 Describe the solution you'd like

According to the docs, MongoDB 7.0 requires mongodb npm package version 5.7 or higher. The current code uses version 4.12.1 (a dependent of mongoose@6.3.1).

For maximum future compatibility, I suggest upgrading to the latest mongoose version (8.0.3). This version uses mongodb@6.2.0.

❓ Describe alternatives you've considered

While it was possible to use MongoDB 7.0 with mongoose@7.6.7, I think it is better to upgrade to the latest mongoose version. The downside of this, is that it will require changing the minimum node version to 16. (mongodb 5.7 can run on node 14).

📋 Additional context

It appears that the simple path of upgrading to latest mongoose via yarn upgrade --latest mongoose works out of the box. It then required fixing the minimum node versions in a few places.
Local tests seems to run fine, as well as my own installation via fly.io.
It appears that tests on GitHub are extremely unstable at this point. Not sure why. After a few reties the tests are passing.

A PR will be submitted shortly

@yehudab yehudab linked a pull request Dec 9, 2023 that will close this issue
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 a pull request may close this issue.

1 participant