From 79b8ef5b11e2c40414315aa7a854e55834a5d777 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Sun, 18 Aug 2019 22:41:20 -0700 Subject: [PATCH] Remove MongoDB unified topology deprecation notice from the grid adapters --- src/Adapters/Files/GridFSBucketAdapter.js | 5 ++++- src/Adapters/Files/GridStoreAdapter.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Adapters/Files/GridFSBucketAdapter.js b/src/Adapters/Files/GridFSBucketAdapter.js index a27de45a6e..883bf96c9a 100644 --- a/src/Adapters/Files/GridFSBucketAdapter.js +++ b/src/Adapters/Files/GridFSBucketAdapter.js @@ -20,7 +20,10 @@ export class GridFSBucketAdapter extends FilesAdapter { super(); this._databaseURI = mongoDatabaseURI; - const defaultMongoOptions = { useNewUrlParser: true }; + const defaultMongoOptions = { + useNewUrlParser: true, + useUnifiedTopology: true, + }; this._mongoOptions = Object.assign(defaultMongoOptions, mongoOptions); } diff --git a/src/Adapters/Files/GridStoreAdapter.js b/src/Adapters/Files/GridStoreAdapter.js index c5af4d8c6d..e41abbc8ca 100644 --- a/src/Adapters/Files/GridStoreAdapter.js +++ b/src/Adapters/Files/GridStoreAdapter.js @@ -21,7 +21,10 @@ export class GridStoreAdapter extends FilesAdapter { super(); this._databaseURI = mongoDatabaseURI; - const defaultMongoOptions = { useNewUrlParser: true }; + const defaultMongoOptions = { + useNewUrlParser: true, + useUnifiedTopology: true, + }; this._mongoOptions = Object.assign(defaultMongoOptions, mongoOptions); }