-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deps): update mongoose to v6.0.13, update mongoose dependencies …
…likewise (#3093) * fix(deps): bump mongoose from 5.13.5 to 6.0.12 Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.13.5 to 6.0.12. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md) - [Commits](Automattic/mongoose@5.13.5...6.0.12) --- updated-dependencies: - dependency-name: mongoose dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fix(deps): update connect-mongo to v4.6.0 * chore(dev-deps): update @types/mongodb to v4.0.7 * fix(FormModel): update schema validators to 6.x syntax * fix(config): use ConnectOptions type declaration from mongoose@6 * fix(agency): correct types to use mongoose@6 types * fix(config): remove unsupported options (now default) see https://mongoosejs.com/docs/migrating_to_6.html#no-more-deprecation-warning-options * fix: misc type errors due to mongoose@6 * chore(deps): add mongodb dependency * fix(UserModel): update schema to fit new syntax and MongoServerError * fix(MyInfoModel): use Mixed type instead of undocumented Object type * fix: add typecasts to get around excessively deep TS error * fix(FormLogicModel): add typecast for schema Schema.Types.Mixed * fix(agency): further update types * fix(packages): update bson-ext to v4.0.2, and mongoose to v6.0.13 * fix: update mongodb-memory-server-core to 8.0.2 required since bson-ext won't work with old memory core versions * fix(tests): update instantiation of test db * fix(tests): update mongoose toEqual matchers to toMatchObject matchers somewhere along the way mongoose changed the shape of their returned objects, causing toEqual match to fail even if they serialize to the same string. * fix(e2e): correctly return promise of mongoose.createConnection v6 change * fix(FormModel): move esrvcId schema prop to be above status Mongoose now saves objects with keys in the order the keys are specified in the schema, not in the user-defined object. * fix(spcp.service.spec): remove unused dbhandler * feat: remove mockingoose package was underutilitized and broke during mongoose v6 migration, so deleting it * fix(test): fix failing tests due to immutable create field mongoose v6 sets the createdAt value to be immutable. See https://mongoosejs.com/docs/migrating_to_6.html#immutable-createdat * fix(test): remaining toEqual -> toMatchObject matcher changes * fix(test): replace esrvcId values with more obvious values * fix(test): freeze date in example related tests fixes issue where expect.anything() is not matching with whatever mongoose object is returning... * fix(test): remove flakeyness of returned examples by sorting in result * fix: update package-lock for snyk reported vulns * fix(deps): update mongodb-memory-server-core to 8.0.4 * fix: ignore excessively deep type-instantiation ts type error lots of issues on mongoose repo which seems semi related but not really related, ignoring for now till we overhaul the types mongoose uses * fix: assign table column discrim before setting field discrim Mongoose now saves objects with keys in the order the keys are specified in the schema, meaning the table column discriminator would not have been applied at the time the table field was assigned as a discriminator to the form's form fields. This resulted in a bug where table columns did not have a discriminated schema causing uncaught errors to be thrown when a table field was submitted, such as "UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'selectedValidation' of undefined" as the field did not contain the necessary discriminated column schema props due to not being assigned prior to assigning the TableFieldSchema discriminator. See https://mongoosejs.com/docs/migrating_to_6.html#schema-defined-document-key-order * test: add success test case for submissions containing table fields this broke in mongoose v6 upgrade before being fixed, adding a test to ensure that this does not break in the future Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
861f3e8
commit d5ada10
Showing
59 changed files
with
991 additions
and
1,511 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.