twilio-node
twilio-node copied to clipboard
Reconsider use of library q v2
Issue Summary
FYI -- In your package.json dependencies, you are using "q": "2.0.x",
You may want to check if that's really needed and consider downgrading to v1. Per the author of q, v2 is experimental and "development on v2 is dead." https://github.com/kriskowal/q/tree/v2 https://github.com/kriskowal/q/issues/852
Steps to Reproduce
n/a
Code Snippet
Exception/Log
Technical details:
- twilio-node version: Since at least 3.46 to current
- node version: n/a
Or, you know - use native promises instead. They are available, fast and easy to debug in every version of Node.js you support and are superior to Q in every way other than the helper functions (which you don't use).
- Q.denodify ->
util.promisify
- callback APIs and Q.deferred -> promisified APIs you can use directly.
And so on.
@eemt and @benjamingr Thank you for the suggestion. We will take a look at it.
This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
Related to PR#450
Seems like Q is causing prototype pollution on Promise and causing memory leaks in Jest for us. Any module that imports twilio and other modules which use Promise hang around in memory.
Closing as fixed (lastly) by https://github.com/twilio/twilio-node/pull/826
This will be included in the first release candidate for twilio-node@v4 dropping in a week.