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:
26
tools/public_api_guard/BUILD.bazel
Normal file
26
tools/public_api_guard/BUILD.bazel
Normal 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
|
||||
]
|
||||
]
|
Reference in New Issue
Block a user