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/y2022/control_loops/superstructure/BUILD b/y2022/control_loops/superstructure/BUILD
index 3bc1297..a085049 100644
--- a/y2022/control_loops/superstructure/BUILD
+++ b/y2022/control_loops/superstructure/BUILD
@@ -1,6 +1,6 @@
+load("//tools/build_rules:js.bzl", "ts_project")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
-load("@npm//@bazel/typescript:index.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
@@ -200,7 +200,7 @@
],
)
-ts_library(
+ts_project(
name = "superstructure_plotter",
srcs = ["superstructure_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
@@ -211,7 +211,7 @@
],
)
-ts_library(
+ts_project(
name = "catapult_plotter",
srcs = ["catapult_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
@@ -222,7 +222,7 @@
],
)
-ts_library(
+ts_project(
name = "intake_plotter",
srcs = ["intake_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
@@ -233,7 +233,7 @@
],
)
-ts_library(
+ts_project(
name = "turret_plotter",
srcs = ["turret_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
@@ -244,7 +244,7 @@
],
)
-ts_library(
+ts_project(
name = "climber_plotter",
srcs = ["climber_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
diff --git a/y2022/localizer/BUILD b/y2022/localizer/BUILD
index 2a0a9fe..1d45516 100644
--- a/y2022/localizer/BUILD
+++ b/y2022/localizer/BUILD
@@ -1,9 +1,9 @@
+load("//tools/build_rules:js.bzl", "ts_project")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
-load("@npm//@bazel/typescript:index.bzl", "ts_library")
-ts_library(
+ts_project(
name = "localizer_plotter",
srcs = ["localizer_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
diff --git a/y2022/vision/BUILD b/y2022/vision/BUILD
index 31644e4..8d8a43c 100644
--- a/y2022/vision/BUILD
+++ b/y2022/vision/BUILD
@@ -1,8 +1,8 @@
+load("//tools/build_rules:js.bzl", "ts_project")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
-load("@npm//@bazel/typescript:index.bzl", "ts_library")
-ts_library(
+ts_project(
name = "vision_plotter",
srcs = ["vision_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
diff --git a/y2022/www/BUILD b/y2022/www/BUILD
index 957045d..386ca90 100644
--- a/y2022/www/BUILD
+++ b/y2022/www/BUILD
@@ -1,5 +1,4 @@
-load("@npm//@bazel/typescript:index.bzl", "ts_library")
-load("//tools/build_rules:js.bzl", "rollup_bundle")
+load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")
load("//frc971/downloader:downloader.bzl", "aos_downloader_dir")
filegroup(
@@ -12,7 +11,7 @@
visibility = ["//visibility:public"],
)
-ts_library(
+ts_project(
name = "field_main",
srcs = [
"constants.ts",