comedy icon indicating copy to clipboard operation
comedy copied to clipboard

Suggestion: drop bluebird and leverage async/await

Open rijnhard opened this issue 4 years ago • 3 comments

This is probably the least important issue but figured we can discuss it anyway.

All the current stable versions of node and browsers support promises and bluebird is not a dependency that libraries should ship with if it can be avoided.

the codebase itself could really benefit from cleanup and a switch to native promises and async/await.

I don't see this adding much value other than decreasing the likelihood of silly errors like https://github.com/untu/comedy/pull/62 and general code legibility (promises with callbacks tend to be less legible in most circumstances than the equivalent async/await).

P.S. I am aware that not ALL promise usages should be transferred to async/await, especially for concurrency but most of the functions tend to be step by step inside anyway.

rijnhard avatar Feb 18 '21 15:02 rijnhard

Thank you, @rijnhard , that's a good idea I think!

weekens avatar Feb 24 '21 09:02 weekens

@weekens if I have time after hours I can help with this migration

islomkhodja avatar Feb 03 '22 16:02 islomkhodja

@Islomkhodja You could try to! But this is not an easy task at all :)

weekens avatar Feb 04 '22 08:02 weekens