Unverified Commit 00c68f38 authored by Pedro Rodrigues's avatar Pedro Rodrigues Committed by GitHub

Update mongoose and swr and remove no longer needed connection options (#29934)

I've been playing around with `examples/with-mongodb-mongoose` and this PR updates mongoose and swr which are severely outdated to their most recent major releases.

This PR also removes two options that are no longer needed in the connection configuration when using mongoose 6: `useNewUrlParser` and `useUnifiedTopology`. See [Migrating from 5.x to 6.x - No More Deprecation Warning Options](https://mongoosejs.com/docs/migrating_to_6.html#no-more-deprecation-warning-options).

## Documentation / Examples

- [x] Make sure the linting passes
parent 2b7c910e
...@@ -26,8 +26,6 @@ async function dbConnect() { ...@@ -26,8 +26,6 @@ async function dbConnect() {
if (!cached.promise) { if (!cached.promise) {
const opts = { const opts = {
useNewUrlParser: true,
useUnifiedTopology: true,
bufferCommands: false, bufferCommands: false,
} }
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
"start": "next start" "start": "next start"
}, },
"dependencies": { "dependencies": {
"mongoose": "^5.9.13", "mongoose": "^6.0.11",
"next": "latest", "next": "latest",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"swr": "0.2.2" "swr": "^1.0.1"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment