-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Deprecate callback API #246
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
Comments
You are talking about the verify api right? |
Yes. |
Citing from #111 (comment)
|
Agreed, this would clear up much confusion 👍 |
@jfromaniello is this project alive? There's loads of open issues that look like easy fixes. |
If this were done, there would be no option that would avoid an error being thrown against a valid use of the |
@uniqname: That's a good point, a We can consider this for a next major version, there are a lot of smaller breaking changes already planned for a coming version, but imo, if it is synchronous in the implementation, it makes sense to remove the async. |
An alternative would of course be to let the asynchronous calls use https://github.com/ronomon/crypto-async, but would be an extra dependency... |
Another point of view: At the moment, this package might not take advantage of the benefits with asynchronous operations, but if it will start to do that in the future, then all of us who are using the asynchronous functions from the API now can benefit from those changes without making any changes to our own code. But if that will/can never happen, then it's better to just use the synchronous functions from the API. |
Callers can just use Promise.resolve if they don't know if an API will become asynchronous |
Since v8.3.0 See: #480 |
The discussion has been made on #111
As said in the iconic blog post by isaac:
You are providing an async API that is not actually async and is therefor misleading. I therefor think it should be deprecated and removed from the docs.
The text was updated successfully, but these errors were encountered: