build: fix api guardian error form npm (#30063)

built-in, relative, absolute, nested node_modules - Error: Cannot find module '../lib/cli'

built-in, relative, absolute, nested node_modules - Error: Cannot find module '../lib/cli'

This is because the transpiled lib files need to be added to the data.

PR Close #30063
This commit is contained in:
Alan Agius 2019-04-23 19:12:00 +02:00 committed by Ben Lesh
parent 230e32905c
commit 04d13429f0
2 changed files with 4 additions and 3 deletions

View File

@ -87,7 +87,8 @@ jasmine_node_test(
) )
# END-INTERNAL # END-INTERNAL
exports_files( filegroup(
["bin/ts-api-guardian"], name = "bin",
srcs = glob(["lib/*.js"]) + ["bin/ts-api-guardian"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )

View File

@ -36,7 +36,7 @@ def ts_api_guardian_test(
# Locally we need to add the TS build target # Locally we need to add the TS build target
# But it will replaced to @npm//ts-api-guardian when publishing # But it will replaced to @npm//ts-api-guardian when publishing
"@angular//tools/ts-api-guardian:lib", "@angular//tools/ts-api-guardian:lib",
"@angular//tools/ts-api-guardian:bin/ts-api-guardian", "@angular//tools/ts-api-guardian:bin",
] ]
args = [ args = [