Skip to content

Commit d91965e

Browse files
authored
Fixing some stuff since rc-1 (#2347)
* Adding a sample repo * Drop updateMetatdata * Fix the zone tests * Drop the manual side-effect imports
1 parent f178fdd commit d91965e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+13476
-215
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ Get your first application up and running by following [our quickstart guide](do
3434
import { Component } from '@angular/core';
3535
import { AngularFirestore } from '@angular/fire/firestore';
3636
import { Observable } from 'rxjs';
37-
import 'firebase/firestore';
3837

3938
@Component({
4039
selector: 'app-root',

docs/firestore/collections.md

-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ The `AngularFirestoreCollection` service is a wrapper around the native Firestor
1111
import { Component } from '@angular/core';
1212
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
1313
import { Observable } from 'rxjs';
14-
import 'firebase/firestore';
1514

1615
export interface Item { name: string; }
1716

@@ -90,7 +89,6 @@ There are multiple ways of streaming collection data from Firestore.
9089
import { Component } from '@angular/core';
9190
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
9291
import { Observable } from 'rxjs';
93-
import 'firebase/firestore';
9492

9593
export interface Item { id: string; name: string; }
9694

@@ -143,7 +141,6 @@ import { Component } from '@angular/core';
143141
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
144142
import { Observable } from 'rxjs';
145143
import { map } from 'rxjs/operators';
146-
import 'firebase/firestore';
147144

148145
export interface Shirt { name: string; price: number; }
149146
export interface ShirtId extends Shirt { id: string; }
@@ -192,7 +189,6 @@ import { Component } from '@angular/core';
192189
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
193190
import { Observable } from 'rxjs';
194191
import { map } from 'rxjs/operators';
195-
import 'firebase/firestore';
196192

197193
export interface AccountDeposit { description: string; amount: number; }
198194
export interface AccountDepoistId extends AccountDeposit { id: string; }
@@ -238,7 +234,6 @@ import { Component } from '@angular/core';
238234
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
239235
import { Observable } from 'rxjs';
240236
import { map } from 'rxjs/operators';
241-
import 'firebase/firestore';
242237

243238
export interface AccountLogItem { description: string; amount: number; }
244239
export interface AccountLogItemId extends AccountLogItem { id: string; }
@@ -288,7 +283,6 @@ There are three `DocumentChangeType`s in Firestore: `added`, `removed`, and `mod
288283
import { Component } from '@angular/core';
289284
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
290285
import { Observable } from 'rxjs';
291-
import 'firebase/firestore';
292286

293287
@Component({
294288
selector: 'app-root',

docs/firestore/documents.md

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ The `AngularFirestoreDocument` service is a wrapper around the native Firestore
1111
import { Component } from '@angular/core';
1212
import { AngularFirestore, AngularFirestoreDocument } from '@angular/fire/firestore';
1313
import { Observable } from 'rxjs';
14-
import 'firebase/firestore';
1514

1615
export interface Item { name: string; }
1716

docs/firestore/querying-collections.md

-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ import { Component } from '@angular/core';
8686
import { AngularFirestore } from '@angular/fire/firestore';
8787
import { Observable, BehaviorSubject, combineLatest } from 'rxjs';
8888
import { switchMap } from 'rxjs/operators';
89-
import 'firebase/firestore';
9089

9190
export interface Item {
9291
text: string;

docs/install-and-setup.md

-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ Open `/src/app/app.component.ts`, and make sure to modify/delete any tests to ge
9393
```ts
9494
import { Component } from '@angular/core';
9595
import { AngularFirestore } from '@angular/fire/firestore';
96-
import 'firebase/firestore';
9796

9897
@Component({
9998
selector: 'app-root',
@@ -115,7 +114,6 @@ In `/src/app/app.component.ts`:
115114
import { Component } from '@angular/core';
116115
import { AngularFirestore } from '@angular/fire/firestore';
117116
import { Observable } from 'rxjs';
118-
import 'firebase/firestore';
119117

120118
@Component({
121119
selector: 'app-root',

docs/rtdb/lists.md

-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Replace your `/src/app/app.component.ts` from previous step to look like below.
1818
```ts
1919
import { Component } from '@angular/core';
2020
import { AngularFireDatabase } from '@angular/fire/database';
21-
import 'firebase/database';
2221

2322
@Component({
2423
selector: 'app-root',
@@ -53,7 +52,6 @@ Update `/src/app/app.component.ts` to import `AngularFireList` from `@angular/fi
5352
import { Component } from '@angular/core';
5453
import { AngularFireDatabase } from '@angular/fire/database';
5554
import { Observable } from 'rxjs';
56-
import 'firebase/database';
5755

5856
@Component({
5957
selector: 'app-root',
@@ -211,7 +209,6 @@ import { Component } from '@angular/core';
211209
import { AngularFireDatabase, AngularFireList } from '@angular/fire/database';
212210
import { Observable } from 'rxjs';
213211
import { map } from 'rxjs/operators';
214-
import 'firebase/database';
215212

216213
@Component({
217214
selector: 'app-root',

docs/rtdb/objects.md

-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ If you've followed the earlier step "Installation and Setup" your `/src/app/app
1818
import { Component } from '@angular/core';
1919
import { AngularFireDatabase } from '@angular/fire/database';
2020
import { Observable } from 'rxjs';
21-
import 'firebase/database';
2221

2322
@Component({
2423
selector: 'app-root',
@@ -51,7 +50,6 @@ Then in your template, you can use the `async` pipe to unwrap the binding.
5150
import { Component } from '@angular/core';
5251
import { AngularFireDatabase } from '@angular/fire/database';
5352
import { Observable } from 'rxjs';
54-
import 'firebase/database';
5553

5654
@Component({
5755
selector: 'app-root',
@@ -130,7 +128,6 @@ itemRef.remove();
130128
import { Component } from '@angular/core';
131129
import { AngularFireDatabase, AngularFireObject } from '@angular/fire/database';
132130
import { Observable } from 'rxjs';
133-
import 'firebase/database';
134131

135132
@Component({
136133
selector: 'app-root',

docs/rtdb/querying-lists.md

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ import { Component } from '@angular/core';
8282
import { AngularFireDatabase, AngularFireAction } from '@angular/fire/database';
8383
import { Observable, Subscription, BehaviorSubject } from 'rxjs';
8484
import { switchMap } from 'rxjs/operators';
85-
import 'firebase/database';
8685

8786
@Component({
8887
selector: 'app-root',

docs/storage/storage.md

-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { AppComponent } from './app.component';
1313
import { AngularFireModule } from '@angular/fire';
1414
import { AngularFireStorageModule } from '@angular/fire/storage';
1515
import { environment } from '../environments/environment';
16-
import 'firebase/storage';
1716

1817
@NgModule({
1918
imports: [
@@ -48,7 +47,6 @@ Once the `AngularFireStorageModule` is registered you can inject the `AngularFir
4847
```ts
4948
import { Component } from '@angular/core';
5049
import { AngularFireStorage } from '@angular/fire/storage';
51-
import 'firebase/storage';
5250

5351
@Component({
5452
selector: 'app-component',
@@ -77,7 +75,6 @@ There are three options for uploading files.
7775
```ts
7876
import { Component } from '@angular/core';
7977
import { AngularFireStorage } from '@angular/fire/storage';
80-
import 'firebase/storage';
8178

8279
@Component({
8380
selector: 'app-root',
@@ -101,7 +98,6 @@ export class AppComponent {
10198
```ts
10299
import { Component } from '@angular/core';
103100
import { AngularFireStorage } from '@angular/fire/storage';
104-
import 'firebase/storage';
105101

106102
@Component({
107103
selector: 'app-root',
@@ -125,7 +121,6 @@ export class AppComponent {
125121
```ts
126122
import { Component } from '@angular/core';
127123
import { AngularFireStorage } from '@angular/fire/storage';
128-
import 'firebase/storage';
129124

130125
@Component({
131126
selector: 'app-root',

docs/version-6-upgrade.md

-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ We're aiming to release 6.0 with an upgrade schematic to automate most of the re
1515
* Dropped `@angular/fire/firebase-node` and `@angular/fire/database-depreciated`
1616
* We make use of Proxy in more modules, you'll need to polyfill if you want to support IE 11
1717
* We've standardized our DI Token naming conventions across all modules
18-
* `AngularFirestoreModule` no longer imports `firebase/firestore` on it's own to remain side-effect free, you'll need to `import 'firebase/firestore'` before you inject it. A similar changes has been made to `AngularFireStorage` and `AngularFireDatabase`
1918
* `AngularFireAuth` has dropped the `auth` property and instead Promise Proxies the underlying Firebase `auth.Auth` instance; allowing your development experience to more closely mirror the JS SDK. Similar changes have been made to `AngularFireFunctions`, `AngularFireMessaging`, and `AngularFirePerformance`.
2019
* `AngularFireAuthGuard` and `canActivate` have dropped support for raw pipes, this was never working correctly in AOT

package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
},
3535
"homepage": "https://github.com/angular/angularfire2#readme",
3636
"dependencies": {
37-
"@angular-devkit/architect": "^0.900.0-0 || ^0.900.0",
38-
"@angular-devkit/core": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
39-
"@angular-devkit/schematics": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
40-
"@angular/common": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
41-
"@angular/compiler": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
42-
"@angular/core": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
43-
"@angular/platform-browser": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
44-
"@angular/platform-browser-dynamic": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
45-
"@angular/router": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
37+
"@angular-devkit/architect": "~0.900",
38+
"@angular-devkit/core": "^9.0.0",
39+
"@angular-devkit/schematics": "^9.0.0",
40+
"@angular/common": "^9.0.0",
41+
"@angular/compiler": "^9.0.0",
42+
"@angular/core": "^9.0.0",
43+
"@angular/platform-browser": "^9.0.0",
44+
"@angular/platform-browser-dynamic": "^9.0.0",
45+
"@angular/router": "^9.0.0",
4646
"firebase": "^7.8.0",
4747
"firebase-admin": "^8.9.2",
4848
"firebase-functions": "^3.3.0",
@@ -64,12 +64,12 @@
6464
"utf-8-validate": "^5.0.2"
6565
},
6666
"devDependencies": {
67-
"@angular-devkit/build-angular": "^0.900.0-0 || ^0.900.0",
68-
"@angular-devkit/build-ng-packagr": "^0.900.0-0 || ^0.900.0",
69-
"@angular/animations": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
70-
"@angular/cli": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
71-
"@angular/compiler-cli": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
72-
"@angular/platform-server": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
67+
"@angular-devkit/build-angular": "~0.900",
68+
"@angular-devkit/build-ng-packagr": "~0.900",
69+
"@angular/animations": " ^9.0.0",
70+
"@angular/cli": "^9.0.0",
71+
"@angular/compiler-cli": "^9.0.0",
72+
"@angular/platform-server": "^9.0.0",
7373
"@types/fs-extra": "^7.0.0",
7474
"@types/gzip-size": "^5.1.1",
7575
"@types/inquirer": "^0.0.44",

sample/.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

sample/.firebaserc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"targets": {
3+
"aftest-94085": {
4+
"hosting": {
5+
"sample": [
6+
"aftest-94085"
7+
]
8+
}
9+
}
10+
}
11+
}

sample/.gitignore

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
.firebase
44+
45+
# System Files
46+
.DS_Store
47+
Thumbs.db

sample/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Sample
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.5.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

0 commit comments

Comments
 (0)