Skip to content

Commit 0c2d890

Browse files
committed
build: update to TypeScript 4.7
Bumps up our version of TypeScript to 4.7 and resolves a couple of build errors.
1 parent d3fac0b commit 0c2d890

File tree

7 files changed

+615
-153
lines changed

7 files changed

+615
-153
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ var_2: &docker-browser-image cimg/node:16.14.0-browsers
1313
# **Note**: When updating the beginning of the cache key, also update the cache key to match
1414
# the new cache key prefix. This allows us to take advantage of CircleCI's fallback caching.
1515
# Read more here: https://circleci.com/docs/2.0/caching/#restoring-cache.
16-
var_3: &cache_key v9-ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}
16+
var_3: &cache_key v10-ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}
1717
# We want to invalidate the cache if the postinstall patches change. In order to apply new
1818
# patches, a clean version of the node modules is needed. Additionally, we invalidate the cache
1919
# if the Bazel version changes. We do this because otherwise the `bazelisk` cache folder will
2020
# contain all previously used versions and ultimately cause the cache restoring to be slower.
21-
var_4: &cache_fallback_key v9-ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-
21+
var_4: &cache_fallback_key v10-ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-
2222

2323
# Settings common to each job
2424
var_5: &job_defaults

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
"[typescript]": {
2020
"editor.defaultFormatter": "esbenp.prettier-vscode",
2121
"editor.formatOnSave": true
22-
}
22+
},
23+
"typescript.tsdk": "node_modules/typescript/lib"
2324
}

package.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
},
5555
"version": "14.1.0-next.0",
5656
"dependencies": {
57-
"@angular/animations": "14.0.0-next.15",
58-
"@angular/common": "14.0.0-next.15",
59-
"@angular/compiler": "14.0.0-next.15",
60-
"@angular/core": "14.0.0-next.15",
61-
"@angular/forms": "14.0.0-next.15",
62-
"@angular/platform-browser": "14.0.0-next.15",
57+
"@angular/animations": "14.0.0-next.16",
58+
"@angular/common": "14.0.0-next.16",
59+
"@angular/compiler": "14.0.0-next.16",
60+
"@angular/core": "14.0.0-next.16",
61+
"@angular/forms": "14.0.0-next.16",
62+
"@angular/platform-browser": "14.0.0-next.16",
6363
"@types/google.maps": "^3.47.3",
6464
"@types/youtube": "^0.0.46",
6565
"rxjs": "^6.6.7",
@@ -68,30 +68,30 @@
6868
"zone.js": "~0.11.5"
6969
},
7070
"devDependencies": {
71-
"@angular-devkit/build-angular": "14.0.0-next.12",
72-
"@angular-devkit/core": "14.0.0-next.12",
73-
"@angular-devkit/schematics": "14.0.0-next.12",
74-
"@angular/bazel": "14.0.0-next.15",
75-
"@angular/cli": "14.0.0-next.12",
76-
"@angular/compiler-cli": "14.0.0-next.15",
71+
"@angular-devkit/build-angular": "14.0.0-next.13",
72+
"@angular-devkit/core": "14.0.0-next.13",
73+
"@angular-devkit/schematics": "14.0.0-next.13",
74+
"@angular/bazel": "14.0.0-next.16",
75+
"@angular/cli": "14.0.0-next.13",
76+
"@angular/compiler-cli": "14.0.0-next.16",
7777
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#335aad1b04b3d95cd4cb1d719e73b93d4e90cce3",
78-
"@angular/localize": "14.0.0-next.15",
79-
"@angular/platform-browser-dynamic": "14.0.0-next.15",
80-
"@angular/platform-server": "14.0.0-next.15",
81-
"@angular/router": "14.0.0-next.15",
78+
"@angular/localize": "14.0.0-next.16",
79+
"@angular/platform-browser-dynamic": "14.0.0-next.16",
80+
"@angular/platform-server": "14.0.0-next.16",
81+
"@angular/router": "14.0.0-next.16",
8282
"@axe-core/webdriverjs": "^4.3.2",
8383
"@babel/core": "^7.16.12",
8484
"@bazel/bazelisk": "~1.11.0",
8585
"@bazel/buildifier": "~5.0.1",
86-
"@bazel/concatjs": "5.4.0",
87-
"@bazel/esbuild": "5.4.0",
86+
"@bazel/concatjs": "5.4.1",
87+
"@bazel/esbuild": "5.4.1",
8888
"@bazel/ibazel": "~0.16.2",
89-
"@bazel/jasmine": "5.4.0",
90-
"@bazel/protractor": "5.4.0",
91-
"@bazel/rollup": "5.4.0",
92-
"@bazel/runfiles": "5.4.0",
93-
"@bazel/terser": "5.4.0",
94-
"@bazel/worker": "5.4.0",
89+
"@bazel/jasmine": "5.4.1",
90+
"@bazel/protractor": "5.4.1",
91+
"@bazel/rollup": "5.4.1",
92+
"@bazel/runfiles": "5.4.1",
93+
"@bazel/terser": "5.4.1",
94+
"@bazel/worker": "5.4.1",
9595
"@firebase/app-types": "^0.7.0",
9696
"@material/animation": "14.0.0-canary.9736ddce9.0",
9797
"@material/auto-init": "14.0.0-canary.9736ddce9.0",
@@ -143,7 +143,7 @@
143143
"@octokit/rest": "18.3.5",
144144
"@rollup/plugin-commonjs": "^21.0.0",
145145
"@rollup/plugin-node-resolve": "^13.1.3",
146-
"@schematics/angular": "14.0.0-next.12",
146+
"@schematics/angular": "14.0.0-next.13",
147147
"@types/babel__core": "^7.1.18",
148148
"@types/browser-sync": "^2.26.3",
149149
"@types/fs-extra": "^9.0.13",
@@ -214,16 +214,16 @@
214214
"tsickle": "0.39.1",
215215
"tslint": "^6.1.3",
216216
"tsutils": "^3.21.0",
217-
"typescript": "~4.6.2",
217+
"typescript": "4.7.0-beta",
218218
"vrsource-tslint-rules": "6.0.0",
219219
"yaml": "^1.10.2",
220220
"yargs": "^17.3.1",
221221
"zx": "^4.3.0"
222222
},
223223
"resolutions": {
224-
"@angular/dev-infra-private/typescript": "~4.6.2",
224+
"@angular/dev-infra-private/typescript": "4.7.0-beta",
225225
"browser-sync-client": "2.26.13",
226-
"dgeni-packages/typescript": "4.6.2",
226+
"dgeni-packages/typescript": "4.7.0-beta",
227227
"**/https-proxy-agent": "5.0.0"
228228
}
229229
}

