Update dependency mongoose to v5 - autoclosed #151
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.13.12
->^5.11.7
By merging this PR, the below issues will be automatically resolved and closed:
Release Notes
Automattic/mongoose
v5.11.7
Compare Source
===================
get()
with empty string returns undefined for mongoose-plugin-autoinc #9681isNew
to false for documents that were successfully inserted byinsertMany
withordered = false
when an error occurred #9677Document#id
optional so types that useid
can useModel<IMyType & Document>
#9684v5.11.6
Compare Source
===================
create()
andfindOneAndReplace()
#9676mongoose.model()
andConnection#model()
with model as generic param #9685 #9678 sahasayanv5.11.5
Compare Source
===================
null
in maps of subdocs #9628validate
#9667VirtualType#applyGetters()
andapplySetters()
,Schema#virtuals
,Schema#childSchemas
,Query#_mongooseOptions
#9658id
to LeanDocuments in case it is defined in the user's schema #9657upsert
andorFail()
#9654insertMany()
more consistent #9662SchemaTypeOpts
andConnectionOptions
aliases for backwards compatsort()
fromlimit
example to avoid potential confusion #9584v5.11.4
Compare Source
===================
Document#__v
so documents have a Version by default #9652 sahasayansession
option toSaveOptions
#9642Schema#paths
,Schema#static(obj)
,Embedded#schema
,DocumentArray#schema
, make Schema inherit from EventEmitter #9650FilterQuery
#9649find()
,findOne()
,findById()
#9648Document#parent()
method because it conflicts with existing user code #9645Connection#db
property #9643tsconfig.json
file for intellisense #9611 alecgibsonv5.11.3
Compare Source
===================
Document#_id
so documents have an id by default #9632LeanDocument
with arrays #9620ModelUpdateOptions
as alias forQueryOptions
for backwards compat #9637v5.11.2
Compare Source
====================
db
events deprecation warning with 'close' events #10004 #9930$pull
more permissive to allow dotted paths #9993v5.11.1
Compare Source
====================
validateModifiedOnly
is set #9963findOneAndReplace()
#9951loadClass()
#9975Schema
constructor #9969type
to an array of schemas when using SchemaDefinitionType #9962v5.11.0
Compare Source
===================
index.d.ts
file #8108localField
andforeignField
as arrays #6608get
option forSchema#virtual()
#9343populate
schematype option that sets default populate options #6029populate()
in batch when usingbatchSize
#9366 biomorgothoverwriteModels
option to bypassOverwriteModelError
globally #9406deepEqual()
on documents and arrays #9396enum
validator in schema #9547 #9546 AbdelrahmanHafezshell
option for date format (ISODate) #9532 FlameFractalget()
,set()
#9375Document#$isValid()
,isDirectSelected()
,isSelected()
,$isDefault()
#9474minLength
andmaxLength
behave the same asminlength
andmaxlength
#8777 m-weeks$parent()
as an alias forparent()
for documents and subdocuments to avoid path name conflicts #9455v5.10.19
Compare Source
====================
$type
in query filters #9577v5.10.18
Compare Source
====================
v5.10.17
Compare Source
====================
v5.10.16
Compare Source
====================
useDb()
#9569of
for array type definitions to be consistent with maps #9564v5.10.15
Compare Source
====================
Array#toObject()
returns a vanilla JavaScript array in Node.js 6+ #9540disconnect()
stop Mongoose if it is trying to reconnect #9531Document#overwrite()
correctly overwrites maps #9549increment
as a schema path name #9538partialFilterExpression
for indexes in discriminator schemas #9542v5.10.14
Compare Source
====================
$setOnInsert
#9537document
andquery
onremove
hooks to get just document middleware #9530 mustafaKamal-fev5.10.13
Compare Source
====================
v5.10.12
Compare Source
====================
startSession()
#9515deleteOne
anddeleteMany
trigger middleware #9504ssl
defaulting totrue
for srv connection strings #9511v5.10.11
Compare Source
====================
mongoose.connect()
multiple times in parallel, make 2nd call wait for connection before resolving #9476save()
persistMap#clear()
#9493v5.10.10
Compare Source
====================
$match
as the 2nd stage in pipeline rather than 1st #9487v5.10.9
Compare Source
===================
autoCreate
as a global option to be consistent withautoIndex
#9466v5.10.8
Compare Source
===================
mongoose.model()
with schema from a different Mongoose module instance #9449reason
on cast errors that occur while init-ing a document #9448createCollection()
not throw error when collection already exists to be consistent with v5.9 #9447v5.10.7
Compare Source
===================
required
can use arrow functions #9435 AbdelrahmanHafezisSelected
#9438Schema#clone()
use parent Mongoose instance's Schema constructor #9426v5.10.6
Compare Source
===================
options.perDocumentLimit
option same asperDocumentLimit
when callingpopulate()
#9418v5.10.5
Compare Source
===================
minimize
iftoObject()
is called without an explicitminimize
#9405v5.10.4
Compare Source
===================
findOneAndRemove()
withorFail()
#9381_id
option tofalse
after instantiating schema #9390getChanges()
#9376v5.10.3
Compare Source
===================
Schema#add()
with schematype instances with different paths #9370Query#get()
example #9372 elainewlinv5.10.2
Compare Source
===================
insertMany()
fails due to server selection error #9355pull()
on a document array when_id
is an alias #9319.$
#9361mongoose.model()
#7723v5.10.1
Compare Source
====================
$type
in query filters #9577v5.10.0
Compare Source
===================
Connection#transaction()
helper that handles resetting Mongoose document state if the transaction fails #8380optimisticConcurrency
option to use OCC forsave()
#9001 #5424Aggregate#search()
for Atlas Text Search #9115setDefaultsOnInsert
as a global option #9036 AbdelrahmanHafezreturnOriginal
as a global option #9189 #9183 AbdelrahmanHafezdefaults
option to disable adding defaults to a single document #8271set()
function for global options, support setting_id
globally #8883$or
when each clause contains a different discriminator key #9018findOneAndUpdate()
,updateOne()
, etc. #6087mongoose.connect()
while already connected a no-op #9203getClient()
andsetClient()
function for interacting with a connection's underlying MongoClient instance #9164parent()
function that allows you to get the parent document for populated docs #8092useProjection
option totoObject()
andtoJSON()
for hiding deselected fields on newly created documents #9118v5.9.29
Compare Source
===================
syncIndexes()
report error if it can't create an index #9303v5.9.28
Compare Source
===================
name
andmessage
show up on individual ValidatorErrors when calling JSON.stringify() on a ValidationError #9296match
schema validator with/g
flag #9287v5.9.27
Compare Source
===================
v5.9.26
Compare Source
===================
undefined
#9275bulkWrite()
updates when not using$set
#9268extends Error
#9273invalidate()
methods have the same return value as top-level document #9271create()
docs use async/await, and add another warning about howcreate()
with options requires array syntax #9280validateModifiedOnly
option works #9263v5.9.25
Compare Source
===================
discriminator()
#9238bufferCommands = false
#9239syncIndexes()
#9225v5.9.24
Compare Source
===================
bufferCommands
option ifmongoose.connect()
is called aftermongoose.model()
#9179priorDoc
after overwriting single nested subdoc so changes after overwrite get persisted correctly #9208bufferMaxEntries
when settingbufferCommands
#9218Model.hydrate()
#9209null
to schema boolean'sconvertToFalse
set #9223find
andfindOne()
examples use async/await and clarifyfind({})
is find all #9210v5.9.23
Compare Source
===================
syncIndexes()
error when db index has a collation but Mongoose index does not #9224 clhuangtransform
option #9211v5.9.22
Compare Source
===================
{ type: mongoose.Schema.Types.Array }
as equivalent to{ type: Array }
#9194connect()
multiple times #9167v5.9.21
Compare Source
===================
typeKey
option to implicitly created schemas fromtypePojoToMixed
#9185 joaoritterrefPath
with multiple documents #9153perDocumentLimit
and multiple documents #9175transform
functions that return promises #9176 #9163 AbdelrahmanHafezv5.9.20
Compare Source
===================
openUri()
on an already open connection #9107update
values in bulkWrite #9160 #9157 AbdelrahmanHafezv5.9.19
Compare Source
===================
required
validator on single nested subdoc correctly when callingSchema#clone()
#8819tiedValue
when casting update on nested paths #9108typePojoToMixed
#9085globalSetup
with Jest #9063const
instead ofvar
in examples #9125 dmcgroutherv5.9.18
Compare Source
===================
$locals
when initializing document #9099 #9098 AbdelrahmanHafezsetDefaultsOnInsert
a mongoose option so it doesn't end up in debug output #9086connect()
andopenUri()
options #9071v5.9.17
Compare Source
===================
splice()
on slice()-ed arrays #9011v5.9.16
Compare Source
===================
$and
,$or
,$nor
contain non-object values #8948$__.scope
property a symbol instead to work around a bug with fast-safe-stringify #8955v5.9.15
Compare Source
===================
unshift()
aftermap()
#9012 philippejerdb
from reserved keywords #8940ref
as a no-op #8946insertedDocs
oninsertMany()
errors #8938writeErrors
property on insertMany error withordered: false
, even if only one op failed #8938v5.9.14
Compare Source
===================
Error.prototype.toJSON
read only #8986 osherkind
to cast errors thrown by query execution #8953 AbdelrahmanHafezsave()
docs #8956 AbdelrahmanHafez