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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(repository): simplify ensurePromise helper #3149

Merged
merged 1 commit into from Jun 14, 2019

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Jun 13, 2019

loopback-datasource-juggler is always using native Promises, no need to wrap the promises returned by juggler APIs into another Promise instance.

This is a follow-up for loopbackio/loopback-datasource-juggler#1749 and older loopbackio/loopback-datasource-juggler#1631.

I discovered this improvement opportunity while experimenting with optimizing dependencies of @loopback/repository (loosely related to #3126).

Checklist

馃憠 Read and sign the CLA (Contributor License Agreement) 馃憟

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

馃憠 Check out how to submit a PR 馃憟

@bajtos bajtos added refactor Repository Issues related to @loopback/repository package labels Jun 13, 2019
@bajtos bajtos self-assigned this Jun 13, 2019
Copy link
Contributor

@b-admike b-admike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 馃憤 .

loopback-datasource-juggler is always using native Promises,
no need to wrap the promises returned by juggler APIs into another
Promise instance.

Signed-off-by: Miroslav Bajto拧 <mbajtoss@gmail.com>
@bajtos bajtos force-pushed the refactor/simplify-promise-check branch from 758c4e5 to 57403bf Compare June 14, 2019 06:21
@bajtos bajtos merged commit ba3f389 into master Jun 14, 2019
@delete-merged-branch delete-merged-branch bot deleted the refactor/simplify-promise-check branch June 14, 2019 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Repository Issues related to @loopback/repository package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants