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