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

mongoose

Package Overview
Dependencies
Maintainers
4
Versions
897
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose - npm Package Compare versions

Comparing version 6.13.4 to 6.13.5

6

lib/helpers/populate/assignVals.js

@@ -246,3 +246,3 @@ 'use strict';

const userSpecifiedTransform = typeof populateOptions.transform === 'function';
const transform = userSpecifiedTransform ? populateOptions.transform : noop;
const transform = userSpecifiedTransform ? populateOptions.transform : v => v;
if (Array.isArray(val)) {

@@ -339,5 +339,1 @@ // find logic

}
function noop(v) {
return v;
}

19

lib/helpers/populate/getModelsMapForPopulate.js

@@ -185,2 +185,11 @@ 'use strict';

}
if (Array.isArray(match)) {
for (const item of match) {
if (item != null && item.$where) {
throw new MongooseError('Cannot use $where filter with populate() match');
}
}
} else if (match != null && match.$where != null) {
throw new MongooseError('Cannot use $where filter with populate() match');
}
data.match = match;

@@ -464,2 +473,12 @@ data.hasMatchFunction = hasMatchFunction;

if (Array.isArray(match)) {
for (const item of match) {
if (item != null && item.$where) {
throw new MongooseError('Cannot use $where filter with populate() match');
}
}
} else if (match != null && match.$where != null) {
throw new MongooseError('Cannot use $where filter with populate() match');
}
// Get local fields

@@ -466,0 +485,0 @@ const ret = _getLocalFieldValues(doc, localField, model, options, virtual);

{
"name": "mongoose",
"description": "Mongoose MongoDB ODM",
"version": "6.13.4",
"version": "6.13.5",
"author": "Guillermo Rauch <guillermo@learnboost.com>",

@@ -6,0 +6,0 @@ "keywords": [

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