mongodb-memory-server-core
Advanced tools
Comparing version 10.1.2 to 10.1.3-beta.1
@@ -28,3 +28,3 @@ "use strict"; | ||
log(`locateBinary: env "SYSTEM_BINARY" was provided with value: "${useOpts.systemBinary}"`); | ||
const systemReturn = await this.getSystemPath(useOpts.systemBinary); | ||
const systemReturn = await this.getSystemPath(path.resolve(useOpts.systemBinary)); | ||
if ((0, utils_1.isNullOrUndefined)(systemReturn)) { | ||
@@ -31,0 +31,0 @@ throw new errors_1.BinaryNotFoundError(useOpts.systemBinary, ' (systemBinary)'); |
@@ -77,10 +77,11 @@ "use strict"; | ||
if (!(0, utils_1.isNullOrUndefined)(binaryPath)) { | ||
log(`getPath: Spawning binaryPath "${binaryPath}" to get version`); | ||
const spawnOutput = (0, child_process_1.spawnSync)(binaryPath, ['--version']) | ||
.stdout.toString() | ||
// this regex is to match the first line of the "mongod --version" output "db version v4.0.25" OR "db version v4.2.19-11-ge2f2736" | ||
.match(/^\s*db\s+version\s+v?(\d+\.\d+\.\d+)(-\d*)?(-[a-zA-Z0-9].*)?\s*$/im); | ||
(0, utils_1.assertion)(!(0, utils_1.isNullOrUndefined)(spawnOutput), new Error('Couldnt find an version from system binary output!')); | ||
// dont warn if the versions dont match if "SYSTEM_BINARY_VERSION_CHECK" is false, but still test the binary if it is available to be executed | ||
if ((0, resolveConfig_1.envToBool)((0, resolveConfig_1.default)(resolveConfig_1.ResolveConfigVariables.SYSTEM_BINARY_VERSION_CHECK))) { | ||
log(`getPath: Spawning binaryPath "${binaryPath}" to get version`); | ||
const spawnOutput = (0, child_process_1.spawnSync)(binaryPath, ['--version']) | ||
// NOTE: "stdout" seemingly can be "undefined", see https://github.com/typegoose/mongodb-memory-server/issues/742#issuecomment-2528284865 | ||
.stdout?.toString() | ||
// this regex is to match the first line of the "mongod --version" output "db version v4.0.25" OR "db version v4.2.19-11-ge2f2736" | ||
.match(/^\s*db\s+version\s+v?(\d+\.\d+\.\d+)(-\d*)?(-[a-zA-Z0-9].*)?\s*$/im); | ||
(0, utils_1.assertion)(!(0, utils_1.isNullOrUndefined)(spawnOutput), new Error('Couldnt find an version from system binary output!')); | ||
log('getPath: Checking & Warning about version conflicts'); | ||
@@ -87,0 +88,0 @@ const binaryVersion = spawnOutput[1]; |
{ | ||
"name": "mongodb-memory-server-core", | ||
"version": "10.1.2", | ||
"version": "10.1.3-beta.1", | ||
"description": "MongoDB Server for testing (core package, without autodownload). The server will allow you to connect your favourite ODM or client library to the MongoDB Server and run parallel integration tests isolated from each other.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
400106
5827
1