Skip to content

Commit b72a87b

Browse files
committed
Placeholders for sub-package, reexport rxfire/*
1 parent fadc178 commit b72a87b

27 files changed

+233
-14
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ AngularFire smooths over the rough edges an Angular developer might encounter wh
1818

1919
```ts
2020
import { Component } from '@angular/core';
21-
import { AngularFirestore } from '@angular/fire/firestore';
22-
import { Observable } from 'rxjs';
21+
import { Firestore } from '@angular/fire';
22+
import { Observable, valueChanges } from 'rxjs';
23+
import { collection } from 'firebase/firestore';
2324

2425
@Component({
2526
selector: 'app-root',
@@ -33,8 +34,8 @@ import { Observable } from 'rxjs';
3334
})
3435
export class MyApp {
3536
item$: Observable<any[]>;
36-
constructor(firestore: AngularFirestore) {
37-
this.item$ = firestore.collection('items').valueChanges();
37+
constructor(firestore: Firestore) {
38+
this.item$ = valueChanges(collection(firestore, 'items'));
3839
}
3940
}
4041
```
@@ -47,6 +48,7 @@ AngularFire doesn't follow Angular's versioning as Firebase also has breaking ch
4748

4849
| Angular | Firebase | AngularFire |
4950
| --------|----------|--------------|
51+
| 12 | 9 | ^7.0 |
5052
| 11 | 7,8 | ^6.1 |
5153
| 10 | 8 | ^6.0.4 |
5254
| 10 | 7 | ^6.0.3 |
@@ -77,7 +79,7 @@ Neither AngularFire or Firebase ship with polyfills. To have compatability acros
7779

7880
[Stackblitz Template](https://stackblitz.com/edit/angular-fire-start) - Remember to set your Firebase configuration in `app/app.module.ts`.
7981

80-
[Upgrading to v6.0? Check out our guide.](docs/version-6-upgrade.md)
82+
[Upgrading to v7.0? Check out our guide.](docs/version-7-upgrade.md)
8183

8284
**Having troubles?** Get help on our [Q&A board](https://github.com/angular/angularfire/discussions?discussions_q=category%3AQ%26A), the official [Firebase Mailing List](https://groups.google.com/forum/#!forum/firebase-talk), the [Firebase Community Slack](https://firebase.community/) (`#angularfire2`), the [Angular Community Discord](http://discord.gg/angular) (`#firebase`), [Gitter](https://gitter.im/angular/angularfire2), the [Firebase subreddit](https://www.reddit.com/r/firebase), or [Stack Overflow](https://stackoverflow.com/questions/tagged/angularfire2).
8385

docs/version-7-upgrade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Upgrading to AngularFire 7.0
2+
3+
Intended to be run with Angular 12, AngularFire 7.0 allows you to take full advtange of the new tree-shakable Firebase JS SDK (v9) while also providing a compatible expirience with the prior API.
4+
5+
**TBD**

src/analytics/analytics.module.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function ɵanalyticsInstancesFactory(instances: Analytics[]) {
2828
// Hack: useFactory doesn't allow us to pass a lambda, so let's bind the arugments
2929
// Going this direction to cut down on DI token noise; also making it easier to support
3030
// multiple Firebase Apps
31-
export function ɵboundAuthInstanceFactory(zone: NgZone) {
31+
export function ɵboundAnalyticsInstanceFactory(zone: NgZone) {
3232
const analytics = ɵsmartCacheInstance<FirebaseAnalytics>(CACHE_PREFIX, this);
3333
return new Analytics(analytics);
3434
}
@@ -47,15 +47,15 @@ const DEFAULT_ANALYTICS_INSTANCE_PROVIDER = {
4747
DEFAULT_ANALYTICS_INSTANCE_PROVIDER,
4848
]
4949
})
50-
export class AngularFireAuthModule {
50+
export class AngularFireAnalyticsModule {
5151
}
5252

5353
export function provideAnalytics(fn: () => FirebaseAnalytics) {
5454
return {
55-
ngModule: AngularFireAuthModule,
55+
ngModule: AngularFireAnalyticsModule,
5656
providers: [{
5757
provide: ANALYTICS_INSTANCES,
58-
useFactory: ɵboundAuthInstanceFactory.bind(fn),
58+
useFactory: ɵboundAnalyticsInstanceFactory.bind(fn),
5959
multi: true,
6060
deps: [
6161
NgZone,

src/analytics/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/package.schema.json",
3+
"ngPackage": {
4+
"lib": {
5+
"umdModuleIds": {
6+
"rxfire/analytics": "rxfire"
7+
},
8+
"entryFile": "public_api.ts"
9+
}
10+
}
11+
}

src/analytics/public_api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Analytics, provideAnalytics, ANALYTICS_INSTANCES } from '@angular/fire';

src/app/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/package.schema.json",
3+
"ngPackage": {
4+
"lib": {
5+
"umdModuleIds": {
6+
"rxfire/app": "rxfire"
7+
},
8+
"entryFile": "public_api.ts"
9+
}
10+
}
11+
}

src/app/public_api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { FirebaseApp, provideFirebaseApp, FIREBASE_APPS } from '@angular/fire';

src/auth/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/package.schema.json",
3+
"ngPackage": {
4+
"lib": {
5+
"umdModuleIds": {
6+
"rxfire/auth": "rxfire"
7+
},
8+
"entryFile": "public_api.ts"
9+
}
10+
}
11+
}

src/auth/public_api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { Auth, provideAuth, AUTH_INSTANCES } from '@angular/fire';
2+
export * from 'rxfire/auth';

src/database/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/package.schema.json",
3+
"ngPackage": {
4+
"lib": {
5+
"umdModuleIds": {
6+
"rxfire/database": "rxfire"
7+
},
8+
"entryFile": "public_api.ts"
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)