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

mongoose

Package Overview
Dependencies
Maintainers
4
Versions
907
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.9.3 to 8.9.4

1

lib/schema/documentArray.js

@@ -525,2 +525,3 @@ 'use strict';

this.Constructor.discriminators);
schematype._appliedDiscriminators = this._appliedDiscriminators;
return schematype;

@@ -527,0 +528,0 @@ };

@@ -396,3 +396,4 @@ 'use strict';

schematype.caster.discriminators = Object.assign({}, this.caster.discriminators);
schematype._appliedDiscriminators = this._appliedDiscriminators;
return schematype;
};

24

package.json
{
"name": "mongoose",
"description": "Mongoose MongoDB ODM",
"version": "8.9.3",
"version": "8.9.4",
"author": "Guillermo Rauch <guillermo@learnboost.com>",

@@ -33,4 +33,4 @@ "keywords": [

"@babel/preset-env": "7.26.0",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"acquit": "1.3.0",

@@ -40,3 +40,2 @@ "acquit-ignore": "0.2.1",

"assert-browserify": "2.0.0",
"axios": "1.1.3",
"babel-loader": "8.2.5",

@@ -47,18 +46,17 @@ "broken-link-checker": "^0.7.8",

"crypto-browserify": "3.12.1",
"dotenv": "16.4.5",
"dox": "1.0.0",
"eslint": "8.57.0",
"eslint-plugin-markdown": "^5.0.0",
"eslint": "8.57.1",
"eslint-plugin-markdown": "^5.1.0",
"eslint-plugin-mocha-no-only": "1.2.0",
"express": "^4.19.2",
"fs-extra": "~11.2.0",
"highlight.js": "11.10.0",
"highlight.js": "11.11.1",
"lodash.isequal": "4.5.0",
"lodash.isequalwith": "4.4.0",
"markdownlint-cli2": "^0.15.0",
"marked": "15.0.3",
"markdownlint-cli2": "^0.17.1",
"marked": "15.0.4",
"mkdirp": "^3.0.1",
"mocha": "10.8.2",
"mocha": "11.0.1",
"moment": "2.30.1",
"mongodb-memory-server": "10.1.2",
"mongodb-memory-server": "10.1.3",
"ncp": "^2.0.0",

@@ -73,3 +71,3 @@ "nyc": "15.1.0",

"uuid": "11.0.3",
"webpack": "5.96.1"
"webpack": "5.97.1"
},

@@ -76,0 +74,0 @@ "directories": {

@@ -713,2 +713,10 @@ /// <reference path="./aggregate.d.ts" />

export type BufferToBinaryProperty<T> = T extends Buffer
? mongodb.Binary
: T extends Types.DocumentArray<infer ItemType>
? Types.DocumentArray<BufferToBinary<ItemType>>
: T extends Types.Subdocument<unknown, unknown, infer SubdocType>
? HydratedSingleSubdocument<BufferToBinary<SubdocType>>
: BufferToBinary<T>;
/**

@@ -723,11 +731,7 @@ * Converts any Buffer properties into mongodb.Binary instances, which is what `lean()` returns

? T
: T extends Record<string, any> ? {
[K in keyof T]: T[K] extends Buffer
? mongodb.Binary
: T[K] extends Types.DocumentArray<infer ItemType>
? Types.DocumentArray<BufferToBinary<ItemType>>
: T[K] extends Types.Subdocument<unknown, unknown, infer SubdocType>
? HydratedSingleSubdocument<BufferToBinary<SubdocType>>
: BufferToBinary<T[K]>;
} : T;
: T extends Record<string, any>
? {
[K in keyof T]: BufferToBinaryProperty<T[K]>
}
: T;

@@ -734,0 +738,0 @@ /**

@@ -38,2 +38,3 @@ declare module 'mongoose' {

session?: ClientSession;
validateBeforeSave?: boolean;
}

@@ -40,0 +41,0 @@

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

type GetLeanResultType<RawDocType, ResultType, QueryOp> = QueryOp extends QueryOpThatReturnsDocument
? (ResultType extends any[] ? Default__v<Require_id<BufferToBinary<FlattenMaps<RawDocType>>>>[] : Default__v<Require_id<BufferToBinary<FlattenMaps<RawDocType>>>>)
? (ResultType extends any[] ? Default__v<Require_id<FlattenMaps<BufferToBinary<RawDocType>>>>[] : Default__v<Require_id<FlattenMaps<BufferToBinary<RawDocType>>>>)
: ResultType;

@@ -229,0 +229,0 @@

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

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

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