Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Update dependency mongoose to v6 #255

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 24, 2021

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mongoose (source) ^5.12.14 -> ^6.0.0 age adoption passing confidence

Release Notes

Automattic/mongoose

v6.6.1

Compare Source

==================

  • fix: correctly apply defaults after subdoc init #​12328
  • fix(array): avoid using default _id when using pull() #​12294
  • fix: allow null values inside $expr objects #​12429 MartinDrost
  • fix(query): use correct Query constructor when cloning query #​12418
  • docs(website): remove setting "latest38x" which is not used anywhere #​12396 hasezoey

v6.6.0

Compare Source

==================

v6.5.5

Compare Source

==================

  • fix(setDefaultsOnInsert): avoid applying defaults on insert if nested property set #​12279
  • fix(model): make applyHooks() and applyMethods() handle case where custom method is set to Mongoose implementation #​12254
  • fix(types): add string "ascending" and "descending" index-directions #​10269
  • docs: upgrade dox to 1.0.0 #​12403 hasezoey
  • docs: update old mongodb nodejs driver documentation urls #​12387 hasezoey
  • docs: update JSDOC ... (spread) definition #​12388 hasezoey
  • refactor(model): allow optionally passing indexes to createIndexes and cleanIndexes #​12280 AbdelrahmanHafez

v6.5.4

Compare Source

==================

  • fix(document): allow calling $assertPopulated() with values to better support manual population #​12233
  • fix(connection+mongoose): better handling for calling model() with 1 argument #​12359
  • fix(model): allow defining discriminator virtuals and methods using schema options #​12326
  • fix(types): fix MongooseQueryMiddleware missing "findOneAndReplace" and "replaceOne" #​12330 #​12329 Jule- lpizzinidev
  • fix(types): fix replaceOne return type #​12351 lpizzinidev
  • fix(types): use this for return type from $assertPopulated() #​12234
  • docs: highlight how to connect using auth in README #​12354 AntonyOnScript
  • docs: improve jsdoc comments for private methods #​12337 hasezoey
  • docs: fix minor typo in compatibility table header #​12355 skyme5

v6.5.3

Compare Source

==================

v6.5.2

Compare Source

==================

  • fix(aggregate): avoid throwing error when disconnecting with change stream open #​12201 ramos-ph
  • fix(query): overwrite top-level key if using Query.prototype.set() to set to undefined #​12155
  • fix(query): shallow clone options before modifying #​12176
  • fix(types): auto schema type inference on Connection.prototype.model() #​12240 hasezoey
  • fix(types): better typescript support for schema plugins #​12139 emiljanitzek
  • fix(types): make bulkWrite() type param optional #​12221 #​12212
  • docs: misc cleanup #​12199 hasezoey
  • docs: highlight current top-most visible header in navbar #​12222 hasezoey
  • docs(populate): improve examples for Document.prototype.populate() #​12111
  • docs(middleware): clarify document vs model in middleware docs #​12113

v6.5.1

Compare Source

==================

  • fix(timestamps): set timestamps on child schema when child schema has timestamps: true but parent schema does not #​12119
  • fix(schema+timestamps): handle insertMany() with timestamps and discriminators #​12150
  • fix(model+query): handle populate with lean transform that deletes _id #​12143
  • fix(types): allow $pull with _id #​12142
  • fix(types): add schema plugin option inference #​12196 hasezoey
  • fix(types): pass type to mongodb bulk write operation #​12167 emiljanitzek
  • fix(types): map correct generics from model to schema #​12125 emiljanitzek
  • fix(types): avoid baffling circular reference when using PopulatedDoc with a bidirectional reference #​12136
  • fix(types): allow using path with $count #​12149
  • docs(compatibility): change to use a table #​12200 hasezoey
  • docs(api_split.pug): add "code" to sidebar entries #​12153 hasezoey
  • docs: add "code" to Headers (and index list) #​12152 hasezoey

v6.5.0

Compare Source

