Socket
Socket
Sign inDemoInstall

@discue/mongodb-resource-client

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@discue/mongodb-resource-client - npm Package Compare versions

Comparing version 0.36.0 to 0.37.0

2

lib/base-storage.d.ts

@@ -9,3 +9,3 @@ export = exports;

constructor({ client, databaseName, collectionName }?: ConstructorOptions);
_mongoDbClient: import("mongodb").MongoClient;
/** @private */ private _mongoDbClient;
/** @private */ private _databaseName;

@@ -12,0 +12,0 @@ /** @private */ private _collectionName;

@@ -59,3 +59,3 @@ 'use strict'

if (client) {
this._mongoDbClient = client
/** @private */ this._mongoDbClient = client
} else {

@@ -62,0 +62,0 @@ throw new Error('Configuration Error. `client` needs to be set.')

@@ -441,8 +441,11 @@ 'use strict'

*/
close() {
return Promise.all([
this._hostStorage.close(),
super.close()
])
async close() {
await this._hostStorage.close()
// check first whether topology is still set. Very likely we are using
// the same MongoClient and thus don't need to call `close`
// of the super class
if (this._mongoDbClient.topology) {
await super.close()
}
}
}

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "0.36.0",
"version": "0.37.0",
"description": "Simple wrapper around mongodb client allowing easier managing of resources",

@@ -8,0 +8,0 @@ "main": "lib/index",

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