Skip to content

Commit b60623a

Browse files
committed
build: ensure build uses typescript 3.9
We recently updated TS 3.9 in the `package.json` with #19286, but the build did not pick up the new version. This is because peer dependency ranges did not accept TS 3.9, so yarn hoisted sufficient TS versions.
1 parent e408228 commit b60623a

File tree

31 files changed

+91
-72
lines changed

31 files changed

+91
-72
lines changed

angular-tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"angularCompilerOptions": {
66
// In snapshot builds the compiler-cli will now use ngtsc by default. In
77
// order to be able to build the summary files, we need to use ngc.
8-
"enableIvy": false
8+
"enableIvy": false,
9+
"disableTypeScriptVersionCheck": true
910
},
1011
"compilerOptions": {
1112
"module": "umd",

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"material-components-web": "7.0.0-canary.058cfd23c.0",
6363
"rxjs": "^6.5.3",
6464
"systemjs": "0.19.43",
65-
"tslib": "^1.10.0",
65+
"tslib": "^1.12.0",
6666
"zone.js": "~0.10.2"
6767
},
6868
"devDependencies": {
@@ -161,7 +161,7 @@
161161
"tsickle": "0.38.1",
162162
"tslint": "^6.1.0",
163163
"tsutils": "^3.17.1",
164-
"typescript": "3.9.1-rc",
164+
"typescript": "3.9.2",
165165
"typescript-3.6": "npm:typescript@~3.6.4",
166166
"typescript-3.7": "npm:typescript@~3.7.0",
167167
"typescript-3.8": "npm:typescript@~3.8.0",
@@ -170,7 +170,9 @@
170170
"yargs": "15.3.0"
171171
},
172172
"resolutions": {
173-
"dgeni-packages/typescript": "3.8.3",
173+
"dgeni-packages/typescript": "3.9.2",
174+
"@angular/compiler-cli/typescript": "3.9.2",
175+
"@angular/bazel/typescript": "3.9.2",
174176
"**/graceful-fs": "4.2.2"
175177
}
176178
}

src/bazel-tsconfig-build.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,8 @@
4343

4444
// See https://github.com/angular/angular/issues/29107
4545
"devmodeTargetOverride": "es5"
46+
},
47+
"angularCompilerOptions": {
48+
"disableTypeScriptVersionCheck": true
4649
}
4750
}

src/bazel-tsconfig-test.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"extends": "./bazel-tsconfig-build.json",
66
"compilerOptions": {
7-
"importHelpers": false,
7+
"importHelpers": true,
88
"types": ["jasmine"]
99
},
1010
"bazelOptions": {
@@ -16,5 +16,8 @@
1616

1717
// See https://github.com/angular/angular/issues/29107
1818
"devmodeTargetOverride": "es5"
19+
},
20+
"angularCompilerOptions": {
21+
"disableTypeScriptVersionCheck": true
1922
}
2023
}

src/cdk/schematics/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ ts_library(
2323
"testing/**/*.ts",
2424
],
2525
),
26+
# Schematics do not need to run in browsers and can use `commonjs`
27+
# as format instead the default `umd` format.
28+
devmode_module = "commonjs",
2629
module_name = "@angular/cdk/schematics",
30+
prodmode_module = "commonjs",
2731
tsconfig = ":tsconfig.json",
2832
deps = [
2933
"//src/cdk/schematics/update-tool",

src/cdk/schematics/testing/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ package(default_visibility = ["//visibility:public"])
55
ts_library(
66
name = "testing",
77
srcs = glob(["**/*.ts"]),
8+
# Schematics do not need to run in browsers and can use `commonjs`
9+
# as format instead the default `umd` format.
10+
devmode_module = "commonjs",
811
module_name = "@angular/cdk/schematics/testing",
12+
prodmode_module = "commonjs",
913
tsconfig = "tsconfig.json",
1014
deps = [
1115
"@npm//@angular-devkit/core",

src/cdk/schematics/testing/test-case-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export function _patchTypeScriptDefaultLib(tree: Tree) {
232232
if (filePath.match(/node_modules[/\\]typescript/)) {
233233
return readFileSync(filePath);
234234
} else {
235-
return _originalRead.apply(this, arguments);
235+
return _originalRead.call(this, filePath);
236236
}
237237
};
238238
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
3+
"strict": true,
34
"lib": ["es2015"],
4-
"types": ["node", "jasmine", "glob"]
5+
"types": ["node", "jasmine", "glob", "tslib"]
56
}
67
}

src/cdk/schematics/update-tool/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ package(default_visibility = ["//visibility:public"])
55
ts_library(
66
name = "update-tool",
77
srcs = glob(["**/*.ts"]),
8+
# Schematics do not need to run in browsers and can use `commonjs`
9+
# as format instead the default `umd` format.
10+
devmode_module = "commonjs",
811
module_name = "@angular/cdk/schematics/update-tool",
12+
prodmode_module = "commonjs",
913
tsconfig = ":tsconfig.json",
1014
deps = [
1115
"@npm//@types/node",

src/components-examples/material/datepicker/tsconfig-build.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
"compilerOptions": {
44
// Needed for Moment.js since it doesn't have a default export.
55
"allowSyntheticDefaultImports": true
6+
},
7+
"angularCompilerOptions": {
8+
"disableTypeScriptVersionCheck": true
69
}
710
}

0 commit comments

Comments
 (0)