Skip to content

Commit 8e5a995

Browse files
authored
chore(): final fixes for 5.2.0 release (#2085)
* Reworking performance a bit more * Perf documentation * Doc path should be optional * Build tests for ng 7 & 8 * Handle different formats for .firebaserc and firebase.json * Make schematic deps peers by install deps and devDeps in ngAdd * Upgrading typescript * Angular Package Manager changes and side effects * Make perf lazy and fix both perf & messaging on Node
1 parent d2ef4c8 commit 8e5a995

File tree

99 files changed

+21005
-702
lines changed

Some content is hidden

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

99 files changed

+21005
-702
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ typings/
66
npm-debug.log
77
.idea/
88
.vscode/settings.json
9+
angular-fire-*.tgz
910
angularfire2-*.tgz
1011
*.ngfactory.ts
1112
*.ngsummary.json

.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ install:
3939
fi
4040
4141
script:
42-
- yarn run build
42+
- yarn build
4343
- |
4444
./node_modules/.bin/karma start --single-run --browsers ChromeHeadlessTravis --reporters mocha &&
4545
yarn test:node &&
4646
node tools/run-typings-test.js &&
47-
cd test/ng-build/ng6 &&
48-
yarn && yarn build:prod
47+
bash ./test/ng-build/build.sh

CHANGELOG.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
<a name="5.2.0"></a>
22
# [5.2.0](https://github.com/angular/angularfire2/compare/5.1.3...5.2.0) (2019-05-24)
33

4+
AngularFire 5.2 introduces support for Angular 8 and version 6 of the Firebase SDK.
5+
46
### Bug Fixes
57

68
* **firestore:** Fix for builds targeting Node ([#2079](https://github.com/angular/angularfire2/issues/2079)) ([8a33826](https://github.com/angular/angularfire2/commit/8a33826))
79
* **storage:** Typo in updateMetadata method ([#2029](https://github.com/angular/angularfire2/issues/2029)) ([6133296](https://github.com/angular/angularfire2/commit/6133296))
10+
* **messaging:** Allow `AngularFireMessaging` to be included in a server build ([#1938](https://github.com/angular/angularfire2/issues/1938)) ([9b870a9](https://github.com/angular/angularfire2/commit/9b870a9))
811

912
### Features
1013

11-
* **performance:** AngularFire Performance Monitoring ([#2064](https://github.com/angular/angularfire2/issues/2064))
14+
* **performance:** AngularFire Performance Monitoring ([#2064](https://github.com/angular/angularfire2/issues/2064)) ([2469e77](https://github.com/angular/angularfire2/commit/2469e7721ffaea755ab6b95b66610e1495692342))
1215
* **auth-guard:** AngularFire Auth Guards ([#2016](https://github.com/angular/angularfire2/issues/2016)) ([e32164d](https://github.com/angular/angularfire2/commit/e32164d))
1316
* **firestore:** Added option to include document IDs on valueChanges() ([#1976](https://github.com/angular/angularfire2/issues/1976)) ([7108875](https://github.com/angular/angularfire2/commit/7108875))
1417
* **firestore:** Support Firestore Collection Group Queries ([#2066](https://github.com/angular/angularfire2/issues/2066)) ([c34c0f3](https://github.com/angular/angularfire2/commit/c34c0f3))
1518
* **functions:** Allow configuration of Functions Emulator Origin ([#2017](https://github.com/angular/angularfire2/issues/2017)) ([d12b4c5](https://github.com/angular/angularfire2/commit/d12b4c5))
1619
* **schematics:** ng deploy schematic ([#2046](https://github.com/angular/angularfire2/issues/2046)) ([be0a1fb](https://github.com/angular/angularfire2/commit/be0a1fb))
17-
20+
* **firestore:** path on `AngularFirestoreCollection`'s `.doc` is optional ([#1974](https://github.com/angular/angularfire2/issues/1974)) ([c2354f8](https://github.com/angular/angularfire2/commit/c2354f8))
1821

1922

2023
<a name="5.1.2"></a>

docs/performance/getting-started.md

+26-6
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,43 @@ ngOnInit() {
5151
}
5252
```
5353

54-
### `trace(name:string)`
54+
### `trace(name: string, options?: TraceOptions)`
5555

5656
The most basic operator, `trace` will measure the amount of time it takes for your observable to either complete or emit its first value. Beyond the basic trace there are several other operators:
5757

58-
### `traceUntil(name:string, test: (T) => Boolean)`
58+
<h3>
59+
<pre>
60+
traceUntil(
61+
name: string,
62+
test: (T) => Boolean,
63+
options?: TraceOptions & { orComplete?: true }
64+
)
65+
</pre>
66+
</h3>
5967

6068
Trace the observable until the first emission that passes the provided test.
6169

62-
### `traceWhile(name:string, test: (T) => Boolean)`
70+
If the `orComplete` option is passed it will complete the trace when the observable completes, even if an emission never passed the provided test.
71+
72+
<h3>
73+
<pre>
74+
traceWhile(
75+
name: string,
76+
test: (T) => Boolean,
77+
options?: TraceOptions & { orComplete?: true }
78+
)
79+
</pre>
80+
</h3>
81+
82+
Starting with an emission that passes the provided test, trace until an emission fails the test.
6383

64-
Trace the observable until the first emission that fails the provided test.
84+
If the `orComplete` option is passed it will complete any existing trace when the observable completes.
6585

66-
### `traceUntilLast(name:string)`
86+
### `traceUntilLast(name: string, options?: TraceOptions)`
6787

6888
Trace the observable until completion.
6989

70-
### `traceUntilFirst(name: string)`
90+
### `traceUntilFirst(name: string, options?: TraceOptions)`
7191

7292
Traces the observable until the first emission.
7393

package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"karma": "karma start",
1212
"test:universal": "npm run build && cp -R dist/packages-dist test/universal-test/node_modules/angularfire2 && cd test/universal-test && npm run prerender",
1313
"delayed_karma": "sleep 10 && karma start",
14-
"build": "rm -rf dist && node tools/build.js",
14+
"build": "rm -rf dist && node tools/build.js && npm pack ./dist/packages-dist",
1515
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
16-
"build:wrapper": "npm i --prefix wrapper && npm run --prefix wrapper build"
16+
"build:wrapper": "npm i --prefix wrapper && npm run --prefix wrapper build && npm pack ./dist/wrapper-dist"
1717
},
1818
"schematics": "./dist/packages-dist/collection.json",
1919
"builders": "./dist/packages-dist/builders.json",
@@ -33,15 +33,15 @@
3333
},
3434
"homepage": "https://github.com/angular/angularfire2#readme",
3535
"dependencies": {
36-
"@angular-devkit/architect": "^0.800.0-rc.4 || >=8.0.0 <9 || 9.0.0-0",
37-
"@angular-devkit/core": ">=6.0.0 <9 || 9.0.0-0",
38-
"@angular-devkit/schematics": ">=6.0.0 <9 || 9.0.0-0",
39-
"@angular/common": ">=6.0.0 <9 || 9.0.0-0",
40-
"@angular/compiler": ">=6.0.0 <9 || 9.0.0-0",
41-
"@angular/core": ">=6.0.0 <9 || 9.0.0-0",
42-
"@angular/platform-browser": ">=6.0.0 <9 || 9.0.0-0",
43-
"@angular/platform-browser-dynamic": ">=6.0.0 <9 || 9.0.0-0",
44-
"@angular/router": ">=6.0.0 <9 || 9.0.0-0",
36+
"@angular-devkit/architect": "<0.900 || ^0.900.0-0 || ^9.0.0-0",
37+
"@angular-devkit/core": ">=6.0.0 <9 || ^9.0.0-0",
38+
"@angular-devkit/schematics": ">=6.0.0 <9 || ^9.0.0-0",
39+
"@angular/common": ">=6.0.0 <9 || ^9.0.0-0",
40+
"@angular/compiler": ">=6.0.0 <9 || ^9.0.0-0",
41+
"@angular/core": ">=6.0.0 <9 || ^9.0.0-0",
42+
"@angular/platform-browser": ">=6.0.0 <9 || ^9.0.0-0",
43+
"@angular/platform-browser-dynamic": ">=6.0.0 <9 || ^9.0.0-0",
44+
"@angular/router": ">=6.0.0 <9 || ^9.0.0-0",
4545
"firebase": ">= 5.5.7 <7",
4646
"firebase-tools": "^6.10.0",
4747
"fuzzy": "^0.1.3",
@@ -57,9 +57,9 @@
5757
"utf-8-validate": "~4.0.0"
5858
},
5959
"devDependencies": {
60-
"@angular/animations": ">=6.0.0 <9 || 9.0.0-0",
61-
"@angular/compiler-cli": ">=6.0.0 <9 || 9.0.0-0",
62-
"@angular/platform-server": ">=6.0.0 <9 || 9.0.0-0",
60+
"@angular/animations": ">=6.0.0 <9 || ^9.0.0-0",
61+
"@angular/compiler-cli": ">=6.0.0 <9 || ^9.0.0-0",
62+
"@angular/platform-server": ">=6.0.0 <9 || ^9.0.0-0",
6363
"@types/inquirer": "^0.0.44",
6464
"@types/jasmine": "^2.5.36",
6565
"@types/request": "0.0.30",
@@ -96,7 +96,7 @@
9696
"systemjs": "^0.19.16",
9797
"systemjs-builder": "^0.15.7",
9898
"traceur": "0.0.96",
99-
"typescript": "^3.1.6 <3.2"
99+
"typescript": ">=3.4.0 <3.5.0"
100100
},
101101
"typings": "index.d.ts"
102102
}

src/auth-guard/package.json

+2-25
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
{
22
"name": "@angular/fire/auth-guard",
3-
"version": "ANGULARFIRE2_VERSION",
4-
"description": "The auth guard module",
53
"main": "../bundles/auth-guard.umd.js",
64
"module": "index.js",
75
"es2015": "./es2015/index.js",
8-
"keywords": [
9-
"angular",
10-
"firebase",
11-
"rxjs"
12-
],
13-
"repository": {
14-
"type": "git",
15-
"url": "git+https://github.com/angular/angularfire2.git"
16-
},
17-
"author": "angular,firebase",
18-
"license": "MIT",
19-
"peerDependencies": {
20-
"@angular/fire": "ANGULARFIRE2_VERSION",
21-
"@angular/common": "ANGULAR_VERSION",
22-
"@angular/core": "ANGULAR_VERSION",
23-
"@angular/platform-browser": "ANGULAR_VERSION",
24-
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
25-
"@angular/router": "ANGULAR_VERSION",
26-
"firebase": "FIREBASE_VERSION",
27-
"rxjs": "RXJS_VERSION",
28-
"zone.js": "ZONEJS_VERSION"
29-
},
30-
"typings": "index.d.ts"
6+
"typings": "index.d.ts",
7+
"sideEffects": false
318
}
329

src/auth/package.json

+2-24
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,8 @@
11
{
22
"name": "@angular/fire/auth",
3-
"version": "ANGULARFIRE2_VERSION",
4-
"description": "The auth module",
53
"main": "../bundles/auth.umd.js",
64
"module": "index.js",
75
"es2015": "./es2015/index.js",
8-
"keywords": [
9-
"angular",
10-
"firebase",
11-
"rxjs"
12-
],
13-
"repository": {
14-
"type": "git",
15-
"url": "git+https://github.com/angular/angularfire2.git"
16-
},
17-
"author": "angular,firebase",
18-
"license": "MIT",
19-
"peerDependencies": {
20-
"@angular/fire": "ANGULARFIRE2_VERSION",
21-
"@angular/common": "ANGULAR_VERSION",
22-
"@angular/core": "ANGULAR_VERSION",
23-
"@angular/platform-browser": "ANGULAR_VERSION",
24-
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
25-
"firebase": "FIREBASE_VERSION",
26-
"rxjs": "RXJS_VERSION",
27-
"zone.js": "ZONEJS_VERSION"
28-
},
29-
"typings": "index.d.ts"
6+
"typings": "index.d.ts",
7+
"sideEffects": false
308
}

src/core/collection.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"schematics": {
44
"ng-add": {
55
"description": "Add firebase deploy schematic",
6-
"factory": "./schematics/index#ngDeploy"
6+
"factory": "./schematics/index#ngAdd"
7+
},
8+
"ng-add-setup-firebase-deploy": {
9+
"description": "Setup ng deploy",
10+
"factory": "./schematics/index#setupNgDeploy"
711
}
812
}
913
}

src/core/package.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,20 @@
2121
"author": "angular,firebase",
2222
"license": "MIT",
2323
"peerDependencies": {
24+
"@angular-devkit/architect": "ANGULAR_DEVKIT_ARCH_VERSION",
25+
"@angular-devkit/core": "ANGULAR_VERSION",
26+
"@angular-devkit/schematics": "ANGULAR_VERSION",
2427
"@angular/common": "ANGULAR_VERSION",
2528
"@angular/core": "ANGULAR_VERSION",
2629
"@angular/platform-browser": "ANGULAR_VERSION",
2730
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
2831
"firebase": "FIREBASE_VERSION",
29-
"rxjs": "RXJS_VERSION",
30-
"zone.js": "ZONEJS_VERSION"
31-
},
32-
"dependencies": {
33-
"@angular-devkit/architect": "ANGULAR_DEVKIT_ARCH_VERSION",
34-
"@angular-devkit/core": "ANGULAR_VERSION",
35-
"@angular-devkit/schematics": "ANGULAR_VERSION",
3632
"firebase-tools": "FIREBASE_TOOLS_VERSION",
3733
"fuzzy": "FUZZY_VERSION",
3834
"inquirer": "INQUIRER_VERSION",
39-
"inquirer-autocomplete-prompt": "INQUIRER_AUTOCOMPLETE_VERSION"
35+
"inquirer-autocomplete-prompt": "INQUIRER_AUTOCOMPLETE_VERSION",
36+
"rxjs": "RXJS_VERSION"
4037
},
41-
"typings": "index.d.ts"
38+
"typings": "index.d.ts",
39+
"sideEffects": false
4240
}

src/database-deprecated/package.json

+2-24
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,8 @@
11
{
22
"name": "@angular/fire/database-deprecated",
3-
"version": "ANGULARFIRE2_VERSION",
4-
"description": "The database module",
53
"main": "../bundles/database.umd.js",
64
"module": "index.js",
75
"es2015": "./es2015/index.js",
8-
"keywords": [
9-
"angular",
10-
"firebase",
11-
"rxjs"
12-
],
13-
"repository": {
14-
"type": "git",
15-
"url": "git+https://github.com/angular/angularfire2.git"
16-
},
17-
"author": "angular,firebase",
18-
"license": "MIT",
19-
"peerDependencies": {
20-
"@angular/fire": "ANGULARFIRE2_VERSION",
21-
"@angular/common": "ANGULAR_VERSION",
22-
"@angular/core": "ANGULAR_VERSION",
23-
"@angular/platform-browser": "ANGULAR_VERSION",
24-
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
25-
"firebase": "FIREBASE_VERSION",
26-
"rxjs": "RXJS_VERSION",
27-
"zone.js": "ZONEJS_VERSION"
28-
},
29-
"typings": "index.d.ts"
6+
"typings": "index.d.ts",
7+
"sideEffects": false
308
}

src/database/package.json

+2-24
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,8 @@
11
{
22
"name": "@angular/fire/database",
3-
"version": "ANGULARFIRE2_VERSION",
4-
"description": "The database module",
53
"main": "../bundles/database.umd.js",
64
"module": "index.js",
75
"es2015": "./es2015/index.js",
8-
"keywords": [
9-
"angular",
10-
"firebase",
11-
"rxjs"
12-
],
13-
"repository": {
14-
"type": "git",
15-
"url": "git+https://github.com/angular/angularfire2.git"
16-
},
17-
"author": "angular,firebase",
18-
"license": "MIT",
19-
"peerDependencies": {
20-
"@angular/fire": "ANGULARFIRE2_VERSION",
21-
"@angular/common": "ANGULAR_VERSION",
22-
"@angular/core": "ANGULAR_VERSION",
23-
"@angular/platform-browser": "ANGULAR_VERSION",
24-
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
25-
"firebase": "FIREBASE_VERSION",
26-
"rxjs": "RXJS_VERSION",
27-
"zone.js": "ZONEJS_VERSION"
28-
},
29-
"typings": "index.d.ts"
6+
"typings": "index.d.ts",
7+
"sideEffects": false
308
}

src/firebase-node/package.json

+2-20
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,7 @@
33
"version": "ANGULARFIRE2_VERSION",
44
"description": "Fixes for Node.js",
55
"main": "index.js",
6-
"keywords": [
7-
"angular",
8-
"firebase",
9-
"rxjs"
10-
],
11-
"repository": {
12-
"type": "git",
13-
"url": "git+https://github.com/angular/angularfire2.git"
14-
},
15-
"author": "angular,firebase",
16-
"license": "MIT",
17-
"dependencies": {
18-
"xhr2": "XHR2_VERSION",
19-
"ws": "WS_VERSION"
20-
},
21-
"optionalDependencies": {
22-
"bufferutil": "BUFFERUTIL_VERSION",
23-
"utf-8-validate": "UTF_8_VALIDATE_VERSION"
24-
},
25-
"typings": "index.d.ts"
6+
"typings": "index.d.ts",
7+
"sideEffects": true
268
}
279

src/firestore/collection/collection.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export class AngularFirestoreCollection<T=DocumentData> {
154154
* Create a reference to a single document in a collection.
155155
* @param path
156156
*/
157-
doc<T>(path: string): AngularFirestoreDocument<T> {
157+
doc<T>(path?: string): AngularFirestoreDocument<T> {
158158
return new AngularFirestoreDocument<T>(this.ref.doc(path), this.afs);
159159
}
160160
}

0 commit comments

Comments
 (0)