v2.3.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel file:
bazel_dep(name = "aspect_rules_ts", version = "2.3.0")
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True)
rules_ts_ext.deps()
use_repo(rules_ts_ext, "npm_typescript")Using WORKSPACE
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_ts",
sha256 = "b11f5bd59983a58826842029b99240fd0eeb6f1291d710db10f744b327701646",
strip_prefix = "rules_ts-2.3.0",
url = "https://github.com/aspect-build/rules_ts/releases/download/v2.3.0/rules_ts-v2.3.0.tar.gz",
)
##################
# rules_ts setup #
##################
# Fetches the rules_ts dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
rules_ts_dependencies(
# This keeps the TypeScript version in-sync with the editor, which is typically best.
ts_version_from = "//:package.json",
# Alternatively, you could pick a specific version, or use
# load("@aspect_rules_ts//ts:repositories.bzl", "LATEST_TYPESCRIPT_VERSION")
# ts_version = LATEST_TYPESCRIPT_VERSION
)
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_dependencies()
load("@bazel_features//:deps.bzl", "bazel_features_deps")
bazel_features_deps()
# Fetch and register node, if you haven't already
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
node_version = DEFAULT_NODE_VERSION,
)
# Register aspect_bazel_lib toolchains;
# If you use npm_translate_lock or npm_import from aspect_rules_js you can omit this block.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_copy_directory_toolchains", "register_copy_to_directory_toolchains")
register_copy_directory_toolchains()
register_copy_to_directory_toolchains()To use rules_ts with bazel-lib 2.x, you must additionally register the coreutils toolchain.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_coreutils_toolchains")
register_coreutils_toolchains()What's Changed
- chore: fix GHA concurrency check to not apply to main branch by @gregmagolan in #556
- chore: upgrade to Aspect Workflows 5.9.14 by @gregmagolan in #557
- chore: upgrade to Aspect Workflows 5.9.15 by @gregmagolan in #558
- chore: upgrade to Aspect Workflows 5.9.16 by @gregmagolan in #559
- chore: upgrade to Aspect Workflows 5.9.18 by @gregmagolan in #561
- chore: upgrade to Aspect Workflows 5.9.20 by @gregmagolan in #563
- chore: upgrade to Aspect Workflows 5.9.22 by @gregmagolan in #564
- test: add test of empty node_modules target by @jbedard in #565
- chore: switch to new Aspect Workflows OSS staging deployment by @gregmagolan in #566
- chore: stash output of vmstat in artifacts by @gregmagolan in #560
- fix: typecheck_test depends on the .d.ts files by @alexeagle in #568
- Changes by create-pull-request action by @github-actions in #562
- chore: fix buildifier error by @jbedard in #572
- Changes by create-pull-request action by @github-actions in #573
- chore: upgrade to Aspect Workflows 5.9.24 by @gregmagolan in #575
- Changes by create-pull-request action by @github-actions in #578
- chore: upgrade Aspect Workflows to 5.10.0-alpha.4 by @gregmagolan in #581
- chore: enable workflows github annotations by @kormide in #582
- Changes by create-pull-request action by @github-actions in #583
- fix: handle various ts_project srcs labels syntaxes by @jbedard in #571
- chore: upgrade Aspect Workflows to 5.10.0-alpha.5 by @kormide in #587
- chore: upgrade Aspect Workflows to 5.10.0-alpha.6 by @kormide in #588
- chore: upgrade Aspect Workflows to 5.10.0-alpha.8 by @kormide in #591
- chore: upgrade Aspect Workflows to 5.10.0-alpha.9 by @gregmagolan in #594
- chore: upgrade to Aspect Workflows 5.10.0-alpha.10 by @gregmagolan in #595
- feat(ts_proto_library): add connect-query plugin by @mrmeku in #590
- chore: upgrade to Aspect Workflows 5.10.0-rc0 by @gregmagolan in #597
- chore: bump to Bazel 7 by @gregmagolan in #598
- chore: upgrade to buildifier 6.4.0 by @gregmagolan in #600
- chore: fixup windows CI by @gregmagolan in #599
- chore: update to latest stardoc by @gregmagolan in #602
- chore: drop dependency on rules_jasmine by @gregmagolan in #603
New Contributors
Full Changelog: v2.2.0...v2.3.0