Add package_name to ts_library so that module_name no longer enables linking #2450
Labels
Can Close?
We will close this in 30 days if there is no further activity
Milestone
This is a breaking change so needs to be sequenced with 4.0.
It will allow us to remove the
__tslibrary__
special handling ininternal/linker/link_node_modules.bzl
:``
# Special case for ts_library module_name for legacy behavior and for AMD name work-around
# Tag the mapping as "tslibrary" so it can be overridden by any other mapping if found.
#
# In short, ts_library module_name attribute results in both setting the AMD name (which
# desired and necessary in devmode which outputs UMD) and in making a linkable mapping. Because
# of this, you can get in the situation where a ts_library module_name and a downstream pkg_name
# package_name conflict and result in duplicate mappings. This work-around will make this
# situation work however it is not a recommended pattern since a ts_library can be a dep of a
# pkg_npm but not vice-verse at the moment since ts_library cannot handle directory artifacts as
# deps.
if hasattr(linkable_package_info, "_tslibrary") and linkable_package_info._tslibrary:
mr[0] = "tslibrary"
The text was updated successfully, but these errors were encountered: