@getanthill/mongodb-connector
Advanced tools
Comparing version 1.3.2 to 1.4.0
{ | ||
"name": "@getanthill/mongodb-connector", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"description": "MongoDB connector", | ||
@@ -9,5 +9,2 @@ "main": "index.js", | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"scripts": { | ||
@@ -27,12 +24,12 @@ "mocha": "NODE_ENV=test mocha --bail --exit", | ||
"devDependencies": { | ||
"@types/mocha": "^10.0.1", | ||
"@types/mocha": "^10.0.6", | ||
"@types/mongodb": "4.0.6", | ||
"chai": "^4.3.7", | ||
"chai": "^4.3.10", | ||
"install-peers-cli": "2.2.0", | ||
"lodash": "4.17.21", | ||
"mocha": "10.2.0", | ||
"nodemon": "2.0.21", | ||
"nodemon": "3.0.2", | ||
"nyc": "15.1.0", | ||
"prettier": "2.8.4", | ||
"sinon": "^15.0.1" | ||
"prettier": "3.1.1", | ||
"sinon": "^17.0.1" | ||
}, | ||
@@ -43,4 +40,4 @@ "dependencies": { | ||
"peerDependencies": { | ||
"mongodb": "^5" | ||
"mongodb": "^6" | ||
} | ||
} |
@@ -96,27 +96,2 @@ /* eslint-disable no-underscore-dangle */ | ||
if (!client) { | ||
// To avoid a logger warning set mandatory option to the connection | ||
if (database.options) { | ||
if ( | ||
!Object.prototype.hasOwnProperty.call( | ||
database.options, | ||
'useNewUrlParser', | ||
) | ||
) { | ||
database.options.useNewUrlParser = true; | ||
} | ||
if ( | ||
!Object.prototype.hasOwnProperty.call( | ||
database.options, | ||
'useUnifiedTopology', | ||
) | ||
) { | ||
database.options.useUnifiedTopology = true; | ||
} | ||
} else { | ||
database.options = { | ||
useNewUrlParser: true, | ||
useUnifiedTopology: true, | ||
}; | ||
} | ||
client = new MongoClient(database.url, database.options); | ||
@@ -123,0 +98,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39199
1224