Skip to content

v1.12.0

Compare
Choose a tag to compare
@github-actions github-actions released this 15 Dec 19:37
· 746 commits to main since this release
ceade5f

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_js", version = "1.12.0")

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 = "519c92af31ff856659dc48711110f69139b9c3a74511f5b0118c887dcf06e360",
    strip_prefix = "rules_js-1.12.0",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.12.0.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

  • feat: run prepare lifecycle hooks by @gregmagolan in #712
  • feat: handle env var substititions for _auth in .npmrc by @gregmagolan in #716
  • docs: mention how to use pnpm ls to find package.json data by @alexeagle in #717
  • feat: add lifecycle_hooks attribute to npm_translate_lock and npm_import by @gregmagolan in #718
  • fix: empty lifecycle_hooks_execuction_requirements should be set on generated npm_import targets in npm_translate_lock by @gregmagolan in #719
  • docs: extract a standalone page for pnpm by @alexeagle in #720
  • fix(docs): update broken links in API doc by @alexeagle in #721
  • feat: support "*" in npm_translate_lock patch_args dict by @gregmagolan in #722

Full Changelog: v1.11.1...v1.12.0