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

@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.24.0 to 0.25.0

1

lib/history.js

@@ -87,2 +87,3 @@ const { createTracer } = require('@discue/open-telemetry-tracing')

eventEmitter.on(`${this._usageEventPrefix}.delete`, (event) => this._eventHandler('delete', event))
eventEmitter.on(`${this._usageEventPrefix}.close`, () => this.close())
}

@@ -89,0 +90,0 @@

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

/// <reference types="node" />
export = exports;

@@ -14,2 +15,3 @@ declare class exports {

_collectionName: string;
_eventEmitter: import("events");
_emitUsageEventEnabled: boolean;

@@ -16,0 +18,0 @@ _emiteUsageEvent: ({ context, resourceIds, before, after }: {

@@ -88,2 +88,3 @@ const { MongoClient, Timestamp } = require('mongodb')

this._eventEmitter = eventEmitter
this._emitUsageEventEnabled = eventEmitter != null

@@ -526,5 +527,8 @@ this._emiteUsageEvent = eventTrigger(this.usageEventPrefix, collectionName, eventEmitter)

*/
close() {
async close() {
if (this._emitUsageEventEnabled) {
await this._emiteUsageEvent({ context: 'close' })
}
return this._mongoDbClient.close()
}
}

2

package.json

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

"license": "MIT",
"version": "0.24.0",
"version": "0.25.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