From 3bcae9a0f9af406d65d715bbf4e747dc475e1dec Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Thu, 25 Jan 2024 10:37:31 -0500 Subject: [PATCH] BREAKING CHANGE: allow using mongodb node driver 6 as well as 5 re: #112 --- README.md | 2 -- index.js | 2 +- package.json | 2 +- test/examples.test.js | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b30ab08..18d9e14 100644 --- a/README.md +++ b/README.md @@ -140,8 +140,6 @@ var store = new MongoDBStore({ // Lets you set options passed to `MongoClient.connect()`. Useful for // configuring connectivity or working around deprecation warnings. connectionOptions: { - useNewUrlParser: true, - useUnifiedTopology: true, serverSelectionTimeoutMS: 10000 } }); diff --git a/index.js b/index.js index af336d1..d52e4af 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,7 @@ const OptionsType = new Archetype({ }, connectionOptions: { $type: Object, - $default: () => ({ useNewUrlParser: true, useUnifiedTopology : true }) + $default: null }, expires: { $type: 'number', diff --git a/package.json b/package.json index 539830f..402feee 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "archetype": "0.13.x", - "mongodb": "5.x" + "mongodb": "5.x || 6.x" }, "devDependencies": { "acquit": "1.0.5", diff --git a/test/examples.test.js b/test/examples.test.js index 3f1df20..9b1208d 100644 --- a/test/examples.test.js +++ b/test/examples.test.js @@ -179,8 +179,6 @@ describe('MongoDBStore', function() { // Lets you set options passed to `MongoClient.connect()`. Useful for // configuring connectivity or working around deprecation warnings. connectionOptions: { - useNewUrlParser: true, - useUnifiedTopology: true, serverSelectionTimeoutMS: 10000 } });