-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add support for async collection methods #299
Add support for async collection methods #299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use *Async methods when calling DB. Other than that, it looks fine. Much apprectiated!
Once we merge this we should first move to support async functions in hooks and then move the hooks internals to use the new async functions to be ready for Meteor 3.
Cool, thnx. I've updated the PR. |
That's great @jdgjsag67251 👍 Thanks a lot! |
See #288.
Ok, so apparently Meteor just internally calls the non-async methods and wraps them in a Promise: https://github.com/meteor/meteor/blob/devel/packages/mongo/collection.js#L998.
This PR just adds tests to make sure that the hooks keep working when Meteor changes their implementation.