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
1
Versions
274
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 6.3.0 to 6.3.1

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [6.3.1](https://github.com/nodkz/mongodb-memory-server/compare/v6.3.0...v6.3.1) (2020-02-28)
**Note:** Version bump only for package mongodb-memory-server-core
# [6.3.0](https://github.com/nodkz/mongodb-memory-server/compare/v6.2.4...v6.3.0) (2020-02-28)

@@ -8,0 +16,0 @@

2

lib/MongoMemoryReplSet.d.ts
/// <reference types="node" />
import { EventEmitter } from 'events';
import * as mongodb from 'mongodb';
import MongoMemoryServer from './MongoMemoryServer';

@@ -53,3 +52,2 @@ import { MongoBinaryOpts } from './util/MongoBinary';

_state: 'init' | 'running' | 'stopped';
admin?: mongodb.Admin;
constructor(opts?: MongoMemoryReplSetOptsT);

@@ -56,0 +54,0 @@ getConnectionString(otherDb?: string | boolean): Promise<string>;

@@ -196,3 +196,3 @@ "use strict";

return __awaiter(this, void 0, void 0, function () {
var servers, cnt, server;
var servers, cnt, current, server;
var _this = this;

@@ -213,4 +213,5 @@ return __generator(this, function (_a) {

cnt = this.opts.replSet.count || 1;
current = 0;
while (servers.length < cnt) {
log(" starting " + cnt + " servers...");
log(" starting server " + current + " of " + cnt + "...");
server = this._initServer(this.getInstanceOpts({}));

@@ -280,3 +281,3 @@ servers.push(server);

return __awaiter(this, void 0, void 0, function () {
var uris, MongoClient, conn, db, members, rsConfig;
var uris, MongoClient, conn, db, admin, members, rsConfig;
return __generator(this, function (_a) {

@@ -290,3 +291,3 @@ switch (_a.label) {

if (!this.servers.length) {
throw new Error('One or more server is required.');
throw new Error('One or more servers are required.');
}

@@ -323,3 +324,3 @@ return [4 /*yield*/, Promise.all(this.servers.map(function (server) { return server.getUri(); }))];

db.topology.shouldCheckForSessionSupport = function () { return false; };
this.admin = db.admin();
admin = db.admin();
members = uris.map(function (uri, idx) { return ({ _id: idx, host: db_util_1.getHost(uri) }); });

@@ -331,3 +332,3 @@ rsConfig = {

};
return [4 /*yield*/, this.admin.command({ replSetInitiate: rsConfig })];
return [4 /*yield*/, admin.command({ replSetInitiate: rsConfig })];
case 5:

@@ -334,0 +335,0 @@ _a.sent();

{
"name": "mongodb-memory-server-core",
"version": "6.3.0",
"version": "6.3.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.",

@@ -72,3 +72,3 @@ "main": "lib/index",

"disabled-build:flow": "find ./lib -name \"*.d.ts\" -exec bash -c './node_modules/.bin/flowgen --add-flow-header \"$1\" -o \"${1%.d.ts}\".js.flow' - '{}' \\;",
"watch": "cross-env MONGOMS_DOWNLOAD_DIR=./tmp jest --watch",
"watch": "cross-env MONGOMS_DOWNLOAD_DIR=./tmp jest --watchAll",
"coverage": "cross-env MONGOMS_DOWNLOAD_DIR=./tmp jest --coverage",

@@ -80,3 +80,3 @@ "lint": "npm run eslint && npm run tscheck",

},
"gitHead": "2b8d9d2b72da05ea63e323744f5a46ffc5496954"
"gitHead": "dde00c95b262dbae7b443cd60b95b7d78748b89e"
}

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