Skip to content

Commit

Permalink
build: update to Angular & CLI 10.1.x and re-run migrations (#2598)
Browse files Browse the repository at this point in the history
- run v10.1 CLI migrations for lib, sample, and test projects
  - removes Solution style tsconfig
  - updates tslint config
- pin zone.js@0.10.2 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
  • Loading branch information
Splaktar committed Sep 25, 2020
1 parent 77a9a15 commit ebf537e
Show file tree
Hide file tree
Showing 24 changed files with 4,901 additions and 4,224 deletions.
30 changes: 16 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"tslib": "^1.10.0 || ^2.0.0",
"ws": "^7.2.1",
"xhr2": "^0.1.4",
"zone.js": "~0.10.2"
"zone.js": "0.10.2"
},
"optionalDependencies": {
"bufferutil": "^4.0.1",
Expand All @@ -77,42 +77,44 @@
"@angular/cli": "^9.0.0 || ^10.0.0",
"@angular/compiler-cli": "^9.0.0 || ^10.0.0",
"@angular/platform-server": "^9.0.0 || ^10.0.0",
"@firebase/app-types": "^0.6.1",
"@types/fs-extra": "^7.0.0",
"@types/gzip-size": "^5.1.1",
"@types/inquirer": "^0.0.44",
"@types/jasmine": "^3.3.13",
"@types/node": "^12.6.2",
"@types/request": "0.0.30",
"@types/semver": "^7.1.0",
"codelyzer": "^5.0.0",
"codelyzer": "^6.0.0",
"concurrently": "^2.2.0",
"conventional-changelog-cli": "^1.2.0",
"firebase-functions-test": "^0.2.0",
"firebase-functions-test": "^0.2.2",
"gzip-size": "^5.1.1",
"jasmine": "^3.4.0",
"jasmine-core": "^3.4.0",
"karma": "^4.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"jasmine-core": "~3.5.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ncp": "^2.0.0",
"ng-packagr": "^9.0.0 || ^10.0.0",
"ng-packagr": "^10.1.0",
"pretty-size": "^2.0.0",
"protractor": "3.0.0",
"protractor": "~7.0.0",
"reflect-metadata": "0.1.2",
"replace-in-file": "^5.0.2",
"rimraf": "^2.5.4",
"rollup": "^2.22.0",
"schematics-utilities": "^2.0.1",
"shelljs": "^0.8.0",
"systemjs": "^0.19.16",
"systemjs-builder": "^0.15.7",
"traceur": "0.0.96",
"tsconfig-paths": "^3.8.0",
"tsickle": "^0.35.0",
"tslint": "^5.17.0",
"tsickle": "^0.39.1",
"tslint": "~6.1.0",
"typedoc": "^0.16.4",
"typescript": "~3.6.4"
"typescript": "~3.9.7"
},
"typings": "index.d.ts"
}
23 changes: 7 additions & 16 deletions sample/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,14 @@
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
"tsconfig.server.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "sample:serve"
},
"configurations": {
"production": {
"devServerTarget": "sample:serve:production"
}
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
Expand Down Expand Up @@ -197,5 +185,8 @@
}
}
},
"defaultProject": "sample"
}
"defaultProject": "sample",
"cli": {
"analytics": "cf8320c3-bce0-480d-a971-68484635f481"
}
}
69 changes: 35 additions & 34 deletions sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,50 @@
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"dev:ssr": "ng run sample:serve-ssr",
"serve:ssr": "node dist/sample/server/main.js",
"build:ssr": "ng build --prod && ng run sample:server:production",
"prerender": "ng run sample:prerender"
},
"private": true,
"dependencies": {
"@angular/animations": "~10.0.0",
"@angular/common": "~10.0.0",
"@angular/compiler": "~10.0.0",
"@angular/core": "~10.0.0",
"@angular/animations": "~10.1.3",
"@angular/common": "~10.1.3",
"@angular/compiler": "~10.1.3",
"@angular/core": "~10.1.3",
"@angular/fire": "../dist/packages-dist",
"@angular/forms": "~10.0.0",
"@angular/platform-browser": "~10.0.0",
"@angular/platform-browser-dynamic": "~10.0.0",
"@angular/platform-server": "~10.0.0",
"@angular/router": "~10.0.0",
"@angular/service-worker": "^10.0.0",
"@nguniversal/express-engine": "~9.1.0",
"firebase": "^7.13.2",
"proxy-polyfill": "^0.3.1",
"rxjs": "~6.5.4",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
"@angular/forms": "~10.1.3",
"@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~10.1.3",
"@angular/platform-server": "~10.1.3",
"@angular/router": "~10.1.3",
"@angular/service-worker": "^10.1.3",
"@nguniversal/express-engine": "~10.1.0",
"firebase": "~7.13.2",
"first-input-delay": "^0.1.3",
"proxy-polyfill": "^0.3.2",
"rxjs": "~6.6.3",
"tslib": "^2.0.1",
"zone.js": "0.10.2"
},
"devDependencies": {
"@angular-devkit/architect": "~0.901.0",
"@angular-devkit/build-angular": "~0.1000.0",
"@angular/cli": "~10.0.0",
"@angular/compiler-cli": "~10.0.0",
"@angular/language-service": "~10.0.0",
"@nguniversal/builders": "^9.1.0",
"@angular-devkit/architect": "~0.1001.3",
"@angular-devkit/build-angular": "~0.1001.3",
"@angular/cli": "~10.1.3",
"@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~10.1.3",
"@firebase/app-types": "^0.6.1",
"@nguniversal/builders": "^10.1.0",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"@types/node": "^14.11.2",
"codelyzer": "^6.0.0",
"express": "^4.17.1",
"express-serve-static-core": "^0.1.1",
"firebase-admin": "^8.10.0",
"firebase-functions": "^3.6.0",
"firebase-functions-test": "^0.2.0",
"firebase-tools": "^8.0.0",
"firebase-admin": "^8.13.0",
"firebase-functions": "^3.11.0",
"firebase-functions-test": "^0.2.2",
"firebase-tools": "^8.11.1",
"fuzzy": "^0.1.3",
"inquirer": "^6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1",
Expand All @@ -57,11 +59,10 @@
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
"ts-node": "~9.0.0",
"tslint": "~6.1.3",
"typescript": "~3.9.7"
}
}
10 changes: 2 additions & 8 deletions sample/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { async, TestBed } from '@angular/core/testing';
import { TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
Expand All @@ -20,12 +20,6 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

it(`should have as title 'sample'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('sample');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
Expand Down
4 changes: 2 additions & 2 deletions sample/src/app/auth/auth.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';

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

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

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ AuthComponent ]
})
Expand Down
4 changes: 2 additions & 2 deletions sample/src/app/database/database.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';

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

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

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ DatabaseComponent ]
})
Expand Down
4 changes: 2 additions & 2 deletions sample/src/app/firestore/firestore.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';

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

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

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ FirestoreComponent ]
})
Expand Down
4 changes: 2 additions & 2 deletions sample/src/app/messaging/messaging.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';

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

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

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ MessagingComponent ]
})
Expand Down
4 changes: 2 additions & 2 deletions sample/src/app/remote-config/remote-config.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';

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

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

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ RemoteConfigComponent ]
})
Expand Down
4 changes: 2 additions & 2 deletions sample/src/app/storage/storage.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';

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

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

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ StorageComponent ]
})
Expand Down
2 changes: 1 addition & 1 deletion sample/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": [],
Expand Down
23 changes: 0 additions & 23 deletions sample/tsconfig.base.json

This file was deleted.

41 changes: 22 additions & 19 deletions sample/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
/*
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
It is not intended to be used to perform a compilation.
To learn more about this file see: https://angular.io/config/solution-tsconfig.
*/
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./tsconfig.server.json"
}
]
}
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
Loading

0 comments on commit ebf537e

Please sign in to comment.