-
Notifications
You must be signed in to change notification settings - Fork 755
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
Consider removing Bluebird #438
Comments
It seems like you require bluebird only in this file https://github.com/stripe/stripe-node/blob/7abdb8913ab927bcde07f1d0b9b61ef1048b9269/lib/StripeMethod.basic.js And the rest of occurrences is in the test files. |
@OrKoN The dependency was introduced when the library needed to support Node 0.x and native ES6 promises weren't available. Now that the minimum required version is Node 4, I suppose we could remove the dependency in favor of native promises. That said, Bluebird seems to have significantly better performance than native promises (according to https://github.com/petkaantonov/bluebird/tree/master/benchmark) so this is something we'd need to consider carefully. cc @brandur-stripe @jlomas-stripe, any thoughts on this? |
@ob-stripe I think this info on bluebird's site may be outdated (results are from 2015-01-05). Alternatively, you can optionally accept a different promise implementation if someone wants to use Bluebird. |
I like this! I've prepared a patch in #439. |
@ob-stripe I am positively surprised by how fast you respond 👍 I hope the PR can be merged soon. I think this will definitely help people who use Stripe with AWS Lambda and other similar services. |
@OrKoN I've just released version 5.6.0 of the library with native ES6 promises instead of Bluebird :) Thanks for the suggestion! |
Hi,
I was wondering why do you need Bluebird as a dependency? I am packaging this module for AWS Lambda and want to optimize the size of the final bundle. Here is what I see: stripe-node takes 102 KB, bluebird requires 613 KB!
I think the library may not need such a heavy dependency. Is it possible to remove it?
The text was updated successfully, but these errors were encountered: