mongodb-memory-server
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -75,3 +75,3 @@ 'use strict'; | ||
debug(`MongoBinary: found cached binary path for ${version}`); | ||
_context.next = 10; | ||
_context.next = 11; | ||
break; | ||
@@ -88,3 +88,4 @@ | ||
case 9: | ||
this.cache[version] = new Promise(function (resolve, reject) { | ||
_context.next = 11; | ||
return new Promise(function (resolve, reject) { | ||
_properLockfile2.default.lock(downloadDir, { | ||
@@ -97,2 +98,9 @@ stale: 120000, | ||
// cache may be populated by previous process | ||
// check again | ||
if (_this.cache[version]) { | ||
debug(`MongoBinary: found cached binary path for ${version}`); | ||
resolve(_this.cache[version]); | ||
} | ||
if (err) { | ||
@@ -119,3 +127,4 @@ reject(err); | ||
}).then(function (binPath) { | ||
resolve(binPath); | ||
_this.cache[version] = binPath; | ||
resolve(); | ||
}).catch(function (e) { | ||
@@ -128,9 +137,8 @@ debug(`MongoBinary: Error with mongod binary path: ${e}`); | ||
case 10: | ||
return _context.abrupt('return', this.cache[version].then(function (binPath) { | ||
debug(`MongoBinary: Mongod binary path: ${binPath}`); | ||
return binPath; | ||
})); | ||
case 11: | ||
case 11: | ||
debug(`MongoBinary: Mongod binary path: ${this.cache[version]}`); | ||
return _context.abrupt('return', this.cache[version]); | ||
case 13: | ||
case 'end': | ||
@@ -137,0 +145,0 @@ return _context.stop(); |
{ | ||
"name": "mongodb-memory-server", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "In-memory MongoDB Server. Designed with testing in mind, the server will allow you to connect your favourite ODM or client library to the MongoDB Server and run integration tests isolated from each other.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
57542
713