Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit c2e9686

Browse files
committed
build: upgrade to Angular and CDK v9
1 parent 2aca286 commit c2e9686

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+308
-365
lines changed

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,29 @@
2727
"universal:serve": "gulp universal:serve"
2828
},
2929
"version": "8.0.0-beta.27",
30-
"requiredAngularVersion": ">=8.0.0-rc.5",
30+
"requiredAngularVersion": ">=9.0.0-rc.2",
3131
"dependencies": {
32-
"@angular/cdk": "^8.0.0-rc.1",
33-
"@angular/common": "^8.0.0-rc.5",
34-
"@angular/compiler": "^8.0.0-rc.5",
35-
"@angular/core": "^8.0.0-rc.5",
36-
"@angular/platform-browser": "^8.0.0-rc.5",
32+
"@angular/cdk": "^9.0.0-rc.2",
33+
"@angular/common": "^9.0.0-rc.2",
34+
"@angular/compiler": "^9.0.0-rc.2",
35+
"@angular/core": "^9.0.0-rc.2",
36+
"@angular/platform-browser": "^9.0.0-rc.2",
3737
"core-js": "^2.5.7",
3838
"karma-parallel": "^0.3.1",
3939
"rxjs": "^6.5.1",
4040
"systemjs": "0.19.43",
41-
"tsickle": "^0.35.0",
41+
"tsickle": "^0.37.1",
4242
"tslib": "^1.9.3",
43-
"zone.js": "~0.9.1"
43+
"zone.js": "~0.10.2"
4444
},
4545
"devDependencies": {
46-
"@angular/animations": "^8.0.0-rc.5",
47-
"@angular/compiler-cli": "^8.0.0-rc.5",
48-
"@angular/forms": "^8.0.0-rc.5",
49-
"@angular/material": "^8.0.0-rc.1",
50-
"@angular/platform-browser-dynamic": "^8.0.0-rc.5",
51-
"@angular/platform-server": "^8.0.0-rc.5",
52-
"@angular/router": "^8.0.0-rc.5",
46+
"@angular/animations": "^9.0.0-rc.2",
47+
"@angular/compiler-cli": "^9.0.0-rc.2",
48+
"@angular/forms": "^9.0.0-rc.2",
49+
"@angular/material": "^9.0.0-rc.2",
50+
"@angular/platform-browser-dynamic": "^9.0.0-rc.2",
51+
"@angular/platform-server": "^9.0.0-rc.2",
52+
"@angular/router": "^9.0.0-rc.2",
5353
"@firebase/app-types": "^0.3.2",
5454
"@types/chalk": "^0.4.31",
5555
"@types/fs-extra": "^4.0.5",
@@ -119,7 +119,7 @@
119119
"ts-node": "^3.0.4",
120120
"tsconfig-paths": "^2.3.0",
121121
"tslint": "^5.11.0",
122-
"typescript": "~3.4.5",
122+
"typescript": "~3.6.4",
123123
"uglify-js": "^2.8.14"
124124
},
125125
"// Gulp": "Overwrite graceful-fs to a version that does not rely on the 'natives' package. This fixes gulp for >= 10.13, more information: #28213",

