Changelog
*Sourced from [mongoose's changelog](https://github.com/Automattic/mongoose/blob/master/History.md).*
> 5.5.1 / 2019-04-11
> ==================
> * fix(document): correctly overwrite all properties when setting a single nested subdoc [#7660](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7660) [#7681](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7681)
> * fix(array): allow customization of array required validator [#7696](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7696) [freewil](https://github.com/freewil)
> * fix(discriminator): handle embedded discriminators when casting array defaults [#7687](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7687)
> * fix(collection): ensure collection functions return a promise even if disconnected [#7676](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7676)
> * fix(schematype): avoid indexing properties with `{ unique: false, index: false }` [#7620](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7620)
> * fix(aggregate): make `Aggregate#model()` with no arguments return the aggregation's model [#7608](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7608)
>
> 5.5.0 / 2019-04-08
> ==================
> * feat(model): support applying hooks to custom static functions [#5982](https://github-redirect.dependabot.com/Automattic/mongoose/issues/5982)
> * feat(populate): support specifying a function as `match` [#7397](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7397)
> * perf(buffer): avoid calling `defineProperties()` in Buffer constructor [#7331](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7331)
> * feat(connection): add `plugin()` for connection-scoped plugins [#7378](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7378)
> * feat(model): add Model#deleteOne() and corresponding hooks [#7538](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7538)
> * feat(query): support hooks for `Query#distinct()` [#5938](https://github-redirect.dependabot.com/Automattic/mongoose/issues/5938)
> * feat(model): print warning when calling create() incorrectly with a session [#7535](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7535)
> * feat(document): add Document#isEmpty() and corresponding helpers for nested paths [#5369](https://github-redirect.dependabot.com/Automattic/mongoose/issues/5369)
> * feat(document): add `getters` option to Document#get() [#7233](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7233)
> feat(query): add Query#projection() to get or overwrite the current projection [#7384](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7384)
> * fix(document): set full validator path on validatorProperties if `propsParameter` set on validator [#7447](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7447)
> * feat(document): add Document#directModifiedPaths() [#7373](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7373)
> * feat(document): add $locals property [#7691](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7691)
> * feat(document): add validateUpdatedOnly option that only validates modified paths in `save()` [#7492](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7492) [captaincaius](https://github.com/captaincaius)
> * chore: upgrade MongoDB driver to v3.2.0 [#7641](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7641)
> * fix(schematype): deprecate `isAsync` option for custom validators [#6700](https://github-redirect.dependabot.com/Automattic/mongoose/issues/6700)
> * chore(mongoose): deprecate global.MONGOOSE_DRIVER_PATH so we can be webpack-warning-free in 6.0 [#7501](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7501)
>
> 5.4.23 / 2019-04-08
> ===================
> * fix(document): report cast error when string path in schema is an array in MongoDB [#7619](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7619)
> * fix(query): set deletedCount on result of remove() [#7629](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7629)
> * docs(subdocs): add note about parent() and ownerDocument() to subdocument docs [#7576](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7576)
>
> 5.4.22 / 2019-04-04
> ===================
> * fix(aggregate): allow modifying options in pre('aggregate') hook [#7606](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7606)
> * fix(map): correctly init maps of maps when loading from MongoDB [#7630](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7630)
> * docs(model+query): add `omitUndefined` option to docs for updateX() and findOneAndX() [#3486](https://github-redirect.dependabot.com/Automattic/mongoose/issues/3486)
> * docs: removed duplicate Query.prototype.merge() reference from doc [#7684](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7684) [shihabmridha](https://github.com/shihabmridha)
> * docs(schema): fix shardKey type to object instead of bool [#7668](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7668) [kyletsang](https://github.com/kyletsang)
> * docs(api): fix `Model.prototypedelete` link [#7665](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7665) [pixcai](https://github.com/pixcai)
>
> 5.4.21 / 2019-04-02
> ===================
> * fix(updateValidators): run update validators correctly on Decimal128 paths [#7561](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7561)
> * fix(update): cast array filters in nested doc arrays correctly [#7603](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7603)
> * fix(document): allow .get() + .set() with aliased paths [#7592](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7592)
> * fix(document): ensure custom getters on single nested subdocs don't get persisted if toObject.getters = true [#7601](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7601)
> ... (truncated)
Commits
- [`98352db`](https://github.com/Automattic/mongoose/commit/98352db458f2f309f09fa3db2bc07c4c0160789f) chore: release 5.5.1
- [`2d3c4e5`](https://github.com/Automattic/mongoose/commit/2d3c4e51da3dcafdf9466d8cd196e24c429e1ada) fix(schematype): avoid indexing properties with `{ unique: false, index: fals...
- [`2a5c214`](https://github.com/Automattic/mongoose/commit/2a5c214850c06322d810cc504be74938fe6cbf6c) test(schematype): repro [#7620](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7620)
- [`3ac55ee`](https://github.com/Automattic/mongoose/commit/3ac55eeb77aeb107eab93deaaf56cacc1a7095c3) Merge pull request [#7696](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7696) from hellodigit/checkrequired-array
- [`dd43ef7`](https://github.com/Automattic/mongoose/commit/dd43ef7d5aebf3d4d86659805064bee820340ac5) style: fix lint
- [`0ea126d`](https://github.com/Automattic/mongoose/commit/0ea126d4d77d75420bdde73535f83c53a32f55ee) fix(aggregate): make `Aggregate#model()` with no arguments return the aggrega...
- [`5106455`](https://github.com/Automattic/mongoose/commit/51064559bb564cd4908f4a9f52c8f3f5c923a844) test(aggregate): repro [#7608](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7608)
- [`8c6032d`](https://github.com/Automattic/mongoose/commit/8c6032d94087cfdc72adb77176a6087fdb3d89e4) test: fix tests re: [#7687](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7687)
- [`fd91c2f`](https://github.com/Automattic/mongoose/commit/fd91c2fd7be68440c1e4b7326b120d05f84cd6bb) fix(discriminator): handle embedded discriminators when casting array defaults
- [`aeb0327`](https://github.com/Automattic/mongoose/commit/aeb0327fdcaace6b7f3e7a73510abec95034e907) test(discriminator): repro [#7687](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7687)
- Additional commits viewable in [compare view](https://github.com/Automattic/mongoose/compare/5.4.16...5.5.1)
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 squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@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.4.16 to 5.5.1.
Changelog
*Sourced from [mongoose's changelog](https://github.com/Automattic/mongoose/blob/master/History.md).* > 5.5.1 / 2019-04-11 > ================== > * fix(document): correctly overwrite all properties when setting a single nested subdoc [#7660](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7660) [#7681](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7681) > * fix(array): allow customization of array required validator [#7696](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7696) [freewil](https://github.com/freewil) > * fix(discriminator): handle embedded discriminators when casting array defaults [#7687](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7687) > * fix(collection): ensure collection functions return a promise even if disconnected [#7676](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7676) > * fix(schematype): avoid indexing properties with `{ unique: false, index: false }` [#7620](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7620) > * fix(aggregate): make `Aggregate#model()` with no arguments return the aggregation's model [#7608](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7608) > > 5.5.0 / 2019-04-08 > ================== > * feat(model): support applying hooks to custom static functions [#5982](https://github-redirect.dependabot.com/Automattic/mongoose/issues/5982) > * feat(populate): support specifying a function as `match` [#7397](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7397) > * perf(buffer): avoid calling `defineProperties()` in Buffer constructor [#7331](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7331) > * feat(connection): add `plugin()` for connection-scoped plugins [#7378](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7378) > * feat(model): add Model#deleteOne() and corresponding hooks [#7538](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7538) > * feat(query): support hooks for `Query#distinct()` [#5938](https://github-redirect.dependabot.com/Automattic/mongoose/issues/5938) > * feat(model): print warning when calling create() incorrectly with a session [#7535](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7535) > * feat(document): add Document#isEmpty() and corresponding helpers for nested paths [#5369](https://github-redirect.dependabot.com/Automattic/mongoose/issues/5369) > * feat(document): add `getters` option to Document#get() [#7233](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7233) > feat(query): add Query#projection() to get or overwrite the current projection [#7384](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7384) > * fix(document): set full validator path on validatorProperties if `propsParameter` set on validator [#7447](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7447) > * feat(document): add Document#directModifiedPaths() [#7373](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7373) > * feat(document): add $locals property [#7691](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7691) > * feat(document): add validateUpdatedOnly option that only validates modified paths in `save()` [#7492](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7492) [captaincaius](https://github.com/captaincaius) > * chore: upgrade MongoDB driver to v3.2.0 [#7641](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7641) > * fix(schematype): deprecate `isAsync` option for custom validators [#6700](https://github-redirect.dependabot.com/Automattic/mongoose/issues/6700) > * chore(mongoose): deprecate global.MONGOOSE_DRIVER_PATH so we can be webpack-warning-free in 6.0 [#7501](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7501) > > 5.4.23 / 2019-04-08 > =================== > * fix(document): report cast error when string path in schema is an array in MongoDB [#7619](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7619) > * fix(query): set deletedCount on result of remove() [#7629](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7629) > * docs(subdocs): add note about parent() and ownerDocument() to subdocument docs [#7576](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7576) > > 5.4.22 / 2019-04-04 > =================== > * fix(aggregate): allow modifying options in pre('aggregate') hook [#7606](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7606) > * fix(map): correctly init maps of maps when loading from MongoDB [#7630](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7630) > * docs(model+query): add `omitUndefined` option to docs for updateX() and findOneAndX() [#3486](https://github-redirect.dependabot.com/Automattic/mongoose/issues/3486) > * docs: removed duplicate Query.prototype.merge() reference from doc [#7684](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7684) [shihabmridha](https://github.com/shihabmridha) > * docs(schema): fix shardKey type to object instead of bool [#7668](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7668) [kyletsang](https://github.com/kyletsang) > * docs(api): fix `Model.prototypedelete` link [#7665](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7665) [pixcai](https://github.com/pixcai) > > 5.4.21 / 2019-04-02 > =================== > * fix(updateValidators): run update validators correctly on Decimal128 paths [#7561](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7561) > * fix(update): cast array filters in nested doc arrays correctly [#7603](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7603) > * fix(document): allow .get() + .set() with aliased paths [#7592](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7592) > * fix(document): ensure custom getters on single nested subdocs don't get persisted if toObject.getters = true [#7601](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7601) > ... (truncated)Commits
- [`98352db`](https://github.com/Automattic/mongoose/commit/98352db458f2f309f09fa3db2bc07c4c0160789f) chore: release 5.5.1 - [`2d3c4e5`](https://github.com/Automattic/mongoose/commit/2d3c4e51da3dcafdf9466d8cd196e24c429e1ada) fix(schematype): avoid indexing properties with `{ unique: false, index: fals... - [`2a5c214`](https://github.com/Automattic/mongoose/commit/2a5c214850c06322d810cc504be74938fe6cbf6c) test(schematype): repro [#7620](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7620) - [`3ac55ee`](https://github.com/Automattic/mongoose/commit/3ac55eeb77aeb107eab93deaaf56cacc1a7095c3) Merge pull request [#7696](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7696) from hellodigit/checkrequired-array - [`dd43ef7`](https://github.com/Automattic/mongoose/commit/dd43ef7d5aebf3d4d86659805064bee820340ac5) style: fix lint - [`0ea126d`](https://github.com/Automattic/mongoose/commit/0ea126d4d77d75420bdde73535f83c53a32f55ee) fix(aggregate): make `Aggregate#model()` with no arguments return the aggrega... - [`5106455`](https://github.com/Automattic/mongoose/commit/51064559bb564cd4908f4a9f52c8f3f5c923a844) test(aggregate): repro [#7608](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7608) - [`8c6032d`](https://github.com/Automattic/mongoose/commit/8c6032d94087cfdc72adb77176a6087fdb3d89e4) test: fix tests re: [#7687](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7687) - [`fd91c2f`](https://github.com/Automattic/mongoose/commit/fd91c2fd7be68440c1e4b7326b120d05f84cd6bb) fix(discriminator): handle embedded discriminators when casting array defaults - [`aeb0327`](https://github.com/Automattic/mongoose/commit/aeb0327fdcaace6b7f3e7a73510abec95034e907) test(discriminator): repro [#7687](https://github-redirect.dependabot.com/Automattic/mongoose/issues/7687) - Additional commits viewable in [compare view](https://github.com/Automattic/mongoose/compare/5.4.16...5.5.1)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 squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@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.