Skip to content

Commit 320a105

Browse files
committed
refactor: Angular v11 update and AngularJS and Material updates
- enable more strict flags and fix related issues
1 parent 638e816 commit 320a105

File tree

11 files changed

+5094
-3241
lines changed

11 files changed

+5094
-3241
lines changed

angular.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"builder": "@angular-devkit/build-angular:browser",
2626
"options": {
2727
"aot": true,
28-
"extractCss": true,
2928
"outputPath": "dist/",
3029
"index": "src/index.html",
3130
"main": "src/main.ts",
@@ -55,7 +54,6 @@
5554
"optimization": true,
5655
"outputHashing": "all",
5756
"sourceMap": true,
58-
"extractCss": true,
5957
"namedChunks": false,
6058
"aot": true,
6159
"extractLicenses": true,

package-lock.json

Lines changed: 5014 additions & 3157 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -19,56 +19,55 @@
1919
"update": "npm-check -u"
2020
},
2121
"dependencies": {
22-
"@angular/animations": "10.0.6",
23-
"@angular/cdk": "10.1.1",
24-
"@angular/common": "10.0.6",
25-
"@angular/compiler": "10.0.6",
26-
"@angular/core": "10.0.6",
27-
"@angular/fire": "^6.0.2",
28-
"@angular/forms": "10.0.6",
29-
"@angular/material": "10.1.1",
30-
"@angular/platform-browser": "10.0.6",
31-
"@angular/platform-browser-dynamic": "10.0.6",
32-
"@angular/upgrade": "10.0.6",
22+
"@angular/animations": "11.0.0",
23+
"@angular/cdk": "11.0.0",
24+
"@angular/common": "11.0.0",
25+
"@angular/compiler": "11.0.0",
26+
"@angular/core": "11.0.0",
27+
"@angular/fire": "^6.0.5",
28+
"@angular/forms": "11.0.0",
29+
"@angular/material": "11.0.0",
30+
"@angular/platform-browser": "11.0.0",
31+
"@angular/platform-browser-dynamic": "11.0.0",
32+
"@angular/upgrade": "11.0.0",
3333
"@schuchard/prettier": "^3.1.0",
34-
"@types/angular": "^1.7.2",
35-
"@types/angular-material": "^1.1.71",
36-
"angular": "^1.8.0",
37-
"angular-animate": "^1.8.0",
38-
"angular-aria": "^1.8.0",
39-
"angular-material": "^1.2.0-rc.2",
40-
"angular-messages": "^1.8.0",
41-
"angular-sanitize": "^1.8.0",
42-
"firebase": "^7.17.1",
43-
"rxjs": "^6.6.0",
44-
"tslib": "^2.0.0",
45-
"zone.js": "~0.10.3"
34+
"@types/angular": "^1.8.0",
35+
"@types/angular-material": "^1.1.72",
36+
"angular": "^1.8.2",
37+
"angular-animate": "^1.8.2",
38+
"angular-aria": "^1.8.2",
39+
"angular-material": "^1.2.1",
40+
"angular-messages": "^1.8.2",
41+
"angular-sanitize": "^1.8.2",
42+
"firebase": "^8.0.1",
43+
"rxjs": "^6.6.3",
44+
"tslib": "^2.0.3",
45+
"zone.js": "~0.11.3"
4646
},
4747
"devDependencies": {
48-
"@angular-devkit/architect": "^0.1000.4",
49-
"@angular-devkit/build-angular": "~0.1000.4",
50-
"@angular/cli": "~10.0.4",
51-
"@angular/compiler-cli": "~10.0.6",
52-
"@angular/language-service": "~10.0.6",
53-
"@types/gulp": "^4.0.6",
54-
"@types/node": "^14.0.27",
55-
"codelyzer": "^6.0.0-next.1",
48+
"@angular-devkit/build-angular": "~0.1100.0",
49+
"@angular/cli": "~11.0.0",
50+
"@angular/compiler-cli": "~11.0.0",
51+
"@angular/language-service": "~11.0.0",
52+
"@types/gulp": "^4.0.7",
53+
"@types/node": "^14.14.7",
54+
"codelyzer": "^6.0.1",
5655
"debug": "^4.1.1",
57-
"firebase-tools": "^8.6.0",
58-
"gulp": "^4.0.2",
59-
"gulp-angular-templatecache": "^3.0.0",
60-
"gulp-htmlmin": "^5.0.1",
61-
"husky": "4.2.5",
62-
"lint-staged": "^10.2.11",
56+
"firebase-tools": "^8.16.0",
57+
"gulp": "~4.0.2",
58+
"gulp-angular-templatecache": "~3.0.0",
59+
"gulp-htmlmin": "~5.0.1",
60+
"husky": "4.3.0",
61+
"lint-staged": "^10.5.1",
6362
"npm-check": "^5.9.2",
64-
"prettier": "2.0.5",
65-
"rxjs-tslint-rules": "^4.34.0",
66-
"source-map-explorer": "^2.4.2",
67-
"ts-node": "^8.10.2",
68-
"tslint": "~6.1.0",
63+
"prettier": "2.1.2",
64+
"rxjs-tslint-rules": "^4.34.5",
65+
"source-map-explorer": "^2.5.0",
66+
"ts-node": "^9.0.0",
67+
"tslint": "~6.1.3",
6968
"tslint-config-prettier": "1.18.0",
7069
"tsutils": "^3.17.1",
71-
"typescript": "~3.9.5"
70+
"typescript": "~4.0.5"
7271
},
7372
"husky": {
7473
"hooks": {

src/.browserslistrc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
# You can see what browsers were selected by your queries by running:
66
# npx browserslist
77

8-
> 0.5%
9-
last 2 versions
8+
last 1 Chrome version
9+
last 1 Firefox version
10+
last 2 Edge major versions
11+
last 2 Safari major versions
12+
last 2 iOS major versions
1013
Firefox ESR
11-
not dead
12-
not IE 9-10 # For IE 9-10 support, remove 'not'.
14+
IE 11

src/app/angular/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ import { Component, Input } from '@angular/core';
77
})
88
export class AppComponent {
99
static selector = 'appComponent';
10-
@Input() name: string;
10+
@Input() name: string = 'Material';
1111
}

src/app/angularjs/app-angularjs.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { bootstrapAngular } from './bootstrap-module';
1515

1616
const downgradedModule = downgradeModule(bootstrapAngular);
1717

18-
const configFunction = ($mdThemingProvider, $mdGestureProvider) => {
18+
const configFunction = ($mdThemingProvider: any, $mdGestureProvider: any) => {
1919
$mdThemingProvider
2020
.theme('default')
2121
.primaryPalette('indigo')

src/app/angularjs/tabs.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Directive, ElementRef, Injector } from '@angular/core';
22
import { UpgradeComponent } from '@angular/upgrade/static';
3+
import { IScope } from 'angular';
34

45
export const tabsComponent = {
56
selector: 'ng1-tabs',
@@ -8,7 +9,7 @@ export const tabsComponent = {
89
static $inject = ['$scope'];
910
$digestCount = 0;
1011

11-
constructor($scope) {
12+
constructor($scope: IScope) {
1213
this.$digestCount = 0;
1314
$scope.$watch(() => {
1415
this.$digestCount++;

src/app/angularjs/version-stamp.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Directive, ElementRef, Injector, VERSION } from '@angular/core';
33
import { VERSION as cdkVersion } from '@angular/cdk';
44
import { VERSION as matVersion } from '@angular/material/core';
55
import { UpgradeComponent } from '@angular/upgrade/static';
6+
import { IWindowService } from 'angular';
67

78
export const versionStampComponent = {
89
selector: 'version-stamp',
@@ -41,7 +42,7 @@ export const versionStampComponent = {
4142
static $inject = ['$window'];
4243
versions: object;
4344

44-
constructor($window) {
45+
constructor($window: IWindowService) {
4546
this.versions = {
4647
angularjs: angular.version,
4748
md: $window.ngMaterial.version.full,

src/tsconfig.app.json

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

tsconfig.base.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)