src/apps/demo-app/angular.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
"build": {
1212
"builder": "@angular-devkit/build-angular:browser",
1313
"options": {
14+
"aot": true,
1415
"outputPath": "dist/browser",
1516
"index": "src/index.html",
1617
"main": "src/main.ts",
17-
"tsConfig": "src/tsconfig.app.json",
18+
"tsConfig": "tsconfig.app.json",
1819
"polyfills": "src/polyfills.ts",
1920
"assets": [
2021
"src/assets",
@@ -27,6 +28,12 @@
2728
},
2829
"configurations": {
2930
"production": {
31+
"budgets": [
32+
{
33+
"type": "anyComponentStyle",
34+
"maximumWarning": "6kb"
35+
}
36+
],
3037
"optimization": true,
3138
"outputHashing": "all",
3239
"sourceMap": false,
@@ -68,7 +75,7 @@
6875
"main": "src/test.ts",
6976
"karmaConfig": "./karma.conf.js",
7077
"polyfills": "src/polyfills.ts",
71-
"tsConfig": "src/tsconfig.spec.json",
78+
"tsConfig": "tsconfig.spec.json",
7279
"scripts": [],
7380
"styles": [
7481
"src/styles.scss"
@@ -83,8 +90,8 @@
8390
"builder": "@angular-devkit/build-angular:tslint",
8491
"options": {
8592
"tsConfig": [
86-
"src/tsconfig.app.json",
87-
"src/tsconfig.spec.json"
93+
"tsconfig.app.json",
94+
"tsconfig.spec.json"
8895
],
8996
"exclude": [
9097
"**/node_modules/**"
@@ -96,7 +103,7 @@
96103
"options": {
97104
"outputPath": "dist/server",
98105
"main": "src/main.server.ts",
99-
"tsConfig": "src/tsconfig.server.json"
106+
"tsConfig": "tsconfig.server.json"
100107
}
101108
}
102109
}
@@ -137,4 +144,4 @@
137144
"prefix": "demo"
138145
}
139146
}
140-
}
147+
}

src/apps/demo-app/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"dependencies": {
1515
"@angular/animations": "file:../../../node_modules/@angular/animations",
1616
"@angular/cdk": "file:../../../node_modules/@angular/cdk",
17-
"@angular/cli": "^8.3.17",
1817
"@angular/common": "file:../../../node_modules/@angular/common",
1918
"@angular/compiler": "file:../../../node_modules/@angular/compiler",
2019
"@angular/core": "file:../../../node_modules/@angular/core",
@@ -27,16 +26,18 @@
2726
"@angular/router": "file:../../../node_modules/@angular/router",
2827
"core-js": "file:../../../node_modules/core-js",
2928
"rxjs": "file:../../../node_modules/rxjs",
29+
"tslib": "file:../../../node_modules/tslib",
3030
"zone.js": "file:../../../node_modules/zone.js"
3131
},
3232
"devDependencies": {
33-
"@angular-devkit/build-angular": "~0.803.17",
33+
"@angular-devkit/build-angular": "~0.900.0-rc.2",
34+
"@angular/cli": "^9.0.0-rc.2",
3435
"@angular/compiler-cli": "file:../../../node_modules/@angular/compiler-cli",
35-
"@angular/language-service": "^8.2.13",
36+
"@angular/language-service": "^9.0.0-rc.2",
3637
"@types/jasmine": "~2.8.3",
3738
"@types/jasminewd2": "~2.0.2",
38-
"@types/node": "~6.0.60",
39-
"codelyzer": "^5.0.1",
39+
"@types/node": "^12.12.11",
40+
"codelyzer": "^5.1.2",
4041
"jasmine-core": "~2.8.0",
4142
"jasmine-spec-reporter": "~4.2.1",
4243
"karma": "~2.0.0",

src/apps/demo-app/src/app/routing.module.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@ import {HashLocationStrategy, LocationStrategy} from '@angular/common';
44

55
const DEMO_APP_ROUTES: Routes = [
66
{path: '', redirectTo: 'docs', pathMatch: 'full'},
7-
{path: 'grid', loadChildren: './grid/grid.module#DocsGridModule'},
8-
{path: 'docs', loadChildren: './layout/layout.module#DocsLayoutModule'},
9-
{path: 'responsive', loadChildren: './responsive/responsive.module#DocsResponsiveModule'},
10-
{path: 'issues', loadChildren: './github-issues/github-issues.module#DocsGithubIssuesModule'},
7+
{path: 'grid', loadChildren: () => import('./grid/grid.module').then(m => m.DocsGridModule)},
8+
{
9+
path: 'docs', loadChildren: () => import('./layout/layout.module')
10+
.then(m => m.DocsLayoutModule)
11+
},
12+
{
13+
path: 'responsive',
14+
loadChildren: () => import('./responsive/responsive.module').then(m => m.DocsResponsiveModule)
15+
},
16+
{
17+
path: 'issues',
18+
loadChildren: () => import('./github-issues/github-issues.module')
19+
.then(m => m.DocsGithubIssuesModule)
20+
},
1121
{
1222
path: 'stackoverflow',
13-
loadChildren: './stack-overflow/stack-overflow.module#DocsStackOverflowModule'
23+
loadChildren: () => import('./stack-overflow/stack-overflow.module')
24+
.then(m => m.DocsStackOverflowModule)
1425
}
1526
];
1627

src/apps/demo-app/src/main.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ if (environment.production) {
77
}
88

99
export { AppServerModule } from './app/app.server.module';
10+
11+
export { renderModule, renderModuleFactory } from '@angular/platform-server';

src/apps/demo-app/src/tsconfig.app.json

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

src/apps/demo-app/src/tsconfig.server.json

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

src/apps/demo-app/tsconfig.app.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "./out-tsc/app",
5+
"types": []
6+
},
7+
"files": [
8+
"src/main.ts",
9+
"src/polyfills.ts"
10+
],
11+
"include": [
12+
"src/**/*.d.ts"
13+
]
14+
}

src/apps/demo-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"es2017",
1717
"dom"
1818
],
19-
"module": "es2015",
19+
"module": "esnext",
2020
"baseUrl": "./"
2121
}
2222
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": "./tsconfig.app.json",
3+
"compilerOptions": {
4+
"outDir": "./out-tsc/app-server",
5+
"module": "commonjs",
6+
"types": [
7+
"node"
8+
]
9+
},
10+
"files": [
11+
"src/main.server.ts",
12+
"server.ts"
13+
],
14+
"angularCompilerOptions": {
15+
"entryModule": "./src/app/app.server.module#AppServerModule"
16+
}
17+
}

src/apps/demo-app/src/tsconfig.spec.json renamed to src/apps/demo-app/tsconfig.spec.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
2-
"extends": "../tsconfig.json",
2+
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/spec",
55
"baseUrl": "./",
6-
"module": "commonjs",
76
"types": [
87
"jasmine",
98
"node"
109
]
1110
},
1211
"files": [
13-
"test.ts",
12+
"src/test.ts",
1413
"polyfills.ts"
1514
],
1615
"include": [

src/apps/hello-world/angular.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"build": {
1212
"builder": "@angular-devkit/build-angular:browser",
1313
"options": {
14+
"aot": true,
1415
"outputPath": "dist",
1516
"index": "src/index.html",
1617
"main": "src/main.ts",
@@ -27,6 +28,12 @@
2728
},
2829
"configurations": {
2930
"production": {
31+
"budgets": [
32+
{
33+
"type": "anyComponentStyle",
34+
"maximumWarning": "6kb"
35+
}
36+
],
3037
"optimization": true,
3138
"outputHashing": "all",
3239
"sourceMap": false,
@@ -148,4 +155,4 @@
148155
"spec": false
149156
}
150157
}
151-
}
158+
}

src/apps/hello-world/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@
1414
"dependencies": {
1515
"@angular/animations": "file:../../../node_modules/@angular/animations",
1616
"@angular/cdk": "file:../../../node_modules/@angular/cdk",
17-
"@angular/cli": "^8.3.17",
1817
"@angular/common": "file:../../../node_modules/@angular/common",
1918
"@angular/compiler": "file:../../../node_modules/@angular/compiler",
2019
"@angular/core": "file:../../../node_modules/@angular/core",
2120
"@angular/flex-layout": "file:../../../dist/releases/flex-layout/angular-flex-layout.tgz",
2221
"@angular/forms": "file:../../../node_modules/@angular/forms",
23-
"@angular/material": "file:../../../node_modules/@angular/material",
2422
"@angular/platform-browser": "file:../../../node_modules/@angular/platform-browser",
2523
"@angular/platform-browser-dynamic": "file:../../../node_modules/@angular/platform-browser-dynamic",
2624
"@angular/router": "file:../../../node_modules/@angular/router",
2725
"core-js": "file:../../../node_modules/core-js",
2826
"rxjs": "file:../../../node_modules/rxjs",
27+
"tslib": "file:../../../node_modules/tslib",
2928
"zone.js": "file:../../../node_modules/zone.js"
3029
},
3130
"devDependencies": {
32-
"@angular-devkit/build-angular": "~0.803.17",
31+
"@angular-devkit/build-angular": "~0.900.0-rc.2",
32+
"@angular/cli": "^9.0.0-rc.2",
3333
"@angular/compiler-cli": "file:../../../node_modules/@angular/compiler-cli",
34-
"@angular/language-service": "^8.2.13",
34+
"@angular/language-service": "^9.0.0-rc.2",
3535
"typescript": "file:../../../node_modules/typescript"
3636
}
3737
}

src/apps/hello-world/src/tsconfig.app.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"module": "es2015",
77
"types": []
88
},
9-
"exclude": [
10-
"test.ts",
11-
"**/*.spec.ts"
9+
"files": [
10+
"main.ts",
11+
"polyfills.ts"
1212
]
1313
}

src/apps/hello-world/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"es2017",
1616
"dom"
1717
],
18-
"module": "es2015",
18+
"module": "esnext",
1919
"baseUrl": "./"
2020
}
21-
}
21+
}

src/apps/universal-app/angular.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"build": {
1818
"builder": "@angular-devkit/build-angular:browser",
1919
"options": {
20+
"aot": true,
2021
"outputPath": "dist/browser",
2122
"index": "src/index.html",
2223
"main": "src/main.ts",
@@ -53,6 +54,10 @@
5354
"type": "initial",
5455
"maximumWarning": "2mb",
5556
"maximumError": "5mb"
57+
},
58+
{
59+
"type": "anyComponentStyle",
60+
"maximumWarning": "6kb"
5661
}
5762
]
5863
}
@@ -108,7 +113,7 @@
108113
"builder": "@angular-devkit/build-angular:server",
109114
"options": {
110115
"outputPath": "dist/server",
111-
"main": "src/main.server.ts",
116+
"main": "server.ts",
112117
"tsConfig": "src/tsconfig.server.json"
113118
},
114119
"configurations": {
@@ -119,7 +124,8 @@
119124
"with": "src/environments/environment.prod.ts"
120125
}
121126
]
122-
}
127+
},
128+
"optimization": true
123129
}
124130
}
125131
}

0 commit comments

Comments
 (0)