==================

  • perf(document): avoid creating unnecessary empty objects when creating a state machine #​11988
  • feat: upgrade mongodb driver -> 4.8.1 #​12103 AbdelrahmanHafez
  • feat(model): allow passing timestamps option to Model.bulkSave(...) #​12082 AbdelrahmanHafez
  • feat(model): add castObject() function that casts a POJO to the model's schema #​11945
  • feat(document): add $inc() helper that increments numeric paths #​12115
  • feat(schema): add schema level lean option IslandRhythms
  • feat(schema): add global id option to disable id on schemas #​12067 IslandRhythms
  • fix(connection): re-run Model.init() if re-connecting after explicitly closing a connection #​12130
  • feat(model): add applyDefaults() helper that allows applying defaults to document or POJO #​11945
  • feat(model): allow calling hydrate() with { setters: true } #​11653
  • feat(model): add hydrate option to Model.watch() to automatically hydrate fullDocument #​12121
  • feat(types): add support for automatically typed virtuals in schemas #​11908 mohammad0-0ahmad

v6.4.7

Compare Source

==================

v6.4.6

Compare Source

==================

  • fix(schema): disallow setting proto when creating schema with dotted properties #​12085
  • fix(document): avoid mutating original object passed to $set() when applying defaults to nested properties #​12102
  • fix(query): apply lean transform option to top-level document #​12093
  • docs(migrating_to_6): correct example for isObjectIdOrHexString() #​12123 LokeshKanumoori

v6.4.5

Compare Source

==================

v6.4.4

Compare Source

==================

v6.4.3

Compare Source

==================

  • fix(document): handle validating deeply nested subdocuments underneath nested paths with required: false #​12021
  • fix(types): infer schematype type from schema paths when calling SchemaType.path() #​11987
  • fix(types): add $top and $topN aggregation operators #​12053
  • fix(types): clean up a couple of issues with $add and $ifNull #​12017
  • fix(types): allow $cond with $in #​12028
  • docs: add path level descending index example in docs #​12023 MitchellCash
  • docs: add Buffer, Decimal128, Map to docs #​11971

v6.4.2

Compare Source

==================

  • fix: keep autoIndex & autoCreate as true by default if read preference is primaryPreferred #​11976
  • fix(types): improve inferred Schema Type to handle nested paths and ObjectIds #​12007 iammola
  • fix(types): avoid inferring doc type from param to create() #​12001
  • fix(types): make populate Paths generic consistently overwrite doc interface #​11955
  • fix(types): allow null at ne expression second parameter #​11996 jyeros
  • fix(types): change index "weights" to be more explicit #​11997 hasezoey

v6.4.1

Compare Source

==================

  • fix(schema): allow 0 for numbers if required and ref both set #​11912
  • fix(query): skip applying default projections over slice projections #​11940
  • fix(types): handle arrays in ApplyBasicQueryCasting correctly #​11964
  • fix(types): fix $match typings #​11969 andreialecu
  • fix(types): avoid adding non-existent properties from model constructor for typegoose #​11960
  • fix(types): make Mongoose UpdateQuery compatible with MongoDB UpdateFilter #​11911
  • fix(types): simplify MergeType constraints #​11978
  • fix(types): correct references to Buffer for @​types/node >= 16.0.0 < 16.6.0 #​11963
  • fix(types): re-add the possibility to pass undefined for projection in Model.find #​11965 ghost91-
  • fix(types): fix typo for indexes #​11953 AbdelrahmanHafez
  • fix(document+types): document merge option #​11913
  • docs: update schematypes.md #​11981 korzio
  • docs: update validation.md #​11982 korzio

v6.4.0

Compare Source

==================

v6.3.9

Compare Source

==================

  • fix(document): handle nested paths underneath subdocuments when getting all subdocuments for pre save hooks #​11917
  • fix(types): correct typing in post aggregate hooks #​11924 GCastilho
  • docs: remove connect-option reconnectTries and reconnectInterval #​11930 Uzlopak

v6.3.8

Compare Source

==================

  • fix: revert 670b445 perf optimizations that caused some test failures #​11541

v6.3.7

Compare Source

==================

  • fix(schema+document): allow disabling _id on subdocuments by default #​11541
  • fix(update): respect global strictQuery option when casting array filters #​11836
  • perf(document): avoid unnecessarily creating new options object on every $set #​11541
  • fix: toJSON with undefined path #​11922 kerryChen95
  • fix: add refPath to SchemaTypeOptions class #​11862
  • fix(types): handle boolean default functions #​11828
  • docs(populate): make path names in refPath section consistent #​11724

v6.3.6

Compare Source

==================

  • fix(update): apply timestamps to nested subdocs within $push and $addToSet #​11775
  • fix(document): use shallow clone instead of deep clone for toObject() options #​11776
  • fix: avoid checking for ObjectId with instanceof #​11891 noseworthy
  • fix(types): Allow sorting by text score #​11893
  • fix(types): allow schematype get() functions to return undefined #​11561
  • fix(types): add Schema.discriminator #​11855 Uzlopak
  • fix(types): discriminator generic type not being passed to schema #​11898 GCastilho

v6.3.5

Compare Source

==================

  • fix(document): avoid infinite recursion when calling toObject() on self-referencing document #​11756
  • fix(document): avoid manually populating documents that are manually populated in another doc with different unpopulatedValue #​11442
  • fix(document): fix ObjectId conversion for external schemas #​11841 coyotte508
  • fix: fix codeql warnings #​11817 Uzlopak
  • fix(types): allow passing TVirtuals to Schema class #​11543
  • fix(types): Type of Connection.transaction() #​11825 dwrss
  • docs(typescript): add coverage for TypeScript query helpers #​11709
  • docs: fix documention of error handling #​11844 Uzlopak
  • docs: typings mongoose.Error should reference to MongooseError #​11850 Uzlopak
  • chore: improve issue templates #​11794 Uzlopak
  • chore: use ts-benchmark instead of internal TS benchmarking #​11798 mohammad0-0ahmad

v6.3.4

Compare Source

==================

  • fix(schema): disallow using schemas with schema-level projection with map subdocuments #​11698
  • fix(document): avoid setting nested paths to null when they're undefined #​11723
  • fix: allow using comment with findOneAndUpdate(), count(), distinct() and hint with findOneAndUpdate() #​11793
  • fix(document): clean modified subpaths when setting nested path to null after modifying subpaths #​11764
  • fix(types): allow calling deleteModel() with RegExp in TypeScript #​11812
  • docs(typescript): add section on PopulatedDoc to TypeScript populate docs #​11685

v6.3.3

Compare Source

==================

  • perf: avoid leaking memory when using populate() with QueryCursor because of reusing populate options with _docs #​11641
  • fix(types): add _id back for LeanDocument #​11769 #​11761 taxilian
  • fix(model): add skipValidation option for bulkWrite() to allow skipping validation for insertOne and replaceOne #​11663
  • fix(document): correctly $__reset() subdocuments that are under nested paths #​11672
  • fix(query): handle casting BSONRegExp instances as RegExps in queries #​11597
  • fix: correctly cast $not in $expr #​11689
  • perf: optimize size of browser bundle, use buffer v.5.7.1 package to match buffer package of mongodb in browser bundle #​11765 Uzlopak
  • docs: Query.populate docs do not include using an array of strings for the path param #​11768 #​11641 AbdelrahmanHafez
  • chore: add GitHub workflow to close stale "can't reproduce", "help", "needs clarification" issues #​11753 Uzlopak
  • chore: remove Makefile dependency for compiling docs #​11751 Uzlopak

v6.3.2

Compare Source

==================

  • perf: avoid registering event listeners on subdocuments to reduce memory usage #​11541
  • fix(setDefaultsOnInsert): set default if sibling of nested path is $set #​11668
  • perf(document): remove unnecessary workaround for ignoring subpaths of arrays #​11541
  • fix(types): various fixes and improvements for types #​11650 taxilian
  • fix(types): make mongoose typings work without esmModuleInterop true #​11695 Uzlopak
  • fix(types): support populate(path, fields, model) syntax #​11649 #​11598 mohammad0-0ahmad
  • fix(types): correct SchemaTypeOptions.get function signature #​11561
  • fix: fix browser build for Webpack 5 #​11717
  • docs: improve readme #​11705 mahendrap1512

v6.3.1

Compare Source

