Skip to content

Commit 2a21ca0

Browse files
alan-agius4IgorMinar
authored andcommitted
feat(bazel): add additional parameters to ts_api_guardian_test def (#25694)
Added `strip_export_pattern` and `allow_module_identifiers` so that these can be passed from downstream PR Close #25694
1 parent ddc1335 commit 2a21ca0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/ts-api-guardian/index.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
load("@build_bazel_rules_nodejs//internal/node:node.bzl", "nodejs_binary", "nodejs_test")
1919

20-
COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor", "fs", "Symbol"]
20+
COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor"]
2121

22-
def ts_api_guardian_test(name, golden, actual, data = [], **kwargs):
22+
def ts_api_guardian_test(name, golden, actual, data = [], strip_export_pattern = "^\(__\|ɵ\)", allow_module_identifiers = COMMON_MODULE_IDENTIFIERS, **kwargs):
2323
"""Runs ts_api_guardian
2424
"""
2525
data += [
@@ -33,9 +33,9 @@ def ts_api_guardian_test(name, golden, actual, data = [], **kwargs):
3333
# From there, the relative imports would point to .ts files.
3434
"--node_options=--preserve-symlinks",
3535
"--stripExportPattern",
36-
"^\(__\|ɵ\)",
36+
strip_export_pattern,
3737
]
38-
for i in COMMON_MODULE_IDENTIFIERS:
38+
for i in allow_module_identifiers:
3939
args += ["--allowModuleIdentifiers", i]
4040

4141
nodejs_test(

0 commit comments

Comments
 (0)