New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chpr-mongodb

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chpr-mongodb - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

.idea/jsLibraryMappings.xml

2

package.json
{
"name": "chpr-mongodb",
"version": "0.0.4",
"version": "0.1.0",
"description": "MongoDB driver",

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

@@ -12,2 +12,4 @@ const { EventEmitter } = require('events');

const NOT_SYSTEM_COLLECTION_REGEX = /^(?!system\.).*/;
// https://github.com/mongodb/node-mongodb-native/blob/834a0e299a518d370e65b2bdb76994e97dbde63f/lib/server.js#L339

@@ -55,2 +57,16 @@ const MONGODB_CONNECTION_EVENTS = [

/**
* Remove the info.uuid of a collection object
*
* @param collection
*
* @return {*} The filtered collection
*/
static removeCollectionInfoUuid(collection) {
if (collection && collection.info) {
delete collection.info.uuid;
}
return collection;
}
/**
* Connect the databases

@@ -142,3 +158,3 @@ *

*/
const collections = await db.listCollections({ name: { $regex: /^(?!system\.).*/ }}).toArray();
const collections = await db.listCollections({ name: { $regex: NOT_SYSTEM_COLLECTION_REGEX }}).toArray();

@@ -150,3 +166,3 @@ const collectionIndexesCursors = await Promise.all(collections

name: databaseName,
collections,
collections: collections.map(MongoDbConnector.removeCollectionInfoUuid),
collectionIndexes: collectionIndexesCursors.map(cursor => cursor.cursor.firstBatch)

@@ -153,0 +169,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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