v1.13.1
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_js", version = "1.13.1")
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
npm.npm_translate_lock(
name = "npm",
pnpm_lock = "//:pnpm-lock.yaml",
)
use_repo(npm, "npm")
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_js",
sha256 = "686d5b345592c1958b4aea24049d935ada11b83ae5538658d22b84b353cfbb1e",
strip_prefix = "rules_js-1.13.1",
url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.13.1.tar.gz",
)
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_dependencies()
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
node_version = DEFAULT_NODE_VERSION,
)
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()
What's Changed
- chore: add test case for a node-gyp install step on an npm package by @gregmagolan in #725
- fix: js_image_layer build on RBE by @bazaglia in #707
- docs: move mention of rules_nodejs lower in README by @alexeagle in #731
- fix: formatting for new docsite by @gregmagolan in #735
- fix: formatting for new docsite by @gregmagolan in #736
- prefactor: sort bzlmod attributes and fix npm_translate_lock name by @kormide in #737
- chore: update docs for new docsite by @gregmagolan in #739
- chore: update docs for new docsite by @gregmagolan in #740
- chore: add front matter for new docsite by @gregmagolan in #741
- fix(bzlmod): use canonical name for package_json.bzl loads by @alexeagle in #747
- chore: update to Bazel 6.0.0 and Aspect CLI 5.1.1 by @gregmagolan in #752
- Add some missing attributes to bzlmod api by @kormide in #750
- chore: update to aspect_bazel_lib 1.19.0 and rules_nodejs 5.8.0 by @gregmagolan in #753
New Contributors
Full Changelog: v1.13.0...v1.13.1