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

Export patchPromise function to allow capturing third-party promises (e.g. Bluebird) #40

Merged
merged 2 commits into from
Jul 6, 2018

Conversation

MaximusHaximus
Copy link
Contributor

Exposes patchPromise() as a property of of capturePromise(), patchPromiseImpl()

This allows me to use this method to capture promises from third party promise libraries (e.g. Bluebird) without having to duplicate this logic into our codebase. We need this exposed because we use Bluebird promises throughout our system, including the promises returned by the AWS SDK by way of calling aws.config.setPromisesDependency().

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…omiseImpl() to allow capturing promises from third party promise libraries (e.g. Bluebird)
@haotianw465
Copy link
Contributor

I'm fine with exposing the actual patching code. But since we already have capturePromise() where the word Promise refers to native promise, could the method has a name like patchThenable or patchThirdPartyPromise to indicate the expected function input?

@MaximusHaximus
Copy link
Contributor Author

@haotianw465 Renamed to patchThirdPartyPromise per your suggestion

@lewisf
Copy link

lewisf commented Jun 24, 2018

@haotianw465 any updates on this?

@haotianw465 haotianw465 merged commit 6a739be into aws:master Jul 6, 2018
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

Successfully merging this pull request may close these issues.

3 participants