From 662a0f25b13131e5962b97012b6a9d06a75a86d3 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 11 Jan 2021 23:26:13 +0100 Subject: [PATCH] use unified topology in mongoose --- package.json | 2 +- spec/helper.js | 1 + src/db/client.js | 1 + yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7a6e809..08ffc12 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "cors": "^2.8.5", "debug": "4.1.1", "dotenv": "8.0.0", - "express": "4.17.1", + "express": "^4.17.1", "glob": "7.1.4", "js-cookie": "2.2.0", "jsonwebtoken": "8.5.1", diff --git a/spec/helper.js b/spec/helper.js index 7675262..045aa41 100644 --- a/spec/helper.js +++ b/spec/helper.js @@ -12,6 +12,7 @@ let ConnectServer; mongoose.set('useFindAndModify', false); mongoose.set('useCreateIndex', true); mongoose.set('useNewUrlParser', true); +mongoose.set('useUnifiedTopology', true); const Parse = require('parse/node'); Parse.serverURL = 'http://localhost:3000/parse'; diff --git a/src/db/client.js b/src/db/client.js index 1020e21..29f84e1 100644 --- a/src/db/client.js +++ b/src/db/client.js @@ -4,6 +4,7 @@ const { MONGO_URI } = require('../config'); mongoose.set('useFindAndModify', false); mongoose.set('useCreateIndex', true); mongoose.set('useNewUrlParser', true); +mongoose.set('useUnifiedTopology', true); let parseConnect; let apiConnect; diff --git a/yarn.lock b/yarn.lock index a835442..18d5802 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1967,7 +1967,7 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -"apn@parse-community/node-apn#semver:^3.0.1-parse": +"apn@github:parse-community/node-apn#semver:^3.0.1-parse": version "3.2.0" resolved "https://codeload.github.com/parse-community/node-apn/tar.gz/68de6580510bccd898891d059f8a570ad345731e" dependencies: @@ -2328,9 +2328,9 @@ atob@^2.1.2: integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== aws-sdk@^2.59.0: - version "2.824.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.824.0.tgz#a67747d4d0b53d09c6c121e93f44d8f6e76fc44b" - integrity sha512-9KNRQBkIMPn+6DWb4gR+RzqTMNyGLEwOgXbE4dDehOIAflfLnv3IFwLnzrhxJnleB4guYrILIsBroJFBzjiekg== + version "2.825.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.825.0.tgz#91dad854827f6f8ada5a305dd32524e2f19cc622" + integrity sha512-b49nvaETm7uVRLf0FJ1CMmwCRVlLaxHtptVFuxX+2L4FR9VB0sLdgsxhtL3RVFbQlgVFNRV7fJUVK27mC++H+A== dependencies: buffer "4.9.2" events "1.1.1"