Releases: aspect-build/rules_js
Release list
v2.9.3
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.
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel file:
bazel_dep(name = "aspect_rules_js", version = "2.9.3")
####### Node.js version #########
# By default you get the node version from DEFAULT_NODE_VERSION in @rules_nodejs//nodejs:repositories.bzl
# Optionally you can pin a different node version:
bazel_dep(name = "rules_nodejs", version = "6.3.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "18.14.2")
#################################
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
npm.npm_translate_lock(
name = "npm",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
# Allows developers to use the matching pnpm version, for example:
# bazel run -- @pnpm --dir /home/runner/work/rules_js/rules_js install
use_repo(pnpm, "pnpm")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 = "94a3cfe9a0b8d24b3738adbb2193e3c34bd94048c1841c6035b7ab3d3fe68e2d",
strip_prefix = "rules_js-2.9.3",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.9.3/rules_js-v2.9.3.tar.gz",
)
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_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: convert hex from packageManager integrity to base64 format by @sbarfurth in #2717
- ci: fix bazel 8 testing by @jbedard in #2981
- chore: upgrade tools_telemetry to v0.5 by @jbedard in #2979
- chore: fix llvm URLs by @jbedard in #2982
Full Changelog: v2.9.2...v2.9.3
v3.4.1
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.4.1")
# 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
- feat: support the npmrc tokenHelper auth setting by @sethvargo in #2948
- fix: run npmrc tokenHelpers lazily and match auth registries on a path boundary by @jbedard in #2969
- chore: mirror external releases by @github-actions[bot] in #2970
- refactor: share one node and npm wrapper across targets by @acozzette in #2971
- perf: invoke node directly from the js_binary launcher by @acozzette in #2972
- perf: write captured stdout/stderr straight to the output file by @acozzette in #2973
- chore: mirror external releases by @github-actions[bot] in #2975
- test: explicitly set
silent_on_successon mostjs_run_binarytargets by @acozzette in #2976 - chore: upgrade tools_telemetry to v0.5 by @jbedard in #2978
New Contributors
- @sethvargo made their first contribution in #2948
Full Changelog: v3.4.0...v3.4.1
v3.4.0
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.4.0")
# 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
- refactor: rename node-patches to node-bootstrap, register.cjs to bootstrap.cjs by @acozzette in #2958
- feat: add js_run_binary_action helper for invoking js_binary from custom rules by @acozzette in #2956
- feat: support --bazel-bindir flag for path-mapping-compatible js_binary tools by @acozzette in #2918
- fix: js_run_binary_action drops --bazel-bindir value when outputs[0] … by @acozzette in #2960
- chore: mirror external releases by @github-actions[bot] in #2945
- refactor: expose js_run_binary_action as js_binary_lib.run_binary_action by @acozzette in #2963
- feat(js_run_binary): add support for path mapping by @acozzette in #2962
- refactor(js_run_binary): support path mapping with use_execroot_entry_point by @acozzette in #2965
- docs: add documentation on how to enable path mapping by @acozzette in #2966
- chore: mirror external releases by @github-actions[bot] in #2961
- feat(js_image_layer): add external compressor passthrough by @alexeagle in #2898
- feat(js_run_binary): add flag controlling default of set_legacy_envir… by @acozzette in #2967
- feat(nextjs): allow passing additional args to next build by @imanmalekian31 in #2947
- fix: support path-mapping with js_run_binary(stdout,stderr,exit_code_out) by @jbedard in #2968
Full Changelog: v3.3.1...v3.4.0
v3.3.1
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.3.1")
# 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
- fix(coverage): sh toolchain is optional for the merger by @jbedard in #2950
- ci: do not let a cached test result stand in for a coverage run by @jbedard in #2951
- refactor: build the coverage test rules from one factory by @jbedard in #2952
- test: e2e coverage workspace covering the supported scenarios by @jbedard in #2953
- test: assert coverage merger behavior in bash, not appended JS by @jbedard in #2954
- revert: feat: use bazel-lib run_binary's native stdout/stderr/exit_co… by @acozzette in #2955
- fix(coverage): generate lcov report in the test action by @jbedard in #2932
- refactor: directly run node from shell using exec when not using expected_exit_code by @jbedard in #2944
Full Changelog: v3.3.0...v3.3.1
v3.3.0
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.3.0")
# 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
- chore: mirror external releases by @github-actions[bot] in #2920
- fix: detect execroot when output_base path contains a bazel-out segment by @titusfortner in #2919
- fix(npm_package_store): link first-party (JsInfo) deps into the store node_modules by @mloeppky-zoox in #2917
- feat: use bazel-lib run_binary's native stdout/stderr/exit_code_out/s… by @acozzette in #2921
- test: demonstrate first-party dep links in package_store_1p listings by @jbedard in #2922
- fix(watch): treat EXIT as a clean shutdown of the cycle loop by @jbedard in #2924
- fix(watch): keep connect() error listener attached until connection completes by @jbedard in #2923
- fix(watch): read the socket with a single persistent reader by @jbedard in #2925
- fix(node-patches): resolve readlink target against the real parent dir by @mloeppky-zoox in #2916
- chore: mirror external releases by @github-actions[bot] in #2928
- chore: mirror external releases by @github-actions[bot] in #2929
- docs: expand explanation of js_run_binary(chdir) and $(location,execpath) by @jbedard in #2927
- fix(js_binary): drop unused mandatory shell toolchain by @jbedard in #2926
- chore: mirror external releases by @github-actions[bot] in #2931
- fix(js_binary): tools/sh toolchain required on windows by @jbedard in #2930
- chore: mirror external releases by @github-actions[bot] in #2935
- feat: add npm_package(packable) for creating the package tar.gz file by @jbedard in #2939
- fix: disable node compile cache unless the cache dir is explicitly specified by @jbedard in #2940
- ci: enable macos unit tests on main module by @jbedard in #2941
- test: add detailed js_test/binary launcher tests by @jbedard in #2942
- fix: do not assume testonly=False in macros to support default_testonly by @jbedard in #2943
- fix: super long package names on windows cause paths >max length by @jbedard in #2934
- refactor: remove unused js_binary shell logf_warn func by @jbedard in #2946
New Contributors
- @titusfortner made their first contribution in #2919
- @mloeppky-zoox made their first contribution in #2917
Full Changelog: v3.2.3...v3.3.0
v3.2.3
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.2.3")
# 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
- test: enable runfiles tree on Windows for e2e/bzlmod by @jbedard in #2886
- Changes by create-pull-request action by @github-actions[bot] in #2885
- fix(nextjs): match standalone server copy patterns to build output la… by @imanmalekian31 in #2887
- Changes by create-pull-request action by @github-actions[bot] in #2889
- chore: stop pinning to 9.0.2 for Bazel 9 tests by @acozzette in #2882
- fix(nextjs): add missing dependencies in nextjs_standalone_server by @acozzette in #2890
- Changes by create-pull-request action by @github-actions[bot] in #2893
- Changes by create-pull-request action by @github-actions[bot] in #2895
- fix: resolve npm package store tar toolchain as a Label by @keegancsmith in #2900
- perf: accumulate JsInfo field depsets directly in npm_package_store by @jbedard in #2906
- perf: construct JsInfo directly in npm store and link rules by @jbedard in #2907
- perf: compute directory symlink targets without generic path normalization by @jbedard in #2909
- ci: run slow jobs on 32core machine by @jbedard in #2911
- perf: gather terminal package store deps in a single pass by @jbedard in #2905
- perf: use a dict for linked package store directory membership checks by @jbedard in #2908
- perf: reduce per-action overhead registering NpmPackageExtract by @jbedard in #2910
- chore: upgrade aspect_tools_telemetry to 0.4.2 by @jbedard in #2912
- docs: correct broken anchor links in docstrings for Bazel registry docs by @georgesfarah in #2913
- docs: update hoist docs to mention pnpm-workspace.yaml by @gzm0 in #2899
- Changes by create-pull-request action by @github-actions[bot] in #2902
New Contributors
- @georgesfarah made their first contribution in #2913
Full Changelog: v3.2.2...v3.2.3
v3.2.2
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.2.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 #2881
- fix: get
nextjs_standalone_buildworking with cross-platform builds by @acozzette in #2879 - docs: add troubleshooting info about NpmPackageExtract and remote exec issues by @jbedard in #2880
- fix(nextjs): add allow_overwrites to standalone copy_to_directory for… by @imanmalekian31 in #2857
- perf: avoid AST depth depending on pnpm workspace size by @jbedard in #2865
- fix: overriding version of "pnpm" repo by @jbedard in #2883
New Contributors
- @imanmalekian31 made their first contribution in #2857
Full Changelog: v3.2.1...v3.2.2
v3.2.1
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.2.1")
# 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
- fix: declare use_execroot_entry_point config setting as public by @jbedard in #2875
- test: add bcr incompatible flags to all e2e tests by @jbedard in #2876
- ci: merge vanilla-bazel CI into the Aspect Workflows CI workflow by @jbedard in #2874
- fix: revert change to resolved.json $schema url by @jbedard in #2878
Full Changelog: v3.2.0...v3.2.1
v3.2.0
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.2.0")
# 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 #2847
- Changes by create-pull-request action by @github-actions[bot] in #2849
- test: add assert_tar_listing() tests across all bazel versions by @jbedard in #2850
- feat: streamline invocation of binaries from npm and update examples by @acozzette in #2846
- fix: always use the target platform for
toolinjs_run_devserverby @acozzette in #2853 - Changes by create-pull-request action by @github-actions[bot] in #2854
- Changes by create-pull-request action by @github-actions[bot] in #2856
- feat: add flag controlling the default for use_execroot_entry_point by @acozzette in #2837
- chore: migrate to Aspect CLI AXL tasks on ephemeral GHA runners by @gregmagolan in #2858
- chore: bump aspect-cli to v2026.22.15 by @gregmagolan in #2860
- chore: bump aspect-cli to v2026.22.17 by @gregmagolan in #2862
- chore: bump aspect-cli to v2026.22.23 by @gregmagolan in #2866
- chore: bump aspect-cli to v2026.22.29 by @gregmagolan in #2867
- chore: bump Aspect CLI to 2026.22.39 by @gregmagolan in #2869
- ci: adopt aspect-build/setup-aspect by @gregmagolan in #2870
- chore: align buildifier config with aspect-cli; bump CLI to 2026.22.44 by @gregmagolan in #2871
- docs: expand and update documentation on
use_execroot_entry_pointby @acozzette in #2872 - chore: fix broken docs.aspect.build links by @kapunahelewong in #2770
- Changes by create-pull-request action by @github-actions[bot] in #2859
- fix: watch pnpm-workspace.yaml by @gzm0 in #2863
Full Changelog: v3.1.2...v3.2.0
v3.1.2
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
- @menny made their first contribution in #2826
- @nickschaap made their first contribution in #2841
Full Changelog: v3.1.1...v3.1.2