Socket
Socket
Sign inDemoInstall

@brickyang/easy-mongodb

Package Overview
Dependencies
21
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

23

lib/mongo.js

@@ -20,3 +20,2 @@ 'use strict';

this.client;
this.featureCompatibilityVersion;
}

@@ -80,12 +79,4 @@

this.db = client.db(this.config.name);
const {
featureCompatibilityVersion,
} = await this.db.executeDbAdminCommand({
getParameter: 1,
featureCompatibilityVersion: 1,
});
/* istanbul ignore next */
this.featureCompatibilityVersion =
featureCompatibilityVersion.version || featureCompatibilityVersion;
Object.freeze(this.db);
Object.freeze(this.client);
this.emit('connect');

@@ -640,8 +631,2 @@ return client;

startSession(args = {}) {
if (parseFloat(this.featureCompatibilityVersion) < 3.6) {
throw new Error(
'Current topology does not support sessions, need 3.6 or above'
);
}
const options = Object.assign({}, args.options);

@@ -663,8 +648,2 @@ return this.client.startSession(options);

startTransaction(args = {}) {
if (parseFloat(this.featureCompatibilityVersion) < 4) {
throw new Error(
'Current topology does not support transactions, need 4.0 or above'
);
}
const options = Object.assign({}, args.options);

@@ -671,0 +650,0 @@ const session = this.startSession();

2

package.json
{
"name": "@brickyang/easy-mongodb",
"version": "1.1.1",
"version": "1.1.2",
"description": "Based on MongoDB Native Node.js Driver.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc