Automattic/mongoose
### [`v5.5.13`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5513--2019-06-05)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.12...5.5.13)
===================
- fix(model): support passing deleteOne options [#7860](https://togithub.com/Automattic/mongoose/issues/7860) [#7857](https://togithub.com/Automattic/mongoose/issues/7857) [Fonger](https://togithub.com/Fonger)
- fix(update): run setters on array elements when doing $addToSet, $push, etc [#4185](https://togithub.com/Automattic/mongoose/issues/4185)
- fix(model): support getting discriminator by value when creating a new model [#7851](https://togithub.com/Automattic/mongoose/issues/7851)
- docs(transactions): add section about the `withTransaction()` helper [#7598](https://togithub.com/Automattic/mongoose/issues/7598)
- docs(schema): clarify relationship between Schema#static() and Schema#statics [#7827](https://togithub.com/Automattic/mongoose/issues/7827)
- docs(model): fix typo `projetion` to `projection` [#7868](https://togithub.com/Automattic/mongoose/issues/7868) [dfdeagle47](https://togithub.com/dfdeagle47)
- docs(schema): correct schema options lists [#7828](https://togithub.com/Automattic/mongoose/issues/7828)
### [`v5.5.12`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5512--2019-05-31)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.11...5.5.12)
===================
- fix(document): fix unexpected error when loading a document with a nested property named `schema` [#7831](https://togithub.com/Automattic/mongoose/issues/7831)
- fix(model): skip applying static hooks by default if static name conflicts with query middleware (re: mongoose-delete plugin) [#7790](https://togithub.com/Automattic/mongoose/issues/7790)
- fix(query): apply schema-level projections to the result of `findOneAndReplace()` [#7654](https://togithub.com/Automattic/mongoose/issues/7654)
- fix: upgrade mongodb driver -> 3.2.6
- docs(tutorials): add findOneAndUpdate() tutorial [#7847](https://togithub.com/Automattic/mongoose/issues/7847)
- docs(validation): add `updateOne()` and `updateMany()` to list of update validator operations [#7845](https://togithub.com/Automattic/mongoose/issues/7845)
- docs(model): make sure options lists in `update()` API line up [#7842](https://togithub.com/Automattic/mongoose/issues/7842)
### [`v5.5.11`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5511--2019-05-23)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.10...5.5.11)
===================
- fix(discriminator): allow numeric discriminator keys for embedded discriminators [#7808](https://togithub.com/Automattic/mongoose/issues/7808)
- chore: add Node.js 12 to travis build matrix [#7784](https://togithub.com/Automattic/mongoose/issues/7784)
### [`v5.5.10`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5510--2019-05-20)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.9...5.5.10)
===================
- fix(discriminator): allow user-defined discriminator path in schema [#7807](https://togithub.com/Automattic/mongoose/issues/7807)
- fix(query): ensure `findOneAndReplace()` sends `replacement` to server [#7654](https://togithub.com/Automattic/mongoose/issues/7654)
- fix(cast): allow `[]` as a value when casting `$nin` [#7806](https://togithub.com/Automattic/mongoose/issues/7806)
- docs(model): clarify that setters do run on `update()` by default [#7801](https://togithub.com/Automattic/mongoose/issues/7801)
- docs: fix typo in FAQ [#7821](https://togithub.com/Automattic/mongoose/issues/7821) [jaona](https://togithub.com/jaona)
### [`v5.5.9`](https://togithub.com/Automattic/mongoose/blob/master/History.md#559--2019-05-16)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.8...5.5.9)
==================
- fix(query): skip schema setters when casting $regexp $options [#7802](https://togithub.com/Automattic/mongoose/issues/7802) [Fonger](https://togithub.com/Fonger)
- fix(populate): don't skip populating doc array properties whose name conflicts with an array method [#7782](https://togithub.com/Automattic/mongoose/issues/7782)
- fix(populate): make populated virtual return undefined if not populated [#7795](https://togithub.com/Automattic/mongoose/issues/7795)
- fix(schema): handle custom setters in arrays of document arrays [#7804](https://togithub.com/Automattic/mongoose/issues/7804) [Fonger](https://togithub.com/Fonger)
- docs(tutorials): add query casting tutorial [#7789](https://togithub.com/Automattic/mongoose/issues/7789)
### [`v5.5.8`](https://togithub.com/Automattic/mongoose/blob/master/History.md#558--2019-05-13)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.7...5.5.8)
==================
- fix(document): run pre save hooks on nested child schemas [#7792](https://togithub.com/Automattic/mongoose/issues/7792)
- fix(model): set $session() before validation middleware for bulkWrite/insertMany [#7785](https://togithub.com/Automattic/mongoose/issues/7785) [#7769](https://togithub.com/Automattic/mongoose/issues/7769) [Fonger](https://togithub.com/Fonger)
- fix(query): make `getPopulatedPaths()` return deeply populated paths [#7757](https://togithub.com/Automattic/mongoose/issues/7757)
- fix(query): suppress findAndModify deprecation warning when using `Model.findOneAndUpdate()` [#7794](https://togithub.com/Automattic/mongoose/issues/7794)
- fix: upgrade mongodb -> 3.2.4 [#7794](https://togithub.com/Automattic/mongoose/issues/7794)
- fix(document): handle a couple edge cases with atomics that happen when schema defines an array property named 'undefined' [#7756](https://togithub.com/Automattic/mongoose/issues/7756)
- docs(discriminator): correct function parameters [#7786](https://togithub.com/Automattic/mongoose/issues/7786) [gfpacheco](https://togithub.com/gfpacheco)
### [`v5.5.7`](https://togithub.com/Automattic/mongoose/blob/master/History.md#557--2019-05-09)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.6...5.5.7)
==================
- fix(model): set $session() before pre save middleware runs when calling save() with options [#7742](https://togithub.com/Automattic/mongoose/issues/7742)
- fix(model): set $session before pre remove hooks run when calling remove() with options [#7742](https://togithub.com/Automattic/mongoose/issues/7742)
- fix(schema): support `remove()` on nested path [#2398](https://togithub.com/Automattic/mongoose/issues/2398)
- fix(map): handle setting populated map element to doc [#7745](https://togithub.com/Automattic/mongoose/issues/7745)
- fix(query): return rawResult when inserting with options `{new:false,upsert:true,rawResult:true}` [#7774](https://togithub.com/Automattic/mongoose/issues/7774) [#7770](https://togithub.com/Automattic/mongoose/issues/7770) [LiaanM](https://togithub.com/LiaanM)
- fix(schematype): remove internal `validators` option because it conflicts with Backbone [#7720](https://togithub.com/Automattic/mongoose/issues/7720)
### [`v5.5.6`](https://togithub.com/Automattic/mongoose/blob/master/History.md#556--2019-05-06)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.5...5.5.6)
==================
- fix(document): stop converting arrays to objects when setting non-schema path to array with strict: false [#7733](https://togithub.com/Automattic/mongoose/issues/7733)
- fix(array): make two Mongoose arrays `assert.deepEqual()` each other if they have the same values [#7700](https://togithub.com/Automattic/mongoose/issues/7700)
- fix(populate): support populating a path in a document array embedded in an array [#7647](https://togithub.com/Automattic/mongoose/issues/7647)
- fix(populate): set populate virtual count to 0 if local field is empty [#7731](https://togithub.com/Automattic/mongoose/issues/7731)
- fix(update): avoid throwing cast error if casting array filter that isn't in schema with strictQuery = false [#7728](https://togithub.com/Automattic/mongoose/issues/7728)
- docs: fix typo in `distinct()` description [#7767](https://togithub.com/Automattic/mongoose/issues/7767) [phil-r](https://togithub.com/phil-r)
### [`v5.5.5`](https://togithub.com/Automattic/mongoose/blob/master/History.md#555--2019-04-30)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.4...5.5.5)
==================
- fix(document): ensure nested properties within single nested subdocs get set correctly when overwriting single nested subdoc [#7748](https://togithub.com/Automattic/mongoose/issues/7748)
- fix(document): skip non-object `validators` in schema types [#7720](https://togithub.com/Automattic/mongoose/issues/7720)
- fix: bump mongodb driver -> 3.2.3 [#7752](https://togithub.com/Automattic/mongoose/issues/7752)
- fix(map): disallow setting map key with special properties [#7750](https://togithub.com/Automattic/mongoose/issues/7750) [Fonger](https://togithub.com/Fonger)
### [`v5.5.4`](https://togithub.com/Automattic/mongoose/blob/master/History.md#554--2019-04-25)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.3...5.5.4)
==================
- fix(document): avoid calling custom getters when saving [#7719](https://togithub.com/Automattic/mongoose/issues/7719)
- fix(timestamps): handle child schema timestamps correctly when reusing child schemas [#7712](https://togithub.com/Automattic/mongoose/issues/7712)
- fix(query): pass correct callback for \_legacyFindAndModify [#7736](https://togithub.com/Automattic/mongoose/issues/7736) [Fonger](https://togithub.com/Fonger)
- fix(model+query): allow setting `replacement` parameter for `findOneAndReplace()` [#7654](https://togithub.com/Automattic/mongoose/issues/7654)
- fix(map): make `delete()` unset the key in the database [#7746](https://togithub.com/Automattic/mongoose/issues/7746) [Fonger](https://togithub.com/Fonger)
- fix(array): use symbol for `_schema` property to avoid confusing deep equality checks [#7700](https://togithub.com/Automattic/mongoose/issues/7700)
- fix(document): prevent `depopulate()` from removing fields with empty array [#7741](https://togithub.com/Automattic/mongoose/issues/7741) [#7740](https://togithub.com/Automattic/mongoose/issues/7740) [Fonger](https://togithub.com/Fonger)
- fix: make `MongooseArray#includes` support ObjectIds [#7732](https://togithub.com/Automattic/mongoose/issues/7732) [#6354](https://togithub.com/Automattic/mongoose/issues/6354) [hansemannn](https://togithub.com/hansemannn)
- fix(document): report correct validation error index when pushing onto doc array [#7744](https://togithub.com/Automattic/mongoose/issues/7744) [Fonger](https://togithub.com/Fonger)
### [`v5.5.3`](https://togithub.com/Automattic/mongoose/blob/master/History.md#553--2019-04-22)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.2...5.5.3)
==================
- fix: add findAndModify deprecation warning that references the useFindAndModify option [#7644](https://togithub.com/Automattic/mongoose/issues/7644)
- fix(document): handle pushing a doc onto a discriminator that contains a doc array [#7704](https://togithub.com/Automattic/mongoose/issues/7704)
- fix(update): run setters on array elements when doing $set [#7679](https://togithub.com/Automattic/mongoose/issues/7679)
- fix: correct usage of arguments while buffering commands [#7718](https://togithub.com/Automattic/mongoose/issues/7718) [rzymek](https://togithub.com/rzymek)
- fix(document): avoid error clearing modified subpaths if doc not defined [#7715](https://togithub.com/Automattic/mongoose/issues/7715) [bitflower](https://togithub.com/bitflower)
- refactor(array): move `_parent` property behind a symbol [#7726](https://togithub.com/Automattic/mongoose/issues/7726) [#7700](https://togithub.com/Automattic/mongoose/issues/7700)
- docs(model): list out all operations and options for `bulkWrite()` [#7055](https://togithub.com/Automattic/mongoose/issues/7055)
- docs(aggregate): use `eachAsync()` instead of nonexistent `each()` [#7699](https://togithub.com/Automattic/mongoose/issues/7699)
- docs(validation): add CastError validation example [#7514](https://togithub.com/Automattic/mongoose/issues/7514)
- docs(query+model): list out all options and callback details for Model.updateX() and Query#updateX() [#7646](https://togithub.com/Automattic/mongoose/issues/7646)
### [`v5.5.2`](https://togithub.com/Automattic/mongoose/blob/master/History.md#552--2019-04-16)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.1...5.5.2)
==================
- fix(document): support setting nested path to non-POJO object [#7639](https://togithub.com/Automattic/mongoose/issues/7639)
- perf(connection): remove leaked event handler in `Model.init()` so `deleteModel()` frees all memory [#7682](https://togithub.com/Automattic/mongoose/issues/7682)
- fix(timestamps): handle custom statics that conflict with built-in functions (like mongoose-delete plugin) [#7698](https://togithub.com/Automattic/mongoose/issues/7698)
- fix(populate): make `Document#populated()` work for populated subdocs [#7685](https://togithub.com/Automattic/mongoose/issues/7685)
- fix(document): support `.set()` on document array underneath embedded discriminator path [#7656](https://togithub.com/Automattic/mongoose/issues/7656)
### [`v5.5.1`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5513--2019-06-05)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.0...5.5.1)
===================
- fix(model): support passing deleteOne options [#7860](https://togithub.com/Automattic/mongoose/issues/7860) [#7857](https://togithub.com/Automattic/mongoose/issues/7857) [Fonger](https://togithub.com/Fonger)
- fix(update): run setters on array elements when doing $addToSet, $push, etc [#4185](https://togithub.com/Automattic/mongoose/issues/4185)
- fix(model): support getting discriminator by value when creating a new model [#7851](https://togithub.com/Automattic/mongoose/issues/7851)
- docs(transactions): add section about the `withTransaction()` helper [#7598](https://togithub.com/Automattic/mongoose/issues/7598)
- docs(schema): clarify relationship between Schema#static() and Schema#statics [#7827](https://togithub.com/Automattic/mongoose/issues/7827)
- docs(model): fix typo `projetion` to `projection` [#7868](https://togithub.com/Automattic/mongoose/issues/7868) [dfdeagle47](https://togithub.com/dfdeagle47)
- docs(schema): correct schema options lists [#7828](https://togithub.com/Automattic/mongoose/issues/7828)
### [`v5.5.0`](https://togithub.com/Automattic/mongoose/blob/master/History.md#550--2019-04-08)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.4.23...5.5.0)
==================
- feat(model): support applying hooks to custom static functions [#5982](https://togithub.com/Automattic/mongoose/issues/5982)
- feat(populate): support specifying a function as `match` [#7397](https://togithub.com/Automattic/mongoose/issues/7397)
- perf(buffer): avoid calling `defineProperties()` in Buffer constructor [#7331](https://togithub.com/Automattic/mongoose/issues/7331)
- feat(connection): add `plugin()` for connection-scoped plugins [#7378](https://togithub.com/Automattic/mongoose/issues/7378)
- feat(model): add Model#deleteOne() and corresponding hooks [#7538](https://togithub.com/Automattic/mongoose/issues/7538)
- feat(query): support hooks for `Query#distinct()` [#5938](https://togithub.com/Automattic/mongoose/issues/5938)
- feat(model): print warning when calling create() incorrectly with a session [#7535](https://togithub.com/Automattic/mongoose/issues/7535)
- feat(document): add Document#isEmpty() and corresponding helpers for nested paths [#5369](https://togithub.com/Automattic/mongoose/issues/5369)
- feat(document): add `getters` option to Document#get() [#7233](https://togithub.com/Automattic/mongoose/issues/7233)
- feat(query): add Query#projection() to get or overwrite the current projection [#7384](https://togithub.com/Automattic/mongoose/issues/7384)
- fix(document): set full validator path on validatorProperties if `propsParameter` set on validator [#7447](https://togithub.com/Automattic/mongoose/issues/7447)
- feat(document): add Document#directModifiedPaths() [#7373](https://togithub.com/Automattic/mongoose/issues/7373)
- feat(document): add $locals property [#7691](https://togithub.com/Automattic/mongoose/issues/7691)
- feat(document): add validateUpdatedOnly option that only validates modified paths in `save()` [#7492](https://togithub.com/Automattic/mongoose/issues/7492) [captaincaius](https://togithub.com/captaincaius)
- chore: upgrade MongoDB driver to v3.2.0 [#7641](https://togithub.com/Automattic/mongoose/issues/7641)
- fix(schematype): deprecate `isAsync` option for custom validators [#6700](https://togithub.com/Automattic/mongoose/issues/6700)
- chore(mongoose): deprecate global.MONGOOSE_DRIVER_PATH so we can be webpack-warning-free in 6.0 [#7501](https://togithub.com/Automattic/mongoose/issues/7501)
### [`v5.4.23`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5423--2019-04-08)
[Compare Source](https://togithub.com/Automattic/mongoose/compare/5.4.22...5.4.23)
===================
- fix(document): report cast error when string path in schema is an array in MongoDB [#7619](https://togithub.com/Automattic/mongoose/issues/7619)
- fix(query): set deletedCount on result of remove() [#7629](https://togithub.com/Automattic/mongoose/issues/7629)
- docs(subdocs): add note about parent() and ownerDocument() to subdocument docs [#7576](https://togithub.com/Automattic/mongoose/issues/7576)
Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".
:no_bell: Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Renovate Bot. View repository job log here.
This PR contains the following updates:
5.4.22
->5.5.13
Release Notes
Automattic/mongoose
### [`v5.5.13`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5513--2019-06-05) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.12...5.5.13) =================== - fix(model): support passing deleteOne options [#7860](https://togithub.com/Automattic/mongoose/issues/7860) [#7857](https://togithub.com/Automattic/mongoose/issues/7857) [Fonger](https://togithub.com/Fonger) - fix(update): run setters on array elements when doing $addToSet, $push, etc [#4185](https://togithub.com/Automattic/mongoose/issues/4185) - fix(model): support getting discriminator by value when creating a new model [#7851](https://togithub.com/Automattic/mongoose/issues/7851) - docs(transactions): add section about the `withTransaction()` helper [#7598](https://togithub.com/Automattic/mongoose/issues/7598) - docs(schema): clarify relationship between Schema#static() and Schema#statics [#7827](https://togithub.com/Automattic/mongoose/issues/7827) - docs(model): fix typo `projetion` to `projection` [#7868](https://togithub.com/Automattic/mongoose/issues/7868) [dfdeagle47](https://togithub.com/dfdeagle47) - docs(schema): correct schema options lists [#7828](https://togithub.com/Automattic/mongoose/issues/7828) ### [`v5.5.12`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5512--2019-05-31) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.11...5.5.12) =================== - fix(document): fix unexpected error when loading a document with a nested property named `schema` [#7831](https://togithub.com/Automattic/mongoose/issues/7831) - fix(model): skip applying static hooks by default if static name conflicts with query middleware (re: mongoose-delete plugin) [#7790](https://togithub.com/Automattic/mongoose/issues/7790) - fix(query): apply schema-level projections to the result of `findOneAndReplace()` [#7654](https://togithub.com/Automattic/mongoose/issues/7654) - fix: upgrade mongodb driver -> 3.2.6 - docs(tutorials): add findOneAndUpdate() tutorial [#7847](https://togithub.com/Automattic/mongoose/issues/7847) - docs(validation): add `updateOne()` and `updateMany()` to list of update validator operations [#7845](https://togithub.com/Automattic/mongoose/issues/7845) - docs(model): make sure options lists in `update()` API line up [#7842](https://togithub.com/Automattic/mongoose/issues/7842) ### [`v5.5.11`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5511--2019-05-23) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.10...5.5.11) =================== - fix(discriminator): allow numeric discriminator keys for embedded discriminators [#7808](https://togithub.com/Automattic/mongoose/issues/7808) - chore: add Node.js 12 to travis build matrix [#7784](https://togithub.com/Automattic/mongoose/issues/7784) ### [`v5.5.10`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5510--2019-05-20) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.9...5.5.10) =================== - fix(discriminator): allow user-defined discriminator path in schema [#7807](https://togithub.com/Automattic/mongoose/issues/7807) - fix(query): ensure `findOneAndReplace()` sends `replacement` to server [#7654](https://togithub.com/Automattic/mongoose/issues/7654) - fix(cast): allow `[]` as a value when casting `$nin` [#7806](https://togithub.com/Automattic/mongoose/issues/7806) - docs(model): clarify that setters do run on `update()` by default [#7801](https://togithub.com/Automattic/mongoose/issues/7801) - docs: fix typo in FAQ [#7821](https://togithub.com/Automattic/mongoose/issues/7821) [jaona](https://togithub.com/jaona) ### [`v5.5.9`](https://togithub.com/Automattic/mongoose/blob/master/History.md#559--2019-05-16) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.8...5.5.9) ================== - fix(query): skip schema setters when casting $regexp $options [#7802](https://togithub.com/Automattic/mongoose/issues/7802) [Fonger](https://togithub.com/Fonger) - fix(populate): don't skip populating doc array properties whose name conflicts with an array method [#7782](https://togithub.com/Automattic/mongoose/issues/7782) - fix(populate): make populated virtual return undefined if not populated [#7795](https://togithub.com/Automattic/mongoose/issues/7795) - fix(schema): handle custom setters in arrays of document arrays [#7804](https://togithub.com/Automattic/mongoose/issues/7804) [Fonger](https://togithub.com/Fonger) - docs(tutorials): add query casting tutorial [#7789](https://togithub.com/Automattic/mongoose/issues/7789) ### [`v5.5.8`](https://togithub.com/Automattic/mongoose/blob/master/History.md#558--2019-05-13) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.7...5.5.8) ================== - fix(document): run pre save hooks on nested child schemas [#7792](https://togithub.com/Automattic/mongoose/issues/7792) - fix(model): set $session() before validation middleware for bulkWrite/insertMany [#7785](https://togithub.com/Automattic/mongoose/issues/7785) [#7769](https://togithub.com/Automattic/mongoose/issues/7769) [Fonger](https://togithub.com/Fonger) - fix(query): make `getPopulatedPaths()` return deeply populated paths [#7757](https://togithub.com/Automattic/mongoose/issues/7757) - fix(query): suppress findAndModify deprecation warning when using `Model.findOneAndUpdate()` [#7794](https://togithub.com/Automattic/mongoose/issues/7794) - fix: upgrade mongodb -> 3.2.4 [#7794](https://togithub.com/Automattic/mongoose/issues/7794) - fix(document): handle a couple edge cases with atomics that happen when schema defines an array property named 'undefined' [#7756](https://togithub.com/Automattic/mongoose/issues/7756) - docs(discriminator): correct function parameters [#7786](https://togithub.com/Automattic/mongoose/issues/7786) [gfpacheco](https://togithub.com/gfpacheco) ### [`v5.5.7`](https://togithub.com/Automattic/mongoose/blob/master/History.md#557--2019-05-09) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.6...5.5.7) ================== - fix(model): set $session() before pre save middleware runs when calling save() with options [#7742](https://togithub.com/Automattic/mongoose/issues/7742) - fix(model): set $session before pre remove hooks run when calling remove() with options [#7742](https://togithub.com/Automattic/mongoose/issues/7742) - fix(schema): support `remove()` on nested path [#2398](https://togithub.com/Automattic/mongoose/issues/2398) - fix(map): handle setting populated map element to doc [#7745](https://togithub.com/Automattic/mongoose/issues/7745) - fix(query): return rawResult when inserting with options `{new:false,upsert:true,rawResult:true}` [#7774](https://togithub.com/Automattic/mongoose/issues/7774) [#7770](https://togithub.com/Automattic/mongoose/issues/7770) [LiaanM](https://togithub.com/LiaanM) - fix(schematype): remove internal `validators` option because it conflicts with Backbone [#7720](https://togithub.com/Automattic/mongoose/issues/7720) ### [`v5.5.6`](https://togithub.com/Automattic/mongoose/blob/master/History.md#556--2019-05-06) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.5...5.5.6) ================== - fix(document): stop converting arrays to objects when setting non-schema path to array with strict: false [#7733](https://togithub.com/Automattic/mongoose/issues/7733) - fix(array): make two Mongoose arrays `assert.deepEqual()` each other if they have the same values [#7700](https://togithub.com/Automattic/mongoose/issues/7700) - fix(populate): support populating a path in a document array embedded in an array [#7647](https://togithub.com/Automattic/mongoose/issues/7647) - fix(populate): set populate virtual count to 0 if local field is empty [#7731](https://togithub.com/Automattic/mongoose/issues/7731) - fix(update): avoid throwing cast error if casting array filter that isn't in schema with strictQuery = false [#7728](https://togithub.com/Automattic/mongoose/issues/7728) - docs: fix typo in `distinct()` description [#7767](https://togithub.com/Automattic/mongoose/issues/7767) [phil-r](https://togithub.com/phil-r) ### [`v5.5.5`](https://togithub.com/Automattic/mongoose/blob/master/History.md#555--2019-04-30) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.4...5.5.5) ================== - fix(document): ensure nested properties within single nested subdocs get set correctly when overwriting single nested subdoc [#7748](https://togithub.com/Automattic/mongoose/issues/7748) - fix(document): skip non-object `validators` in schema types [#7720](https://togithub.com/Automattic/mongoose/issues/7720) - fix: bump mongodb driver -> 3.2.3 [#7752](https://togithub.com/Automattic/mongoose/issues/7752) - fix(map): disallow setting map key with special properties [#7750](https://togithub.com/Automattic/mongoose/issues/7750) [Fonger](https://togithub.com/Fonger) ### [`v5.5.4`](https://togithub.com/Automattic/mongoose/blob/master/History.md#554--2019-04-25) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.3...5.5.4) ================== - fix(document): avoid calling custom getters when saving [#7719](https://togithub.com/Automattic/mongoose/issues/7719) - fix(timestamps): handle child schema timestamps correctly when reusing child schemas [#7712](https://togithub.com/Automattic/mongoose/issues/7712) - fix(query): pass correct callback for \_legacyFindAndModify [#7736](https://togithub.com/Automattic/mongoose/issues/7736) [Fonger](https://togithub.com/Fonger) - fix(model+query): allow setting `replacement` parameter for `findOneAndReplace()` [#7654](https://togithub.com/Automattic/mongoose/issues/7654) - fix(map): make `delete()` unset the key in the database [#7746](https://togithub.com/Automattic/mongoose/issues/7746) [Fonger](https://togithub.com/Fonger) - fix(array): use symbol for `_schema` property to avoid confusing deep equality checks [#7700](https://togithub.com/Automattic/mongoose/issues/7700) - fix(document): prevent `depopulate()` from removing fields with empty array [#7741](https://togithub.com/Automattic/mongoose/issues/7741) [#7740](https://togithub.com/Automattic/mongoose/issues/7740) [Fonger](https://togithub.com/Fonger) - fix: make `MongooseArray#includes` support ObjectIds [#7732](https://togithub.com/Automattic/mongoose/issues/7732) [#6354](https://togithub.com/Automattic/mongoose/issues/6354) [hansemannn](https://togithub.com/hansemannn) - fix(document): report correct validation error index when pushing onto doc array [#7744](https://togithub.com/Automattic/mongoose/issues/7744) [Fonger](https://togithub.com/Fonger) ### [`v5.5.3`](https://togithub.com/Automattic/mongoose/blob/master/History.md#553--2019-04-22) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.2...5.5.3) ================== - fix: add findAndModify deprecation warning that references the useFindAndModify option [#7644](https://togithub.com/Automattic/mongoose/issues/7644) - fix(document): handle pushing a doc onto a discriminator that contains a doc array [#7704](https://togithub.com/Automattic/mongoose/issues/7704) - fix(update): run setters on array elements when doing $set [#7679](https://togithub.com/Automattic/mongoose/issues/7679) - fix: correct usage of arguments while buffering commands [#7718](https://togithub.com/Automattic/mongoose/issues/7718) [rzymek](https://togithub.com/rzymek) - fix(document): avoid error clearing modified subpaths if doc not defined [#7715](https://togithub.com/Automattic/mongoose/issues/7715) [bitflower](https://togithub.com/bitflower) - refactor(array): move `_parent` property behind a symbol [#7726](https://togithub.com/Automattic/mongoose/issues/7726) [#7700](https://togithub.com/Automattic/mongoose/issues/7700) - docs(model): list out all operations and options for `bulkWrite()` [#7055](https://togithub.com/Automattic/mongoose/issues/7055) - docs(aggregate): use `eachAsync()` instead of nonexistent `each()` [#7699](https://togithub.com/Automattic/mongoose/issues/7699) - docs(validation): add CastError validation example [#7514](https://togithub.com/Automattic/mongoose/issues/7514) - docs(query+model): list out all options and callback details for Model.updateX() and Query#updateX() [#7646](https://togithub.com/Automattic/mongoose/issues/7646) ### [`v5.5.2`](https://togithub.com/Automattic/mongoose/blob/master/History.md#552--2019-04-16) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.1...5.5.2) ================== - fix(document): support setting nested path to non-POJO object [#7639](https://togithub.com/Automattic/mongoose/issues/7639) - perf(connection): remove leaked event handler in `Model.init()` so `deleteModel()` frees all memory [#7682](https://togithub.com/Automattic/mongoose/issues/7682) - fix(timestamps): handle custom statics that conflict with built-in functions (like mongoose-delete plugin) [#7698](https://togithub.com/Automattic/mongoose/issues/7698) - fix(populate): make `Document#populated()` work for populated subdocs [#7685](https://togithub.com/Automattic/mongoose/issues/7685) - fix(document): support `.set()` on document array underneath embedded discriminator path [#7656](https://togithub.com/Automattic/mongoose/issues/7656) ### [`v5.5.1`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5513--2019-06-05) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.5.0...5.5.1) =================== - fix(model): support passing deleteOne options [#7860](https://togithub.com/Automattic/mongoose/issues/7860) [#7857](https://togithub.com/Automattic/mongoose/issues/7857) [Fonger](https://togithub.com/Fonger) - fix(update): run setters on array elements when doing $addToSet, $push, etc [#4185](https://togithub.com/Automattic/mongoose/issues/4185) - fix(model): support getting discriminator by value when creating a new model [#7851](https://togithub.com/Automattic/mongoose/issues/7851) - docs(transactions): add section about the `withTransaction()` helper [#7598](https://togithub.com/Automattic/mongoose/issues/7598) - docs(schema): clarify relationship between Schema#static() and Schema#statics [#7827](https://togithub.com/Automattic/mongoose/issues/7827) - docs(model): fix typo `projetion` to `projection` [#7868](https://togithub.com/Automattic/mongoose/issues/7868) [dfdeagle47](https://togithub.com/dfdeagle47) - docs(schema): correct schema options lists [#7828](https://togithub.com/Automattic/mongoose/issues/7828) ### [`v5.5.0`](https://togithub.com/Automattic/mongoose/blob/master/History.md#550--2019-04-08) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.4.23...5.5.0) ================== - feat(model): support applying hooks to custom static functions [#5982](https://togithub.com/Automattic/mongoose/issues/5982) - feat(populate): support specifying a function as `match` [#7397](https://togithub.com/Automattic/mongoose/issues/7397) - perf(buffer): avoid calling `defineProperties()` in Buffer constructor [#7331](https://togithub.com/Automattic/mongoose/issues/7331) - feat(connection): add `plugin()` for connection-scoped plugins [#7378](https://togithub.com/Automattic/mongoose/issues/7378) - feat(model): add Model#deleteOne() and corresponding hooks [#7538](https://togithub.com/Automattic/mongoose/issues/7538) - feat(query): support hooks for `Query#distinct()` [#5938](https://togithub.com/Automattic/mongoose/issues/5938) - feat(model): print warning when calling create() incorrectly with a session [#7535](https://togithub.com/Automattic/mongoose/issues/7535) - feat(document): add Document#isEmpty() and corresponding helpers for nested paths [#5369](https://togithub.com/Automattic/mongoose/issues/5369) - feat(document): add `getters` option to Document#get() [#7233](https://togithub.com/Automattic/mongoose/issues/7233) - feat(query): add Query#projection() to get or overwrite the current projection [#7384](https://togithub.com/Automattic/mongoose/issues/7384) - fix(document): set full validator path on validatorProperties if `propsParameter` set on validator [#7447](https://togithub.com/Automattic/mongoose/issues/7447) - feat(document): add Document#directModifiedPaths() [#7373](https://togithub.com/Automattic/mongoose/issues/7373) - feat(document): add $locals property [#7691](https://togithub.com/Automattic/mongoose/issues/7691) - feat(document): add validateUpdatedOnly option that only validates modified paths in `save()` [#7492](https://togithub.com/Automattic/mongoose/issues/7492) [captaincaius](https://togithub.com/captaincaius) - chore: upgrade MongoDB driver to v3.2.0 [#7641](https://togithub.com/Automattic/mongoose/issues/7641) - fix(schematype): deprecate `isAsync` option for custom validators [#6700](https://togithub.com/Automattic/mongoose/issues/6700) - chore(mongoose): deprecate global.MONGOOSE_DRIVER_PATH so we can be webpack-warning-free in 6.0 [#7501](https://togithub.com/Automattic/mongoose/issues/7501) ### [`v5.4.23`](https://togithub.com/Automattic/mongoose/blob/master/History.md#5423--2019-04-08) [Compare Source](https://togithub.com/Automattic/mongoose/compare/5.4.22...5.4.23) =================== - fix(document): report cast error when string path in schema is an array in MongoDB [#7619](https://togithub.com/Automattic/mongoose/issues/7619) - fix(query): set deletedCount on result of remove() [#7629](https://togithub.com/Automattic/mongoose/issues/7629) - docs(subdocs): add note about parent() and ownerDocument() to subdocument docs [#7576](https://togithub.com/Automattic/mongoose/issues/7576)Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "
rebase!
".:no_bell: Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot. View repository job log here.