Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<a name="6.0.1"></a>
# [6.0.1](https://github.com/angular/angularfire2/compare/6.0.0...6.0.1) (2020-06-24)

* Updating peer dependencies to allow for Angular 10
* `ng add @angular/fire` should correctly add the `firebase` peer
* `ng add @angular/fire` will not duplicate settings entries, if they're already present
* `ng add @angular/fire` will error if there are peer incompatabilities
* `ng deploy` should function correctly on Windows devices
* `ng deploy` will now mark the Angular assets as immutable on Firebase Hosting
* RTDB and Firestore CRUD operations should return in the ngZone
* Use of `AngularFireAuthGuard` should no longer destablize Zone.js

<a name="6.0.0"></a>
# [6.0.0](https://github.com/angular/angularfire2/compare/6.0.0-rc.2...6.0.0) (2020-04-01)

Expand Down
12 changes: 6 additions & 6 deletions docs/performance/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ You can inject `AngularFirePerformance` to perform manual traces.
```ts
constructor(private performance: AngularFirePerformance) {}

ngOnInit() {
const trace = this.performance.trace('some-trace');
trace.start();
...
trace.stop();
}
...

const trace = await this.performance.trace('some-trace');
trace.start();
...
trace.stop();
```

## RXJS operators
Expand Down
9 changes: 5 additions & 4 deletions src/database/list/create-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import { map } from 'rxjs/operators';

export function createListReference<T= any>(query: DatabaseQuery, afDatabase: AngularFireDatabase): AngularFireList<T> {
const outsideAngularScheduler = afDatabase.schedulers.outsideAngular;
const refInZone = afDatabase.schedulers.ngZone.run(() => query.ref);
return {
query,
update: createDataOperationMethod<Partial<T>>(query.ref, 'update'),
set: createDataOperationMethod<T>(query.ref, 'set'),
push: (data: T) => query.ref.push(data),
remove: createRemoveMethod(query.ref),
update: createDataOperationMethod<Partial<T>>(refInZone, 'update'),
set: createDataOperationMethod<T>(refInZone, 'set'),
push: (data: T) => refInZone.push(data),
remove: createRemoveMethod(refInZone),
snapshotChanges(events?: ChildEvent[]) {
return snapshotChanges<T>(query, events, outsideAngularScheduler).pipe(afDatabase.keepUnstableUntilFirst);
},
Expand Down
6 changes: 4 additions & 2 deletions src/firestore/firestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ export class AngularFirestore {
collectionRef = pathOrRef;
}
const { ref, query } = associateQuery(collectionRef, queryFn);
return new AngularFirestoreCollection<T>(ref, query, this);
const refInZone = this.schedulers.ngZone.run(() => ref);
return new AngularFirestoreCollection<T>(refInZone, query, this);
}

/**
Expand Down Expand Up @@ -212,7 +213,8 @@ export class AngularFirestore {
} else {
ref = pathOrRef;
}
return new AngularFirestoreDocument<T>(ref, this);
const refInZone = this.schedulers.ngZone.run(() => ref);
return new AngularFirestoreDocument<T>(refInZone, this);
}

/**
Expand Down
6 changes: 1 addition & 5 deletions src/schematics/deploy/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,7 @@ export const deployToFunction = async (
open(`http://localhost:${port}`);
}, 1500);

<<<<<<< HEAD
return firebaseTools.serve({ port, targets: ['hosting', 'functions'] }).then(() =>
=======
return firebaseTools.serve({ port, targets: ["hosting", "functions"], host: 'localhost'}).then(() =>
>>>>>>> 074c477... fix(deploy): undefined:5000 -> localhost:5000
return firebaseTools.serve({ port, targets: ['hosting', 'functions'], host: 'localhost'}).then(() =>
require('inquirer').prompt({
type: 'confirm',
name: 'deployProject',
Expand Down