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

@examgoal/mongodb

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@examgoal/mongodb - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

3

dist/index.d.ts

@@ -1,2 +0,2 @@

import { ClientSession, Db, MongoClient } from 'mongodb';
import { Db, MongoClient } from 'mongodb';
import { ConfigOptions } from "./lib/options";

@@ -7,3 +7,2 @@ declare class MongodbClient {

constructor(config: ConfigOptions);
createSession(): ClientSession;
getDb(name?: string): Promise<Db>;

@@ -10,0 +9,0 @@ get db(): Db;

@@ -7,10 +7,5 @@ "use strict";

this.configuration = config;
this.mongoClient = new mongodb_1.MongoClient(config.uri, Object.assign(Object.assign({}, (config.mongodbOptions || {})), { numberOfRetries: Number.MAX_VALUE, useNewUrlParser: true, useUnifiedTopology: true }));
this.mongoClient = new mongodb_1.MongoClient(config.uri, config.mongodbOptions || {});
}
createSession() {
if (!this.isConnected) {
throw new Error(`${this.name} Can't create session if client is not connected`);
}
return this.mongoClient.startSession();
}
// If you are not using unifiedTopology use this line to connect
getDb(name) {

@@ -17,0 +12,0 @@ return new Promise((resolve, reject) => {

{
"name": "@examgoal/mongodb",
"version": "1.0.8",
"version": "1.0.9",
"description": "MongoDB Session Management Helper for ExpressJS or any Node JS Projects",

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

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