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

Commit 058ca74

Browse files
authored
feat: upgrade to TypeScript v3.1 (#860)
* Upgrade apps to Angular CLI v7 * Update versions in package.json to v7 for Angular and Material * Update to TypeScript v3.1 and change the MatchMedia interface to match updated spec
1 parent 2401536 commit 058ca74

28 files changed

+5418
-4967
lines changed

package-lock.json

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

package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,27 @@
2828
"version": "7.0.0-beta.19",
2929
"requiredAngularVersion": ">=7.0.0-rc.0",
3030
"dependencies": {
31-
"@angular/cdk": "^6.4.7",
32-
"@angular/common": "^6.1.6",
33-
"@angular/compiler": "^6.1.6",
34-
"@angular/core": "^6.1.6",
35-
"@angular/platform-browser": "^6.1.6",
31+
"@angular/cdk": "^7.0.0-rc.0",
32+
"@angular/common": "^7.0.0-rc.0",
33+
"@angular/compiler": "^7.0.0-rc.0",
34+
"@angular/core": "^7.0.0-rc.0",
35+
"@angular/platform-browser": "^7.0.0-rc.0",
3636
"core-js": "^2.5.7",
3737
"rxjs": "^6.3.0",
3838
"systemjs": "0.19.43",
39-
"tsickle": "^0.32.1",
39+
"tsickle": "^0.32.0",
4040
"tslib": "^1.9.3",
4141
"zone.js": "^0.8.26"
4242
},
4343
"devDependencies": {
44-
"@angular/animations": "^6.1.6",
45-
"@angular/compiler-cli": "^6.1.6",
46-
"@angular/forms": "^6.1.6",
47-
"@angular/http": "^6.1.6",
48-
"@angular/material": "^6.4.7",
49-
"@angular/platform-browser-dynamic": "^6.1.6",
50-
"@angular/platform-server": "^6.1.6",
51-
"@angular/router": "^6.1.6",
44+
"@angular/animations": "^7.0.0-rc.0",
45+
"@angular/compiler-cli": "^7.0.0-rc.0",
46+
"@angular/forms": "^7.0.0-rc.0",
47+
"@angular/http": "^7.0.0-rc.0",
48+
"@angular/material": "^7.0.0-rc.0",
49+
"@angular/platform-browser-dynamic": "^7.0.0-rc.0",
50+
"@angular/platform-server": "^7.0.0-rc.0",
51+
"@angular/router": "^7.0.0-rc.0",
5252
"@google-cloud/storage": "^1.7.0",
5353
"@types/chalk": "^0.4.31",
5454
"@types/fs-extra": "^4.0.5",
@@ -116,12 +116,12 @@
116116
"scss-bundle": "^2.4.0",
117117
"selenium-webdriver": "^3.6.0",
118118
"sorcery": "^0.10.0",
119-
"stylelint": "^7.12.0",
119+
"stylelint": "^9.6.0",
120120
"temp": "0.8.3",
121121
"ts-node": "^3.0.4",
122122
"tsconfig-paths": "^2.3.0",
123123
"tslint": "^5.11.0",
124-
"typescript": "~2.9.2",
124+
"typescript": "~3.1.1",
125125
"uglify-js": "^2.8.14"
126126
}
127127
}

src/apps/demo-app/.angular-cli.json

-84
This file was deleted.

src/apps/demo-app/angular.json

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"demo-app": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"architect": {
11+
"build": {
12+
"builder": "@angular-devkit/build-angular:browser",
13+
"options": {
14+
"outputPath": "dist/browser",
15+
"index": "src/index.html",
16+
"main": "src/main.ts",
17+
"tsConfig": "src/tsconfig.app.json",
18+
"polyfills": "src/polyfills.ts",
19+
"assets": [
20+
"src/assets",
21+
"src/favicon.ico"
22+
],
23+
"styles": [
24+
"src/styles.scss"
25+
],
26+
"scripts": []
27+
},
28+
"configurations": {
29+
"production": {
30+
"optimization": true,
31+
"outputHashing": "all",
32+
"sourceMap": false,
33+
"extractCss": true,
34+
"namedChunks": false,
35+
"aot": true,
36+
"extractLicenses": true,
37+
"vendorChunk": false,
38+
"buildOptimizer": true,
39+
"fileReplacements": [
40+
{
41+
"replace": "src/environments/environment.ts",
42+
"with": "src/environments/environment.prod.ts"
43+
}
44+
]
45+
}
46+
}
47+
},
48+
"serve": {
49+
"builder": "@angular-devkit/build-angular:dev-server",
50+
"options": {
51+
"browserTarget": "demo-app:build"
52+
},
53+
"configurations": {
54+
"production": {
55+
"browserTarget": "demo-app:build:production"
56+
}
57+
}
58+
},
59+
"extract-i18n": {
60+
"builder": "@angular-devkit/build-angular:extract-i18n",
61+
"options": {
62+
"browserTarget": "demo-app:build"
63+
}
64+
},
65+
"test": {
66+
"builder": "@angular-devkit/build-angular:karma",
67+
"options": {
68+
"main": "src/test.ts",
69+
"karmaConfig": "./karma.conf.js",
70+
"polyfills": "src/polyfills.ts",
71+
"tsConfig": "src/tsconfig.spec.json",
72+
"scripts": [],
73+
"styles": [
74+
"src/styles.scss"
75+
],
76+
"assets": [
77+
"src/assets",
78+
"src/favicon.ico"
79+
]
80+
}
81+
},
82+
"lint": {
83+
"builder": "@angular-devkit/build-angular:tslint",
84+
"options": {
85+
"tsConfig": [
86+
"src/tsconfig.app.json",
87+
"src/tsconfig.spec.json"
88+
],
89+
"exclude": [
90+
"**/node_modules/**"
91+
]
92+
}
93+
},
94+
"server": {
95+
"builder": "@angular-devkit/build-angular:server",
96+
"options": {
97+
"outputPath": "dist/server",
98+
"main": "src/main.server.ts",
99+
"tsConfig": "src/tsconfig.server.json"
100+
}
101+
}
102+
}
103+
},
104+
"demo-app-e2e": {
105+
"root": "e2e",
106+
"sourceRoot": "e2e",
107+
"projectType": "application",
108+
"architect": {
109+
"e2e": {
110+
"builder": "@angular-devkit/build-angular:protractor",
111+
"options": {
112+
"protractorConfig": "./protractor.conf.js",
113+
"devServerTarget": "demo-app:serve"
114+
}
115+
},
116+
"lint": {
117+
"builder": "@angular-devkit/build-angular:tslint",
118+
"options": {
119+
"tsConfig": [
120+
"e2e/tsconfig.e2e.json"
121+
],
122+
"exclude": [
123+
"**/node_modules/**"
124+
]
125+
}
126+
}
127+
}
128+
}
129+
},
130+
"defaultProject": "demo-app",
131+
"schematics": {
132+
"@schematics/angular:component": {
133+
"prefix": "demo",
134+
"styleext": "scss"
135+
},
136+
"@schematics/angular:directive": {
137+
"prefix": "demo"
138+
}
139+
}
140+
}

src/apps/demo-app/karma.conf.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,22 @@
44
module.exports = function (config) {
55
config.set({
66
basePath: '',
7-
frameworks: ['jasmine', '@angular/cli'],
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
1212
require('karma-coverage-istanbul-reporter'),
13-
require('@angular/cli/plugins/karma')
13+
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client:{
1616
clearContext: false // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageIstanbulReporter: {
19-
reports: [ 'html', 'lcovonly' ],
19+
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
2020
fixWebpackSourcePaths: true
2121
},
22-
angularCli: {
23-
environment: 'dev'
24-
},
22+
2523
reporters: ['progress', 'kjhtml'],
2624
port: 9876,
2725
colors: true,

src/apps/demo-app/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"dependencies": {
1515
"@angular/animations": "file:../../../node_modules/@angular/animations",
1616
"@angular/cdk": "file:../../../node_modules/@angular/cdk",
17+
"@angular/cli": "^7.0.0-rc.2",
1718
"@angular/common": "file:../../../node_modules/@angular/common",
1819
"@angular/compiler": "file:../../../node_modules/@angular/compiler",
1920
"@angular/core": "file:../../../node_modules/@angular/core",
@@ -30,13 +31,13 @@
3031
"zone.js": "file:../../../node_modules/zone.js"
3132
},
3233
"devDependencies": {
33-
"@angular/cli": "1.7.2",
34+
"@angular-devkit/build-angular": "~0.9.0-rc.1",
3435
"@angular/compiler-cli": "file:../../../node_modules/@angular/compiler-cli",
3536
"@angular/language-service": "^6.0.0",
3637
"@types/jasmine": "~2.8.3",
3738
"@types/jasminewd2": "~2.0.2",
3839
"@types/node": "~6.0.60",
39-
"codelyzer": "^4.0.1",
40+
"codelyzer": "^4.5.0",
4041
"jasmine-core": "~2.8.0",
4142
"jasmine-spec-reporter": "~4.2.1",
4243
"karma": "~2.0.0",

src/apps/demo-app/src/polyfills.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import 'core-js/es6/set';
4343

4444
/** Evergreen browsers require these. **/
4545
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46-
import 'core-js/es7/reflect';
46+
4747

4848

4949
/**

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
]
1111
},
1212
"files": [
13-
"test.ts"
13+
"test.ts",
14+
"polyfills.ts"
1415
],
1516
"include": [
1617
"**/*.spec.ts",

src/apps/demo-app/tsconfig.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"lib": [
1515
"es2017",
1616
"dom"
17-
]
17+
],
18+
"module": "es2015",
19+
"baseUrl": "./"
1820
}
19-
}
21+
}

0 commit comments

Comments
 (0)