Skip to content

Commit 4cadc73

Browse files
committed
Modify based on review
- Update licenses date to 2020 (from 2017, 2018) - Declare Module in `registerMessagingCompat.ts` - Update build rule (package.json): -- add `app-comapt` as a dev dependency
1 parent adc5625 commit 4cadc73

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# @firebase/messaging-compat
22

3-
This is the compat package that recreates the v7 APIs.
3+
This is the compat package that recreates the v8 APIs.
44

55
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**

packages-exp/messaging-compat/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google LLC
3+
* Copyright 2020 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

packages-exp/messaging-compat/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"tslib": "^1.11.1"
3939
},
4040
"devDependencies": {
41+
"@firebase/app-compat": "0.0.900",
4142
"@rollup/plugin-json": "4.1.0",
4243
"rollup-plugin-typescript2": "0.29.0",
4344
"ts-essentials": "7.0.1",

packages-exp/messaging-compat/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2018 Google LLC
3+
* Copyright 2020 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

packages-exp/messaging-compat/rollup.config.release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2018 Google LLC
3+
* Copyright 2020 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

packages-exp/messaging-compat/src/registerMessagingCompat.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,19 @@ import {
2222
InstanceFactory
2323
} from '@firebase/component';
2424

25+
import { FirebaseApp } from '@firebase/app-compat';
26+
import { FirebaseMessaging } from '@firebase/messaging-exp';
2527
import { MessagingCompat } from './messaging-compat';
2628
import { _registerComponent } from '@firebase/app-exp';
2729

30+
declare module '@firebase/component' {
31+
interface NameServiceMapping {
32+
'app-compat': FirebaseApp;
33+
'messaging-compat': MessagingCompat;
34+
'messaging-exp': FirebaseMessaging;
35+
}
36+
}
37+
2838
const messagingCompatFactory: InstanceFactory<'messaging-compat'> = (
2939
container: ComponentContainer
3040
) => {
@@ -36,6 +46,10 @@ const messagingCompatFactory: InstanceFactory<'messaging-compat'> = (
3646

3747
export function registerMessagingCompat(): void {
3848
_registerComponent(
39-
new Component('messaging-exp', messagingCompatFactory, ComponentType.PUBLIC)
49+
new Component(
50+
'messaging-compat',
51+
messagingCompatFactory,
52+
ComponentType.PUBLIC
53+
)
4054
);
4155
}

0 commit comments

Comments
 (0)