Skip to content

Commit

Permalink
feat(bazel): add additional parameters to ts_api_guardian_test def (a…
Browse files Browse the repository at this point in the history
…ngular#25694)

Added `strip_export_pattern` and `allow_module_identifiers` so that these can be passed from downstream

PR Close angular#25694
  • Loading branch information
alan-agius4 authored and FrederikSchlemmer committed Jan 3, 2019
1 parent c5bd970 commit 827bb6d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/ts-api-guardian/index.bzl
Expand Up @@ -17,9 +17,9 @@

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

COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor", "fs", "Symbol"]
COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor"]

def ts_api_guardian_test(name, golden, actual, data = [], **kwargs):
def ts_api_guardian_test(name, golden, actual, data = [], strip_export_pattern = "^\(__\|ɵ\)", allow_module_identifiers = COMMON_MODULE_IDENTIFIERS, **kwargs):
"""Runs ts_api_guardian
"""
data += [
Expand All @@ -33,9 +33,9 @@ def ts_api_guardian_test(name, golden, actual, data = [], **kwargs):
# From there, the relative imports would point to .ts files.
"--node_options=--preserve-symlinks",
"--stripExportPattern",
"^\(__\|ɵ\)",
strip_export_pattern,
]
for i in COMMON_MODULE_IDENTIFIERS:
for i in allow_module_identifiers:
args += ["--allowModuleIdentifiers", i]

nodejs_test(
Expand Down

0 comments on commit 827bb6d

Please sign in to comment.