Skip to content

Commit 6b04715

Browse files
committed
update app dependency
1 parent 31fa5a1 commit 6b04715

File tree

6 files changed

+7
-11
lines changed

6 files changed

+7
-11
lines changed

packages-exp/messaging-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"dependencies": {
3333
"@firebase/component": "0.1.19",
34-
"@firebase/installations-exp": "0.0.800",
34+
"@firebase/installations": "0.4.17",
3535
"@firebase/messaging-types-exp": "0.0.800",
3636
"@firebase/util": "0.3.2",
3737
"eslint": "^7.3.1",

packages-exp/messaging-exp/src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class MessagingService implements _FirebaseService {
6969
readonly swController: SwController | null = null;
7070

7171
constructor(container: ComponentContainer) {
72-
const app = container.getProvider('app').getImmediate();
72+
const app = container.getProvider('app-exp').getImmediate();
7373
const appConfig = extractAppConfig(app);
7474
const installations = container.getProvider('installations').getImmediate();
7575
const analyticsProvider = container.getProvider('analytics-internal');

packages-exp/messaging-exp/src/helpers/extract-app-config.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,12 @@ describe('extractAppConfig', () => {
4242
).to.throw('Missing App configuration value: "App Configuration Object"');
4343

4444
let firebaseApp = getFakeApp();
45-
// @ts-expect-error
4645
delete firebaseApp.options;
4746
expect(() => extractAppConfig(firebaseApp)).to.throw(
4847
'Missing App configuration value: "App Configuration Object"'
4948
);
5049

5150
firebaseApp = getFakeApp();
52-
// @ts-expect-error
5351
delete firebaseApp.name;
5452
expect(() => extractAppConfig(firebaseApp)).to.throw(
5553
'Missing App configuration value: "App Name"'

packages-exp/messaging-exp/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
import '@firebase/installations-exp';
19-
2018
import {
2119
Component,
2220
ComponentContainer,

packages-exp/messaging-exp/src/interfaces/internal-dependencies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import { AppConfig } from './app-config';
1919
import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types';
2020
import { FirebaseApp } from '@firebase/app-types-exp';
21-
import { FirebaseInstallations } from '@firebase/installations-types-exp';
21+
import { FirebaseInstallations } from '@firebase/installations-types';
2222
import { Provider } from '@firebase/component';
2323

2424
export interface FirebaseInternalDependencies {

packages-exp/messaging-exp/src/testing/fakes/firebase-dependencies.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
} from '@firebase/analytics-interop-types';
2222
import { FirebaseApp, FirebaseOptions } from '@firebase/app-types-exp';
2323

24-
import { FirebaseInstallations } from '@firebase/installations-types-exp';
24+
import { FirebaseInstallations } from '@firebase/installations-types';
2525
import { FirebaseInternalDependencies } from '../../interfaces/internal-dependencies';
2626
import { Provider } from '@firebase/component';
2727
import { extractAppConfig } from '../../helpers/extract-app-config';
@@ -38,7 +38,7 @@ export function getFakeFirebaseDependencies(
3838
};
3939
}
4040

41-
export function getFakeApp(options: FirebaseOptions = {}): FirebaseApp {
41+
export function getFakeApp(options: FirebaseOptions = {}): any {
4242
options = {
4343
apiKey: 'apiKey',
4444
projectId: 'projectId',
@@ -54,8 +54,8 @@ export function getFakeApp(options: FirebaseOptions = {}): FirebaseApp {
5454
options,
5555
automaticDataCollectionEnabled: true,
5656
delete: async () => {},
57-
messaging: (() => null as unknown) as FirebaseApp['messaging']
58-
// installations: () => getFakeInstallations()
57+
messaging: (() => null as unknown) as FirebaseApp['messaging'],
58+
installations: () => getFakeInstallations()
5959
};
6060
}
6161

0 commit comments

Comments
 (0)