Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

[WIP] Update Mongoose #1816

Closed
wants to merge 2 commits into from
Closed

Conversation

simison
Copy link
Member

@simison simison commented Jul 13, 2017

Just work in progress branch of mine which currently has several things I was testing and learning around updating Mongoose from 4.10 to 4.11. I got the app working, but tests are still failing.

I might get back to this at some point, but meanwhile if anyone else wants to take a stab at updating Mongoose, feel free to look at this.

  • Passing user/pass in connection's options throws deprecated warning so I removed it, I saw an issue where it was mentioned they might add it back but I lost it. Gotta double check.

  • Using new mongoose connection logic by setting: useMongoClient:true

  • Above will make everything into promises so I'm using those in several places instead of callbacks, but I didn't spend too much time in refactoring. I think the whole thing could do with proper rewrite.

  • I'm using mongooseService.loadModels()'s callback everywhere but this probably isn't needed, I was just trying to get rid of errors with tests.

  • Running tests throws "Schema not defined" errors so here are some solutions I was testing

  • Rename mongoose variables to mongooseService so that it's obvious its not referring to mongoose module but our own internal service.

Read more; #1814

@mleanos
Copy link
Member

mleanos commented Jul 14, 2017

@simison Any particular reason for the other package dependency upgrades in package.json?

I'm planning on spending some time on this, and agree that we could use a re-write of our mongoose service.

@simison
Copy link
Member Author

simison commented Jul 14, 2017

@mleanos nope, I should actually remove that commit from here and open a PR for it.

If you can take over this would be aaaawesome!

@mleanos
Copy link
Member

mleanos commented Jul 14, 2017

If you can take over this would be aaaawesome!

That was my intention. Do keep an eye on it though. I'll probably need some guidance/review from you at some point 😸

@simison
Copy link
Member Author

simison commented Jul 14, 2017

Sure 👍 just ping me when there's something to check, I'll be busy at a hackathon over the weekend but I can check over something if need.

@simison
Copy link
Member Author

simison commented Jul 17, 2017

Closing as duplicate of #1818

Thanks @mleanos !

@simison simison marked this as a duplicate of #1818 Jul 17, 2017
@simison simison closed this Jul 17, 2017
mleanos added a commit to mleanos/mean that referenced this pull request Jul 26, 2017
Upgrades Mongoose to 4.11.1

Updates Mongoose connection implementation to accommodate deprecated
features & connection options.

Also, updates the Gulp Mocha tasks to reflect changes to the Mongoose
implementation.

Fixes tests to get the database from the existing Mongoose singleton.

Derives from changes in meanjs#1816

Closes meanjs#1814
mleanos added a commit that referenced this pull request Jul 27, 2017
Upgrades Mongoose to 4.11.1

Updates Mongoose connection implementation to accommodate deprecated
features & connection options.

Also, updates the Gulp Mocha tasks to reflect changes to the Mongoose
implementation.

Fixes tests to get the database from the existing Mongoose singleton.

Derives from changes in #1816

Closes #1814
cicorias pushed a commit to JavaScriptExpert/mean that referenced this pull request Sep 12, 2017
Upgrades Mongoose to 4.11.1

Updates Mongoose connection implementation to accommodate deprecated
features & connection options.

Also, updates the Gulp Mocha tasks to reflect changes to the Mongoose
implementation.

Fixes tests to get the database from the existing Mongoose singleton.

Derives from changes in meanjs#1816

Closes meanjs#1814
lupinthethirdgentleman pushed a commit to lupinthethirdgentleman/mean-dashboard that referenced this pull request Aug 5, 2021
Upgrades Mongoose to 4.11.1

Updates Mongoose connection implementation to accommodate deprecated
features & connection options.

Also, updates the Gulp Mocha tasks to reflect changes to the Mongoose
implementation.

Fixes tests to get the database from the existing Mongoose singleton.

Derives from changes in meanjs/mean#1816

Closes meanjs/mean#1814
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants