feat(bazel): report error when dependency does not provide JS sources in ng_package (#45470)

Non-JavaScript source-providing targets in the `ng_package` rule can throw-off
the entry-point detection and therefore should be flagged. Currently e.g.
a genrule-generated static file might unnecessarily cause additional
actions to be generated (non-breaking but just unnecessary)

PR Close #45470
This commit is contained in:
Paul Gschwendtner 2022-03-29 22:44:46 +02:00 committed by Jessica Janiuk
parent 636909fba7
commit 28e835b4bb

View file

@ -572,8 +572,9 @@ _NG_PACKAGE_ATTRS = dict(PKG_NPM_ATTRS, **{
allow_single_file = [".txt"],
),
"deps": attr.label_list(
doc = """Other rules that produce JavaScript outputs, such as `ts_library`.""",
doc = """ Targets that produce production JavaScript outputs, such as `ts_library`.""",
aspects = _NG_PACKAGE_DEPS_ASPECTS,
providers = [JSEcmaScriptModuleInfo],
cfg = partial_compilation_transition,
),
"readme_md": attr.label(allow_single_file = [".md"]),