Skip to content

Commit 4615198

Browse files
djmarcinalexeagle
authored andcommitted
fix(typescript): propagate tags to validate_options (#3260)
1 parent e915877 commit 4615198

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/typescript/index.bzl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,12 @@ def ts_project(
371371
fail("As of rules_nodejs 3.0, extends should have a single value, not a list.\n" +
372372
"Use a ts_config rule to group together a chain of extended tsconfigs.")
373373

374+
common_kwargs = {
375+
"tags": kwargs.get("tags", []),
376+
"visibility": kwargs.get("visibility", None),
377+
"testonly": kwargs.get("testonly", None),
378+
}
379+
374380
if type(tsconfig) == type(dict()):
375381
# Copy attributes <-> tsconfig properties
376382
# TODO: fail if compilerOptions includes a conflict with an attribute?
@@ -425,6 +431,7 @@ def ts_project(
425431
allow_js = allow_js,
426432
tsconfig = tsconfig,
427433
extends = extends,
434+
**common_kwargs
428435
)
429436
tsc_deps = tsc_deps + ["_validate_%s_options" % name]
430437

@@ -504,11 +511,6 @@ def ts_project(
504511
len(js_outs),
505512
))
506513

507-
common_kwargs = {
508-
"tags": kwargs.get("tags", []),
509-
"visibility": kwargs.get("visibility", None),
510-
"testonly": kwargs.get("testonly", None),
511-
}
512514
if type(transpiler) == "function" or type(transpiler) == "rule":
513515
transpiler(
514516
name = transpile_target_name,

0 commit comments

Comments
 (0)