-
Notifications
You must be signed in to change notification settings - Fork 895
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
Implement useEmulator for Database #3904
Conversation
🦋 Changeset detectedLatest commit: e965bbd The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 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 |
Binary Size ReportAffected SDKs
Test Logs |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have thoughts on this: https://gist.github.com/schmidt-sebastian/b84902bf402a887ee2b3bc6591a51068
This brings this repo a little close in line with Android (or does it - but it seems simpler).
Co-authored-by: Sebastian Schmidt <[email protected]>
…se-js-sdk into ss-use-emulator-database
Quoting @schmidt-sebastian from chat:
|
@Feiyang1 - Looks like we need more approvals. |
Discussion
This PR is part of a group: #3904 #3906 #3909
In order for
useEmulator()
to work theRepo
has to be changed or replaced. In Android this was easier because the database instance lazily creates theRepo
(viaensureRepo()
) but in JS theRepo
creates the database instance.In this change I move the
repo_
androot_
fields to have getters/setters so that we can track their usage and allowuseEmulator()
to replace theRepo
only if no database operations have been performed yet.Android implementation:
firebase/firebase-android-sdk#1802
This follows Proposal 2 at:
http://go/firebase-emulator-connection-api
Testing
API Changes