Skip to content

Allow using native promises? #27

Open

Description

@MichalCz

Hi,

First of all: I really like the way you wrote this bridge - I was on my way of writing the same thing on my own so this is seriously cool to see. :)

I see that your code depends on bluebird - which is quite heavy when compared to native promises. It has the upshot of being available anywhere, but perhaps you'd consider moving to native promises with some polyfill like any-promise and add bluebird as optional dependency?

I would be happy to help.

Activity

  1. JYone3A commented on Apr 9, 2019

    @JYone3A

    +1

  2. munro commented on Apr 10, 2019

    @munro
    Member

    I would be happy to help.

    @mickdekkers yessss that would be awesome!

  3. huan commented on Apr 10, 2019

    @huan
    Collaborator

    Thanks for the suggestion!

    A pull request that could demo how to improve this issue will be welcome. Please feel free to submit solutions so that we could be able to start a discussion based on that.

  4. MichalCz commented on Apr 18, 2019

    @MichalCz
    Author

    Hey. I tried a little but I'd need to dig in a bit more to make this work - the issue is in the use of two Bluebird methods try and finally (the latter is available in node v10). I don't want to add any polyfills as a dependency so I'll need to drill deeper into the issue...

    ...and I don't know when I'd find some time...

  5. added a commit that references this issue on Apr 24, 2019
    356e4c8
  6. munro commented on Apr 24, 2019

    @munro
    Member

    @MichalCz I was able to remove bluebird in #28—which yea removes removes/changes some functionally (especially the .catch(...) semantics). I'm ok with that since I personally use async/await, and then the default behavior will be the built in Promise, which makes sense, because then people can wrap it with bluebird or whatever if they choose to.

    The remaining work is to

    • update the readme to reflect the changes (some of the examples will no longer work)
      • and since they have to be updated I think it make sense to show async/await now!
    • make sure all the readme examples are defined as tests
    • make sure all the tests pass!

    I'm about to sign off for tonight, but any help would be greatly appreciated :D

  7. MichalCz commented on Apr 24, 2019

    @MichalCz
    Author

    @munro I'll check that out. :)

  8. munro commented on Feb 5, 2021

    @munro
    Member

    image

    Just got some expert insight on how to better handle this transition 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions