Skip to content

Commit 4d0faad

Browse files
committed
Adding support for ng12
1 parent 8d69c9d commit 4d0faad

36 files changed

+6005
-5632
lines changed

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
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,15 +40,15 @@
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",
@@ -65,19 +65,19 @@
6565
"tslib": "^1.10.0 || ^2.0.0",
6666
"ws": "^7.2.1",
6767
"xhr2": "^0.1.4",
68-
"zone.js": "0.10.2"
68+
"zone.js": "~0.11.4"
6969
},
7070
"optionalDependencies": {
7171
"bufferutil": "^4.0.1",
7272
"utf-8-validate": "^5.0.2"
7373
},
7474
"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",
75+
"@angular-devkit/build-angular": ">= 0.900 < 0.1300",
76+
"@angular-devkit/build-ng-packagr": ">= 0.900 < 0.1300",
77+
"@angular/animations": " ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
78+
"@angular/cli": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
79+
"@angular/compiler-cli": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
80+
"@angular/platform-server": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
8181
"@types/fs-extra": "^7.0.0",
8282
"@types/gzip-size": "^5.1.1",
8383
"@types/inquirer": "^0.0.44",
@@ -99,7 +99,7 @@
9999
"karma-jasmine": "~4.0.0",
100100
"karma-jasmine-html-reporter": "^1.5.0",
101101
"ncp": "^2.0.0",
102-
"ng-packagr": "^10.1.0",
102+
"ng-packagr": "^12.0.0",
103103
"pretty-size": "^2.0.0",
104104
"protractor": "~7.0.0",
105105
"reflect-metadata": "0.1.2",
@@ -117,7 +117,7 @@
117117
"tslint": "~6.1.0",
118118
"ttypescript": "^1.5.12",
119119
"typedoc": "^0.16.4",
120-
"typescript": ">=4.0.0 <4.1.0"
120+
"typescript": ">=4.2.3 <4.3.0"
121121
},
122122
"typings": "index.d.ts",
123123
"resolutions": {

sample/angular.json

Lines changed: 10 additions & 3 deletions
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,9 @@
129134
"main": "server.ts",
130135
"tsConfig": "tsconfig.server.json",
131136
"bundleDependencies": true,
132-
"externalDependencies": [ ]
137+
"externalDependencies": [ ],
138+
"sourceMap": true,
139+
"optimization": false
133140
},
134141
"configurations": {
135142
"production": {

sample/package.json

Lines changed: 19 additions & 19 deletions
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,13 @@
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+
"karma": "~6.3.2",
6666
"karma-chrome-launcher": "~3.1.0",
6767
"karma-coverage-istanbul-reporter": "~3.0.2",
6868
"karma-jasmine": "~4.0.0",
6969
"karma-jasmine-html-reporter": "^1.5.0",
7070
"ts-node": "~9.0.0",
7171
"tslint": "~6.1.3",
72-
"typescript": "~4.0.5"
72+
"typescript": "~4.2.4"
7373
}
74-
}
74+
}

sample/server.ts

Lines changed: 2 additions & 2 deletions
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';
@@ -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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)