v2.1.1
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel file:
bazel_dep(name = "aspect_rules_ts", version = "2.1.1")
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 = "6ad28b5bac2bb5a74e737925fbc3f62ce1edabe5a48d61a9980c491ef4cedfb7",
strip_prefix = "rules_ts-2.1.1",
url = "https://github.com/aspect-build/rules_ts/releases/download/v2.1.1/rules_ts-v2.1.1.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: green up HEAD when run with --enable_bzlmod by @kormide in #491
- fix: respect ts_project root_dir and out_dir for assets by @jbedard in #493
- chore: upgrade to Aspect Workflows 5.8.10 by @gregmagolan in #494
- Changes by create-pull-request action by @github-actions in #489
- chore: upgrade to Aspect Workflows 5.8.15 by @gregmagolan in #495
- chore: upgrade to Aspect Workflows 5.9.0-beta.2 by @gregmagolan in #496
- chore: bring in aspect_rules_lint and add format task to Aspect Workflows by @gregmagolan in #498
- chore: bazel run //:format by @gregmagolan in #499
- chore: run Aspect Workflows setup step on small instances by @gregmagolan in #501
- chore: upgrade to Aspect Workflows 5.9.0-beta.10 by @gregmagolan in #502
- chore: use ARM instances for small runner group by @gregmagolan in #503
- chore: enable workflows delivery on demostration target by @gregmagolan in #504
- chore: upgrade to Aspect Workflows 5.9.0-rc.0 by @gregmagolan in #505
- chore: upgrade to Aspect Workflows 5.9.0-rc.7 by @gregmagolan in #506
- chore: switch to smaller 'small' instances without nvme drives by @gregmagolan in #508
- chore: upgrade to Aspect Workflows 5.9.0-rc.9 by @gregmagolan in #510
- chore: update links to docsite by @gregmagolan in #512
- chore: add managed grafana to Aspect Workflows deployment by @gregmagolan in #513
- Changes by create-pull-request action by @github-actions in #497
- chore: reduce size of remote cache to tune deployment costs by @gregmagolan in #515
- chore: upgrade to Aspect Workflows 5.9.0-rc.16 by @gregmagolan in #519
- feat: enable code review comments by @alexeagle in #518
- fix: wire the validation action by @alexeagle in #520
- refactor: suggest naming node toolchain 'nodejs' by @alexeagle in #522
- chore: run bzlmod on ci by @kormide in #523
New Contributors
- @github-actions made their first contribution in #489
Full Changelog: v2.1.0...v2.1.1