Skip to content

Commit e551ff7

Browse files
authored
Marking peer support for NG12 (#2834)
1 parent 984803d commit e551ff7

Some content is hidden

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

52 files changed

+6624
-5889
lines changed

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
needs: build
6262
strategy:
6363
matrix:
64-
node: ["10", "12", "14"]
64+
node: ["12", "14", "16"]
6565
firebase: ["7", "8"]
6666
fail-fast: false
6767
name: Test Firebase v${{ matrix.firebase }} on Node.js ${{ matrix.node }}
@@ -93,8 +93,8 @@ jobs:
9393
if: steps.node_modules_cache.outputs.cache-hit != 'true'
9494
run: |
9595
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
96-
yarn install --frozen-lockfile --prefer-offline
97-
yarn add firebase@^${{ matrix.firebase }}.0 --prefer-offline
96+
yarn install --frozen-lockfile --prefer-offline --ignore-engines
97+
yarn add firebase@^${{ matrix.firebase }}.0 --prefer-offline --ignore-engines
9898
- name: Firebase emulator cache
9999
uses: actions/cache@v2
100100
with:

CHANGELOG.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
<a name="6.1.5"></a>
2+
# [6.1.5](https://github.com/angular/angularfire/compare/6.1.4...6.1.5) (2021-05-17)
3+
4+
Support Angular 12 peer
5+
6+
### Bug Fixes
7+
8+
* **auth:** set the passed settings individually ([#2826](https://github.com/angular/angularfire/issues/2826)) ([984803d](https://github.com/angular/angularfire/commit/984803d))
9+
110
<a name="6.1.4"></a>
2-
## [6.1.4](https://github.com/angular/angularfire/compare/6.1.3...6.1.4) (2020-12-03)
11+
# [6.1.4](https://github.com/angular/angularfire/compare/6.1.3...6.1.4) (2020-12-03)
312

413

514
### Bug Fixes
@@ -10,7 +19,7 @@
1019

1120

1221
<a name="6.1.3"></a>
13-
## [6.1.3](https://github.com/angular/angularfire/compare/6.1.2...6.1.3) (2020-11-30)
22+
# [6.1.3](https://github.com/angular/angularfire/compare/6.1.2...6.1.3) (2020-11-30)
1423

1524

1625
### Bug Fixes

package.json

+24-23
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@angular/fire",
3-
"version": "6.1.4",
3+
"version": "6.1.5",
44
"description": "The official Angular library for Firebase.",
55
"private": true,
66
"scripts": {
7-
"test": "npm run build:jasmine && npm run test:node",
7+
"test": "npm run build:jasmine && npm run test:node && npm run test:chrome-headless",
88
"test:watch": "firebase emulators:exec --project=angularfire2-test \"ng test --watch=true --browsers=Chrome\"",
99
"test:chrome": "firebase emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=Chrome\"",
1010
"test:chrome-headless": "firebase emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=ChromeHeadless\"",
1111
"lint": "ng lint",
12-
"test:node": "firebase emulators:exec --project=angularfire2-test \"node -r tsconfig-paths/register ./tools/jasmine.js\"",
12+
"test:node": "node -r tsconfig-paths/register ./tools/jasmine.js",
1313
"test:typings": "node ./tools/run-typings-test.js",
1414
"test:build": "bash ./test/ng-build/build.sh",
1515
"test:all": "npm run test:node && npm run test:chrome-headless && npm run test:typings && npm run test:build",
@@ -40,45 +40,46 @@
4040
},
4141
"homepage": "https://github.com/angular/angularfire#readme",
4242
"dependencies": {
43-
"@angular-devkit/architect": ">= 0.900 < 0.1200",
44-
"@angular-devkit/core": "^9.0.0 || ^10.0.0 || ^11.0.0",
45-
"@angular-devkit/schematics": "^9.0.0 || ^10.0.0 || ^11.0.0",
46-
"@angular/common": "^9.0.0 || ^10.0.0 || ^11.0.0",
47-
"@angular/compiler": "^9.0.0 || ^10.0.0 || ^11.0.0",
48-
"@angular/core": "^9.0.0 || ^10.0.0 || ^11.0.0",
49-
"@angular/platform-browser": "^9.0.0 || ^10.0.0 || ^11.0.0",
50-
"@angular/platform-browser-dynamic": "^9.0.0 || ^10.0.0 || ^11.0.0",
51-
"@angular/router": "^9.0.0 || ^10.0.0 || ^11.0.0",
43+
"@angular-devkit/architect": ">= 0.900 < 0.1300",
44+
"@angular-devkit/core": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
45+
"@angular-devkit/schematics": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
46+
"@angular/common": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
47+
"@angular/compiler": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
48+
"@angular/core": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
49+
"@angular/platform-browser": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
50+
"@angular/platform-browser-dynamic": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
51+
"@angular/router": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
5252
"firebase": "^7.0 || ^8.0",
5353
"firebase-admin": "^8.10.0",
5454
"firebase-functions": "^3.6.0",
55-
"firebase-tools": "^8.0.0",
55+
"firebase-tools": "^8.0.0 || ^9.0.0",
5656
"fs-extra": "^8.0.1",
5757
"fuzzy": "^0.1.3",
5858
"husky": "^4.2.5",
5959
"inquirer": "^6.2.2",
6060
"inquirer-autocomplete-prompt": "^1.0.1",
61+
"jsonc-parser": "^3.0.0",
6162
"open": "^7.0.3",
6263
"rxfire": "^3.9.7 || ^4.0.0",
6364
"rxjs": "^6.5.3",
6465
"semver": "^7.1.3",
6566
"tslib": "^1.10.0 || ^2.0.0",
6667
"ws": "^7.2.1",
6768
"xhr2": "^0.1.4",
68-
"zone.js": "0.10.2"
69+
"zone.js": "~0.11.4"
6970
},
7071
"optionalDependencies": {
7172
"bufferutil": "^4.0.1",
7273
"utf-8-validate": "^5.0.2"
7374
},
7475
"devDependencies": {
75-
"@angular-devkit/build-angular": ">= 0.900 < 0.1200",
76-
"@angular-devkit/build-ng-packagr": ">= 0.900 < 0.1200",
77-
"@angular/animations": " ^9.0.0 || ^10.0.0 || ^11.0.0",
78-
"@angular/cli": "^9.0.0 || ^10.0.0 || ^11.0.0",
79-
"@angular/compiler-cli": "^9.0.0 || ^10.0.0 || ^11.0.0",
80-
"@angular/platform-server": "^9.0.0 || ^10.0.0 || ^11.0.0",
81-
"@types/fs-extra": "^7.0.0",
76+
"@angular-devkit/build-angular": ">= 0.900 < 0.1300",
77+
"@angular-devkit/build-ng-packagr": ">= 0.900 < 0.1300",
78+
"@angular/animations": " ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
79+
"@angular/cli": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
80+
"@angular/compiler-cli": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
81+
"@angular/platform-server": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
82+
"@types/fs-extra": "^7.0.0",
8283
"@types/gzip-size": "^5.1.1",
8384
"@types/inquirer": "^0.0.44",
8485
"@types/jasmine": "^3.3.13",
@@ -99,7 +100,7 @@
99100
"karma-jasmine": "~4.0.0",
100101
"karma-jasmine-html-reporter": "^1.5.0",
101102
"ncp": "^2.0.0",
102-
"ng-packagr": "^10.1.0",
103+
"ng-packagr": "^12.0.0",
103104
"pretty-size": "^2.0.0",
104105
"protractor": "~7.0.0",
105106
"reflect-metadata": "0.1.2",
@@ -117,7 +118,7 @@
117118
"tslint": "~6.1.0",
118119
"ttypescript": "^1.5.12",
119120
"typedoc": "^0.16.4",
120-
"typescript": ">=4.0.0 <4.1.0"
121+
"typescript": ">=4.2.3 <4.3.0"
121122
},
122123
"typings": "index.d.ts",
123124
"resolutions": {

sample/.firebaserc

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
"projects": {
1212
"default": "aftest-94085"
1313
}
14-
}
14+
}

sample/angular.json

+27-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"main": "src/main.ts",
1919
"polyfills": "src/polyfills.ts",
2020
"tsConfig": "tsconfig.app.json",
21-
"aot": true,
2221
"assets": [
2322
"src/favicon.ico",
2423
"src/assets",
@@ -29,7 +28,13 @@
2928
"styles": [
3029
"src/styles.css"
3130
],
32-
"scripts": []
31+
"scripts": [],
32+
"vendorChunk": true,
33+
"extractLicenses": false,
34+
"buildOptimizer": false,
35+
"sourceMap": true,
36+
"optimization": false,
37+
"namedChunks": true
3338
},
3439
"configurations": {
3540
"emulated": {
@@ -129,7 +134,24 @@
129134
"main": "server.ts",
130135
"tsConfig": "tsconfig.server.json",
131136
"bundleDependencies": true,
132-
"externalDependencies": [ ]
137+
"externalDependencies": [
138+
"firebase",
139+
"@firebase/app",
140+
"@firebase/analytics",
141+
"@firebase/auth",
142+
"@firebase/component",
143+
"@firebase/database",
144+
"@firebase/firestore",
145+
"@firebase/functions",
146+
"@firebase/installations",
147+
"@firebase/messaging",
148+
"@firebase/storage",
149+
"@firebase/performance",
150+
"@firebase/remote-config",
151+
"@firebase/util"
152+
],
153+
"sourceMap": true,
154+
"optimization": false
133155
},
134156
"configurations": {
135157
"production": {
@@ -174,11 +196,7 @@
174196
"deploy": {
175197
"builder": "@angular/fire:deploy",
176198
"options": {
177-
"ssr": true,
178-
"functionsNodeVersion": 12,
179-
"functionsRuntimeOptions": {
180-
"memory": "1GB"
181-
}
199+
"ssr": true
182200
}
183201
}
184202
}
@@ -188,4 +206,4 @@
188206
"cli": {
189207
"analytics": "cf8320c3-bce0-480d-a971-68484635f481"
190208
}
191-
}
209+
}

sample/firebase.json

+1-9
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@
1515
"value": "public,max-age=31536000,immutable"
1616
}
1717
]
18-
}, {
19-
"source": "*-sw.js",
20-
"headers": [
21-
{
22-
"key": "Cache-Control",
23-
"value": "no-cache"
24-
}
25-
]
2618
}
2719
],
2820
"rewrites": [
@@ -56,4 +48,4 @@
5648
"enabled": true
5749
}
5850
}
59-
}
51+
}

sample/package.json

+21-19
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
},
1818
"private": true,
1919
"dependencies": {
20-
"@angular/animations": "~11.0.0",
21-
"@angular/common": "~11.0.0",
22-
"@angular/compiler": "~11.0.0",
23-
"@angular/core": "~11.0.0",
20+
"@angular/animations": "~12.0.0",
21+
"@angular/common": "~12.0.0",
22+
"@angular/compiler": "~12.0.0",
23+
"@angular/core": "~12.0.0",
2424
"@angular/fire": "../dist/packages-dist",
25-
"@angular/forms": "~11.0.0",
26-
"@angular/platform-browser": "~11.0.0",
27-
"@angular/platform-browser-dynamic": "~11.0.0",
28-
"@angular/platform-server": "~11.0.0",
29-
"@angular/router": "~11.0.0",
30-
"@angular/service-worker": "^11.0.0",
25+
"@angular/forms": "~12.0.0",
26+
"@angular/platform-browser": "~12.0.0",
27+
"@angular/platform-browser-dynamic": "~12.0.0",
28+
"@angular/platform-server": "~12.0.0",
29+
"@angular/router": "~12.0.0",
30+
"@angular/service-worker": "^12.0.0",
3131
"@nguniversal/express-engine": "~10.1.0",
3232
"core-js": "^3.6.5",
3333
"firebase": "^8.0.0",
@@ -36,14 +36,14 @@
3636
"rxjs": "~6.6.3",
3737
"tslib": "^2.0.1",
3838
"whatwg-fetch": "^3.4.1",
39-
"zone.js": "0.10.3"
39+
"zone.js": "~0.11.4"
4040
},
4141
"devDependencies": {
42-
"@angular-devkit/architect": "~0.1001.3",
43-
"@angular-devkit/build-angular": "~0.1100.0",
44-
"@angular/cli": "~11.0.0",
45-
"@angular/compiler-cli": "~11.0.0",
46-
"@angular/language-service": "~11.0.0",
42+
"@angular-devkit/architect": "~0.1200.0",
43+
"@angular-devkit/build-angular": "~12.0.0",
44+
"@angular/cli": "~12.0.0",
45+
"@angular/compiler-cli": "~12.0.0",
46+
"@angular/language-service": "~12.0.0",
4747
"@firebase/app-types": "^0.6.1",
4848
"@nguniversal/builders": "^10.1.0",
4949
"@types/jasmine": "~3.5.0",
@@ -62,13 +62,15 @@
6262
"inquirer-autocomplete-prompt": "^1.0.1",
6363
"jasmine-core": "~3.5.0",
6464
"jasmine-spec-reporter": "~5.0.0",
65-
"karma": "~5.1.1",
65+
"jsonc-parser": "^3.0.0",
66+
"karma": "~6.3.2",
6667
"karma-chrome-launcher": "~3.1.0",
6768
"karma-coverage-istanbul-reporter": "~3.0.2",
6869
"karma-jasmine": "~4.0.0",
6970
"karma-jasmine-html-reporter": "^1.5.0",
71+
"open": "^7.0.3",
7072
"ts-node": "~9.0.0",
7173
"tslint": "~6.1.3",
72-
"typescript": "~4.0.5"
74+
"typescript": "~4.2.4"
7375
}
74-
}
76+
}

sample/server.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'zone.js/dist/zone-node';
1+
import 'zone.js/node';
22

33
import { ngExpressEngine } from '@nguniversal/express-engine';
44
import * as express from 'express';
@@ -15,7 +15,7 @@ global['WebSocket'] = require('ws');
1515
/* tslint:enable:no-string-literal */
1616

1717
// include the protos required to bundle firestore
18-
import 'dir-loader!./firestore-protos';
18+
// import 'dir-loader!./firestore-protos';
1919

2020
// The Express app is exported so that it can be used by serverless Functions.
2121
export function app() {
@@ -36,7 +36,7 @@ export function app() {
3636
// Serve static files from /browser
3737
server.get('*.*', express.static(distFolder, {
3838
maxAge: '1y'
39-
}));
39+
}) as any);
4040

4141
// All regular routes use the Universal engine
4242
server.get('*', (req, res) => {

sample/src/app/database/database.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class DatabaseComponent implements OnInit {
2525
this.testObjectValue$ = EMPTY;
2626
} else {
2727
const doc = database.object('test');
28-
const key = makeStateKey(doc.query.toString());
28+
const key = makeStateKey<unknown>(doc.query.toString());
2929
const existing = state.get(key, undefined);
3030
this.testObjectValue$ = doc.valueChanges().pipe(
3131
trace('database'),

sample/src/app/firestore-offline/firestore-offline.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class FirestoreOfflineComponent implements OnInit {
2222

2323
constructor(state: TransferState, firestore: AngularFirestoreOffline) {
2424
const doc = firestore.doc('test/1');
25-
const key = makeStateKey(doc.ref.path);
25+
const key = makeStateKey<unknown>(doc.ref.path);
2626
const existing = state.get(key, undefined);
2727
this.testDocValue$ = firestore.doc('test/1').valueChanges().pipe(
2828
trace('firestore'),

sample/src/app/firestore/firestore.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class FirestoreComponent implements OnInit {
2121

2222
constructor(state: TransferState, firestore: AngularFirestore) {
2323
const doc = firestore.doc('test/1');
24-
const key = makeStateKey(doc.ref.path);
24+
const key = makeStateKey<unknown>(doc.ref.path);
2525
const existing = state.get(key, undefined);
2626
this.testDocValue$ = firestore.doc('test/1').valueChanges().pipe(
2727
trace('firestore'),

sample/src/app/storage/storage.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class StorageComponent implements OnInit {
2525

2626
constructor(storage: AngularFireStorage, state: TransferState) {
2727
const icon = storage.ref('google-g.png');
28-
const key = makeStateKey('google-icon-url');
28+
const key = makeStateKey<unknown>('google-icon-url');
2929
const existing = state.get(key, undefined);
3030
this.downloadUrl$ = existing ? of(existing) : icon.getDownloadURL().pipe(
3131
trace('storage'),

sample/src/app/upboats/upboats.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class UpboatsComponent implements OnInit {
2121
const collection = firestore.collection<Animal>('animals', ref =>
2222
ref.orderBy('upboats', 'desc').orderBy('updatedAt', 'desc')
2323
);
24-
const key = makeStateKey(collection.ref.path);
24+
const key = makeStateKey<Animal[]>(collection.ref.path);
2525
const existing = state.get(key, undefined);
2626
this.animals = collection.snapshotChanges().pipe(
2727
trace('animals'),

sample/src/environments/environment.emulated.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ export const environment = {
2525
* This import should be commented out in production mode because it will have a negative impact
2626
* on performance if an error is thrown.
2727
*/
28-
import 'zone.js/dist/zone-error'; // Included with Angular CLI.
28+
import 'zone.js/plugins/zone-error'; // Included with Angular CLI.

sample/src/environments/environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ export const environment = {
2525
* This import should be commented out in production mode because it will have a negative impact
2626
* on performance if an error is thrown.
2727
*/
28-
import 'zone.js/dist/zone-error'; // Included with Angular CLI.
28+
import 'zone.js/plugins/zone-error'; // Included with Angular CLI.

0 commit comments

Comments
 (0)