Skip to content

Commit 0e32757

Browse files
committed
Merge branch 'master' into fei-rc-exp
2 parents 77bf463 + 602ec18 commit 0e32757

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+578
-2105
lines changed

.changeset/bright-ducks-jump.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'firebase': minor
3+
'@firebase/database': minor
4+
'@firebase/database-types': minor
5+
---
6+
7+
Add a useEmulator(host, port) method to Realtime Database

.changeset/silver-dolls-wave.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"firebase": major
3+
"@firebase/firestore": major
4+
---
5+
6+
This releases removes all input validation. Please use our TypeScript types to validate API usage.

.changeset/tame-knives-change.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@firebase/database-types": patch
3+
"@firebase/database": patch
4+
"firebase": patch
5+
---
6+
7+
Updated the type definition for `ThenableReference` to only implement `then` and `catch`, which matches the implementation.

.changeset/tiny-hounds-rest.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"firebase: major
3+
"@firebase/storage": major
4+
---
5+
6+
This releases removes all input validation. Please use our TypeScript types to validate API usage.

.changeset/wicked-cups-search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/firestore': minor
3+
---
4+
5+
Removed excess validation of null and NaN values in query filters. This more closely aligns the SDK with the Firestore backend, which has always accepted null and NaN for all operators, even though this isn't necessarily useful.

common/api-review/auth-exp.api.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export class EmailAuthProvider implements externs.EmailAuthProvider {
123123

124124
// @public (undocumented)
125125
export class FacebookAuthProvider extends OAuthProvider {
126+
constructor();
126127
// (undocumented)
127128
static credential(accessToken: string): externs.OAuthCredential;
128129
// (undocumented)
@@ -133,8 +134,6 @@ export class FacebookAuthProvider extends OAuthProvider {
133134
static readonly FACEBOOK_SIGN_IN_METHOD = externs.SignInMethod.FACEBOOK;
134135
// (undocumented)
135136
static readonly PROVIDER_ID = externs.ProviderId.FACEBOOK;
136-
// (undocumented)
137-
readonly providerId = externs.ProviderId.FACEBOOK;
138137
}
139138

140139
// @public (undocumented)
@@ -160,6 +159,7 @@ export function getRedirectResult(authExtern: externs.Auth, resolverExtern?: ext
160159

161160
// @public (undocumented)
162161
export class GithubAuthProvider extends OAuthProvider {
162+
constructor();
163163
// (undocumented)
164164
static credential(accessToken: string): externs.OAuthCredential;
165165
// (undocumented)
@@ -170,12 +170,11 @@ export class GithubAuthProvider extends OAuthProvider {
170170
static readonly GITHUB_SIGN_IN_METHOD = externs.SignInMethod.GITHUB;
171171
// (undocumented)
172172
static readonly PROVIDER_ID = externs.ProviderId.GITHUB;
173-
// (undocumented)
174-
readonly providerId = externs.ProviderId.GITHUB;
175173
}
176174

177175
// @public (undocumented)
178176
export class GoogleAuthProvider extends OAuthProvider {
177+
constructor();
179178
// (undocumented)
180179
static credential(idToken?: string | null, accessToken?: string | null): externs.OAuthCredential;
181180
// (undocumented)
@@ -186,8 +185,6 @@ export class GoogleAuthProvider extends OAuthProvider {
186185
static readonly GOOGLE_SIGN_IN_METHOD = externs.SignInMethod.GOOGLE;
187186
// (undocumented)
188187
static readonly PROVIDER_ID = externs.ProviderId.GOOGLE;
189-
// (undocumented)
190-
readonly providerId = externs.ProviderId.GOOGLE;
191188
}
192189

193190
// @public (undocumented)
@@ -404,6 +401,7 @@ export function signOut(auth: externs.Auth): Promise<void>;
404401

405402
// @public (undocumented)
406403
export class TwitterAuthProvider extends OAuthProvider {
404+
constructor();
407405
// (undocumented)
408406
static credential(token: string, secret: string): externs.OAuthCredential;
409407
// (undocumented)
@@ -413,8 +411,6 @@ export class TwitterAuthProvider extends OAuthProvider {
413411
// (undocumented)
414412
static readonly PROVIDER_ID = externs.ProviderId.TWITTER;
415413
// (undocumented)
416-
readonly providerId = externs.ProviderId.TWITTER;
417-
// (undocumented)
418414
static readonly TWITTER_SIGN_IN_METHOD = externs.SignInMethod.TWITTER;
419415
}
420416

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [FacebookAuthProvider](./auth.facebookauthprovider.md) &gt; [(constructor)](./auth.facebookauthprovider._constructor_.md)
4+
5+
## FacebookAuthProvider.(constructor)
6+
7+
Constructs a new instance of the `FacebookAuthProvider` class
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
constructor();
13+
```

docs-exp/auth.facebookauthprovider.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ export declare class FacebookAuthProvider extends OAuthProvider
1111
```
1212
<b>Extends:</b> [OAuthProvider](./auth.oauthprovider.md)
1313
14+
## Constructors
15+
16+
| Constructor | Modifiers | Description |
17+
| --- | --- | --- |
18+
| [(constructor)()](./auth.facebookauthprovider._constructor_.md) | | Constructs a new instance of the <code>FacebookAuthProvider</code> class |
19+
1420
## Properties
1521
1622
| Property | Modifiers | Type | Description |
1723
| --- | --- | --- | --- |
1824
| [FACEBOOK\_SIGN\_IN\_METHOD](./auth.facebookauthprovider.facebook_sign_in_method.md) | <code>static</code> | (not declared) | |
1925
| [PROVIDER\_ID](./auth.facebookauthprovider.provider_id.md) | <code>static</code> | (not declared) | |
20-
| [providerId](./auth.facebookauthprovider.providerid.md) | | (not declared) | |
2126
2227
## Methods
2328
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [GithubAuthProvider](./auth.githubauthprovider.md) &gt; [(constructor)](./auth.githubauthprovider._constructor_.md)
4+
5+
## GithubAuthProvider.(constructor)
6+
7+
Constructs a new instance of the `GithubAuthProvider` class
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
constructor();
13+
```

docs-exp/auth.githubauthprovider.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ export declare class GithubAuthProvider extends OAuthProvider
1111
```
1212
<b>Extends:</b> [OAuthProvider](./auth.oauthprovider.md)
1313
14+
## Constructors
15+
16+
| Constructor | Modifiers | Description |
17+
| --- | --- | --- |
18+
| [(constructor)()](./auth.githubauthprovider._constructor_.md) | | Constructs a new instance of the <code>GithubAuthProvider</code> class |
19+
1420
## Properties
1521
1622
| Property | Modifiers | Type | Description |
1723
| --- | --- | --- | --- |
1824
| [GITHUB\_SIGN\_IN\_METHOD](./auth.githubauthprovider.github_sign_in_method.md) | <code>static</code> | (not declared) | |
1925
| [PROVIDER\_ID](./auth.githubauthprovider.provider_id.md) | <code>static</code> | (not declared) | |
20-
| [providerId](./auth.githubauthprovider.providerid.md) | | (not declared) | |
2126
2227
## Methods
2328
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [GoogleAuthProvider](./auth.googleauthprovider.md) &gt; [(constructor)](./auth.googleauthprovider._constructor_.md)
4+
5+
## GoogleAuthProvider.(constructor)
6+
7+
Constructs a new instance of the `GoogleAuthProvider` class
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
constructor();
13+
```

docs-exp/auth.googleauthprovider.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ export declare class GoogleAuthProvider extends OAuthProvider
1111
```
1212
<b>Extends:</b> [OAuthProvider](./auth.oauthprovider.md)
1313
14+
## Constructors
15+
16+
| Constructor | Modifiers | Description |
17+
| --- | --- | --- |
18+
| [(constructor)()](./auth.googleauthprovider._constructor_.md) | | Constructs a new instance of the <code>GoogleAuthProvider</code> class |
19+
1420
## Properties
1521
1622
| Property | Modifiers | Type | Description |
1723
| --- | --- | --- | --- |
1824
| [GOOGLE\_SIGN\_IN\_METHOD](./auth.googleauthprovider.google_sign_in_method.md) | <code>static</code> | (not declared) | |
1925
| [PROVIDER\_ID](./auth.googleauthprovider.provider_id.md) | <code>static</code> | (not declared) | |
20-
| [providerId](./auth.googleauthprovider.providerid.md) | | (not declared) | |
2126
2227
## Methods
2328
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [TwitterAuthProvider](./auth.twitterauthprovider.md) &gt; [(constructor)](./auth.twitterauthprovider._constructor_.md)
4+
5+
## TwitterAuthProvider.(constructor)
6+
7+
Constructs a new instance of the `TwitterAuthProvider` class
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
constructor();
13+
```

docs-exp/auth.twitterauthprovider.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@ export declare class TwitterAuthProvider extends OAuthProvider
1111
```
1212
<b>Extends:</b> [OAuthProvider](./auth.oauthprovider.md)
1313
14+
## Constructors
15+
16+
| Constructor | Modifiers | Description |
17+
| --- | --- | --- |
18+
| [(constructor)()](./auth.twitterauthprovider._constructor_.md) | | Constructs a new instance of the <code>TwitterAuthProvider</code> class |
19+
1420
## Properties
1521
1622
| Property | Modifiers | Type | Description |
1723
| --- | --- | --- | --- |
1824
| [PROVIDER\_ID](./auth.twitterauthprovider.provider_id.md) | <code>static</code> | (not declared) | |
19-
| [providerId](./auth.twitterauthprovider.providerid.md) | | (not declared) | |
2025
| [TWITTER\_SIGN\_IN\_METHOD](./auth.twitterauthprovider.twitter_sign_in_method.md) | <code>static</code> | (not declared) | |
2126
2227
## Methods

packages-exp/auth-compat-exp/src/auth.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('auth compat', () => {
4848
if (typeof self !== 'undefined') {
4949
sinon.stub(underlyingAuth, '_getPersistence').returns('TEST');
5050
// eslint-disable-next-line @typescript-eslint/no-floating-promises
51-
authCompat.signInWithRedirect(new impl.GoogleAuthProvider('google'));
51+
authCompat.signInWithRedirect(new impl.GoogleAuthProvider());
5252
expect(
5353
sessionStorage.getItem('firebase:persistence:api-key:undefined')
5454
).to.eq('TEST');

packages-exp/auth-exp/src/core/providers/facebook.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ import { OAuthProvider } from './oauth';
2626
export class FacebookAuthProvider extends OAuthProvider {
2727
static readonly FACEBOOK_SIGN_IN_METHOD = externs.SignInMethod.FACEBOOK;
2828
static readonly PROVIDER_ID = externs.ProviderId.FACEBOOK;
29-
readonly providerId = FacebookAuthProvider.PROVIDER_ID;
29+
30+
constructor() {
31+
super(externs.ProviderId.FACEBOOK);
32+
}
3033

3134
static credential(accessToken: string): externs.OAuthCredential {
3235
return OAuthCredential._fromParams({

packages-exp/auth-exp/src/core/providers/github.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ import { OAuthProvider } from './oauth';
2626
export class GithubAuthProvider extends OAuthProvider {
2727
static readonly GITHUB_SIGN_IN_METHOD = externs.SignInMethod.GITHUB;
2828
static readonly PROVIDER_ID = externs.ProviderId.GITHUB;
29-
readonly providerId = GithubAuthProvider.PROVIDER_ID;
29+
30+
constructor() {
31+
super(externs.ProviderId.GITHUB);
32+
}
3033

3134
static credential(accessToken: string): externs.OAuthCredential {
3235
return OAuthCredential._fromParams({

packages-exp/auth-exp/src/core/providers/google.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ import { OAuthProvider } from './oauth';
2727
export class GoogleAuthProvider extends OAuthProvider {
2828
static readonly GOOGLE_SIGN_IN_METHOD = externs.SignInMethod.GOOGLE;
2929
static readonly PROVIDER_ID = externs.ProviderId.GOOGLE;
30-
readonly providerId = GoogleAuthProvider.PROVIDER_ID;
30+
31+
constructor() {
32+
super(externs.ProviderId.GOOGLE);
33+
}
3134

3235
static credential(
3336
idToken?: string | null,

packages-exp/auth-exp/src/core/providers/twitter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ import { OAuthProvider } from './oauth';
4444
export class TwitterAuthProvider extends OAuthProvider {
4545
static readonly TWITTER_SIGN_IN_METHOD = externs.SignInMethod.TWITTER;
4646
static readonly PROVIDER_ID = externs.ProviderId.TWITTER;
47-
readonly providerId = TwitterAuthProvider.PROVIDER_ID;
47+
48+
constructor() {
49+
super(externs.ProviderId.TWITTER);
50+
}
4851

4952
static credential(token: string, secret: string): externs.OAuthCredential {
5053
return OAuthCredential._fromParams({

packages/database-types/index.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export interface DataSnapshot {
3434

3535
export interface Database {
3636
app: FirebaseApp;
37+
useEmulator(host: string, port: number): void;
3738
goOffline(): void;
3839
goOnline(): void;
3940
ref(path?: string | Reference): Reference;
@@ -43,6 +44,7 @@ export interface Database {
4344
export class FirebaseDatabase implements Database {
4445
private constructor();
4546
app: FirebaseApp;
47+
useEmulator(host: string, port: number): void;
4648
goOffline(): void;
4749
goOnline(): void;
4850
ref(path?: string | Reference): Reference;
@@ -106,7 +108,7 @@ export interface Reference extends Query {
106108
key: string | null;
107109
onDisconnect(): OnDisconnect;
108110
parent: Reference | null;
109-
push(value?: any, onComplete?: (a: Error | null) => any): Reference;
111+
push(value?: any, onComplete?: (a: Error | null) => any): ThenableReference;
110112
remove(onComplete?: (a: Error | null) => any): Promise<any>;
111113
root: Reference;
112114
set(value: any, onComplete?: (a: Error | null) => any): Promise<any>;
@@ -132,7 +134,9 @@ export interface ServerValue {
132134
increment(delta: number): Object;
133135
}
134136

135-
export interface ThenableReference extends Reference, Promise<Reference> {}
137+
export interface ThenableReference
138+
extends Reference,
139+
Pick<Promise<Reference>, 'then' | 'catch'> {}
136140

137141
export function enableLogging(
138142
logger?: boolean | ((a: string) => any),

0 commit comments

Comments
 (0)