==================

  • perf: improve perf of key order #​11639 Uzlopak
  • fix(timestamps): set createdAt when creating new single nested subdocuments #​11603
  • fix: improve CastError message when throwing StrictModeError #​11506
  • fix: upgrade bson to match [email protected] #​11676
  • fix(populate): avoid populating single nested subdocs underneath arrays if there's no ref #​11538
  • fix: handle { capped: number } in schema definition with createCollection() #​11539
  • fix: call markModified before setting changes in Array and in DocumentArray methods #​11660 josegl
  • fix: only allow using minus path to remove auto-selected discriminatorKey from projection #​11546
  • fix(types): set context on virtual getters/setters by default #​11543
  • fix(types): correct return type for Connection.prototype.transaction #​9919
  • fix(types): allow model as document interface key when using extends Document #​11629
  • docs: improve populate typing #​11690 onichandame
  • docs: add information regarding typings-tests #​11691 Uzlopak
  • docs: fix jsdoc for mongoose.createConnection #​11693 Uzlopak

v6.3.0

Compare Source

==================

v6.2.11

Compare Source

===================

  • fix(document): handle validation with triply nested document arrays #​11564
  • fix(query): skip applying string schema setters on $regex #​11426
  • fix: skip findOneAndReplace() validation if runValidators = false #​11559
  • fix(model): correctly handle schema-level collations in syncIndexes() #​7621
  • fix(types): correct populate query return type with lean #​11560 mohammad0-0ahmad
  • fix(types): allow using { type: Mixed } as schema type definition for any path #​10900
  • docs: fix example on Schema.prototype.post() #​11648 EmilienLeroy
  • docs: fix typo in methods/index.js #​11651 eltociear

v6.2.10

Compare Source

===================

v6.2.9

Compare Source

==================

v6.2.8

Compare Source

==================

  • fix(document): handle casting array of spread docs #​11522
  • fix(document): avoid setting nested properties on top-level document when initing with strict: false #​11526
  • fix(document): correctly handle deeply nested subdocuments when getting paths to validate #​11501
  • fix(types): avoid making TInstanceMethods any by default leading to this = any in middleware #​11435
  • fix(types): allow defining array default if using Types.Array<> in document interface #​11391
  • docs(migrating_to_6): describe breaking change in Mongoose 6 about default query populate model #​11289
  • docs(middleware): fix typo #​11537 x1489

v6.2.7

Compare Source

==================

  • perf(document): avoid running validation on every array element if there's no validators to run #​11380
  • fix(cursor): correctly populate in batches when batchSize is set #​11509
  • fix(connection): avoid setting MongoClient on useDb() connections until after setting on base connection #​11445
  • fix(schema): throw more helpful error when using schema from a different version of Mongoose module #​10453
  • fix: add missing timeseries expiration handling #​11489 #​11229 Uzlopak
  • docs: correct Model.findOneAndReplace docs param naming #​11524 anatolykopyl

v6.2.6

Compare Source

==================

  • fix(types): correct reference to cursor TypeScript bindings #​11513 SimonHausdorf
  • fix(types): allow calling Query.prototype.populate() with array of strings #​11518
  • fix(types): export and refactor types of PreMiddlewareFunction, PreSaveMiddlewareFunction, PostMiddlewareFunction, ErrorHandlingMiddlewareFunction #​11485 Uzlopak

v6.2.5

Compare Source

==================

  • fix(mongoose): add isObjectIdOrHexString() to better capture the most common use case for isValidObjectId() #​11419
  • fix(query): prevent modifying discriminator key in updates using operators other than $set #​11456
  • fix(populate+types): call foreignField functions with doc as 1st param, better typings for localField and foreignField functions #​11321
  • fix(populate): return an array when using populate count on an array localField #​11307
  • fix(query): avoid error when using $not with arrays #​11467
  • perf: only deep clone validators if necessary #​11412 Uzlopak
  • fix(types): rename definition files to lowercase to avoid typescript bug #​11469
  • fix(types): aggregate.sort() accepts a string but also { field: 'asc'|'ascending'|'desc'|'descending' } #​11479 simonbrunel
  • fix(types): extract and refactor aggregationcursor and querycursor #​11488 Uzlopak
  • fix(types): extract and refactor schemaoptions #​11484 Uzlopak
  • fix(types): make first param to Query.prototype.populate() a string #​11475 minhthinhls
  • fix(types): improve type checking for doc arrays in schema definitions #​11241
  • docs: fix length comparaison in lean.test.js #​11493 zazapeta
  • docs(timestamps): fix typo #​11481 saibbyweb
  • docs: fix broken link to rawResult #​11459 chhiring90

v6.2.4

Compare Source

==================

  • fix(query): correctly return full deleteOne(), deleteMany() result #​11211
  • fix(query): handle update validators on deeply nested subdocuments #​11455 #​11394
  • fix(discriminator): handle modifying multiple nested paths underneath a discriminator #​11428
  • perf: improve isAsyncFunction #​11408 Uzlopak
  • fix(index.d.ts): add typedefs for Schema pick() #​11448 Moisei-Shkil
  • fix(index.d.ts): allow type override for distinct() #​11306
  • fix(index.d.ts): allow array of validators in schema definition #​11355
  • fix(index.d.ts): improve connection typings #​11418 Uzlopak
  • docs: add timestamps docs #​11336
  • docs(timestamps): explain how timestamps works under the hood #​11336
  • docs(migrating_to_6): add model.exists breaking change returning doument instead of boolean #​11407 AbdelrahmanHafez
  • docs(index.d.ts): add docs for FilterQuery, UpdateQuery, and LeanDocument #​11457 Moisei-Shkil

v6.2.3

Compare Source

==================

  • fix(model): avoid dropping base model indexes when using discriminators with Connection.prototype.syncIndexes() #​11424 #​11421 AbdelrahmanHafez
  • fix(document): handle array defaults when selecting element underneath array #​11376
  • fix(populate): correctly handle depopulating populated subdocuments #​11436
  • fix(utils): improve deepEqual() handling for comparing objects with non-objects #​11417
  • fix(schema): allow declaring array of arrays using [{ type: [String] }] #​11252
  • perf: improve validation sync and async by replacing forEach with classic for loops #​11414 Uzlopak
  • perf: make hasDollarKeys faster #​11401 Uzlopak
  • fix(index.d.ts): ValidationError errors only contains CastError or ValidationError #​11369 Uzlopak
  • fix(index.d.ts): make InsertManyResult.insertedIds return an array of Types.ObjectId by default #​11197
  • fix(index.d.ts): allow pre('save') middleware with pre options #​11257
  • fix(index.d.ts): add supressReservedKeysWarning option to schema #​11439 hiukky
  • docs(connections): improve replica set hostname docs with correct error message and info about err.reason.servers #​11200
  • docs(populate): add virtual populate match option documentation #​11411 remirobichet
  • docs(document): add note to API docs that flattenMaps defaults to true for toJSON() but not toObject() #​11213
  • docs(document+model): add populate option to populate() API docs #​11170
  • docs(migrating_to_6): add additional info about removing omitUndefined #​11038
  • docs(migrating_to_6): add model.exists breaking change returning doument instead of boolean AbdelrahmanHafez

v6.2.2

Compare Source

==================

  • fix: fix QueryCursor and AggregationCursor compatibility with Node v17.5 #​11381 benjamingr
  • fix: better esm support, no necessity for setting allowSyntheticDefaultImports and esModuleInterop #​11343 Uzlopak
  • fix(model): apply projection parameter to hydrate() #​11375
  • fix: fix issue with creating arrays of length > 10000 #​11405 Uzlopak
  • fix(document): minimize single nested subdocs #​11247
  • fix(connection): handle reopening base connection with useDb() #​11240
  • perf: use property access instead of get() helper where possible #​11389 Uzlopak
  • fix: use isArray() instead of instanceof Array #​11393 Uzlopak
  • perf: improve performance of cast$expr() #​11388 Uzlopak
  • perf: remove startsWith() from isOperator() #​11400 [Uzlopak](https://togithub

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

@sonarcloud
Copy link

sonarcloud bot commented Aug 24, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Feb 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant