v3.3.2
Using Bzlmod:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_ts", version = "3.3.2")
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True)
rules_ts_ext.deps(
ts_version_from = "//:package.json",
)
use_repo(rules_ts_ext, "npm_typescript")
Using legacy 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 = "cff3137b043ff6bf1a2542fd9691dc762432370cd39eb4bb0756d288de52067d",
strip_prefix = "rules_ts-3.3.2",
url = "https://github.com/aspect-build/rules_ts/releases/download/v3.3.2/rules_ts-v3.3.2.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("@aspect_rules_js//js:toolchains.bzl", "DEFAULT_NODE_VERSION", "rules_js_register_toolchains")
rules_js_register_toolchains(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: bump to Workflows 5.11.17 GitHub Actions by @gregmagolan in #736
- chore: remove docs and decprecate exclude_types_from_npm_packages by @jbedard in #734
- fix: join
--descriptor_set_in
with host path separator by @willjschmitt in #671 - docs: change release notes to encourage bzlmod by @jbedard in #735
- Changes by create-pull-request action by @github-actions in #713
- ts_project: ensure assets get propagated by @iamricard in #742
- refactor: simplify tsconfig.json files computation by @jbedard in #745
- chore: bump GitHub actions to Workflows 5.11.20 by @gregmagolan in #744
- refactor: align handling of non-transpiled .js/.d.ts by @jbedard in #746
New Contributors
- @willjschmitt made their first contribution in #671
- @iamricard made their first contribution in #742
Full Changelog: v3.3.1...v3.3.2