test(bazel): Build and test ts-api-guardian locally (#22544)

Also use it to test the public API for core and common

Once we have an ng_package for every package, we can remove
the npm dependency on ts-api-guardian and the gulp-based
public api check.

PR Close #22544
This commit is contained in:
Alex Eagle
2018-03-01 10:41:35 -08:00
parent 25faf808a5
commit 4f60968704
23 changed files with 2731 additions and 108 deletions

View File

@ -0,0 +1,26 @@
load("//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
[
ts_api_guardian_test(
name = "%s_api" % i.replace("/", "_"),
actual = "packages/%s/npm_package/%s.d.ts" % (
i.split("/")[0],
"/".join(i.split("/")[1:]),
),
data = glob([
"%s/**/*.d.ts" % i.split("/")[0],
]) + [
"//packages/%s:npm_package" % i.split("/")[0],
],
golden = "tools/public_api_guard/%s.d.ts" % i,
)
for i in [
"core/core",
"core/testing",
"common/http/testing",
"common/common",
"common/http",
"common/testing",
# TODO(alexeagle): add remaining packages here once they have ng_package's
]
]