Rewrite: Added mongoose 4 / 5 compatibility#25
Open
Root-Core wants to merge 11 commits intosergeyksv:masterfrom
Open
Rewrite: Added mongoose 4 / 5 compatibility#25Root-Core wants to merge 11 commits intosergeyksv:masterfrom
Root-Core wants to merge 11 commits intosergeyksv:masterfrom
Conversation
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
|
Is it possible to review this PR, as I need Tingo and Mongoose together? Do you need help? Thank you |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.