Using Bzlmod with Bazel 6 or greater
- (Bazel 6 only) Enable with
common --enable_bzlmodin.bazelrc. - Add to your
MODULE.bazelfile:
bazel_dep(name = "aspect_rules_jest", version = "0.24.2")Using WORKSPACE
Paste this snippet into your WORKSPACE.bazel file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_jest",
sha256 = "51ae2e178ca1baf59d06baf435d865392ce7a7006dc67af39a328902c694c375",
strip_prefix = "rules_jest-0.24.2",
url = "https://github.com/aspect-build/rules_jest/releases/download/v0.24.2/rules_jest-v0.24.2.tar.gz",
)
####################
# aspect_rules_jest setup #
####################
# Fetches the aspect_rules_jest 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_jest//jest:dependencies.bzl", "rules_jest_dependencies")
rules_jest_dependencies()
load("@aspect_rules_js//js:toolchains.bzl", "DEFAULT_NODE_VERSION", "rules_js_register_toolchains")
rules_js_register_toolchains(node_version = DEFAULT_NODE_VERSION)
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()What's Changed
- fix: incorrect _hasReporter logic by @chrisdothtml in #325
New Contributors
- @chrisdothtml made their first contribution in #325
Full Changelog: v0.24.1...v0.24.2