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(data): update datastore-storage-adapter subpaths #12801 #13083

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

david-mcafee
Copy link
Member

@david-mcafee david-mcafee commented Mar 5, 2024

Description of changes

fix(data): update datastore-storage-adapter subpaths

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

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

@david-mcafee david-mcafee requested review from a team as code owners March 5, 2024 04:22
@david-mcafee david-mcafee requested a review from a team March 5, 2024 04:22
Copy link

github-actions bot commented Mar 5, 2024

⚠️ This PR includes manual changes to the "aws-amplify" package.json file, which can have library-wide implications.

Please ensure that this PR:

  • Does not modify "@aws-amplify/*" dependency versions, which may misalign core dependencies across the library.

A repository administrator is required to review & merge this change.

@david-mcafee david-mcafee linked an issue Mar 5, 2024 that may be closed by this pull request
3 tasks
@david-mcafee david-mcafee self-assigned this Mar 5, 2024
@david-mcafee david-mcafee added the DataStore Related to DataStore category label Mar 5, 2024
@david-mcafee david-mcafee changed the title fix(data): update datastore-storage-adapter subpaths fix(data): update datastore-storage-adapter subpaths #12801 Mar 5, 2024
stocaaro
stocaaro previously approved these changes Mar 5, 2024
svidgen
svidgen previously approved these changes Mar 5, 2024
iartemiev
iartemiev previously approved these changes Mar 5, 2024
@@ -53,6 +53,12 @@
"require": "./dist/cjs/datastore/index.js",
"react-native": "./src/datastore/index.ts"
},
"./datastore-storage-adapter": {
Copy link
Contributor

@jimblanc jimblanc Mar 5, 2024

Choose a reason for hiding this comment

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

I'm a bit confused by this, datastore-storage-adapter isn't a dependency of aws-amplify so why are we vending a new export path for it? Is this related to the xml2js change? Will this change how customers need to use datastore-storage-adapter? Blocking PR just to be safe as this will change the export surface of the library.

@david-mcafee david-mcafee dismissed stale reviews from iartemiev, svidgen, and stocaaro via 3183f43 March 5, 2024 21:51
Copy link
Contributor

@jimblanc jimblanc left a comment

Choose a reason for hiding this comment

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

We also need to add the new shim files to your files list in the package.json for them to get distributed to NPM. I'd recommend testing in Verdaccio with React + RN to make sure all the import paths are usable.

Storage example: https://github.com/aws-amplify/amplify-js/blob/main/packages/storage/package.json#L61

@@ -43,5 +43,13 @@
"react-native-sqlite-storage": "5.0.0",
"sqlite3": "^5.0.2",
"typescript": "5.0.2"
},
"exports": {
".": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing the RN entry point looks like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataStore Related to DataStore category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken import for datastore-storage-adapter on fresh Expo RN app
5 participants