Skip to content

Releases: Automattic/mongoose

6.5.4

30 Aug 19:10
Compare
Choose a tag to compare

6.5.4 / 2022-08-30

  • 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

6.5.3

25 Aug 01:29
Compare
Choose a tag to compare

6.5.3 / 2022-08-24

  • fix(document): handle maps when applying defaults to nested paths #12322
  • fix(schema): make ArraySubdocuments apply _id defaults on init #12264
  • fix(populate): handle specifying recursive populate as a string with discriminators #12266
  • perf(types): remove extends Query in Schema.pre() and Schema.post(), loosen discriminator() generic #10349
  • perf(types): some more micro-optimizations re: #10349, remove extra type checking on $ne, etc.
  • fix(types): infer schema on connection.model() #12298 #12125 hasezoey
  • fix(types): add missing findById() type definitions #12309 lpizzinidev
  • fix(types): allow $search in $lookup pipeline stages for MongoDB v6.x support #12278 AbdelrahmanHafez
  • fix(types): add parameter "options" to "Model.remove" #12258 hasezoey
  • fix(types): sync single-generic-no-constraint "model" between "index.d.ts" and "connection.d.ts" #12299 hasezoey
  • fix(types): update isDirectModified typing #12290 gabrielDonnantuoni
  • docs: update links on api docs #12293 eatmoarrice
  • docs: add note about language_override option #12310 IslandRhythms
  • docs(document): add "String[]" to Document.depopulate as jsdoc parameter type #12300 hasezoey
  • docs: update Node.js EventEmitter url #12303 rainrisa

6.5.2

10 Aug 00:58
Compare
Choose a tag to compare

6.5.2 / 2022-08-09

  • 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

6.5.1

03 Aug 19:56
Compare
Choose a tag to compare

6.5.1 / 2022-08-03

  • 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

6.5.0

26 Jul 22:36
Compare
Choose a tag to compare

6.5.0 / 2022-07-26

  • 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

6.4.7

25 Jul 21:18
Compare
Choose a tag to compare

6.4.7 / 2022-07-25

  • fix(virtualtype): use $locals for default virtual getter/setter rather than top-level doc #12124
  • fix(document): call subdocument getters if child schema has getters: true #12105
  • fix(schematype): actually always return "this" where specified #12141 hasezoey
  • fix(types): correct return value for Model.exists() #12094
  • docs(guides): add link to advanced schemas doc #12073
  • docs: handle @see in jsdoc #12144 hasezoey
  • docs: make use of the deprecated tag available in jsdoc for documentation #12080 hasezoey
  • docs(api_split): add basic DEPRECATED output #12146 hasezoey
  • docs: various jsdoc cleanup #12140 hasezoey
  • docs(api_split.pug): add "code" to parameter name #12145 hasezoey

6.4.6

20 Jul 17:28
Compare
Choose a tag to compare

6.4.6 / 2022-07-20

  • 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

6.4.5

18 Jul 16:00
Compare
Choose a tag to compare

6.4.5 / 2022-07-18

  • fix(model+timestamps): set timestamps on subdocuments in insertMany() #12060
  • fix: correct isAtlas check #12110 skrtheboss
  • fix(types): fix various issues with auto typed schemas #12042 mohammad0-0ahmad
  • fix(types): allow any value for AddFields #12096
  • fix(types): allow arbitrary expressions for ConcatArrays #12058
  • fix(types): make $addToSet fields mutable to allow programatically constructing $addToSet #12091
  • fix(types): add $let as a possible expression to $addFields #12087 AbdelrahmanHafez
  • fix(types): fix $switch expression type #12088 AbdelrahmanHafez
  • fix(types): correct options type for syncIndexes() #12101 lpizzinidev
  • fix(types): avoid treating | undefined types as any in Require_id to better support _id: String with auto-typed schemas #12070
  • docs: fix up various jsdoc issues #12086 hasezoey
  • docs: add sanitizeFilter to mongoose.set() options #12112 pathei-kosmos

6.4.4

08 Jul 15:28
Compare
Choose a tag to compare

6.4.4 / 2022-07-08

6.4.3

05 Jul 14:54
Compare
Choose a tag to compare

6.4.3 / 2022-07-05

  • 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