Releases: Automattic/mongoose
Releases · Automattic/mongoose
8.0.1
8.0.1 / 2023-11-15
- fix: retain key order with aliases when creating indexes with alias #14042 meabed
- fix: handle nonexistent collection with diffIndexes #14029 #14010
- types(model+query): correctly remove count from TypeScript types to reflect removal of runtime support #14076 #14067 #14062
- types: correct
this
parameter for methods and statics #14028 #14027 ruxxzebre - types(model+query): unpack arrays in distinct return type #14047 #14026
- types: add missing Types.UUID typings #14023 #13103 k725
- docs: add mongoose 8 to mongodb server compatibility guide #14064
- docs: fix typo in queries.md #14065 MuhibAhmed
8.0.0
8.0.0 / 2023-10-31
- docs: add version support notes for Mongoose 8, including EOL date for Mongoose 6
8.0.0-rc0
8.0.0-rc0 / 2023-10-24
- BREAKING CHANGE: use MongoDB node driver 6, drop support for rawResult option and findOneAndRemove() #13753
- BREAKING CHANGE: apply minimize by default when updating document #13843
- BREAKING CHANGE: remove
id
setter #13784 - BREAKING CHANGE: remove overwrite option for updateOne(), findOneAndUpdate(), etc. #13989 #13578
- BREAKING CHANGE: make model.prototype.deleteOne() return query, not promise #13660 #13369
- BREAKING CHANGE: remove
Model.count()
,Query.prototype.count()
#13618 #13598 - BREAKING CHANGE: allow null values for string enum #13620 #3044
- BREAKING CHANGE: make base schema paths come before discriminator schema paths when running setters, validators, etc. #13846 #13794
- BREAKING CHANGE: make Model.validate() use Model.castObject() to cast, and return casted copy of object instead of modifying in place #13287 #12668
- BREAKING CHANGE: make internal file names all camelCase #13950 #13909 #13308
- BREAKING CHANGE: make create() wait for all documents to finish inserting or error out before throwing an error if ordered = false #13621 #4628
- BREAKING CHANGE: refactor out
mongoose/lib/mongoose.js
file to allow importing Mongoose without MongoDB driver #13905 - BREAKING CHANGE(types): allow
null
for optional fields #13901 - BREAKING CHANGE(types): infer return types types for Model.distinct and Query.distinct #13836 kaulshashank
7.6.3
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
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
7.6.1 / 2023-10-09
7.6.0
7.5.4
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
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
7.5.2 / 2023-09-15
- fix(schema): handle number discriminator keys when using Schema.prototype.discriminator() #13858 #13788
- fix: ignore
id
property when callingset()
with bothid
and_id
specified to avoidid
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