Skip to content

v1.4.0

Compare
Choose a tag to compare
@github-actions github-actions released this 08 May 14:00
· 277 commits to main since this release
d82b64b

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_ts", version = "1.4.0")

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")

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 = "ace5b609603d9b5b875d56c9c07182357c4ee495030f40dcefb10d443ba8c208",
    strip_prefix = "rules_ts-1.4.0",
    url = "https://github.com/aspect-build/rules_ts/releases/download/v1.4.0/rules_ts-v1.4.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
)

# 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,
)

# 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()

What's Changed

  • chore: fix docstring indents by @gregmagolan in #343
  • feat: introduce skip_lib_check attribute by @thesayyn in #345
  • Revert "feat: introduce skip_lib_check attribute" by @alexeagle in #347
  • feat: skipLibCheck take 2 by @alexeagle in #350
  • examples: add tsconfig types example by @jbedard in #351
  • feat: implement custom flags for verbosity and workers by @thesayyn in #294
  • feat: configure ts_project progress_message based on transpile/declaration config by @jbedard in #355
  • fix: dictionary tsconfig extends with bzlmod by @jbedard in #358
  • Updated typescript versions by @UebelAndre in #353
  • docs: add troubleshooting docs about undeclared dependencies by @jbedard in #359
  • refactor: consider json a js source (if resolve_json_module) by @gzm0 in #322
  • docs: add links to bazel-examples in readme by @jbedard in #364
  • refactor: rename LATEST_VERSION to LATEST_TYPESCRIPT_VERSION by @jbedard in #354

New Contributors

Full Changelog: v1.3.3...v1.4.0