Skip to content

v3.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 28 Sep 16:31
· 36 commits to main since this release
0f52f92

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_ts", version = "3.2.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 = "d23ba2b800493a83c3ec9e300e01c74a7b0a58c08893e681417e2c2f48f8c4bb",
    strip_prefix = "rules_ts-3.2.0",
    url = "https://github.com/aspect-build/rules_ts/releases/download/v3.2.0/rules_ts-v3.2.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

  • perf: reduce array array operations by @jbedard in #676
  • refactor: move transpiler_selection_required to main ts_project_rule block by @jbedard in #680
  • perf: remove _replace_ext in lib.bzl by @dzbarsky in #684
  • chore: update GHA Workflows yaml to 5.11.0 by @gregmagolan in #685
  • Changes by create-pull-request action by @github-actions in #691
  • perf: remove unnecessary tsconfig relative_file computation by @jbedard in #687
  • perf: remove unnecessary array create+join by @jbedard in #688
  • perf: remove duplicate path.removeprefix calls by @jbedard in #686
  • test: update typescript to 5.6 by @jbedard in #678
  • refactor: replace 2-arg .add_all with .add by @jbedard in #692
  • refactor: change typechecking validation action to output group by @jbedard in #690
  • fix: do not rely on @npm_typescript if custom tsc is provided by @gzm0 in #693
  • refactor: always replace files var in tsconfig template by @jbedard in #699
  • feat: support ts_project with transpiler and no declarations for type-checking by @jbedard in #698
  • docs: remove incorrect reference to typecheck validation action by @jbedard in #701
  • feat: support --noCheck for parallel transpiling without type-checking by @jbedard in #679
  • chore: upgrade bazel-lib in e2e tests for windows fix by @jbedard in #704
  • feat: support custom dts transpiler by @jbedard in #697
  • refactor: simplify ts_project macro conditional logic by @jbedard in #705

Full Changelog: v3.1.0...v3.2.0