Skip to content

Commit

Permalink
fix(typescript): propagate tags to validate_options (#3260)
Browse files Browse the repository at this point in the history
  • Loading branch information
djmarcin authored and alexeagle committed Jan 20, 2022
1 parent e915877 commit 4615198
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/typescript/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,12 @@ def ts_project(
fail("As of rules_nodejs 3.0, extends should have a single value, not a list.\n" +
"Use a ts_config rule to group together a chain of extended tsconfigs.")

common_kwargs = {
"tags": kwargs.get("tags", []),
"visibility": kwargs.get("visibility", None),
"testonly": kwargs.get("testonly", None),
}

if type(tsconfig) == type(dict()):
# Copy attributes <-> tsconfig properties
# TODO: fail if compilerOptions includes a conflict with an attribute?
Expand Down Expand Up @@ -425,6 +431,7 @@ def ts_project(
allow_js = allow_js,
tsconfig = tsconfig,
extends = extends,
**common_kwargs
)
tsc_deps = tsc_deps + ["_validate_%s_options" % name]

Expand Down Expand Up @@ -504,11 +511,6 @@ def ts_project(
len(js_outs),
))

common_kwargs = {
"tags": kwargs.get("tags", []),
"visibility": kwargs.get("visibility", None),
"testonly": kwargs.get("testonly", None),
}
if type(transpiler) == "function" or type(transpiler) == "rule":
transpiler(
name = transpile_target_name,
Expand Down

0 comments on commit 4615198

Please sign in to comment.