Skip to content

Commit 5485b99

Browse files
committed
upgrade to Angular 11 and Node 14 - Udemy update dates
1 parent 97af941 commit 5485b99

11 files changed

+5358
-4397
lines changed

angular.json

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"optimization": true,
3838
"outputHashing": "all",
3939
"sourceMap": false,
40-
"extractCss": true,
4140
"namedChunks": false,
4241
"aot": true,
4342
"extractLicenses": true,

e2e/tsconfig.e2e.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/e2e",
55
"baseUrl": "./",

package-lock.json

+5,306-4,327
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+23-23
Original file line numberDiff line numberDiff line change
@@ -18,51 +18,51 @@
1818
},
1919
"private": true,
2020
"dependencies": {
21-
"@angular/animations": "10.0.2",
22-
"@angular/cdk": "^10.0.1",
23-
"@angular/common": "10.0.2",
24-
"@angular/compiler": "10.0.2",
25-
"@angular/core": "10.0.2",
26-
"@angular/forms": "10.0.2",
27-
"@angular/material": "^10.0.1",
28-
"@angular/material-moment-adapter": "10.0.1",
29-
"@angular/platform-browser": "10.0.2",
30-
"@angular/platform-browser-dynamic": "10.0.2",
31-
"@angular/router": "10.0.2",
21+
"@angular/animations": "11.0.0",
22+
"@angular/cdk": "^11.0.0",
23+
"@angular/common": "11.0.0",
24+
"@angular/compiler": "11.0.0",
25+
"@angular/core": "11.0.0",
26+
"@angular/forms": "11.0.0",
27+
"@angular/material": "^11.0.0",
28+
"@angular/material-moment-adapter": "11.0.0",
29+
"@angular/platform-browser": "11.0.0",
30+
"@angular/platform-browser-dynamic": "11.0.0",
31+
"@angular/router": "11.0.0",
3232
"body-parser": "^1.18.3",
3333
"core-js": "^2.4.1",
34-
"cypress": "^3.2.0",
34+
"cypress": "^5.6.0",
3535
"express": "^4.16.2",
36-
"http-server": "^0.12.1",
36+
"http-server": "^0.12.3",
3737
"moment": "^2.22.2",
3838
"npm-run-all": "^4.1.5",
3939
"rxjs": "6.5.4",
4040
"tslib": "^2.0.0",
4141
"zone.js": "~0.10.3"
4242
},
4343
"devDependencies": {
44-
"@angular-devkit/build-angular": "~0.1000.0",
45-
"@angular/cli": "^10.0.0",
46-
"@angular/compiler-cli": "10.0.2",
47-
"@angular/language-service": "10.0.2",
44+
"@angular-devkit/build-angular": "^0.1100.1",
45+
"@angular/cli": "^11.0.1",
46+
"@angular/compiler-cli": "11.0.0",
47+
"@angular/language-service": "11.0.0",
4848
"@cypress/webpack-preprocessor": "^4.0.3",
4949
"@types/express": "^4.0.39",
50-
"@types/jasmine": "~2.5.53",
50+
"@types/jasmine": "~3.6.0",
5151
"@types/jasminewd2": "~2.0.2",
5252
"@types/node": "^12.11.1",
53-
"codelyzer": "^5.1.2",
54-
"jasmine-core": "~3.5.0",
53+
"codelyzer": "^6.0.0",
54+
"jasmine-core": "~3.6.0",
5555
"jasmine-spec-reporter": "~5.0.0",
56-
"karma": "~5.0.0",
56+
"karma": "~5.1.1",
5757
"karma-chrome-launcher": "~3.1.0",
5858
"karma-cli": "~1.0.1",
5959
"karma-coverage-istanbul-reporter": "~3.0.2",
60-
"karma-jasmine": "~3.3.0",
60+
"karma-jasmine": "~4.0.0",
6161
"karma-jasmine-html-reporter": "^1.5.0",
6262
"protractor": "~7.0.0",
6363
"start-server-and-test": "^1.9.1",
6464
"ts-node": "~3.2.0",
6565
"tslint": "~6.1.0",
66-
"typescript": "3.9.5"
66+
"typescript": "4.0.5"
6767
}
6868
}

src/app/app-routing.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const routes: Routes = [
2929
];
3030

3131
@NgModule({
32-
imports: [RouterModule.forRoot(routes)],
32+
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
3333
exports: [RouterModule]
3434
})
3535
export class AppRoutingModule { }

src/app/courses/courses-card-list/courses-card-list.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
22
import {CoursesCardListComponent} from './courses-card-list.component';
33
import {CoursesModule} from '../courses.module';
44
import {COURSES} from '../../../../server/db-data';
@@ -16,7 +16,7 @@ describe('CoursesCardListComponent', () => {
1616
let fixture: ComponentFixture<CoursesCardListComponent>;
1717
let el: DebugElement;
1818

19-
beforeEach(async(() => {
19+
beforeEach(waitForAsync(() => {
2020
TestBed.configureTestingModule({
2121
imports: [CoursesModule]
2222
})

src/app/courses/home/home.component.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {async, ComponentFixture, fakeAsync, flush, flushMicrotasks, TestBed, tick} from '@angular/core/testing';
1+
import { ComponentFixture, fakeAsync, flush, flushMicrotasks, TestBed, tick, waitForAsync } from '@angular/core/testing';
22
import {CoursesModule} from '../courses.module';
33
import {DebugElement} from '@angular/core';
44

@@ -31,7 +31,7 @@ describe('HomeComponent', () => {
3131

3232

3333

34-
beforeEach(async(() => {
34+
beforeEach(waitForAsync(() => {
3535

3636
const coursesServiceSpy = jasmine.createSpyObj('CoursesService', ['findAllCourses'])
3737

@@ -124,7 +124,7 @@ describe('HomeComponent', () => {
124124
}));
125125

126126

127-
it("should display advanced courses when tab clicked - async", async(() => {
127+
it("should display advanced courses when tab clicked - async", waitForAsync(() => {
128128

129129
coursesService.findAllCourses.and.returnValue(of(setupCourses()));
130130

src/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
"baseUrl": "./",

src/tsconfig.spec.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/spec",
55
"baseUrl": "./",

tsconfig.base.json

-21
This file was deleted.

tsconfig.json

+20-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
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": "./src/tsconfig.app.json"
12-
},
13-
{
14-
"path": "./src/tsconfig.spec.json"
15-
}
16-
]
17-
}
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"module": "esnext",
5+
"outDir": "./dist/out-tsc",
6+
"sourceMap": true,
7+
"declaration": false,
8+
"moduleResolution": "node",
9+
"emitDecoratorMetadata": true,
10+
"experimentalDecorators": true,
11+
"target": "es2015",
12+
"typeRoots": [
13+
"node_modules/@types"
14+
],
15+
"lib": [
16+
"es2017",
17+
"dom",
18+
"ES2017.object"
19+
]
20+
}
21+
}

0 commit comments

Comments
 (0)