2018-11-08 12:25:33 -05:00
|
|
|
load("//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
|
2018-10-19 17:41:26 -04:00
|
|
|
load(":public_api_guard.bzl", "generate_targets")
|
2018-03-01 13:41:35 -05:00
|
|
|
|
2019-01-09 16:49:16 -05:00
|
|
|
generate_targets(glob(
|
|
|
|
["*/**/*.d.ts"],
|
|
|
|
# exclude the following target because we have an explicit target for it bellow, see :core_api
|
|
|
|
exclude = ["core/core.d.ts"],
|
|
|
|
))
|
2018-11-08 12:25:33 -05:00
|
|
|
|
2019-01-09 16:49:16 -05:00
|
|
|
# Explicit target because core is broken down into sub-packages.
|
|
|
|
# The ts_api_guardian rule does not know how to collect the .d.ts files from the sub-packages so we have to list it here explicitly.
|
|
|
|
# see: https://github.com/angular/angular/issues/28057
|
|
|
|
ts_api_guardian_test(
|
|
|
|
name = "core_api",
|
|
|
|
actual = "angular/packages/core/core.d.ts",
|
|
|
|
data = ["//tools/public_api_guard:core/core.d.ts"] + [
|
|
|
|
"//packages/core",
|
|
|
|
"//packages/core/src/di/interface",
|
|
|
|
"//packages/core/src/interface",
|
|
|
|
"//packages/core/src/util",
|
|
|
|
],
|
|
|
|
golden = "angular/tools/public_api_guard/core/core.d.ts",
|
|
|
|
tags = [
|
|
|
|
"fixme-ivy-aot", # ivy no longer emits generated index file
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# explicit target because the d.ts file is nested in the core and not part of typical public d.ts api
|
2018-11-08 12:25:33 -05:00
|
|
|
ts_api_guardian_test(
|
|
|
|
name = "ng_global_utils_api",
|
|
|
|
actual = "angular/packages/core/src/render3/global_utils_api.d.ts",
|
|
|
|
data = [
|
|
|
|
":global_utils.d.ts",
|
|
|
|
"//packages/core",
|
|
|
|
],
|
|
|
|
golden = "angular/tools/public_api_guard/global_utils.d.ts",
|
|
|
|
)
|