Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/update mongoose deps #686

Merged
merged 5 commits into from
Dec 8, 2021
Merged

Fix/update mongoose deps #686

merged 5 commits into from
Dec 8, 2021

Conversation

MeStrak
Copy link
Contributor

@MeStrak MeStrak commented Dec 7, 2021

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

DeleteOne

  • Updated DeleteOne to use the returned deletedCount variable instead of n as the behaviour seems to have changed and n is not available.
  • It might be possible to refactor this further to use only the deleted result, as the deleted count is used to determine whether a record was deleted. However I did not make that change to avoid too many adjustments for what should be a fairly minor dependency update.

InputTypes for update functions

  • Changed these to use Partial where IType is the interface for the thing being updated. Some changes in the Mongoose type system mean that the previous InputTypes can not be used as parameters. I would appreciate a second pair of eyes to review those changes to make sure I took the right approach.

E2E tests

  • Some errors started appearing for two of the tests (app.e2e and healthcheck) due to the database connection being closed early, even though it is called in the Jest afterAll function.
  • Removed the call to close everything as it was happening prematurely and it now runs correctly.
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

  • Other information:

@MeStrak MeStrak marked this pull request as draft December 7, 2021 18:49
@MeStrak MeStrak marked this pull request as ready for review December 7, 2021 22:49
@paulhermat
Copy link
Contributor

changes look fine for me

@paulhermat paulhermat closed this Dec 8, 2021
@paulhermat paulhermat reopened this Dec 8, 2021
@paulhermat paulhermat merged commit 521533d into master Dec 8, 2021
MeStrak added a commit that referenced this pull request Dec 8, 2021
* fix(dependency maintenance): update dependency mongoose to v6

* fix(dependency maintenance): update mongoose deps

* fix: mongoose deleted count

* fix: tag partials

* test: fix early close of db connection

Co-authored-by: Renovate Bot <[email protected]> and James <MeStrak>
@sanofi-iadc-bot
Copy link
Contributor

🎉 This PR is included in version 3.1.13 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

MeStrak added a commit that referenced this pull request Dec 9, 2021
This reverts
* fix(dependency maintenance): update mongoose and typegoose deps (#686)
521533d
sanofi-iadc-bot pushed a commit that referenced this pull request Dec 9, 2021
## [3.1.15](v3.1.14...v3.1.15) (2021-12-09)

### Bug Fixes

* revert update of mongoose and typegoose deps ([a6e7f5d](a6e7f5d)), closes [#686](#686)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants