Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 30db0aa

Browse files
jamesdanielsdavideast
authored andcommitted
chore(): lean only on firebase types and compatibility with 5.0.4 (#1729)
* chore(): lean only on `firebase` types and compatibility with 5.0.4 * chore(): rc.11 version bump and changelog entry
1 parent a42a84f commit 30db0aa

File tree

21 files changed

+429
-450
lines changed

21 files changed

+429
-450
lines changed

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<a name="5.0.0-rc.11"></a>
2+
# [5.0.0-rc.11](https://github.com/angular/angularfire2/compare/5.0.0-rc.10...5.0.0-rc.11) (2018年06月13日)
3+
4+
### Bug Fixes
5+
6+
* Fixed SSR compilation and misc. typing issues ([#1729](https://github.com/angular/angularfire2/issues/1729)) ([eed5802](https://github.com/angular/angularfire2/commit/eed5802))
7+
8+
19
<a name="5.0.0-rc.10"></a>
210
# [5.0.0-rc.10](https://github.com/angular/angularfire2/compare/5.0.0-rc.9...5.0.0-rc.10) (2018年05月22日)
311

‎docs/auth/getting-started.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ the Firebase docs for more information on what methods are available.](https://f
1111
```ts
1212
import { Component } from '@angular/core';
1313
import { AngularFireAuth } from 'angularfire2/auth';
14-
import { auth } from 'firebase/app';
14+
import { auth } from 'firebase';
1515

1616
@Component({
1717
selector: 'app-root',

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularfire2",
3-
"version": "5.0.0-rc.10",
3+
"version": "5.0.0-rc.11",
44
"description": "The official library of Firebase and Angular.",
55
"private": true,
66
"scripts": {
@@ -34,8 +34,8 @@
3434
"@angular/core": "^6.0.0",
3535
"@angular/platform-browser": "^6.0.0",
3636
"@angular/platform-browser-dynamic": "^6.0.0",
37-
"firebase": "^5.0.3",
3837
"bufferutil": "^3.0.3",
38+
"firebase": "^5.0.3",
3939
"rxjs": "^6.0.0",
4040
"utf-8-validate": "^4.0.0",
4141
"ws": "^3.3.2",

‎src/auth/auth.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { User } from 'firebase/app';
1+
import { User } from 'firebase';
22
import { ReflectiveInjector, Provider } from '@angular/core';
33
import { Observable, Subject } from 'rxjs'
44
import { TestBed, inject } from '@angular/core/testing';

‎src/auth/auth.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Observable, of, from } from 'rxjs';
33
import { switchMap } from 'rxjs/operators';
44
import { FirebaseAppConfig, FirebaseOptions } from 'angularfire2';
55

6-
import { User, auth } from 'firebase/app';
6+
import { User, auth } from 'firebase';
77

88
import { FirebaseAuth, FirebaseOptionsToken, FirebaseNameOrConfigToken, _firebaseAppFactory, FirebaseZoneScheduler } from 'angularfire2';
99

‎src/core/angularfire2.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { FirebaseApp, AngularFireModule } from 'angularfire2';
55
import { Subscription } from 'rxjs';
66
import { COMMON_CONFIG } from './test-config';
77
import { BrowserModule } from '@angular/platform-browser';
8-
import { database } from 'firebase/app';
8+
import { database } from 'firebase';
99

1010
describe('angularfire', () => {
1111
let subscription:Subscription;

‎src/core/firebase.app.module.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { InjectionToken, NgZone, NgModule, Optional } from '@angular/core';
2-
import { app, auth, apps, database, firestore, functions, initializeApp, messaging, storage } from 'firebase/app';
2+
import { app, auth, database, firestore, functions, messaging, storage } from 'firebase';
3+
import * as firebase from 'firebase/app';
34

45
// Public types don't expose FirebaseOptions or FirebaseAppConfig
56
export type FirebaseOptions = {[key:string]: any};
@@ -34,9 +35,9 @@ export function _firebaseAppFactory(options: FirebaseOptions, nameOrConfig?: str
3435
const name = typeof nameOrConfig === 'string' && nameOrConfig || '[DEFAULT]';
3536
const config = typeof nameOrConfig === 'object' && nameOrConfig || {};
3637
config.name = config.name || name;
37-
const existingApp = apps.filter(app => app && app.name === config.name)[0];
38+
const existingApp = firebase.apps.filter(app => app && app.name === config.name)[0];
3839
// We support FirebaseConfig, initializeApp's public type only accepts string; need to cast as any
39-
return (existingApp || (initializeAppasany)(options, config)) as FirebaseApp;
40+
return (existingApp || firebase.initializeApp(options, <any>config)) as FirebaseApp;
4041
}
4142

4243
const FirebaseAppProvider = {

‎src/database-deprecated/firebase_list_factory.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function firebaseListObservable(ref: Reference | DatabaseQuery, {preserveSnapsho
127127
snap.forEach((child: any) => {
128128
lastLoadedKey = child.key;
129129
});
130-
if (array.find((child: any) => toKey(child) === lastLoadedKey)) {
130+
if ((<any>array).find((child: any) => toKey(child) === lastLoadedKey)) {
131131
hasLoaded = true;
132132
obs.next(array);
133133
}
@@ -177,7 +177,7 @@ function firebaseListObservable(ref: Reference | DatabaseQuery, {preserveSnapsho
177177
// The Firebase SDK requires the reference, event name, and callback to
178178
// properly unsubscribe, otherwise it can affect other subscriptions.
179179
handles.forEach(item => {
180-
ref.off(item.event, item.handle);
180+
ref.off(item.eventasany, item.handle);
181181
});
182182
};
183183

‎src/database-deprecated/firebase_object_observable.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Observable, Operator, Subscriber, Subscription } from 'rxjs';
22
import { Reference } from './interfaces';
3-
import { database } from 'firebase/app';
3+
import { database } from 'firebase';
44

55
export class FirebaseObjectObservable<T> extends Observable<T> {
66
constructor(subscribe?: <R>(subscriber: Subscriber<R>) => Subscription | Function | void, public $ref?:Reference) {

‎src/database-deprecated/interfaces.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Observable } from 'rxjs';
2-
import { database } from 'firebase/app';
2+
import { database } from 'firebase';
33

44
export type Reference = database.Reference;
55
export type DataSnapshot = database.DataSnapshot;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /