Releases: Automattic/mongoose
Releases · Automattic/mongoose
8.0.4
8.0.4 / 2024-01-08
- fix(update): set CastError path to full path if casting update fails #14161 #14114
- fix: cast error when there is an elemMatch in the and clause #14171 tosaka-n
- fix: allow defining index on base model that applies to all discriminators #14176 peplin
- fix(model): deep clone bulkWrite() updateOne arguments to avoid mutating documents in update #14197 #14164
- fix(populate): handle deselecting _id with array of fields in populate() #14242 #14231
- types(model+query): use stricter typings for updateX(), replaceOne(),deleteX() Model functions #14228 #14204
- types: fix return types for findByIdAndDelete overrides #14196 #14190
- types(schema): add missing omit() method #14235 amitbeck
- types(model): add missing strict property to bulkWrite() top level options #14239
- docs(compatibility): add note that Mongoose 5.13 is fully compatible with MongoDB server 5 #14230 #14149
- docs: add shared schemas guide #14211
- docs: update TLS/SSL guide for Mongoose v8 - MongoDB v6 driver deprecations #14170 andylwelch
- docs: update findOneAndUpdate tutorial to use includeResultMetadata #14208 #14207
- docs: clarify disabling _id on subdocs #14195 #14194
8.0.3
8.0.3 / 2023-12-07
- fix(schema): avoid creating unnecessary clone of schematype in nested array so nested document arrays use correct constructor #14128 #14101
- docs(connections): add example of registering connection event handlers #14150
- docs(populate): add example of using
refPath
andref
functions #14133 #13834 - types: handle using BigInt global class in schema definitions #14160 #14147
- types: make findOneAndDelete() without options return result doc, not ModifyResult #14153 #14130
- types(model): add no-generic override for insertMany() with options #14152 #13999
- types: add missing Type for applyDefaults #14159 jaypea
8.0.2
8.0.2 / 2023-11-28
- fix(populate): set populated docs in correct order when populating virtual underneath doc array with justOne #14105
- fix(populate): fix curPath to update appropriately #14099 #14098 csy1204
- types: make property names show up in intellisense for UpdateQuery #14123 #14090
- types(document): correct return type for doc.deleteOne() re: Mongoose 8 breaking change #14110 #14081
- types: correct types for when includeResultMetadata: true is set #14078
- types(models): allow specifying timestamps as inline option for bulkWrite() operations #14112 #14072
- docs: fix rendering of 7.x server compatibility #14086 laupow
- docs(source/api): fix "index.js" -> "mongoose.js" rename #14125
- docs(README): update breaking change version #14126
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