angular/tools/bazel/module_name.bzl
Paul Gschwendtner 579618d6d6 build: remove packages/bazel (#61843)
Removes the `@angular/bazel` package as we no longer need it. Yay!

It's replaced by `rules_angular`.

PR Close #61843
2025-06-04 09:13:41 +00:00

15 lines
419 B
Python

def compute_module_name(testonly):
""" Provide better defaults for package names.
e.g. rather than angular/packages/core/testing we want @angular/core/testing
"""
pkg = native.package_name()
if testonly:
# Some tests currently rely on the long-form package names
return None
if pkg.startswith("packages/"):
return "@angular/" + pkg[len("packages/"):]
return None