Skip to content

Commit

Permalink
chore(): final fixes for 5.2.0 release (#2085)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jamesdaniels committed May 31, 2019
1 parent d2ef4c8 commit 8e5a995
Show file tree
Hide file tree
Showing 99 changed files with 21,005 additions and 702 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ typings/
npm-debug.log
.idea/
.vscode/settings.json
angular-fire-*.tgz
angularfire2-*.tgz
*.ngfactory.ts
*.ngsummary.json
Expand Down
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ install:
fi
script:
- yarn run build
- yarn build
- |
./node_modules/.bin/karma start --single-run --browsers ChromeHeadlessTravis --reporters mocha &&
yarn test:node &&
node tools/run-typings-test.js &&
cd test/ng-build/ng6 &&
yarn && yarn build:prod
bash ./test/ng-build/build.sh
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<a name="5.2.0"></a>
# [5.2.0](https://github.com/angular/angularfire2/compare/5.1.3...5.2.0) (2019-05-24)

AngularFire 5.2 introduces support for Angular 8 and version 6 of the Firebase SDK.

### Bug Fixes

* **firestore:** Fix for builds targeting Node ([#2079](https://github.com/angular/angularfire2/issues/2079)) ([8a33826](https://github.com/angular/angularfire2/commit/8a33826))
* **storage:** Typo in updateMetadata method ([#2029](https://github.com/angular/angularfire2/issues/2029)) ([6133296](https://github.com/angular/angularfire2/commit/6133296))
* **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))

### Features

* **performance:** AngularFire Performance Monitoring ([#2064](https://github.com/angular/angularfire2/issues/2064))
* **performance:** AngularFire Performance Monitoring ([#2064](https://github.com/angular/angularfire2/issues/2064)) ([2469e77](https://github.com/angular/angularfire2/commit/2469e7721ffaea755ab6b95b66610e1495692342))
* **auth-guard:** AngularFire Auth Guards ([#2016](https://github.com/angular/angularfire2/issues/2016)) ([e32164d](https://github.com/angular/angularfire2/commit/e32164d))
* **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))
* **firestore:** Support Firestore Collection Group Queries ([#2066](https://github.com/angular/angularfire2/issues/2066)) ([c34c0f3](https://github.com/angular/angularfire2/commit/c34c0f3))
* **functions:** Allow configuration of Functions Emulator Origin ([#2017](https://github.com/angular/angularfire2/issues/2017)) ([d12b4c5](https://github.com/angular/angularfire2/commit/d12b4c5))
* **schematics:** ng deploy schematic ([#2046](https://github.com/angular/angularfire2/issues/2046)) ([be0a1fb](https://github.com/angular/angularfire2/commit/be0a1fb))

* **firestore:** path on `AngularFirestoreCollection`'s `.doc` is optional ([#1974](https://github.com/angular/angularfire2/issues/1974)) ([c2354f8](https://github.com/angular/angularfire2/commit/c2354f8))


<a name="5.1.2"></a>
Expand Down
32 changes: 26 additions & 6 deletions docs/performance/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,43 @@ ngOnInit() {
}
```

### `trace(name:string)`
### `trace(name: string, options?: TraceOptions)`

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:

### `traceUntil(name:string, test: (T) => Boolean)`
<h3>
<pre>
traceUntil(
name: string,
test: (T) => Boolean,
options?: TraceOptions & { orComplete?: true }
)
</pre>
</h3>

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

### `traceWhile(name:string, test: (T) => Boolean)`
If the `orComplete` option is passed it will complete the trace when the observable completes, even if an emission never passed the provided test.

<h3>
<pre>
traceWhile(
name: string,
test: (T) => Boolean,
options?: TraceOptions & { orComplete?: true }
)
</pre>
</h3>

Starting with an emission that passes the provided test, trace until an emission fails the test.

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

### `traceUntilLast(name:string)`
### `traceUntilLast(name: string, options?: TraceOptions)`

Trace the observable until completion.

### `traceUntilFirst(name: string)`
### `traceUntilFirst(name: string, options?: TraceOptions)`

Traces the observable until the first emission.

Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"karma": "karma start",
"test:universal": "npm run build && cp -R dist/packages-dist test/universal-test/node_modules/angularfire2 && cd test/universal-test && npm run prerender",
"delayed_karma": "sleep 10 && karma start",
"build": "rm -rf dist && node tools/build.js",
"build": "rm -rf dist && node tools/build.js && npm pack ./dist/packages-dist",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
"build:wrapper": "npm i --prefix wrapper && npm run --prefix wrapper build"
"build:wrapper": "npm i --prefix wrapper && npm run --prefix wrapper build && npm pack ./dist/wrapper-dist"
},
"schematics": "./dist/packages-dist/collection.json",
"builders": "./dist/packages-dist/builders.json",
Expand All @@ -33,15 +33,15 @@
},
"homepage": "https://github.com/angular/angularfire2#readme",
"dependencies": {
"@angular-devkit/architect": "^0.800.0-rc.4 || >=8.0.0 <9 || 9.0.0-0",
"@angular-devkit/core": ">=6.0.0 <9 || 9.0.0-0",
"@angular-devkit/schematics": ">=6.0.0 <9 || 9.0.0-0",
"@angular/common": ">=6.0.0 <9 || 9.0.0-0",
"@angular/compiler": ">=6.0.0 <9 || 9.0.0-0",
"@angular/core": ">=6.0.0 <9 || 9.0.0-0",
"@angular/platform-browser": ">=6.0.0 <9 || 9.0.0-0",
"@angular/platform-browser-dynamic": ">=6.0.0 <9 || 9.0.0-0",
"@angular/router": ">=6.0.0 <9 || 9.0.0-0",
"@angular-devkit/architect": "<0.900 || ^0.900.0-0 || ^9.0.0-0",
"@angular-devkit/core": ">=6.0.0 <9 || ^9.0.0-0",
"@angular-devkit/schematics": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/common": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/compiler": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/core": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/platform-browser": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/platform-browser-dynamic": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/router": ">=6.0.0 <9 || ^9.0.0-0",
"firebase": ">= 5.5.7 <7",
"firebase-tools": "^6.10.0",
"fuzzy": "^0.1.3",
Expand All @@ -57,9 +57,9 @@
"utf-8-validate": "~4.0.0"
},
"devDependencies": {
"@angular/animations": ">=6.0.0 <9 || 9.0.0-0",
"@angular/compiler-cli": ">=6.0.0 <9 || 9.0.0-0",
"@angular/platform-server": ">=6.0.0 <9 || 9.0.0-0",
"@angular/animations": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/compiler-cli": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/platform-server": ">=6.0.0 <9 || ^9.0.0-0",
"@types/inquirer": "^0.0.44",
"@types/jasmine": "^2.5.36",
"@types/request": "0.0.30",
Expand Down Expand Up @@ -96,7 +96,7 @@
"systemjs": "^0.19.16",
"systemjs-builder": "^0.15.7",
"traceur": "0.0.96",
"typescript": "^3.1.6 <3.2"
"typescript": ">=3.4.0 <3.5.0"
},
"typings": "index.d.ts"
}
27 changes: 2 additions & 25 deletions src/auth-guard/package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
{
"name": "@angular/fire/auth-guard",
"version": "ANGULARFIRE2_VERSION",
"description": "The auth guard module",
"main": "../bundles/auth-guard.umd.js",
"module": "index.js",
"es2015": "./es2015/index.js",
"keywords": [
"angular",
"firebase",
"rxjs"
],
"repository": {
"type": "git",
"url": "git+https://github.com/angular/angularfire2.git"
},
"author": "angular,firebase",
"license": "MIT",
"peerDependencies": {
"@angular/fire": "ANGULARFIRE2_VERSION",
"@angular/common": "ANGULAR_VERSION",
"@angular/core": "ANGULAR_VERSION",
"@angular/platform-browser": "ANGULAR_VERSION",
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
"@angular/router": "ANGULAR_VERSION",
"firebase": "FIREBASE_VERSION",
"rxjs": "RXJS_VERSION",
"zone.js": "ZONEJS_VERSION"
},
"typings": "index.d.ts"
"typings": "index.d.ts",
"sideEffects": false
}

26 changes: 2 additions & 24 deletions src/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
{
"name": "@angular/fire/auth",
"version": "ANGULARFIRE2_VERSION",
"description": "The auth module",
"main": "../bundles/auth.umd.js",
"module": "index.js",
"es2015": "./es2015/index.js",
"keywords": [
"angular",
"firebase",
"rxjs"
],
"repository": {
"type": "git",
"url": "git+https://github.com/angular/angularfire2.git"
},
"author": "angular,firebase",
"license": "MIT",
"peerDependencies": {
"@angular/fire": "ANGULARFIRE2_VERSION",
"@angular/common": "ANGULAR_VERSION",
"@angular/core": "ANGULAR_VERSION",
"@angular/platform-browser": "ANGULAR_VERSION",
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
"firebase": "FIREBASE_VERSION",
"rxjs": "RXJS_VERSION",
"zone.js": "ZONEJS_VERSION"
},
"typings": "index.d.ts"
"typings": "index.d.ts",
"sideEffects": false
}
6 changes: 5 additions & 1 deletion src/core/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"schematics": {
"ng-add": {
"description": "Add firebase deploy schematic",
"factory": "./schematics/index#ngDeploy"
"factory": "./schematics/index#ngAdd"
},
"ng-add-setup-firebase-deploy": {
"description": "Setup ng deploy",
"factory": "./schematics/index#setupNgDeploy"
}
}
}
16 changes: 7 additions & 9 deletions src/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,20 @@
"author": "angular,firebase",
"license": "MIT",
"peerDependencies": {
"@angular-devkit/architect": "ANGULAR_DEVKIT_ARCH_VERSION",
"@angular-devkit/core": "ANGULAR_VERSION",
"@angular-devkit/schematics": "ANGULAR_VERSION",
"@angular/common": "ANGULAR_VERSION",
"@angular/core": "ANGULAR_VERSION",
"@angular/platform-browser": "ANGULAR_VERSION",
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
"firebase": "FIREBASE_VERSION",
"rxjs": "RXJS_VERSION",
"zone.js": "ZONEJS_VERSION"
},
"dependencies": {
"@angular-devkit/architect": "ANGULAR_DEVKIT_ARCH_VERSION",
"@angular-devkit/core": "ANGULAR_VERSION",
"@angular-devkit/schematics": "ANGULAR_VERSION",
"firebase-tools": "FIREBASE_TOOLS_VERSION",
"fuzzy": "FUZZY_VERSION",
"inquirer": "INQUIRER_VERSION",
"inquirer-autocomplete-prompt": "INQUIRER_AUTOCOMPLETE_VERSION"
"inquirer-autocomplete-prompt": "INQUIRER_AUTOCOMPLETE_VERSION",
"rxjs": "RXJS_VERSION"
},
"typings": "index.d.ts"
"typings": "index.d.ts",
"sideEffects": false
}
26 changes: 2 additions & 24 deletions src/database-deprecated/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
{
"name": "@angular/fire/database-deprecated",
"version": "ANGULARFIRE2_VERSION",
"description": "The database module",
"main": "../bundles/database.umd.js",
"module": "index.js",
"es2015": "./es2015/index.js",
"keywords": [
"angular",
"firebase",
"rxjs"
],
"repository": {
"type": "git",
"url": "git+https://github.com/angular/angularfire2.git"
},
"author": "angular,firebase",
"license": "MIT",
"peerDependencies": {
"@angular/fire": "ANGULARFIRE2_VERSION",
"@angular/common": "ANGULAR_VERSION",
"@angular/core": "ANGULAR_VERSION",
"@angular/platform-browser": "ANGULAR_VERSION",
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
"firebase": "FIREBASE_VERSION",
"rxjs": "RXJS_VERSION",
"zone.js": "ZONEJS_VERSION"
},
"typings": "index.d.ts"
"typings": "index.d.ts",
"sideEffects": false
}
26 changes: 2 additions & 24 deletions src/database/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
{
"name": "@angular/fire/database",
"version": "ANGULARFIRE2_VERSION",
"description": "The database module",
"main": "../bundles/database.umd.js",
"module": "index.js",
"es2015": "./es2015/index.js",
"keywords": [
"angular",
"firebase",
"rxjs"
],
"repository": {
"type": "git",
"url": "git+https://github.com/angular/angularfire2.git"
},
"author": "angular,firebase",
"license": "MIT",
"peerDependencies": {
"@angular/fire": "ANGULARFIRE2_VERSION",
"@angular/common": "ANGULAR_VERSION",
"@angular/core": "ANGULAR_VERSION",
"@angular/platform-browser": "ANGULAR_VERSION",
"@angular/platform-browser-dynamic": "ANGULAR_VERSION",
"firebase": "FIREBASE_VERSION",
"rxjs": "RXJS_VERSION",
"zone.js": "ZONEJS_VERSION"
},
"typings": "index.d.ts"
"typings": "index.d.ts",
"sideEffects": false
}
22 changes: 2 additions & 20 deletions src/firebase-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,7 @@
"version": "ANGULARFIRE2_VERSION",
"description": "Fixes for Node.js",
"main": "index.js",
"keywords": [
"angular",
"firebase",
"rxjs"
],
"repository": {
"type": "git",
"url": "git+https://github.com/angular/angularfire2.git"
},
"author": "angular,firebase",
"license": "MIT",
"dependencies": {
"xhr2": "XHR2_VERSION",
"ws": "WS_VERSION"
},
"optionalDependencies": {
"bufferutil": "BUFFERUTIL_VERSION",
"utf-8-validate": "UTF_8_VALIDATE_VERSION"
},
"typings": "index.d.ts"
"typings": "index.d.ts",
"sideEffects": true
}

2 changes: 1 addition & 1 deletion src/firestore/collection/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class AngularFirestoreCollection<T=DocumentData> {
* Create a reference to a single document in a collection.
* @param path
*/
doc<T>(path: string): AngularFirestoreDocument<T> {
doc<T>(path?: string): AngularFirestoreDocument<T> {
return new AngularFirestoreDocument<T>(this.ref.doc(path), this.afs);
}
}
Loading

0 comments on commit 8e5a995

Please sign in to comment.