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

Rewrite: Added mongoose 4 / 5 compatibility #25

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Root-Core
Copy link

Hello there,

i've achieved to adapt Tungus to work with newer mongoose incarnations as discussed in #15 , which ended in a full rewrite.
This has been tested in a bigger project and works pretty good on Windows and Linux.

The support of mongoose 3 has been dropped though (as I've never tested it with this rewrite / the API changed a lot on mongooses side AND the support has ended a while ago).


The current state of TingoDB works well in our bigger project. There might be some use cases, that need modifications to the TingoDB API, but in the most cases it does the job.

One thing needs to be patched in the TingoDB:
sergeyksv/tingodb#159

If it gets rejected, we could build a thin layer to wrap the returned object or you can just use my branch of TingoDB in your package.json.


About the implementation:

It is kind of future proof, as it overrides all high level connection functions. This prevents connections to the MongoDB early and effective, also it is more independent form changes made in higher level functions. It suppresses some warnings, that do not apply to the TingoDB.

Also it mimics the mongoose mongodb-native-drivers behavior as closely as possible while staying true to the high level approach. This will hopefully make updates on mongoose work, without adaption.

It was tested in "real life" on Windows 7 / 10 on x64 and Debian Linux on ARMv7.
Some things got fixed in order to work properly on Windows (symlinks etc.).


Feedback is welcome.
Regards, root-core.

Root-Core and others added 11 commits February 16, 2018 00:35
Make use of native object ids
Added some TODOs
Adapted (non promise) example

Updated README.md
Added promise based example to README.md
Enabled syntax highlighting in README.md
package.json:
* Updated dependencies
* Extended contributors
* Added self reference
* Increased version

Added package-lock.json (as recommended since NPM 5)
Added compatibility with mongoose 5.
Improved compatibility with mongoose 4.
mongoose 3 is untested and not supported.
- Added example for global path
- Pointed out the drop-in replacemant capability
- Added mongoose 5
- Corrected current ObjectID defaults
@dlecan
Copy link

dlecan commented May 9, 2018

Is it possible to review this PR, as I need Tingo and Mongoose together? Do you need help?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants