Releases: Automattic/mongoose
Releases · Automattic/mongoose
6.3.5
6.3.5 / 2022-05-30
- 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
6.3.4
6.3.4 / 2022-05-19
- 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()
andhint
withfindOneAndUpdate()
#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
6.3.3
6.3.3 / 2022-05-09
- 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
andreplaceOne
#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
6.3.2
6.3.2 / 2022-05-02
- 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
6.3.1
6.3.1 / 2022-04-21
- 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 mongodb@4.5 #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
6.3.0
6.3.0 / 2022-04-14
- fix: upgrade mongodb driver -> 4.5.0 #11623 AbdelrahmanHafez
- feat(schema): allow defining discriminators on schema and in schema definition #7971 IslandRhythms
- feat(base): add option to set allowDiskUse globally #11554 AbdelrahmanHafez
- feat(schema): add
removeIndex()
andclearIndex()
#11547 IslandRhythms - feat(cursor): add
continueOnError
option to allow executingeachAsync()
on all docs even if error occurs #6355 - feat(query): add
versionKey
option tolean()
for removing version key from lean docs #8934 IslandRhythms - feat(types): create new ProjectionType type for select(), find(), etc. #11437
- chore: use webpack 5 for browser build #11584 AbdelrahmanHafez
6.2.11
6.2.11 / 2022-04-13
- 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
6.2.10
6.2.10 / 2022-04-04
- fix(types): improve lastErrorObject typing for rawResults #11602 simllll
- docs(typescript): add note about deprecating extends Document #11619 AbdelrahmanHafez
- docs: consistent syntax highlighting with upgraded highlight.js #11579 AbdelrahmanHafez
6.2.9
6.2.9 / 2022-03-28
- perf(document+model): make a few small optimizations #11380
- fix(types): improve populate return type #11560 mohammad0-0ahmad
- fix(document): avoid marking paths as modified on subdocument defaults #11528
- docs(schema): add example to index
expires
option #11557 boly38 - docs(model): add change stream docs #11275
- docs(lambda): update Lambda docs for Mongoose 6 #11275
- docs(connections): add note about connecting with X509 #11333
- docs(populate): fix incorrect path name in
refPath
example #11565 chandiwalaaadhar
6.2.8
6.2.8 / 2022-03-22
- 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