Skip to content

Commit 4c54683

Browse files
committed
build: update to TS 2.9 and enable strictFunctionTypes
Bumps the project to TypeScript 2.9, enables the `strictFunctionTypes` everywhere and fixes the various errors. Fixes #12177.
1 parent 1e1751f commit 4c54683

File tree

41 files changed

+302
-171
lines changed

Some content is hidden

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

41 files changed

+302
-171
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
## IMPORTANT
1111
# If you change the `docker_image` version, also change the `cache_key` suffix and the version of
1212
# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
13-
var_1: &docker_image angular/ngcontainer:0.3.0
14-
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "package-lock.json" }}-0.3.0
13+
var_1: &docker_image angular/ngcontainer:0.3.3
14+
var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "package-lock.json" }}-0.3.3
1515

1616
# Define common ENV vars
1717
var_3: &define_env_vars

WORKSPACE

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ workspace(name = "angular_material")
33
# Add nodejs rules
44
http_archive(
55
name = "build_bazel_rules_nodejs",
6-
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.8.0.zip",
7-
strip_prefix = "rules_nodejs-0.8.0",
8-
sha256 = "4e40dd49ae7668d245c3107645f2a138660fcfd975b9310b91eda13f0c973953",
6+
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.10.1.zip",
7+
strip_prefix = "rules_nodejs-0.10.1",
8+
sha256 = "634206524d90dc03c52392fa3f19a16637d2bcf154910436fe1d669a0d9d7b9c",
99
)
1010

1111
# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
1212
# your npm dependencies. You must still run the package manager.
1313
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories")
1414

15-
check_bazel_version("0.13.0")
15+
check_bazel_version("0.15.0")
1616
node_repositories(package_json = ["//:package.json"])
1717

1818
# Add sass rules
@@ -29,9 +29,16 @@ sass_repositories()
2929
# Add TypeScript rules
3030
http_archive(
3131
name = "build_bazel_rules_typescript",
32-
url = "https://github.com/bazelbuild/rules_typescript/archive/0.12.3.zip",
33-
strip_prefix = "rules_typescript-0.12.3",
34-
sha256 = "967068c3540f59407716fbeb49949c1600dbf387faeeab3089085784dd21f60c",
32+
url = "https://github.com/bazelbuild/rules_typescript/archive/0.15.1.zip",
33+
strip_prefix = "rules_typescript-0.15.1",
34+
sha256 = "3792cc20ef13bb1d1d8b1760894c3320f02a87843e3a04fed7e8e454a75328b6",
35+
)
36+
37+
http_archive(
38+
name = "io_bazel_rules_webtesting",
39+
url = "https://github.com/bazelbuild/rules_webtesting/archive/7ffe970bbf380891754487f66c3d680c087d67f2.zip",
40+
strip_prefix = "rules_webtesting-7ffe970bbf380891754487f66c3d680c087d67f2",
41+
sha256 = "4fb0dca8c9a90547891b7ef486592775a523330fc4555c88cd8f09270055c2ce",
3542
)
3643

3744
# Setup TypeScript Bazel workspace
@@ -54,4 +61,4 @@ local_repository(
5461
# This commit matches the version of buildifier in angular/ngcontainer
5562
# If you change this, also check if it matches the version in the angular/ngcontainer
5663
# version in /.circleci/config.yml
57-
BAZEL_BUILDTOOLS_VERSION = "fd9878fd5de921e0bbab3dcdcb932c2627812ee1"
64+
BAZEL_BUILDTOOLS_VERSION = "82b21607e00913b16fe1c51bec80232d9d6de31c"

e2e/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"emitDecoratorMetadata": true,
77
"experimentalDecorators": true,
88
"strictNullChecks": true,
9+
"strictFunctionTypes": true,
910
"inlineSources": true,
1011
"lib": ["es2015"],
1112
"module": "commonjs",

0 commit comments

Comments
 (0)