Upgrade npm bazel rules to latest

Later than v2, rollup_bundle needs additional configuration to find
workspace files. It also no longer minifies, so needed to add an
additional post-bundle step to maintain api.

We had to rename the `Object` class to `ObjectGenerated` in the
flatbuffers TypeScript generator. This lets us avoid name clashes with
the builtin `Object` class.
Upstream issue: https://github.com/google/flatbuffers/issues/6994

Change-Id: I45ab717bfc9ff8ef24aa05644fb845879cc09d98
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
diff --git a/frc971/analysis/BUILD b/frc971/analysis/BUILD
index 0269d65..0c18061 100644
--- a/frc971/analysis/BUILD
+++ b/frc971/analysis/BUILD
@@ -1,5 +1,5 @@
-load("@npm_bazel_typescript//:defs.bzl", "ts_library")
-load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle")
+load("@npm//@bazel/typescript:index.bzl", "ts_library")
+load("//tools/build_rules:js.bzl", "rollup_bundle")
 load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
 load("//aos:config.bzl", "aos_config")
 
@@ -57,7 +57,6 @@
 
 rollup_bundle(
     name = "plot_index_bundle",
-    enable_code_splitting = False,
     entry_point = "plot_index.ts",
     target_compatible_with = ["@platforms//os:linux"],
     deps = [
diff --git a/frc971/control_loops/drivetrain/BUILD b/frc971/control_loops/drivetrain/BUILD
index eaf37db..6d48192 100644
--- a/frc971/control_loops/drivetrain/BUILD
+++ b/frc971/control_loops/drivetrain/BUILD
@@ -2,7 +2,7 @@
 load("//aos:config.bzl", "aos_config")
 load("//tools/build_rules:select.bzl", "cpu_select")
 load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
-load("@npm_bazel_typescript//:defs.bzl", "ts_library")
+load("@npm//@bazel/typescript:index.bzl", "ts_library")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/frc971/wpilib/BUILD b/frc971/wpilib/BUILD
index 2c8ed29..b6e30d8 100644
--- a/frc971/wpilib/BUILD
+++ b/frc971/wpilib/BUILD
@@ -1,4 +1,4 @@
-load("@npm_bazel_typescript//:defs.bzl", "ts_library")
+load("@npm//@bazel/typescript:index.bzl", "ts_library")
 load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
 load("//aos:config.bzl", "aos_config")