Prepare for migration from ts_library to ts_project
With the upcoming migration from rules_nodejs to rules_js, I am
changing all the `ts_library` targets to become `ts_project` targets.
This patch introduces an alias for a NOP effect. A future patch will
switch the actual implementation.
I am leaving the scouting directory alone because all the build rules
will change completely. They will use Angular-specific rules.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I4b4fd4d14dbf25d6dbdaa3c1725ee6b651eedab6
diff --git a/tools/build_rules/js.bzl b/tools/build_rules/js.bzl
index 5510266..d334764 100644
--- a/tools/build_rules/js.bzl
+++ b/tools/build_rules/js.bzl
@@ -3,7 +3,15 @@
load("@npm//@bazel/terser:index.bzl", "terser_minified")
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@npm//@bazel/protractor:index.bzl", "protractor_web_test_suite")
-load("@npm//@bazel/typescript:index.bzl", "ts_project")
+load("@npm//@bazel/typescript:index.bzl", upstream_ts_library = "ts_library", upstream_ts_project = "ts_project")
+
+def ts_project(**kwargs):
+ """A trivial wrapper to prepare for the rules_js migration.
+
+ The intent is to change his macro to wrap the new rules_js ts_project
+ implementation.
+ """
+ upstream_ts_library(**kwargs)
def rollup_bundle(name, deps, visibility = None, **kwargs):
"""Calls the upstream rollup_bundle() and exposes a .min.js file.
@@ -72,7 +80,7 @@
See the documentation for more information:
https://bazelbuild.github.io/rules_nodejs/Protractor.html#protractor_web_test_suite
"""
- ts_project(
+ upstream_ts_project(
name = name + "__lib",
srcs = srcs,
testonly = 1,