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

Recommend native promises? #805

Open
benjamingr opened this issue Mar 22, 2017 · 3 comments
Open

Recommend native promises? #805

benjamingr opened this issue Mar 22, 2017 · 3 comments

Comments

@benjamingr
Copy link
Collaborator

Given native promises have been up since 2013 I think it would make sense to recommend them over Q with migration notes.

I wouldn't mind writing a package similar to https://github.com/benjamingr/bluebird-api/ for Q if you'd like?

@jbunton-atlassian
Copy link
Collaborator

It seems like it would be at least worth mentioning native promises in the README. Personally I wouldn't recommend them over Q though.

In my apps I do global.Promise = q.Promise so that I can use the improved debugging features, primarily long stack traces. I also use extensively use some Q APIs like nfcall which have no equivalent to the native promises.

@benjamingr
Copy link
Collaborator Author

@jbunton-atlassian Node has way better stack traces with async stack traces support in debugging and better unhandled rejection detection, and nfcall can be easily imported independently (or better - something like promisifyAll).

@jbunton-atlassian
Copy link
Collaborator

I'm not a fan of promisifyAll, I've seen it break with a semver compatible upgrade when libraries add new methods. But of course you're right that nfcall and friends are easily replaceable.

I'm interested in getting better stack traces for the builtin Node promises. Is this some hidden Node flag, or an npm module that does some magic? In particular can they pass this test ?

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

No branches or pull requests

2 participants