scripts/caretaking/firebase-functions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"firebase-functions": "^3.11.0"
1212
},
1313
"devDependencies": {
14-
"typescript": "^4.6.2",
14+
"typescript": "4.7.0-beta",
1515
"firebase-tools": "^8.6.0"
1616
},
1717
"private": true

scripts/caretaking/firebase-functions/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4547,10 +4547,10 @@ typedarray-to-buffer@^3.1.5:
45474547
dependencies:
45484548
is-typedarray "^1.0.0"
45494549

4550-
typescript@^4.6.2:
4551-
version "4.6.3"
4552-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c"
4553-
integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==
4550+
typescript@4.7.0-beta:
4551+
version "4.7.0-beta"
4552+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.0-beta.tgz#15952f24d4177479ca3d19f09436ad8c69a30563"
4553+
integrity sha512-m+CNL8lzHyHDxYYDTI+pm5hw5/bufYVGan2bokPyJY/y9C/4W/PCWMtYZ0vV9fLXbEL57elMeoaz9Evxs8UQ+A==
45544554

45554555
unique-filename@^1.1.1:
45564556
version "1.1.1"

src/material/table/table-data-source.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class _MatTableDataSource<
155155
data: T,
156156
sortHeaderId: string,
157157
): string | number => {
158-
const value = (data as {[key: string]: any})[sortHeaderId];
158+
const value = (data as unknown as Record<string, any>)[sortHeaderId];
159159

160160
if (_isNumberValue(value)) {
161161
const numberValue = Number(value);
@@ -237,15 +237,15 @@ export class _MatTableDataSource<
237237
*/
238238
filterPredicate: (data: T, filter: string) => boolean = (data: T, filter: string): boolean => {
239239
// Transform the data into a lowercase string of all property values.
240-
const dataStr = Object.keys(data)
240+
const dataStr = Object.keys(data as unknown as Record<string, any>)
241241
.reduce((currentTerm: string, key: string) => {
242242
// Use an obscure Unicode character to delimit the words in the concatenated string.
243243
// This avoids matches where the values of two columns combined will match the user's query
244244
// (e.g. `Flute` and `Stop` will match `Test`). The character is intended to be something
245245
// that has a very low chance of being typed in by somebody in a text field. This one in
246246
// particular is "White up-pointing triangle with dot" from
247247
// https://en.wikipedia.org/wiki/List_of_Unicode_characters
248-
return currentTerm + (data as {[key: string]: any})[key] + '◬';
248+
return currentTerm + (data as unknown as Record<string, any>)[key] + '◬';
249249
}, '')
250250
.toLowerCase();
251251

0 commit comments

Comments
 (0)