v3.0.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_ts", version = "3.0.0")
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 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 = "ee7dcc35faef98f3050df9cf26f2a72ef356cab8ad927efb1c4dc119ac082a19",
strip_prefix = "rules_ts-3.0.0",
url = "https://github.com/aspect-build/rules_ts/releases/download/v3.0.0/rules_ts-v3.0.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("@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
- feat: upgrade to rules_js 2.0 by @gregmagolan in #593
- chore: bump to GHA actions/cache@v4 by @gregmagolan in #609
- chore: bump miminum dep to aspect_bazel_lib 2.7.6 by @gregmagolan in #611
- chore: bump to rules_js 2.0.0-rc1 and minimum aspect_bazel_lib 2.7.7 by @gregmagolan in #613
- refactor: enable protoc toolchains by @alexeagle in #614
- chore: switch to Aspect Workflows for RBE by @gregmagolan in #612
- chore: upgrade to Aspect Workflows 5.10.0 RC by @gregmagolan in #616
- fix(ts_proto_library): require explicit srcs to copy by @alexeagle in #617
- fix(ts_proto_library): require explicit srcs to copy (#617) by @alexeagle in #618
- chore: upgrade to Aspect Workflows 5.10.0 by @gregmagolan in #623
- chore: add --check_direct_dependencies to .bazelrc by @gregmagolan in #625
- chore: bump minimum rules_nodejs to 6.2.0 by @gregmagolan in #626
- MODULE.bazel release message to be in line with WORKSPACE; see https:… by @Zemnmez in #619
- chore: bump to Aspect Workflows 5.10.3 by @gregmagolan in #634
- chore: fix a TODO for 3.0.0 by @alexeagle in #637
- Changes by create-pull-request action by @github-actions in #630
- fix: pin typescript version in e2e test by @alexeagle in #639
- Revert "Changes by create-pull-request action" by @alexeagle in #642
- Revert "fix: pin typescript version in e2e test" by @alexeagle in #641
- chore(deps): upgrade TypeScript used by example by @alexeagle in #638
- test: verify outputs of examples/out_dir test by @jbedard in #633
- test: transitive ts_project npm: deps by @jbedard in #635
- refactor: remove unnecessary JsInfo hasattr calls by @jbedard in #632
- Changes by create-pull-request action by @github-actions in #643
- feat: upgrade examples to TS 5.5 by @alexeagle in #646
- Changes by create-pull-request action by @github-actions in #649
- Add example for isolatedDeclarations by @alexeagle in #647
- feat: provide a way for individual ts_project targets to reserve extr… by @alexeagle in #569
- test: do not depend on depset.to_list order by @jbedard in #653
- chore: upgrade to Aspect Workflows 5.10.8 by @gregmagolan in #654
- test: npm packages using js_library by @jbedard in #652
- chore: upgrade to Aspect Workflows 5.10.9 by @gregmagolan in #655
- Changes by create-pull-request action by @github-actions in #657
- chore: upgrade rules_js to v2 rc7 by @jbedard in #659
- fix(ts_proto_library): propagate transitive npm deps by @jbedard in #658
- feat(ts_proto_library): expose protoc_gen_options on ts_proto_library by @mattem in #650
- chore: upgrade to Aspect Workflows 5.10.11 by @gregmagolan in #660
- chore: upgrade to Aspect Workflows 5.10.11 by @gregmagolan in #661
- test: ts_project transpiler linked with failing tsc by @jbedard in #651
- chore: normalize "lib" vs "pkg" terminology in tests by @jbedard in #662
- chore: upgrade to Aspect Workflows 5.10.12 by @gregmagolan in #663
- Update transpiler.md by @alexeagle in #669
- chore: update to rules_js 2.0.0 by @alexeagle in #674
New Contributors
Full Changelog: v2.4.1...v3.0.0