Skip to content

Implement useAuthEmulator and remove auth.useEmulator. #4414

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

Merged
merged 7 commits into from
Feb 4, 2021

Conversation

yuchenshi
Copy link
Member

Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:

Discussion

(Discussed internally)

Testing

All tests are just moved to a new file and then I changed auth.useEmulator(...) to useAuthEmulator(auth, ...). No changes in behavior.

API Changes

This removes the auth.useEmulator(...) non-modular API and adds useAuthEmulator(auth, ...) modular API, as discussed internally. I'd appreciate we merge this PR ASAP to minimize impact. I can clean up the logic in a follow up PR.

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2021

⚠️ No Changeset found

Latest commit: 858c9a5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

use(sinonChai);
use(chaiAsPromised);

describe('core/auth/emulator', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

All tests moved from auth_impl.ts. No changes except API.

url: string,
options?: { disableWarnings: boolean }
): void {
const authInternal = _castAuth(auth);
Copy link
Member Author

Choose a reason for hiding this comment

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

Logic below moved from auth_impl.ts with s/this/authInternal/g.

emitEmulatorWarning(!!options?.disableWarnings);
}

function emitEmulatorWarning(disableBanner: boolean): void {
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved verbatim.

Copy link
Contributor

@sam-gc sam-gc left a comment

Choose a reason for hiding this comment

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

Accidentally used my test account there before

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 4, 2021

Binary Size Report

Affected SDKs

No changes between base commit (0eeefe2) and head commit (7027c46).

Test Logs

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 4, 2021

Size Analysis Report

Affected Products

Diffs between base commit (0eeefe2) and head commit (7027c46) are too large (169,549 characters) to display.

Please check below links to see details from the original test log.

@yuchenshi yuchenshi assigned hsubox76 and unassigned sam-gc Feb 4, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2021

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@yuchenshi yuchenshi merged commit 92d6e50 into master Feb 4, 2021
@yuchenshi yuchenshi deleted the ys/useAuthEmulator branch February 4, 2021 17:36
@firebase firebase locked and limited conversation to collaborators Mar 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants