v1.0.3
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_ts", version = "1.0.3")
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")
use_repo(rules_ts_ext, "npm_google_protobuf")
use_repo(rules_ts_ext, "npm_at_bazel_worker")
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 = "e731efead7d7ab34eb346e5081245083f75536d89f1686519a40247e8175469c",
strip_prefix = "rules_ts-1.0.3",
url = "https://github.com/aspect-build/rules_ts/archive/refs/tags/v1.0.3.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_VERSION")
# ts_version = LATEST_VERSION
)
# 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 = "node",
node_version = DEFAULT_NODE_VERSION,
)
What's Changed
- chore: bump example package.json deps by @gregmagolan in #255
- doc: update snippet to suggest ts_version_from by @alexeagle in #258
- chore: update to Bazel 6.0.0rc3 by @gregmagolan in #260
- chore: cleanup transpiler_test_suite test by @gregmagolan in #263
- fix: fix cascading rebuilds by @gregmagolan in #261
- chore: bump to Bazel 6.0.0rc4 by @gregmagolan in #265
- chore: update to aspect_bazel_lib 1.8.0 by @gregmagolan in #266
- chore: use Aspect CLI 5.0.2 by @gregmagolan in #267
- fix: report changes in deleted, created, changed order by @thesayyn in #259
- chore: update to rules_js 1.11.0 by @gregmagolan in #269
Full Changelog: v1.0.2...v1.0.3