mongodb-connection-string-url
Advanced tools
Comparing version 2.5.1 to 2.5.2
@@ -125,3 +125,17 @@ "use strict"; | ||
authString += '@'; | ||
super(`${protocol.toLowerCase()}://${authString}${DUMMY_HOSTNAME}${rest}`); | ||
try { | ||
super(`${protocol.toLowerCase()}://${authString}${DUMMY_HOSTNAME}${rest}`); | ||
} | ||
catch (err) { | ||
if (looseValidation) { | ||
new ConnectionString(uri, { | ||
...options, | ||
looseValidation: false | ||
}); | ||
} | ||
if (typeof err.message === 'string') { | ||
err.message = err.message.replace(DUMMY_HOSTNAME, hosts); | ||
} | ||
throw err; | ||
} | ||
this._hosts = hosts.split(','); | ||
@@ -128,0 +142,0 @@ if (!looseValidation) { |
{ | ||
"name": "mongodb-connection-string-url", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"description": "MongoDB connection strings, based on the WhatWG URL API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
37838
368