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

fix(aws-amplify): add DataStore export #5421

Merged
merged 7 commits into from
Apr 20, 2020

Conversation

ericclemmons
Copy link
Contributor

@ericclemmons ericclemmons commented Apr 15, 2020

With v3 (modularization) merged, there was a miss with #5202 exporting { DataStore}.

This PR corrects this so customers can use:

import { DataStore, Predicates } from "aws-amplify"

I've added test coverage for our current exports (e.g. import *) which is shockingly large.

There are clearly mistakes (e.g. a) that shouldn't be exported that we are likely unaware of.


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

@ericclemmons ericclemmons self-assigned this Apr 15, 2020
@ericclemmons ericclemmons added DataStore Related to DataStore category version-3 labels Apr 15, 2020
@@ -46,5 +46,47 @@
"@aws-amplify/storage": "^3.1.6",
"@aws-amplify/ui": "^2.0.2",
"@aws-amplify/xr": "^2.1.6"
},
"jest": {
Copy link
Contributor Author

@ericclemmons ericclemmons Apr 15, 2020

Choose a reason for hiding this comment

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

Borrowed this config from @aws-amplify/auth.

"API",
"APIClass",
"graphqlOperation",
"DataStore",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is added via a07e0ac

Copy link
Contributor

Choose a reason for hiding this comment

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

...

Copy link
Contributor

Choose a reason for hiding this comment

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

export * from '@aws-amplify/ui'; in index.ts of aws-amplify

@ericclemmons ericclemmons marked this pull request as ready for review April 15, 2020 23:22
@codecov
Copy link

codecov bot commented Apr 16, 2020

Codecov Report

Merging #5421 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5421   +/-   ##
=======================================
  Coverage   72.91%   72.91%           
=======================================
  Files         196      196           
  Lines       11490    11490           
  Branches     2240     2162   -78     
=======================================
  Hits         8378     8378           
- Misses       2942     2961   +19     
+ Partials      170      151   -19     
Impacted Files Coverage Δ
packages/auth/src/OAuth/OAuth.ts 48.12% <0.00%> (ø)
packages/core/src/Credentials.ts 31.48% <0.00%> (ø)
packages/analytics/src/Analytics.ts 66.86% <0.00%> (ø)
packages/datastore/src/sync/outbox.ts 25.00% <0.00%> (ø)
packages/datastore/src/storage/storage.ts 67.59% <0.00%> (ø)
packages/core/src/OAuthHelper/GoogleOAuth.ts 32.65% <0.00%> (ø)
packages/xr/src/Providers/SumerianProvider.ts 47.55% <0.00%> (ø)
packages/core/src/OAuthHelper/FacebookOAuth.ts 35.55% <0.00%> (ø)
packages/datastore/src/sync/processors/sync.ts 17.33% <0.00%> (ø)
...ackages/datastore/src/storage/adapter/indexeddb.ts 73.26% <0.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45ce88b...626bff9. Read the comment docs.

@ericclemmons
Copy link
Contributor Author

@manueliglesias Let me know if there are any other exports we should add from @aws-amplify/datastore.

The only ones remaining would be TypeScript types or enums, but those are directly available via @aws-amplify/datastore if needed (for now).

Copy link
Contributor

@manueliglesias manueliglesias left a comment

Choose a reason for hiding this comment

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

LGTM 👍 🎉

@ericclemmons ericclemmons merged commit 7cab470 into aws-amplify:master Apr 20, 2020
@ericclemmons ericclemmons deleted the export-datastore branch April 20, 2020 17:39
@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
DataStore Related to DataStore category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants