-
Notifications
You must be signed in to change notification settings - Fork 894
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
Remove dependency on @react-native-async-storage/async-storage #7570
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: 4c64fa2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Changeset File Check ✅
|
Size Report 1Affected Products
Test Logs |
DellaBitta
reviewed
Aug 17, 2023
prameshj
reviewed
Aug 17, 2023
Size Analysis Report 1This report is too large (128,016 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
hsubox76
commented
Aug 18, 2023
I added it back as an optional peerDependency using peerDependenciesMeta and updated the description. Edit: Tested it using npm and yarn and got no warnings. |
hsubox76
requested review from
a team,
lisajian,
renkelvin and
sam-gc
as code owners
August 18, 2023 19:23
lahirumaramba
approved these changes
Aug 21, 2023
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See #7522
In 10.0.0 we added
@react-native-async-storage/async-storage
as a dependency to make things more convenient for React Native users, enabling us to automatically include it as a persistence method for auth. Unfortunately this causes a number of warnings and unexpected issues for non-React Native users. We cannot give the React Native bundle a separate set of dependencies without making a separate NPM package for it. The best compromise is to set the dependency list in a way that works for the majority of users, and document how React Native users can provide an AsyncStorage import to enable auth state persistence.So this involves 2 steps:
peerDependency
, usingpeerDependenciesMeta
to flag it as optional. This will prevent warnings in the latest versions of all major package installers, including npm, yarn, and pnpm.persistence
option. The warning will only appear to users of the RN bundle, and will go away if they provide apersistence
option toinitializeAuth()
.This will break RN users who have already converted to using
getAuth()
with version 10, but since that release was only a month ago, the sooner we get this out, the sooner we can catch any other users before they convert over. Also, the currentgetAuth()
users should get the prominent warning.Testing
Manually tested in RN using Expo - it shows the warning when expected - note the warning is in the terminal and doesn't pop up nicely in the simulator toast.
Manually tested npm and yarn installs - warning is gone.