Skip to content

7.0.1 #2908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 30, 2021
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<a name="7.0.1"></a>
# [7.0.1](https://github.com/angular/angularfire2/compare/7.0.0...7.0.1) (2021-08-30)

### Bug fixes

* **messaging:** `onMessage` will no longer destablize the Angular Zone
* **core:** Injected Classes now have a better fallback pattern for finding defaults, [#2909](https://github.com/angular/angularfire/issues/2909) allowing use of emulators and other config options as expected
* **schematic:** upgrade schematic will no longer rewrite `.ts` files outside of your project root, [#2907](https://github.com/angular/angularfire/issues/2907)

<a name="7.0.0"></a>
# [7.0.0](https://github.com/angular/angularfire2/compare/6.1.5...7.0.0) (2021-08-25)

Expand All @@ -7,8 +16,12 @@
* AngularFire now only works in Ivy applications
* Firebase JS SDK v9 is required
* The existing AngularFire v6 API surface has moved from `@angular/fire/*` to `@angular/fire/compat/*` (see compatibility mode)
* **compat/auth:** `USE_EMULATOR` DI token is now in the form of `['http://localhost:9099']`

### Features

* New modular API surface available at `@angular/fire/*`
* Various cleanup
* **compat/storage:** `USE_EMULATOR` DI token

[See the v7 upgrade guide for more information.](https://github.com/angular/angularfire/blob/master/docs/version-7-upgrade.md)

Expand Down
3 changes: 2 additions & 1 deletion docs/version-7-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Intended to be run with Angular 12, AngularFire 7.0 allows you to take full advt
* AngularFire now only works in Ivy applications
* Firebase JS SDK v9 is required
* The existing AngularFire v6 API surface has moved from `@angular/fire/*` to `@angular/fire/compat/*` (see compatibility mode)
* **compat/auth:** `USE_EMULATOR` DI token is now in the form of `['http://localhost:9099']`

## Compatibility mode

Expand Down Expand Up @@ -216,7 +217,7 @@ collection<T>(docRef, 'bar') // CollectionReference<T>

```ts
import { docSnapshots } from '@angular/fire/firestore';
docSnapshot<T>(docRef) // Observable<DocumentSnapshot<T>>
docSnapshots<T>(docRef) // Observable<DocumentSnapshot<T>>
```
</td>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular/fire",
"version": "7.0.0",
"version": "7.0.1",
"description": "The official Angular library for Firebase.",
"private": true,
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions sample-compat/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"auth": {
"port": 9099
},
"storage": {
"port": 9199
},
"ui": {
"enabled": true
}
Expand Down
4 changes: 2 additions & 2 deletions sample-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"@nguniversal/express-engine": "12.1.0",
"core-js": "^3.6.5",
"cross-fetch": "^3.1.4",
"firebase": "9.0.0-202172505352",
"firebase": "^9.0.0",
"first-input-delay": "^0.1.3",
"proxy-polyfill": "^0.3.2",
"rxfire": "6.0.0-rc.1",
"rxfire": "^6.0.0",
"rxjs": "~6.6.0",
"tslib": "^2.1.0",
"whatwg-fetch": "^3.4.1",
Expand Down
8 changes: 4 additions & 4 deletions sample-compat/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import { FirestoreComponent } from './firestore/firestore.component';
import { AngularFireDatabaseModule, USE_EMULATOR as USE_DATABASE_EMULATOR } from '@angular/fire/compat/database';
import { AngularFirestoreModule, USE_EMULATOR as USE_FIRESTORE_EMULATOR, SETTINGS as FIRESTORE_SETTINGS } from '@angular/fire/compat/firestore';
import { AngularFireStorageModule } from '@angular/fire/compat/storage';
import { AngularFireStorageModule, USE_EMULATOR as USE_STORAGE_EMULATOR } from '@angular/fire/compat/storage';
import { AngularFireAuthModule, USE_DEVICE_LANGUAGE, USE_EMULATOR as USE_AUTH_EMULATOR } from '@angular/fire/compat/auth';
import { AngularFireMessagingModule, SERVICE_WORKER, VAPID_KEY } from '@angular/fire/compat/messaging';
import { AngularFireFunctionsModule, USE_EMULATOR as USE_FUNCTIONS_EMULATOR, ORIGIN as FUNCTIONS_ORIGIN } from '@angular/fire/compat/functions';
Expand Down Expand Up @@ -78,19 +78,19 @@ import { UpboatsComponent } from './upboats/upboats.component';
{ provide: FIRESTORE_SETTINGS, useValue: { ignoreUndefinedProperties: true } },
{ provide: ANALYTICS_DEBUG_MODE, useValue: true },
{ provide: COLLECTION_ENABLED, useValue: true },
{ provide: USE_AUTH_EMULATOR, useValue: environment.useEmulators ? ['localhost', 9099] : undefined },
{ provide: USE_AUTH_EMULATOR, useValue: environment.useEmulators ? ['http://localhost:9099'] : undefined },
{ provide: USE_DATABASE_EMULATOR, useValue: environment.useEmulators ? ['localhost', 9000] : undefined },
{ provide: USE_FIRESTORE_EMULATOR, useValue: environment.useEmulators ? ['localhost', 8080] : undefined },
{ provide: USE_FUNCTIONS_EMULATOR, useValue: environment.useEmulators ? ['localhost', 5001] : undefined },
{ provide: USE_STORAGE_EMULATOR, useValue: environment.useEmulators ? ['localhost', 9199] : undefined },
{ provide: FUNCTIONS_ORIGIN, useFactory: () => isDevMode() || typeof location === 'undefined' ? undefined : location.origin },
{ provide: REMOTE_CONFIG_SETTINGS, useFactory: () => isDevMode() ? { minimumFetchIntervalMillis: 10_000 } : {} },
{ provide: REMOTE_CONFIG_DEFAULTS, useValue: { background_color: 'red' } },
{ provide: USE_DEVICE_LANGUAGE, useValue: true },
{ provide: VAPID_KEY, useValue: environment.vapidKey },
{ provide: SERVICE_WORKER, useFactory: () => typeof navigator !== 'undefined' && navigator.serviceWorker?.getRegistration('firebase-messaging-sw.js') || undefined },
{ provide: SERVICE_WORKER, useFactory: () => typeof navigator !== 'undefined' && navigator.serviceWorker?.register('firebase-messaging-sw.js') || undefined },
{ provide: APP_VERSION, useValue: '0.0.0' },
{ provide: APP_NAME, useValue: 'Angular' },
{ provide: APP_INITIALIZER, useValue: () => typeof navigator !== 'undefined' && navigator.serviceWorker?.register('firebase-messaging-sw.js').catch(() => undefined) || Promise.resolve(), multi: true },
],
bootstrap: [AppComponent]
})
Expand Down
Loading