Skip to content

Commit cc9ccda

Browse files
Merge branch 'master' into mrschmidt/fetchstreams
2 parents ba8cc73 + 22c2621 commit cc9ccda

File tree

69 files changed

+723
-530
lines changed

Some content is hidden

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

69 files changed

+723
-530
lines changed

.changeset/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"firebase-namespace-integration-test",
1414
"firebase-firestore-integration-test",
1515
"firebase-messaging-integration-test",
16+
"firebase-compat-interop-test",
1617
"firebase-compat-typings-test",
1718
"@firebase/app-exp",
1819
"@firebase/analytics-compat",

.changeset/fast-mangos-serve.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/fuzzy-teachers-guess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/component": patch
3+
---
4+
5+
handle `undefined` correctly from input.

.changeset/perfect-comics-march.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/silent-planets-raise.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/tender-eels-greet.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"firebase": patch
3+
---
4+
5+
set firebase.SDK_VERSION to the latest value

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ export type _FirebaseMessagingName = 'messaging';
2929
export function getMessaging(app?: FirebaseApp): FirebaseMessaging;
3030

3131
// @public
32-
export function getToken(messaging: FirebaseMessaging, options?: {
33-
vapidKey?: string;
32+
export function getToken(messaging: FirebaseMessaging, options?: GetTokenOptions): Promise<string>;
33+
34+
// @public
35+
export interface GetTokenOptions {
3436
swReg?: ServiceWorkerRegistration;
35-
}): Promise<string>;
37+
vapidKey?: string;
38+
}
3639

3740
// @public
3841
export function isSupported(): Promise<boolean>;
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## API Report File for "@firebase/messaging-exp/sw"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { FirebaseApp } from '@firebase/app-exp';
8+
import { NextFn } from '@firebase/util';
9+
import { Observer } from '@firebase/util';
10+
import { Unsubscribe } from '@firebase/util';
11+
12+
// @public
13+
export interface FcmOptions {
14+
analyticsLabel?: string;
15+
link?: string;
16+
}
17+
18+
// @public
19+
export interface FirebaseMessaging {
20+
}
21+
22+
// @public
23+
export function getMessaging(app?: FirebaseApp): FirebaseMessaging;
24+
25+
// @public
26+
export function isSupported(): Promise<boolean>;
27+
28+
// @public
29+
export interface MessagePayload {
30+
collapseKey: string;
31+
data?: {
32+
[key: string]: string;
33+
};
34+
fcmOptions?: FcmOptions;
35+
from: string;
36+
notification?: NotificationPayload;
37+
}
38+
39+
export { NextFn }
40+
41+
// @public
42+
export interface NotificationPayload {
43+
body?: string;
44+
image?: string;
45+
title?: string;
46+
}
47+
48+
export { Observer }
49+
50+
// @public
51+
export function onBackgroundMessage(messaging: FirebaseMessaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
52+
53+
export { Unsubscribe }
54+
55+
56+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* @license
3+
* Copyright 2021 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import { getModularInstance } from '@firebase/util';
19+
import { expect } from 'chai';
20+
import { getAnalytics } from '@firebase/analytics-exp';
21+
import firebase from '@firebase/app-compat';
22+
import '@firebase/analytics-compat';
23+
24+
import { TEST_PROJECT_CONFIG } from './util';
25+
26+
firebase.initializeApp(TEST_PROJECT_CONFIG);
27+
28+
const compatAnalytics = firebase.analytics();
29+
const modularAnalytics = getAnalytics();
30+
31+
describe('Analytics compat interop', () => {
32+
it('Analytics compat instance references modular Analytics instance', () => {
33+
expect(getModularInstance(compatAnalytics)).to.equal(modularAnalytics);
34+
});
35+
});

0 commit comments

Comments
 (0)