Move level store exports to index.ts #477
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
React Native currently cannot import
MessageStoreLevel
,DataStoreLevel
, orEventLogLevel
, as they are in a named export called./stores
.React Native currently does not support named exports (but it is coming in a future update), so we have to manually import those classes from the
dist/esm/src/index-stores
directory. Example: decentralized-identity/web5-wallet#52 (comment)This is not ideal, but really causes issues when other packages use the
./stores
import. For example, in @frankhinek's agent refactor PR, we're using the/stores
named export here: https://github.com/TBD54566975/web5-js/pull/168/files#r1298468034. React Native is not able to do this, causing the@web5/agent
package to also be incompatible with React Native.We have a couple of options here:
MessageStoreLevel
,DataStoreLevel
, andEventLogLevel
exports back into the primarydwn-sdk-js
package (what this PR is doing).Perhaps there are more options than this, and I'd be open to other suggestions!