-
Notifications
You must be signed in to change notification settings - Fork 897
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
Move template data under a new customData
field
#3946
Conversation
🦋 Changeset detectedLatest commit: 65399ac The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 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 |
Size Analysis ReportAffected Products
|
Type | Base (f355439) | Head (d1eceee) | Diff |
---|---|---|---|
size_with_ext_deps | 5.40 kB | 5.26 kB | -144 B (-2.7%) |
initializeApp
Size
Type | Base (f355439) | Head (d1eceee) | Diff |
---|---|---|---|
size_with_ext_deps | 9.08 kB | 8.93 kB | -144 B (-1.6%) |
onLog
Size
Type | Base (f355439) | Head (d1eceee) | Diff |
---|---|---|---|
size_with_ext_deps | 5.96 kB | 5.82 kB | -144 B (-2.4%) |
@firebase/auth-exp
-
ActionCodeURL
Size
Type Base (f355439) Head (d1eceee) Diff size 45.4 kB 45.4 kB +11 B (+0.0%) size_with_ext_deps 56.1 kB 56.0 kB -133 B (-0.2%) -
AuthCredential
Size
Type Base (f355439) Head (d1eceee) Diff size 44.7 kB 44.7 kB +11 B (+0.0%) size_with_ext_deps 55.4 kB 55.2 kB -133 B (-0.2%) -
EmailAuthCredential
Size
Type Base (f355439) Head (d1eceee) Diff size 46.5 kB 46.5 kB +11 B (+0.0%) size_with_ext_deps 57.1 kB 57.0 kB -133 B (-0.2%) -
EmailAuthProvider
Size
Type Base (f355439) Head (d1eceee) Diff size 47.8 kB 47.8 kB +11 B (+0.0%) size_with_ext_deps 58.5 kB 58.4 kB -133 B (-0.2%) -
FacebookAuthProvider
Size
Type Base (f355439) Head (d1eceee) Diff size 47.8 kB 47.9 kB +26 B (+0.1%) size_with_ext_deps 58.5 kB 58.4 kB -118 B (-0.2%) -
GithubAuthProvider
Size
Type Base (f355439) Head (d1eceee) Diff size 47.8 kB 47.9 kB +26 B (+0.1%) size_with_ext_deps 58.5 kB 58.4 kB -118 B (-0.2%) -
GoogleAuthProvider
Size
Type Base (f355439) Head (d1eceee) Diff size 47.8 kB 47.9 kB +26 B (+0.1%) size_with_ext_deps 58.5 kB 58.4 kB -118 B (-0.2%) -
OAuthCredential
Size
Type Base (f355439) Head (d1eceee) Diff size 46.5 kB 46.5 kB +11 B (+0.0%) size_with_ext_deps 57.2 kB 57.0 kB -133 B (-0.2%) -
OAuthProvider
Size
Type Base (f355439) Head (d1eceee) Diff size 47.2 kB 47.2 kB +11 B (+0.0%) size_with_ext_deps 57.9 kB 57.7 kB -133 B (-0.2%) -
PhoneAuthCredential
Size
Type Base (f355439) Head (d1eceee) Diff size 46.4 kB 46.5 kB +11 B (+0.0%) size_with_ext_deps 57.1 kB 57.0 kB -133 B (-0.2%) -
PhoneAuthProvider
Size
Type Base (f355439) Head (d1eceee) Diff size 48.2 kB 48.2 kB +11 B (+0.0%) size_with_ext_deps 58.8 kB 58.7 kB -133 B (-0.2%) -
PhoneMultiFactorGenerator
Size
Type Base (f355439) Head (d1eceee) Diff size 45.4 kB 45.4 kB +11 B (+0.0%) size_with_ext_deps 56.0 kB 55.9 kB -133 B (-0.2%) -
RecaptchaVerifier
Size
Type Base (f355439) Head (d1eceee) Diff size 50.9 kB 50.9 kB +11 B (+0.0%) size_with_ext_deps 61.6 kB 61.5 kB -133 B (-0.2%) -
TwitterAuthProvider
Size
Type Base (f355439) Head (d1eceee) Diff size 47.8 kB 47.9 kB +26 B (+0.1%) size_with_ext_deps 58.5 kB 58.4 kB -118 B (-0.2%) -
applyActionCode
Size
Type Base (f355439) Head (d1eceee) Diff size 44.6 kB 44.6 kB +11 B (+0.0%) size_with_ext_deps 55.2 kB 55.1 kB -133 B (-0.2%) -
browserLocalPersistence
Size
Type Base (f355439) Head (d1eceee) Diff size 47.4 kB 47.4 kB +11 B (+0.0%) size_with_ext_deps 58.1 kB 58.0 kB -133 B (-0.2%) -
browserPopupRedirectResolver
Size
Type Base (f355439) Head (d1eceee) Diff size 56.4 kB 56.4 kB +11 B (+0.0%) size_with_ext_deps 67.1 kB 67.0 kB -133 B (-0.2%) -
browserSessionPersistence
Size
Type Base (f355439) Head (d1eceee) Diff size 45.1 kB 45.1 kB +11 B (+0.0%) size_with_ext_deps 55.8 kB 55.6 kB -133 B (-0.2%) -
checkActionCode
Size
Type Base (f355439) Head (d1eceee) Diff size 45.6 kB 45.6 kB +11 B (+0.0%) size_with_ext_deps 56.2 kB 56.1 kB -133 B (-0.2%) -
confirmPasswordReset
Size
Type Base (f355439) Head (d1eceee) Diff size 44.6 kB 44.6 kB +11 B (+0.0%) size_with_ext_deps 55.2 kB 55.1 kB -133 B (-0.2%) -
createUserWithEmailAndPassword
Size
Type Base (f355439) Head (d1eceee) Diff size 45.5 kB 45.5 kB +11 B (+0.0%) size_with_ext_deps 56.1 kB 56.0 kB -133 B (-0.2%) -
deleteUser
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%) -
fetchSignInMethodsForEmail
Size
Type Base (f355439) Head (d1eceee) Diff size 44.8 kB 44.8 kB +11 B (+0.0%) size_with_ext_deps 55.4 kB 55.3 kB -133 B (-0.2%) -
getAdditionalUserInfo
Size
Type Base (f355439) Head (d1eceee) Diff size 45.7 kB 45.7 kB +11 B (+0.0%) size_with_ext_deps 56.4 kB 56.2 kB -133 B (-0.2%) -
getAuth
Size
Type Base (f355439) Head (d1eceee) Diff size 62.2 kB 62.2 kB +11 B (+0.0%) size_with_ext_deps 73.7 kB 73.5 kB -133 B (-0.2%) -
getIdToken
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%) -
getIdTokenResult
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%) -
getMultiFactorResolver
Size
Type Base (f355439) Head (d1eceee) Diff size 47.3 kB 47.4 kB +11 B (+0.0%) size_with_ext_deps 58.0 kB 57.9 kB -133 B (-0.2%) -
getRedirectResult
Size
Type Base (f355439) Head (d1eceee) Diff size 49.9 kB 50.0 kB +63 B (+0.1%) size_with_ext_deps 60.6 kB 60.5 kB -81 B (-0.1%) -
inMemoryPersistence
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%) -
indexedDBLocalPersistence
Size
Type Base (f355439) Head (d1eceee) Diff size 47.5 kB 47.5 kB +11 B (+0.0%) size_with_ext_deps 58.2 kB 58.1 kB -133 B (-0.2%) -
initializeAuth
Size
Type Base (f355439) Head (d1eceee) Diff size 44.8 kB 44.8 kB +11 B (+0.0%) size_with_ext_deps 56.1 kB 55.9 kB -133 B (-0.2%) -
isSignInWithEmailLink
Size
Type Base (f355439) Head (d1eceee) Diff size 45.5 kB 45.6 kB +11 B (+0.0%) size_with_ext_deps 56.2 kB 56.1 kB -133 B (-0.2%) -
linkWithCredential
Size
Type Base (f355439) Head (d1eceee) Diff size 45.5 kB 45.5 kB +11 B (+0.0%) size_with_ext_deps 56.2 kB 56.0 kB -133 B (-0.2%) -
linkWithPhoneNumber
Size
Type Base (f355439) Head (d1eceee) Diff size 49.0 kB 49.0 kB +11 B (+0.0%) size_with_ext_deps 59.7 kB 59.6 kB -133 B (-0.2%) -
linkWithPopup
Size
Type Base (f355439) Head (d1eceee) Diff size 53.0 kB 53.0 kB +63 B (+0.1%) size_with_ext_deps 63.6 kB 63.6 kB -81 B (-0.1%) -
linkWithRedirect
Size
Type Base (f355439) Head (d1eceee) Diff size 48.0 kB 48.0 kB +11 B (+0.0%) size_with_ext_deps 58.7 kB 58.6 kB -133 B (-0.2%) -
multiFactor
Size
Type Base (f355439) Head (d1eceee) Diff size 46.5 kB 46.6 kB +11 B (+0.0%) size_with_ext_deps 57.2 kB 57.1 kB -133 B (-0.2%) -
onAuthStateChanged
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.2 kB 55.0 kB -133 B (-0.2%) -
onIdTokenChanged
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.2 kB 55.0 kB -133 B (-0.2%) -
parseActionCodeURL
Size
Type Base (f355439) Head (d1eceee) Diff size 45.5 kB 45.5 kB +11 B (+0.0%) size_with_ext_deps 56.1 kB 56.0 kB -133 B (-0.2%) -
reauthenticateWithCredential
Size
Type Base (f355439) Head (d1eceee) Diff size 46.1 kB 46.2 kB +63 B (+0.1%) size_with_ext_deps 56.8 kB 56.7 kB -81 B (-0.1%) -
reauthenticateWithPhoneNumber
Size
Type Base (f355439) Head (d1eceee) Diff size 49.6 kB 49.7 kB +63 B (+0.1%) size_with_ext_deps 60.3 kB 60.2 kB -81 B (-0.1%) -
reauthenticateWithPopup
Size
Type Base (f355439) Head (d1eceee) Diff size 53.0 kB 53.0 kB +63 B (+0.1%) size_with_ext_deps 63.7 kB 63.6 kB -81 B (-0.1%) -
reauthenticateWithRedirect
Size
Type Base (f355439) Head (d1eceee) Diff size 47.8 kB 47.8 kB +11 B (+0.0%) size_with_ext_deps 58.4 kB 58.3 kB -133 B (-0.2%) -
reload
Size
Type Base (f355439) Head (d1eceee) Diff size 44.4 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%) -
sendEmailVerification
Size
Type Base (f355439) Head (d1eceee) Diff size 45.1 kB 45.1 kB +11 B (+0.0%) size_with_ext_deps 55.7 kB 55.6 kB -133 B (-0.2%) -
sendPasswordResetEmail
Size
Type Base (f355439) Head (d1eceee) Diff size 45.0 kB 45.0 kB +11 B (+0.0%) size_with_ext_deps 55.6 kB 55.5 kB -133 B (-0.2%) -
sendSignInLinkToEmail
Size
Type Base (f355439) Head (d1eceee) Diff size 45.0 kB 45.0 kB +11 B (+0.0%) size_with_ext_deps 55.6 kB 55.5 kB -133 B (-0.2%) -
setPersistence
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%) -
signInAnonymously
Size
Type Base (f355439) Head (d1eceee) Diff size 45.6 kB 45.6 kB +11 B (+0.0%) size_with_ext_deps 56.3 kB 56.1 kB -133 B (-0.2%) -
signInWithCredential
Size
Type Base (f355439) Head (d1eceee) Diff size 45.8 kB 45.9 kB +63 B (+0.1%) size_with_ext_deps 56.5 kB 56.4 kB -81 B (-0.1%) -
signInWithCustomToken
Size
Type Base (f355439) Head (d1eceee) Diff size 45.5 kB 45.5 kB +11 B (+0.0%) size_with_ext_deps 56.1 kB 56.0 kB -133 B (-0.2%) -
signInWithEmailAndPassword
Size
Type Base (f355439) Head (d1eceee) Diff size 49.3 kB 49.3 kB +63 B (+0.1%) size_with_ext_deps 59.9 kB 59.8 kB -81 B (-0.1%) -
signInWithEmailLink
Size
Type Base (f355439) Head (d1eceee) Diff size 49.5 kB 49.5 kB +63 B (+0.1%) size_with_ext_deps 60.1 kB 60.0 kB -81 B (-0.1%) -
signInWithPhoneNumber
Size
Type Base (f355439) Head (d1eceee) Diff size 49.3 kB 49.4 kB +63 B (+0.1%) size_with_ext_deps 60.0 kB 59.9 kB -81 B (-0.1%) -
signInWithPopup
Size
Type Base (f355439) Head (d1eceee) Diff size 53.0 kB 53.0 kB +63 B (+0.1%) size_with_ext_deps 63.6 kB 63.6 kB -81 B (-0.1%) -
signInWithRedirect
Size
Type Base (f355439) Head (d1eceee) Diff size 47.5 kB 47.5 kB +11 B (+0.0%) size_with_ext_deps 58.2 kB 58.0 kB -133 B (-0.2%) -
signOut
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%) -
unlink
Size
Type Base (f355439) Head (d1eceee) Diff size 45.1 kB 45.1 kB +11 B (+0.0%) size_with_ext_deps 55.7 kB 55.6 kB -133 B (-0.2%) -
updateCurrentUser
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.2 kB 55.0 kB -133 B (-0.2%) -
updateEmail
Size
Type Base (f355439) Head (d1eceee) Diff size 44.8 kB 44.8 kB +11 B (+0.0%) size_with_ext_deps 55.4 kB 55.3 kB -133 B (-0.2%) -
updatePassword
Size
Type Base (f355439) Head (d1eceee) Diff size 44.8 kB 44.8 kB +11 B (+0.0%) size_with_ext_deps 55.4 kB 55.3 kB -133 B (-0.2%) -
updatePhoneNumber
Size
Type Base (f355439) Head (d1eceee) Diff size 45.2 kB 45.2 kB +11 B (+0.0%) size_with_ext_deps 55.9 kB 55.7 kB -133 B (-0.2%) -
updateProfile
Size
Type Base (f355439) Head (d1eceee) Diff size 44.9 kB 44.9 kB +11 B (+0.0%) size_with_ext_deps 55.6 kB 55.5 kB -133 B (-0.2%) -
useDeviceLanguage
Size
Type Base (f355439) Head (d1eceee) Diff size 44.5 kB 44.5 kB +11 B (+0.0%) size_with_ext_deps 55.1 kB 55.0 kB -133 B (-0.2%) -
verifyBeforeUpdateEmail
Size
Type Base (f355439) Head (d1eceee) Diff size 45.1 kB 45.1 kB +11 B (+0.0%) size_with_ext_deps 55.7 kB 55.6 kB -133 B (-0.2%) -
verifyPasswordResetCode
Size
Type Base (f355439) Head (d1eceee) Diff size 45.6 kB 45.7 kB +11 B (+0.0%) size_with_ext_deps 56.3 kB 56.2 kB -133 B (-0.2%)
@firebase/functions-exp
-
httpsCallable
Size
Type Base (f355439) Head (d1eceee) Diff size_with_ext_deps 9.96 kB 9.81 kB -144 B (-1.4%)
@firebase/installations-exp
-
deleteInstallations
Size
Type Base (f355439) Head (d1eceee) Diff size 8.92 kB 8.95 kB +33 B (+0.4%) size_with_ext_deps 17.4 kB 17.3 kB -111 B (-0.6%) -
getId
Size
Type Base (f355439) Head (d1eceee) Diff size 8.36 kB 8.39 kB +33 B (+0.4%) size_with_ext_deps 16.8 kB 16.7 kB -111 B (-0.7%) -
getInstallations
Size
Type Base (f355439) Head (d1eceee) Diff size 8.44 kB 8.48 kB +33 B (+0.4%) size_with_ext_deps 16.9 kB 16.8 kB -111 B (-0.7%) -
getToken
Size
Type Base (f355439) Head (d1eceee) Diff size 8.36 kB 8.40 kB +33 B (+0.4%) size_with_ext_deps 16.8 kB 16.7 kB -111 B (-0.7%) -
onIdChange
Size
Type Base (f355439) Head (d1eceee) Diff size 8.62 kB 8.65 kB +33 B (+0.4%) size_with_ext_deps 17.1 kB 17.0 kB -111 B (-0.7%)
@firebase/performance-exp
-
getPerformance
Size
Type Base (f355439) Head (d1eceee) Diff size_with_ext_deps 34.3 kB 34.2 kB -111 B (-0.3%) -
trace
Size
Type Base (f355439) Head (d1eceee) Diff size_with_ext_deps 34.2 kB 34.1 kB -111 B (-0.3%)
Test Logs
Changeset File Check
|
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.
Looks good for auth
@@ -59,7 +59,7 @@ describe('src/core/providers/facebook', () => { | |||
const error = AUTH_ERROR_FACTORY.create(AuthErrorCode.NEED_CONFIRMATION, { | |||
appName: 'foo' | |||
}); | |||
(error as TaggedWithTokenResponse)._tokenResponse = { | |||
(error.customData! as TaggedWithTokenResponse)._tokenResponse = { |
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.
Always having to use the ! seems weird. In storage, all errors are FirebaseStorageError which extends FirebaseError and makes customData non-optional. But I see auth-exp uses the shared ErrorFactory so I don't know if it would be really messy to get it to return an extended error type instead of FirebaseError.
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.
Also should a property of customData be underscore-prefixed? Not sure what that would mean.
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.
Valid point. What other SDKs have done is do a is[Product]Error()
check, which narrows the type to the specific error type, then you can access customData
safely. See here as an example.
That said, I'm not too worried about them since they are all in test files.
I think the underscore means it's for internal usage only, which is fine. @samhorlbeck
Write template data to a new
customData
field inFirebaseError
instead of writing to the error object itself to avoid overwriting existing fields.Solves #1891 (comment)