Socket
Socket
Sign inDemoInstall

mongoose

Package Overview
Dependencies
Maintainers
4
Versions
883
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 8.6.2 to 8.6.3

1

index.js

@@ -31,2 +31,3 @@ /**

module.exports.version = mongoose.version;
module.exports.Aggregate = mongoose.Aggregate;
module.exports.Mongoose = mongoose.Mongoose;

@@ -33,0 +34,0 @@ module.exports.Schema = mongoose.Schema;

25

lib/schema/uuid.js

@@ -30,15 +30,2 @@ /*!

/**
* Helper function to convert the buffer input to a string
* @param {Buffer} buf The buffer to convert to a hex-string
* @returns {String} The buffer as a hex-string
* @api private
*/
function binary2hex(buf) {
// use buffer built-in function to convert from buffer to hex-string
const hex = buf != null && buf.toString('hex');
return hex;
}
/**
* Convert a String to Binary

@@ -71,3 +58,3 @@ * @param {String} uuidStr The value to process

if (typeof uuidBin !== 'string' && uuidBin != null) {
hex = binary2hex(uuidBin);
hex = uuidBin.toString('hex');
const uuidStr = hex.substring(0, 8) + '-' + hex.substring(8, 8 + 4) + '-' + hex.substring(12, 12 + 4) + '-' + hex.substring(16, 16 + 4) + '-' + hex.substring(20, 20 + 12);

@@ -95,3 +82,11 @@ return uuidStr;

}
return binaryToString(value);
if (Buffer.isBuffer(value)) {
return binaryToString(value);
} else if (value instanceof Binary) {
return binaryToString(value.buffer);
} else if (utils.isPOJO(value) && value.type === 'Buffer' && Array.isArray(value.data)) {
// Cloned buffers look like `{ type: 'Buffer', data: [5, 224, ...] }`
return binaryToString(Buffer.from(value.data));
}
return value;
});

@@ -98,0 +93,0 @@ }

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

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

@@ -141,3 +141,3 @@ declare module 'mongoose' {

*/
depopulate(path?: string | string[]): this;
depopulate<Paths = {}>(path?: string | string[]): MergeType<this, Paths>;

@@ -144,0 +144,0 @@ /**

Sorry, the diff of this file is too big to display

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