Skip to content

v3.5.2

Choose a tag to compare

@github-actions github-actions released this 01 Apr 21:19
· 57 commits to main since this release
565ea29

Using Bzlmod:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_ts", version = "3.5.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 = "fa5659a511f236b1ae6112258bff602fa20a40324b282734c841bc1e857797f3",
    strip_prefix = "rules_ts-3.5.2",
    url = "https://github.com/aspect-build/rules_ts/releases/download/v3.5.2/rules_ts-v3.5.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

  • fix: force CommonJS by changing file extension in case sandboxing is disabled by @KoltesDigital in #780
  • fix: isolated_typecheck and transitive tsconfig deps by @jbedard in #782
  • Changes by create-pull-request action by @github-actions in #758
  • fix: assets from ts_projects in other repositories by @Mivr in #784
  • chore: demonstrate usage of newer connectrpc version by @alexeagle in #783
  • always set 'use_default_shell_env' in ctx.actions.run by @malt3 in #620
  • Ensuring the _types target (when alias) has the right tags by @menny in #770

New Contributors

Full Changelog: v3.5.1...v3.5.2