File tree Expand file tree Collapse file tree 6 files changed +7
-11
lines changed
packages-exp/messaging-exp Expand file tree Collapse file tree 6 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 31
31
},
32
32
"dependencies" : {
33
33
"@firebase/component" : " 0.1.19" ,
34
- "@firebase/installations-exp " : " 0.0.800 " ,
34
+ "@firebase/installations" : " 0.4.17 " ,
35
35
"@firebase/messaging-types-exp" : " 0.0.800" ,
36
36
"@firebase/util" : " 0.3.2" ,
37
37
"eslint" : " ^7.3.1" ,
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class MessagingService implements _FirebaseService {
69
69
readonly swController : SwController | null = null ;
70
70
71
71
constructor ( container : ComponentContainer ) {
72
- const app = container . getProvider ( 'app' ) . getImmediate ( ) ;
72
+ const app = container . getProvider ( 'app-exp ' ) . getImmediate ( ) ;
73
73
const appConfig = extractAppConfig ( app ) ;
74
74
const installations = container . getProvider ( 'installations' ) . getImmediate ( ) ;
75
75
const analyticsProvider = container . getProvider ( 'analytics-internal' ) ;
Original file line number Diff line number Diff line change @@ -42,14 +42,12 @@ describe('extractAppConfig', () => {
42
42
) . to . throw ( 'Missing App configuration value: "App Configuration Object"' ) ;
43
43
44
44
let firebaseApp = getFakeApp ( ) ;
45
- // @ts -expect-error
46
45
delete firebaseApp . options ;
47
46
expect ( ( ) => extractAppConfig ( firebaseApp ) ) . to . throw (
48
47
'Missing App configuration value: "App Configuration Object"'
49
48
) ;
50
49
51
50
firebaseApp = getFakeApp ( ) ;
52
- // @ts -expect-error
53
51
delete firebaseApp . name ;
54
52
expect ( ( ) => extractAppConfig ( firebaseApp ) ) . to . throw (
55
53
'Missing App configuration value: "App Name"'
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- import '@firebase/installations-exp' ;
19
-
20
18
import {
21
19
Component ,
22
20
ComponentContainer ,
Original file line number Diff line number Diff line change 18
18
import { AppConfig } from './app-config' ;
19
19
import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types' ;
20
20
import { FirebaseApp } from '@firebase/app-types-exp' ;
21
- import { FirebaseInstallations } from '@firebase/installations-types-exp ' ;
21
+ import { FirebaseInstallations } from '@firebase/installations-types' ;
22
22
import { Provider } from '@firebase/component' ;
23
23
24
24
export interface FirebaseInternalDependencies {
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
21
21
} from '@firebase/analytics-interop-types' ;
22
22
import { FirebaseApp , FirebaseOptions } from '@firebase/app-types-exp' ;
23
23
24
- import { FirebaseInstallations } from '@firebase/installations-types-exp ' ;
24
+ import { FirebaseInstallations } from '@firebase/installations-types' ;
25
25
import { FirebaseInternalDependencies } from '../../interfaces/internal-dependencies' ;
26
26
import { Provider } from '@firebase/component' ;
27
27
import { extractAppConfig } from '../../helpers/extract-app-config' ;
@@ -38,7 +38,7 @@ export function getFakeFirebaseDependencies(
38
38
} ;
39
39
}
40
40
41
- export function getFakeApp ( options : FirebaseOptions = { } ) : FirebaseApp {
41
+ export function getFakeApp ( options : FirebaseOptions = { } ) : any {
42
42
options = {
43
43
apiKey : 'apiKey' ,
44
44
projectId : 'projectId' ,
@@ -54,8 +54,8 @@ export function getFakeApp(options: FirebaseOptions = {}): FirebaseApp {
54
54
options,
55
55
automaticDataCollectionEnabled : true ,
56
56
delete : async ( ) => { } ,
57
- messaging : ( ( ) => null as unknown ) as FirebaseApp [ 'messaging' ]
58
- // installations: () => getFakeInstallations()
57
+ messaging : ( ( ) => null as unknown ) as FirebaseApp [ 'messaging' ] ,
58
+ installations : ( ) => getFakeInstallations ( )
59
59
} ;
60
60
}
61
61
You can’t perform that action at this time.
0 commit comments