Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongodb-memory-server-core

Package Overview
Dependencies
Maintainers
0
Versions
276
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-memory-server-core - npm Package Compare versions

Comparing version 10.1.2 to 10.1.3-beta.1

2

lib/util/DryMongoBinary.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc