Skip to content

Commit ebf537e

Browse files
authored
build: update to Angular & CLI 10.1.x and re-run migrations (#2598)
- run v10.1 CLI migrations for lib, sample, and test projects - removes Solution style tsconfig - updates tslint config - pin [email protected] because 0.10.3 causes test failures - install or correct missing peerDependencies - update a few other dependencies - remove references to e2e in sample workspace as there are no e2e tests - replace deprecated `async()` with `waitForAsync()` in tests - add tsconfig.server.json to list of files for linting - fix tests prompting to enable Angular CLI analytics
1 parent 77a9a15 commit ebf537e

24 files changed

+4901
-4224
lines changed

package.json

+16-14
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"tslib": "^1.10.0 || ^2.0.0",
6565
"ws": "^7.2.1",
6666
"xhr2": "^0.1.4",
67-
"zone.js": "~0.10.2"
67+
"zone.js": "0.10.2"
6868
},
6969
"optionalDependencies": {
7070
"bufferutil": "^4.0.1",
@@ -77,42 +77,44 @@
7777
"@angular/cli": "^9.0.0 || ^10.0.0",
7878
"@angular/compiler-cli": "^9.0.0 || ^10.0.0",
7979
"@angular/platform-server": "^9.0.0 || ^10.0.0",
80+
"@firebase/app-types": "^0.6.1",
8081
"@types/fs-extra": "^7.0.0",
8182
"@types/gzip-size": "^5.1.1",
8283
"@types/inquirer": "^0.0.44",
8384
"@types/jasmine": "^3.3.13",
8485
"@types/node": "^12.6.2",
8586
"@types/request": "0.0.30",
8687
"@types/semver": "^7.1.0",
87-
"codelyzer": "^5.0.0",
88+
"codelyzer": "^6.0.0",
8889
"concurrently": "^2.2.0",
8990
"conventional-changelog-cli": "^1.2.0",
90-
"firebase-functions-test": "^0.2.0",
91+
"firebase-functions-test": "^0.2.2",
9192
"gzip-size": "^5.1.1",
9293
"jasmine": "^3.4.0",
93-
"jasmine-core": "^3.4.0",
94-
"karma": "^4.1.0",
95-
"karma-chrome-launcher": "^2.2.0",
96-
"karma-coverage-istanbul-reporter": "^2.0.5",
97-
"karma-jasmine": "^2.0.1",
98-
"karma-jasmine-html-reporter": "^1.4.2",
94+
"jasmine-core": "~3.5.0",
95+
"karma": "~5.0.0",
96+
"karma-chrome-launcher": "~3.1.0",
97+
"karma-coverage-istanbul-reporter": "~3.0.2",
98+
"karma-jasmine": "~4.0.0",
99+
"karma-jasmine-html-reporter": "^1.5.0",
99100
"ncp": "^2.0.0",
100-
"ng-packagr": "^9.0.0 || ^10.0.0",
101+
"ng-packagr": "^10.1.0",
101102
"pretty-size": "^2.0.0",
102-
"protractor": "3.0.0",
103+
"protractor": "~7.0.0",
103104
"reflect-metadata": "0.1.2",
104105
"replace-in-file": "^5.0.2",
105106
"rimraf": "^2.5.4",
107+
"rollup": "^2.22.0",
106108
"schematics-utilities": "^2.0.1",
107109
"shelljs": "^0.8.0",
108110
"systemjs": "^0.19.16",
109111
"systemjs-builder": "^0.15.7",
110112
"traceur": "0.0.96",
111113
"tsconfig-paths": "^3.8.0",
112-
"tsickle": "^0.35.0",
113-
"tslint": "^5.17.0",
114+
"tsickle": "^0.39.1",
115+
"tslint": "~6.1.0",
114116
"typedoc": "^0.16.4",
115-
"typescript": "~3.6.4"
117+
"typescript": "~3.9.7"
116118
},
117119
"typings": "index.d.ts"
118120
}

sample/angular.json

+7-16
Original file line numberDiff line numberDiff line change
@@ -103,26 +103,14 @@
103103
"options": {
104104
"tsConfig": [
105105
"tsconfig.app.json",
106-
"tsconfig.spec.json",
107-
"e2e/tsconfig.json"
106+
"tsconfig.server.json",
107+
"tsconfig.spec.json"
108108
],
109109
"exclude": [
110110
"**/node_modules/**"
111111
]
112112
}
113113
},
114-
"e2e": {
115-
"builder": "@angular-devkit/build-angular:protractor",
116-
"options": {
117-
"protractorConfig": "e2e/protractor.conf.js",
118-
"devServerTarget": "sample:serve"
119-
},
120-
"configurations": {
121-
"production": {
122-
"devServerTarget": "sample:serve:production"
123-
}
124-
}
125-
},
126114
"server": {
127115
"builder": "@angular-devkit/build-angular:server",
128116
"options": {
@@ -197,5 +185,8 @@
197185
}
198186
}
199187
},
200-
"defaultProject": "sample"
201-
}
188+
"defaultProject": "sample",
189+
"cli": {
190+
"analytics": "cf8320c3-bce0-480d-a971-68484635f481"
191+
}
192+
}

sample/package.json

+35-34
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,50 @@
77
"build": "ng build",
88
"test": "ng test",
99
"lint": "ng lint",
10-
"e2e": "ng e2e",
1110
"dev:ssr": "ng run sample:serve-ssr",
1211
"serve:ssr": "node dist/sample/server/main.js",
1312
"build:ssr": "ng build --prod && ng run sample:server:production",
1413
"prerender": "ng run sample:prerender"
1514
},
1615
"private": true,
1716
"dependencies": {
18-
"@angular/animations": "~10.0.0",
19-
"@angular/common": "~10.0.0",
20-
"@angular/compiler": "~10.0.0",
21-
"@angular/core": "~10.0.0",
17+
"@angular/animations": "~10.1.3",
18+
"@angular/common": "~10.1.3",
19+
"@angular/compiler": "~10.1.3",
20+
"@angular/core": "~10.1.3",
2221
"@angular/fire": "../dist/packages-dist",
23-
"@angular/forms": "~10.0.0",
24-
"@angular/platform-browser": "~10.0.0",
25-
"@angular/platform-browser-dynamic": "~10.0.0",
26-
"@angular/platform-server": "~10.0.0",
27-
"@angular/router": "~10.0.0",
28-
"@angular/service-worker": "^10.0.0",
29-
"@nguniversal/express-engine": "~9.1.0",
30-
"firebase": "^7.13.2",
31-
"proxy-polyfill": "^0.3.1",
32-
"rxjs": "~6.5.4",
33-
"tslib": "^2.0.0",
34-
"zone.js": "~0.10.2"
22+
"@angular/forms": "~10.1.3",
23+
"@angular/platform-browser": "~10.1.3",
24+
"@angular/platform-browser-dynamic": "~10.1.3",
25+
"@angular/platform-server": "~10.1.3",
26+
"@angular/router": "~10.1.3",
27+
"@angular/service-worker": "^10.1.3",
28+
"@nguniversal/express-engine": "~10.1.0",
29+
"firebase": "~7.13.2",
30+
"first-input-delay": "^0.1.3",
31+
"proxy-polyfill": "^0.3.2",
32+
"rxjs": "~6.6.3",
33+
"tslib": "^2.0.1",
34+
"zone.js": "0.10.2"
3535
},
3636
"devDependencies": {
37-
"@angular-devkit/architect": "~0.901.0",
38-
"@angular-devkit/build-angular": "~0.1000.0",
39-
"@angular/cli": "~10.0.0",
40-
"@angular/compiler-cli": "~10.0.0",
41-
"@angular/language-service": "~10.0.0",
42-
"@nguniversal/builders": "^9.1.0",
37+
"@angular-devkit/architect": "~0.1001.3",
38+
"@angular-devkit/build-angular": "~0.1001.3",
39+
"@angular/cli": "~10.1.3",
40+
"@angular/compiler-cli": "~10.1.3",
41+
"@angular/language-service": "~10.1.3",
42+
"@firebase/app-types": "^0.6.1",
43+
"@nguniversal/builders": "^10.1.0",
4344
"@types/jasmine": "~3.5.0",
4445
"@types/jasminewd2": "~2.0.3",
45-
"@types/node": "^12.11.1",
46-
"codelyzer": "^5.1.2",
46+
"@types/node": "^14.11.2",
47+
"codelyzer": "^6.0.0",
48+
"express": "^4.17.1",
4749
"express-serve-static-core": "^0.1.1",
48-
"firebase-admin": "^8.10.0",
49-
"firebase-functions": "^3.6.0",
50-
"firebase-functions-test": "^0.2.0",
51-
"firebase-tools": "^8.0.0",
50+
"firebase-admin": "^8.13.0",
51+
"firebase-functions": "^3.11.0",
52+
"firebase-functions-test": "^0.2.2",
53+
"firebase-tools": "^8.11.1",
5254
"fuzzy": "^0.1.3",
5355
"inquirer": "^6.2.2",
5456
"inquirer-autocomplete-prompt": "^1.0.1",
@@ -57,11 +59,10 @@
5759
"karma": "~5.0.0",
5860
"karma-chrome-launcher": "~3.1.0",
5961
"karma-coverage-istanbul-reporter": "~3.0.2",
60-
"karma-jasmine": "~3.3.0",
62+
"karma-jasmine": "~4.0.0",
6163
"karma-jasmine-html-reporter": "^1.5.0",
62-
"protractor": "~7.0.0",
63-
"ts-node": "~8.3.0",
64-
"tslint": "~6.1.0",
65-
"typescript": "~3.9.5"
64+
"ts-node": "~9.0.0",
65+
"tslint": "~6.1.3",
66+
"typescript": "~3.9.7"
6667
}
6768
}

sample/src/app/app.component.spec.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { async, TestBed } from '@angular/core/testing';
1+
import { TestBed, waitForAsync } from '@angular/core/testing';
22
import { RouterTestingModule } from '@angular/router/testing';
33
import { AppComponent } from './app.component';
44

55
describe('AppComponent', () => {
6-
beforeEach(async(() => {
6+
beforeEach(waitForAsync(() => {
77
TestBed.configureTestingModule({
88
imports: [
99
RouterTestingModule
@@ -20,12 +20,6 @@ describe('AppComponent', () => {
2020
expect(app).toBeTruthy();
2121
});
2222

23-
it(`should have as title 'sample'`, () => {
24-
const fixture = TestBed.createComponent(AppComponent);
25-
const app = fixture.componentInstance;
26-
expect(app.title).toEqual('sample');
27-
});
28-
2923
it('should render title', () => {
3024
const fixture = TestBed.createComponent(AppComponent);
3125
fixture.detectChanges();

sample/src/app/auth/auth.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { AuthComponent } from './auth.component';
44

55
describe('AuthComponent', () => {
66
let component: AuthComponent;
77
let fixture: ComponentFixture<AuthComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [ AuthComponent ]
1212
})

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { DatabaseComponent } from './database.component';
44

55
describe('DatabaseComponent', () => {
66
let component: DatabaseComponent;
77
let fixture: ComponentFixture<DatabaseComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [ DatabaseComponent ]
1212
})

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { FirestoreComponent } from './firestore.component';
44

55
describe('FirestoreComponent', () => {
66
let component: FirestoreComponent;
77
let fixture: ComponentFixture<FirestoreComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [ FirestoreComponent ]
1212
})

sample/src/app/messaging/messaging.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { MessagingComponent } from './messaging.component';
44

55
describe('MessagingComponent', () => {
66
let component: MessagingComponent;
77
let fixture: ComponentFixture<MessagingComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [ MessagingComponent ]
1212
})

sample/src/app/remote-config/remote-config.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { RemoteConfigComponent } from './remote-config.component';
44

55
describe('RemoteConfigComponent', () => {
66
let component: RemoteConfigComponent;
77
let fixture: ComponentFixture<RemoteConfigComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [ RemoteConfigComponent ]
1212
})

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { StorageComponent } from './storage.component';
44

55
describe('StorageComponent', () => {
66
let component: StorageComponent;
77
let fixture: ComponentFixture<StorageComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [ StorageComponent ]
1212
})

sample/tsconfig.app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.base.json",
2+
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./out-tsc/app",
55
"types": [],

sample/tsconfig.base.json

-23
This file was deleted.

sample/tsconfig.json

+22-19
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
/*
2-
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
3-
It is not intended to be used to perform a compilation.
4-
5-
To learn more about this file see: https://angular.io/config/solution-tsconfig.
6-
*/
71
{
8-
"files": [],
9-
"references": [
10-
{
11-
"path": "./tsconfig.app.json"
12-
},
13-
{
14-
"path": "./tsconfig.spec.json"
15-
},
16-
{
17-
"path": "./tsconfig.server.json"
18-
}
19-
]
20-
}
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"baseUrl": "./",
5+
"outDir": "./dist/out-tsc",
6+
"sourceMap": true,
7+
"declaration": false,
8+
"downlevelIteration": true,
9+
"experimentalDecorators": true,
10+
"module": "esnext",
11+
"moduleResolution": "node",
12+
"importHelpers": true,
13+
"target": "es2015",
14+
"lib": [
15+
"es2018",
16+
"dom"
17+
]
18+
},
19+
"angularCompilerOptions": {
20+
"fullTemplateTypeCheck": true,
21+
"strictInjectionParameters": true
22+
}
23+
}

0 commit comments

Comments
 (0)