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

Commit ec7b57e

Browse files
authored
build: upgrade to Angular and CDK v9 (#1143)
1 parent d062708 commit ec7b57e

Some content is hidden

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

53 files changed

+319
-374
lines changed

package.json

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,33 @@
2424
"lib:test": "gulp test",
2525
"lib:test:ssr": "gulp test:ssr",
2626
"universal:build": "gulp ci:prerender",
27-
"universal:serve": "gulp universal:serve"
27+
"universal:serve": "gulp universal:serve",
28+
"postinstall": "ngcc --properties es2015 browser module main --create-ivy-entry-points"
2829
},
2930
"version": "8.0.0-beta.27",
30-
"requiredAngularVersion": ">=8.0.0-rc.5",
31+
"requiredAngularVersion": ">=9.0.0-rc.6",
3132
"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",
33+
"@angular/cdk": "^9.0.0-rc.5",
34+
"@angular/common": "^9.0.0-rc.6",
35+
"@angular/compiler": "^9.0.0-rc.6",
36+
"@angular/core": "^9.0.0-rc.6",
37+
"@angular/platform-browser": "^9.0.0-rc.6",
3738
"core-js": "^2.5.7",
3839
"karma-parallel": "^0.3.1",
3940
"rxjs": "^6.5.1",
4041
"systemjs": "0.19.43",
41-
"tsickle": "^0.35.0",
42+
"tsickle": "^0.37.1",
4243
"tslib": "^1.9.3",
43-
"zone.js": "~0.9.1"
44+
"zone.js": "~0.10.2"
4445
},
4546
"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",
47+
"@angular/animations": "^9.0.0-rc.6",
48+
"@angular/compiler-cli": "^9.0.0-rc.6",
49+
"@angular/forms": "^9.0.0-rc.6",
50+
"@angular/material": "^9.0.0-rc.5",
51+
"@angular/platform-browser-dynamic": "^9.0.0-rc.6",
52+
"@angular/platform-server": "^9.0.0-rc.6",
53+
"@angular/router": "^9.0.0-rc.6",
5354
"@firebase/app-types": "^0.3.2",
5455
"@types/chalk": "^0.4.31",
5556
"@types/fs-extra": "^4.0.5",
@@ -59,7 +60,7 @@
5960
"@types/jasmine": "^2.8.11",
6061
"@types/merge2": "^0.3.30",
6162
"@types/minimist": "^1.2.0",
62-
"@types/node": "^7.10.1",
63+
"@types/node": "^12.12.17",
6364
"@types/run-sequence": "^0.0.29",
6465
"@types/rx": "2.5.33",
6566
"axe-webdriverjs": "^1.1.5",
@@ -119,10 +120,10 @@
119120
"ts-node": "^3.0.4",
120121
"tsconfig-paths": "^2.3.0",
121122
"tslint": "^5.11.0",
122-
"typescript": "~3.4.5",
123+
"typescript": "~3.6.4",
123124
"uglify-js": "^2.8.14"
124125
},
125-
"// Gulp": "Overwrite graceful-fs to a version that does not rely on the 'natives' package. This fixes gulp for >= 10.13, more information: #28213",
126+
"// Gulp": "Overwrite graceful-fs to a version that does not rely on the 'natives' package. This fixes gulp for >= 10.13, more information: angular/angular#28213",
126127
"resolutions": {
127128
"**/graceful-fs": "4.2.2"
128129
}

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,
@@ -88,4 +95,4 @@
8895
"spec": false
8996
}
9097
}
91-
}
98+
}

src/apps/hello-world/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@
1111
"dependencies": {
1212
"@angular/animations": "file:../../../node_modules/@angular/animations",
1313
"@angular/cdk": "file:../../../node_modules/@angular/cdk",
14-
"@angular/cli": "^8.3.17",
1514
"@angular/common": "file:../../../node_modules/@angular/common",
1615
"@angular/compiler": "file:../../../node_modules/@angular/compiler",
1716
"@angular/core": "file:../../../node_modules/@angular/core",
1817
"@angular/flex-layout": "file:../../../dist/releases/flex-layout/angular-flex-layout.tgz",
1918
"@angular/forms": "file:../../../node_modules/@angular/forms",
20-
"@angular/material": "file:../../../node_modules/@angular/material",
2119
"@angular/platform-browser": "file:../../../node_modules/@angular/platform-browser",
2220
"@angular/platform-browser-dynamic": "file:../../../node_modules/@angular/platform-browser-dynamic",
2321
"@angular/router": "file:../../../node_modules/@angular/router",
2422
"core-js": "file:../../../node_modules/core-js",
2523
"rxjs": "file:../../../node_modules/rxjs",
24+
"tslib": "file:../../../node_modules/tslib",
2625
"zone.js": "file:../../../node_modules/zone.js"
2726
},
2827
"devDependencies": {
29-
"@angular-devkit/build-angular": "~0.803.17",
28+
"@angular-devkit/build-angular": "~0.900.0-rc.2",
29+
"@angular/cli": "^9.0.0-rc.2",
3030
"@angular/compiler-cli": "file:../../../node_modules/@angular/compiler-cli",
31-
"@angular/language-service": "^8.2.13",
31+
"@angular/language-service": "^9.0.0-rc.2",
3232
"typescript": "file:../../../node_modules/typescript"
3333
}
3434
}

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+
}

0 commit comments

Comments
 (0)