Skip to content

Releases: Automattic/mongoose

7.6.3

17 Oct 13:47
Compare
Choose a tag to compare

7.6.3 / 2023-10-17

  • fix(populate): handle multiple spaces when specifying paths to populate using space-delimited paths #13984 #13951
  • fix(update): avoid applying defaults on query filter when upserting with empty update #13983 #13962
  • fix(model): add versionKey to bulkWrite when inserting or upserting #13981 #13944
  • docs: fix typo in timestamps docs #13976 danielcoker

7.6.2

13 Oct 13:39
Compare
Choose a tag to compare

7.6.2 / 2023-10-13

  • perf: avoid storing a separate entry in schema subpaths for every element in an array #13953 #13874
  • fix(document): avoid triggering setter when initializing Model.prototype.collection to allow defining collection as a schema path name #13968 #13956
  • fix(model): make bulkSave() save changes in discriminator paths if calling bulkSave() on base model #13959 #13907
  • fix(document): allow calling $model() with no args for TypeScript #13963 #13878
  • fix(schema): handle embedded discriminators defined using Schema.prototype.discriminator() #13958 #13898
  • types(model): make InsertManyResult consistent with return type of insertMany #13965 #13904
  • types(models): add cleaner type definitions for insertMany() with no generics to prevent errors when using insertMany() in generic classes #13964 #13957
  • types(schematypes): allow defining map path using type: 'Map' in addition to type: Map #13960 #13755

7.6.1

09 Oct 20:37
Compare
Choose a tag to compare

7.6.1 / 2023-10-09

7.6.0

06 Oct 20:24
Compare
Choose a tag to compare

7.6.0 / 2023-10-06

7.5.4

04 Oct 21:30
Compare
Choose a tag to compare

7.5.4 / 2023-10-04

  • fix: avoid stripping out id property when _id is set #13933 #13892 #13867
  • fix(QueryCursor): avoid double-applying schema paths so you can include select: false fields with + projection using cursors #13932 #13773
  • fix(query): allow deselecting discriminator key using - syntax #13929 #13760
  • fix(query): handle $round in $expr as array #13928 #13881
  • fix(document): call pre('validate') hooks when modifying a path underneath triply nested subdoc #13912 #13876
  • fix(mongoose): correctly handle global applyPluginsToChildSchemas option #13911 #13887
  • types: add insertMany array overload with options #13931 t1bb4r
  • docs(compatibility): add Mongoose 7 support to compatibility matrix #13875
  • docs: amend some awkward FAQ wording #13925 peteboere

7.5.3

25 Sep 19:59
Compare
Choose a tag to compare

7.5.3 / 2023-09-25

  • fix(document): handle MongoDB Long when casting BigInts #13869 #13791
  • fix(model): make bulkSave() persist changes that happen in pre('save') middleware #13885 #13799
  • fix: handle casting $elemMatch underneath $not underneath another $elemMatch #13893 #13880
  • fix(model): make bulkWrite casting respect global setDefaultsOnInsert #13870 #13823
  • fix(document): handle default values for discriminator key with embedded discriminators #13891 #13835
  • fix: account for null values when assigning isNew property within document array #13883
  • types: avoid "interface can only extend object types with statically known members" error in TypeScript 4 #13871
  • docs(deprecations): fix typo in includeResultMetadata deprecation docs #13884 #13844
  • docs: fix pre element overflow in home page #13868 ghoshRitesh12

7.5.2

15 Sep 19:42
Compare
Choose a tag to compare

7.5.2 / 2023-09-15

  • fix(schema): handle number discriminator keys when using Schema.prototype.discriminator() #13858 #13788
  • fix: ignore id property when calling set() with both id and _id specified to avoid id setter overwriting #13762
  • types: pass correct document type to required and default function #13851 #13797
  • docs(model): add examples of using diffIndexes() to syncIndexes()and diffIndexes() api docs #13850 #13771

7.5.1

11 Sep 14:56
Compare
Choose a tag to compare

7.5.1 / 2023-09-11

  • fix: set default value for _update when no update object is provided and versionKey is set to false #13795 #13783 MohOraby
  • fix: avoid unexpected error when accessing null array element on discriminator array when populating #13716 ZSabakh
  • types(schematypes): use DocType for instance method this #13822 #13800 pshaddel
  • types: remove duplicated 'exists' method in Model interface in models.d.ts #13818 ohzeno
  • docs(model): replace outdated docs on deprecated findOneAndUpdate() overwrite option #13821 #13715
  • docs: add example of using virtuals.pathsToSkip option for toObject() and toJSON() #13798 RobertHunter-Pluto

7.5.0

29 Aug 20:47
Compare
Choose a tag to compare

7.5.0 / 2023-08-29

  • feat: use mongodb driver v5.18.1
  • feat: allow top level dollar keys with findOneAndUpdate(), update() for MongoDB 5 #13786
  • fix(document): make array getters avoid unintentionally modifying array, defer getters until index access instead #13774
  • feat: deprecate overwrite option for findOneAndUpdate() #13578
  • feat: add pathsToSkip option for Model.validate #13663 #10353
  • feat: support alias when declaring index #13659 #13276
  • fix(query): remove unnecessary check for atomic operators in findOneAndReplace() #13678
  • types: add SearchMeta Interface for Atlas Search #13792 mreouven
  • types(schematypes): add missing BigInt SchemaType #13787

7.4.5

25 Aug 15:15
Compare
Choose a tag to compare

7.4.5 / 2023-08-25

  • fix(debug): avoid putting virtuals and getters in debug output #13778
  • fix(model): make Model.bulkWrite() with empty array and ordered false not throw an error #13664
  • fix(document): correctly handle inclusive/exclusive projections when applying subdocument defaults #13763 #13720