Changelog
*Sourced from [mongoose's changelog](https://github.com/Automattic/mongoose/blob/master/History.md).*
> 5.4.0 / 2018-12-14
> ==================
> * feat(schematype): add `SchemaType.get()`, custom getters across all instances of a schematype [#6912](https://github-redirect.dependabot.com/Automattic/mongoose/issues/6912)
> * feat(schematype): add `SchemaType.cast()`, configure casting for individual schematypes [#7045](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7045)
> * feat(schematype): add `SchemaType.checkRequired()`, configure what values pass `required` check for a schematype [#7186](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7186) [#7150](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7150)
> * feat(model): add `Model.findOneAndReplace()` [#7162](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7162)
> * feat(model): add `Model.events` emitter that emits all `error`'s that occur with a given model [#7125](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7125)
> * feat(populate): add `count` option to populate virtuals, support returning # of populated docs instead of docs themselves [#4469](https://github-redirect.dependabot.com/Automattic/mongoose/issues/4469)
> * feat(aggregate): add `.catch()` helper to make aggregations full thenables [#7267](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7267)
> * feat(query): add hooks for `deleteOne()` and `deleteMany()` [#7195](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7195)
> * feat(document): add hooks for `updateOne()` [#7133](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7133)
> * feat(query): add `Query#map()` for synchronously transforming results before post middleware runs [#7142](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7142)
> * feat(schema): support passing an array of objects or schemas to `Schema` constructor [#7218](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7218)
> * feat(populate): add `clone` option to ensure multiple docs don't share the same populated doc [#3258](https://github-redirect.dependabot.com/Automattic/mongoose/issues/3258)
> * feat(query): add `Query#maxTimeMS()` helper [#7254](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7254)
> * fix(query): deprecate broken `Aggregate#addCursorFlag()` [#7120](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7120)
> * docs(populate): fix incorrect example [#7335](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7335) [zcfan](https://github.com/zcfan)
> * docs(middleware): add `findOneAndDelete` to middleware list [#7327](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7327) [danielkesselberg](https://github.com/danielkesselberg)
Commits
- [`f50eaca`](https://github.com/Automattic/mongoose/commit/f50eacaeac495f3565e3fe0df2ef018e13f520dc) chore: release 5.4.0
- [`bd5c04d`](https://github.com/Automattic/mongoose/commit/bd5c04dc5c0745f2f6efcd5551765c30b1bb482e) Merge pull request [#7333](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7333) from Automattic/5.4
- [`95d55f8`](https://github.com/Automattic/mongoose/commit/95d55f894c80ef62d67c964154167f92458193f2) Merge pull request [#7335](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7335) from zcfan/patch-1
- [`de48c16`](https://github.com/Automattic/mongoose/commit/de48c161732aac6610bf0add0ac5fb2a7b422e53) Fix mistake in populate documentation
- [`3a18679`](https://github.com/Automattic/mongoose/commit/3a18679a3dfcba0e9afcc2c9cc738a55947a245d) Merge pull request [#7256](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7256) from Automattic/gh7045
- [`1a0d204`](https://github.com/Automattic/mongoose/commit/1a0d2045f4c3be3575acd9c02675404400fc6664) feat: add custom caster support for Decimal128
- [`aede9d1`](https://github.com/Automattic/mongoose/commit/aede9d16374661abf0d664ca1199a391d171e7f0) test: add coverage for inheritance re: [#7045](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7045)
- [`1d12a53`](https://github.com/Automattic/mongoose/commit/1d12a5362b5f94584fd73b95b252066de9b3f8bf) feat(schema): add custom caster support for dates
- [`fbd1547`](https://github.com/Automattic/mongoose/commit/fbd1547c6aa3081917f674af33f25ad3476b6bc3) Merge branch '5.4' into gh7045
- [`0c38458`](https://github.com/Automattic/mongoose/commit/0c38458f70147207a6e41e39e11ee8f04d807646) fix: quick fix for [#7268](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7268) [#7125](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7125)
- Additional commits viewable in [compare view](https://github.com/Automattic/mongoose/compare/5.3.16...5.4.0)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Finally, you can contact us by mentioning @dependabot.
Bumps mongoose from 5.3.16 to 5.4.0.
Changelog
*Sourced from [mongoose's changelog](https://github.com/Automattic/mongoose/blob/master/History.md).* > 5.4.0 / 2018-12-14 > ================== > * feat(schematype): add `SchemaType.get()`, custom getters across all instances of a schematype [#6912](https://github-redirect.dependabot.com/Automattic/mongoose/issues/6912) > * feat(schematype): add `SchemaType.cast()`, configure casting for individual schematypes [#7045](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7045) > * feat(schematype): add `SchemaType.checkRequired()`, configure what values pass `required` check for a schematype [#7186](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7186) [#7150](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7150) > * feat(model): add `Model.findOneAndReplace()` [#7162](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7162) > * feat(model): add `Model.events` emitter that emits all `error`'s that occur with a given model [#7125](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7125) > * feat(populate): add `count` option to populate virtuals, support returning # of populated docs instead of docs themselves [#4469](https://github-redirect.dependabot.com/Automattic/mongoose/issues/4469) > * feat(aggregate): add `.catch()` helper to make aggregations full thenables [#7267](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7267) > * feat(query): add hooks for `deleteOne()` and `deleteMany()` [#7195](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7195) > * feat(document): add hooks for `updateOne()` [#7133](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7133) > * feat(query): add `Query#map()` for synchronously transforming results before post middleware runs [#7142](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7142) > * feat(schema): support passing an array of objects or schemas to `Schema` constructor [#7218](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7218) > * feat(populate): add `clone` option to ensure multiple docs don't share the same populated doc [#3258](https://github-redirect.dependabot.com/Automattic/mongoose/issues/3258) > * feat(query): add `Query#maxTimeMS()` helper [#7254](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7254) > * fix(query): deprecate broken `Aggregate#addCursorFlag()` [#7120](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7120) > * docs(populate): fix incorrect example [#7335](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7335) [zcfan](https://github.com/zcfan) > * docs(middleware): add `findOneAndDelete` to middleware list [#7327](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7327) [danielkesselberg](https://github.com/danielkesselberg)Commits
- [`f50eaca`](https://github.com/Automattic/mongoose/commit/f50eacaeac495f3565e3fe0df2ef018e13f520dc) chore: release 5.4.0 - [`bd5c04d`](https://github.com/Automattic/mongoose/commit/bd5c04dc5c0745f2f6efcd5551765c30b1bb482e) Merge pull request [#7333](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7333) from Automattic/5.4 - [`95d55f8`](https://github.com/Automattic/mongoose/commit/95d55f894c80ef62d67c964154167f92458193f2) Merge pull request [#7335](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7335) from zcfan/patch-1 - [`de48c16`](https://github.com/Automattic/mongoose/commit/de48c161732aac6610bf0add0ac5fb2a7b422e53) Fix mistake in populate documentation - [`3a18679`](https://github.com/Automattic/mongoose/commit/3a18679a3dfcba0e9afcc2c9cc738a55947a245d) Merge pull request [#7256](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7256) from Automattic/gh7045 - [`1a0d204`](https://github.com/Automattic/mongoose/commit/1a0d2045f4c3be3575acd9c02675404400fc6664) feat: add custom caster support for Decimal128 - [`aede9d1`](https://github.com/Automattic/mongoose/commit/aede9d16374661abf0d664ca1199a391d171e7f0) test: add coverage for inheritance re: [#7045](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7045) - [`1d12a53`](https://github.com/Automattic/mongoose/commit/1d12a5362b5f94584fd73b95b252066de9b3f8bf) feat(schema): add custom caster support for dates - [`fbd1547`](https://github.com/Automattic/mongoose/commit/fbd1547c6aa3081917f674af33f25ad3476b6bc3) Merge branch '5.4' into gh7045 - [`0c38458`](https://github.com/Automattic/mongoose/commit/0c38458f70147207a6e41e39e11ee8f04d807646) fix: quick fix for [#7268](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7268) [#7125](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7125) - Additional commits viewable in [compare view](https://github.com/Automattic/mongoose/compare/5.3.16...5.4.0)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) Finally, you can contact us by mentioning @dependabot.