mongoose
Advanced tools
Comparing version 8.4.0 to 8.4.1
@@ -606,3 +606,6 @@ 'use strict'; | ||
const values = [].map.call(arguments, (v, i) => this._cast(v, i, { defaults: false }), this); | ||
const cur = this[arrayParentSymbol].get(this[arrayPathSymbol]); | ||
let cur = this[arrayParentSymbol].get(this[arrayPathSymbol]); | ||
if (utils.isMongooseArray(cur)) { | ||
cur = cur.__array; | ||
} | ||
let i = cur.length; | ||
@@ -619,6 +622,6 @@ let mem; | ||
if (some) { | ||
[].splice.call(cur, i, 1); | ||
cur.splice(i, 1); | ||
} | ||
} else if (~cur.indexOf.call(values, mem)) { | ||
[].splice.call(cur, i, 1); | ||
} else if (~this.indexOf.call(values, mem)) { | ||
cur.splice(i, 1); | ||
} | ||
@@ -625,0 +628,0 @@ } |
@@ -116,3 +116,3 @@ 'use strict'; | ||
* Given a path relative to this document, return the path relative | ||
* to the top-level document. | ||
* to the parent document. | ||
* @param {String} p | ||
@@ -119,0 +119,0 @@ * @returns {String} |
{ | ||
"name": "mongoose", | ||
"description": "Mongoose MongoDB ODM", | ||
"version": "8.4.0", | ||
"version": "8.4.1", | ||
"author": "Guillermo Rauch <guillermo@learnboost.com>", | ||
@@ -61,3 +61,3 @@ "keywords": [ | ||
"moment": "2.x", | ||
"mongodb-memory-server": "8.15.1", | ||
"mongodb-memory-server": "9.2.0", | ||
"ncp": "^2.0.0", | ||
@@ -64,0 +64,0 @@ "nyc": "15.1.0", |
@@ -160,4 +160,4 @@ /// <reference path="./aggregate.d.ts" /> | ||
>; | ||
export type HydratedSingleSubdocument<DocType, TOverrides = {}> = Types.Subdocument<unknown> & Require_id<DocType> & TOverrides; | ||
export type HydratedArraySubdocument<DocType, TOverrides = {}> = Types.ArraySubdocument<unknown> & Require_id<DocType> & TOverrides; | ||
export type HydratedSingleSubdocument<DocType, TOverrides = {}> = Types.Subdocument<unknown, Record<string, never>, DocType> & Require_id<DocType> & TOverrides; | ||
export type HydratedArraySubdocument<DocType, TOverrides = {}> = Types.ArraySubdocument<unknown, Record<string, never>, DocType> & Require_id<DocType> & TOverrides; | ||
@@ -164,0 +164,0 @@ export type HydratedDocumentFromSchema<TSchema extends Schema> = HydratedDocument< |
@@ -99,3 +99,3 @@ | ||
class ArraySubdocument<IdType = any> extends Subdocument<IdType> { | ||
class ArraySubdocument<IdType = any, TQueryHelpers = unknown, DocType = unknown> extends Subdocument<IdType, TQueryHelpers, DocType> { | ||
/** Returns this sub-documents parent array. */ | ||
@@ -102,0 +102,0 @@ parentArray(): Types.DocumentArray<unknown>; |
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
Sorry, the diff of this file is too big to display
2671898
50669