Skip to content

v3.1.2

Choose a tag to compare

@github-actions github-actions released this 13 May 17:30
· 122 commits to main since this release
eb8c7ff

Many companies are successfully building with rules_js.
If you're getting value from the project, please let us know!
Just comment on our Adoption Discussion.

Add to your MODULE.bazel file:

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

# Translate the pnpm-lock.yaml file to bazel targets
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")

# Allows developers to use the matching pnpm version, for example:
# bazel run -- @pnpm --dir /home/runner/work/rules_js/rules_js install
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm", dev_dependency = True)
use_repo(pnpm, "pnpm")

By default you get the node version from DEFAULT_NODE_VERSION in @rules_nodejs//nodejs:repositories.bzl
Optionally you can pin a different version using rules_nodejs:

bazel_dep(name = "rules_nodejs", version = "6.7.3")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(node_version = "24.13.0")

What's Changed

  • Changes by create-pull-request action by @github-actions[bot] in #2831
  • feat: handle watch protocol v3 CYCLE_RESET by @jbedard in #2822
  • Changes by create-pull-request action by @github-actions[bot] in #2832
  • test: update js_image_oci to use @bazel/runfiles for loading runfiles by @jbedard in #2834
  • fix(js_image_layer): support js_image_layer in local_path_override (bzlmod nested) workspaces by @menny in #2826
  • test: migrate e2e js_image_oci to pure bzlmod by @jbedard in #2836
  • fix: handle file deletions on CYCLE_RESET by @jbedard in #2835
  • fix: declare tar toolchain for package extraction by @keegancsmith in #2839
  • fix: improve helper tools by @dzbarsky in #2840
  • test: move e2e pnpm_version to basic unit test by @jbedard in #2842
  • feat: allow patching pnpm repo by @nickschaap in #2841
  • Changes by create-pull-request action by @github-actions[bot] in #2838

New Contributors

Full Changelog: v3.1.1...v3.1.2