Releases: aspect-build/rules_js
v3.0.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.0.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
- Changes by create-pull-request action by @github-actions[bot] in #2752
- chore: upgrade gha deps by @jbedard in #2755
- Changes by create-pull-request action by @github-actions[bot] in #2759
- fix: consumption of @npm//:node_modules/{pkg}/package_json.bzl targets across workspaces by @jbedard in #2761
- test: fix archive hashes changed by gh by @jbedard in #2763
- test: update e2e/npm_translate_lock_auth to not change lockfile during test by @jbedard in #2758
- Changes by create-pull-request action by @github-actions[bot] in #2764
- fix: handle missing packages in _collect_dep_constraints by @jbedard in #2765
Full Changelog: v3.0.2...v3.0.3
v3.0.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.0.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
- refactor: add error message when invalid link_package is specified by @jbedard in #2741
- fix(docs): the proto plugin target can live with the toolchain by @alexeagle in #2724
- refactor: upgrade bazel_lib to include cac2d78 by @jbedard in #2744
- fix: declare public RUNFILES_DIR for use by @bazel/runfiles by @jbedard in #2748
- test: add path-mapping test by @jbedard in #2749
- fix: ignore optional packages with os:alpine by @jbedard in #2746
Full Changelog: v3.0.1...v3.0.2
v3.0.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.0.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")See 3.0.0 release notes, 3.0.1 has a single additional compatibility fix.
Full Changelog: v3.0.0...v3.0.1
v3.0.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.0.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")Primary Breaking Changes
- refactor: remove bazel6 support by @jbedard in #2458
- refactor: remove WORKSPACE support by @jbedard in #2455
- refactor: remove support for pnpm <v9 by @jbedard in #2456
Minor Breaking Changes
- refactor: remove the ability to customize node_modules path by @jbedard in #2202
- refactor: remove npm_translate_lock(defs_bzl_filename) by @jbedard in #2466
- refactor: remove exclude_types_from_npm_packages flag by @jbedard in #2464
- refactor: remove support for deprecated include_{npm_sources,npm_linked_packages,declarations} by @jbedard in #2468
- refactor: remove npm_import(link_packages) by @jbedard in #2486
- refactor: replace npm_translate_lock(prod,dev) with no_dev flag similar to no_optional by @jbedard in #2487
- refactor: remove npm_translate_lock(link_workspace) by @jbedard in #2551
- refactor: remove npm_translate_lock(additional_file_contents) by @jbedard in #2555
- refactor: remove npm_translate_lock(root_package) by @jbedard in #2552
- refactor: remove non-bzlmod repository rule APIs by @jbedard in #2496
- refactor: remove deprecated npm_translate_lock(replace_packages) by @jbedard in #2494
What's Changed
- perf: avoid double-parsing pnpm-lockfile by @dzbarsky in #2480
- refactor: npm_translate_lock_generate.bzl cleanup by @dzbarsky in #2452, #2453
- test: enable all e2e tests on bzlmod by @jbedard in #2463
- chore: upgrade rules_nodejs to 6.6 by @jbedard in #2467
- refactor: use strict dict property access on known structs by @jbedard in #2471
- refactor: remove old pnpm <v9 logic by @jbedard in #2473
- refactor: minor 3.x cleanup tasks by @jbedard in #2476
- refactor: validate parsed pnpm-lock file/link: references by @jbedard in #2475
- fix: share single package store entry accross all aliases to local projects by @jbedard in #2474
- refactor: improve the npmrc-exists handling by @dzbarsky in #2399
- Prepare for fixing double-parsing by @dzbarsky in #2477
- Changes by create-pull-request action (#2454) by @jbedard in #2479
- refactor: extricate lockfile verification from npm_translate_lock repo rule by @dzbarsky in #2478
- refactor: adopt new NodeJS runtime toolchain by @guw in #2330
- test: importing of dev alias of a non-dev dep by @jbedard in #2482
- refactor: remove unused macro params and return values by @jbedard in #2481
- refactor: clarify internal vs public generated pnpm package macros by @jbedard in #2484
- refactor: cleanup init_pnpm_labels by @dzbarsky in #2485
- refactor: remove --enable_bzlmod usage by @dzbarsky in #2489
- refactor: directly use tar.bzl module by @jbedard in #2460
- cleanup: remove generated stardocs by @alexeagle in #2491
- cleanup(docs): remove rules_nodejs and rules_js 1.x migration by @alexeagle in #2490
- refactor: use attr instead of rctx.attr in lockfile parsing to prep for extension by @dzbarsky in #2492
- chore: remove some WORKSPACE terminology by @jbedard in #2493
- refactor: specify bzlmod tag_class(doc) by @jbedard in #2495
- test: add snapshot tests for npm repos with no_dev and no_optional by @jbedard in #2498
- refactor: directly use yq.bzl module by @jbedard in #2501
- fix: nodejs toolchains for OCI images by @dzbarsky in #2499
- fix: do not override all snapshots of a package due to one tarball override by @jbedard in #2435
- refactor: remove internal struct merging of importer deps by @jbedard in #2502
- refactor: distinguish package vs repo vs target name by @jbedard in #2503
- refactor: remove use of abortcontroller-polyfill for legacy node versions by @jbedard in #2504
- refactor: replace aspect_bazel_lib//lib:jq with jq.bzl module by @jbedard in #2505
- refactor: align pnpm package store with lockfile by @jbedard in #2177
- refactor: upgrade aspect_bazel_lib to bazel_lib by @jbedard in #2457
- refactor: remove rules_docker tests and examples by @jbedard in #2508
- chore: upgrade bazel7 to 7.7.1 by @jbedard in #2507
- chore: simplify github workflows cache keys by @jbedard in #2513
- refactor: simplify npm target and repo package store naming by @jbedard in #2509
- refactor: do not create empty name="node_modules" targets by @jbedard in #2525
- fix: support pnpm v10+ configuration in pnpm-workspace.yaml by @jbedard in #2528
- chore: remove js/toolchains.bzl by @jbedard in #2531
- chore: remove node16+18 testing by @jbedard in #2530
- refactor: only generate package_json.bzl for direct deps by @jbedard in #2534
- refactor: do not expose RUNFILES var, use JS_BINARY__RUNFILES by @jbedard in #2533
- refactor: do not resort npm packages multiple times by @jbedard in #2535
- refactor: npm_translate_lock simplifying and cleanup by @jbedard in #2537
- refactor: remove more usage of utils.exists by @dzbarsky in #2541
- feat: platform specific optional npm deps by @jbedard in #2538
- test: add snapshot test includign circular npm deps by @jbedard in #2544
- refactor: remove npm_import(transitive_closure) from public extension by @jbedard in #2545
- chore: disable workspace by @jbedard in #2549
- refactor: only use transitive_closure when circular deps or lifecycle hooks exist by @jbedard in #2543
- refactor: do not generate npm lifecycle deps for packages with no lifecycle hooks by @jbedard in #2546
- refactor: simplify npm_link_package() util macro by @jbedard in #2553
- fix: change use of rctx.environ to rctx.getenv by @jbedard in #2554
- perf: optimize package store symlink creation by @dzbarsky in #2401
- refactor: do not use transitive_c...
v3.0.0-rc6
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.0.0-rc6")
# 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(docs): remove content that's been moved to Aspect docs by @kapunahelewong in #2729
- test: packages with nested peer deps by @jbedard in #2730
- feat: support watch protocol v1 by @jbedard in #2411
- refactor: remove unnecessary attr.* expansion by @jbedard in #2733
- fix: do not try updating lockfile with update_pnpm_lock=True in non-root module by @jbedard in #2734
- Changes by create-pull-request action by @github-actions[bot] in #2728
New Contributors
- @kapunahelewong made their first contribution in #2729
Full Changelog: v3.0.0-rc5...v3.0.0-rc6
v3.0.0-rc5
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.0.0-rc5")
# 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: use aspect-build org CI checks by @alexeagle in #2706
- chore(docs): minor tweaks to be Mintlify-MDX compatible by @alexeagle in #2712
- fix: convert hex from packageManager integrity to base64 format by @sbarfurth in #2709
- docs: fix typos and grammar in docstrings by @jbedard in #2714
- refactor: update pnpm versions by @github-actions[bot] in #2713
- fix: npm_deps tests on Windows, add a fix for Bazel 9.0.0 #2261 by @Mivr in #2700
- feat: allow proto_library as js_library#dep by @alexeagle in #2721
- chore(docs): add API docs for proto by @alexeagle in #2722
- chore: remove tests from gha which also run on aspect workflows by @jbedard in #2707
- fix: run npm package target in other repo by @jbedard in #2726
- chore: mirror external pnpm releases by @github-actions[bot] in #2720
Full Changelog: v3.0.0-rc4...v3.0.0-rc5
v3.0.0-rc4
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.0.0-rc4")
# 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: remove primary bazel version testing from gha by @jbedard in #2701
- Revert "fix: produce starlark_doc_extract rules for public API" by @alexeagle in #2710
- chore(docs): document public APIs, not private ones by @alexeagle in #2711
Full Changelog: v3.0.0-rc3...v3.0.0-rc4
v3.0.0-rc3
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.0.0-rc3")
# 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(deps): update pre-commit hook commitizen-tools/commitizen to v4 by @renovate[bot] in #2680
- chore: Fix up a few broken links by @MatrixFrog in #2697
- feat: support reproducible pnpm downloads using bazel facts api by @jbedard in #2698
- fix: add check to ensure home npmrc exists in module extension by @smocherla-brex in #2702
- refactor: upgrade platforms bzlmod dep to v1 by @jbedard in #2704
- refactor(deps): remove use of path-exists, upgrade @pnpm/lifecycle by @renovate[bot] in #2682
- fix: produce starlark_doc_extract rules for public API by @alexeagle in #2703
- test: remove use of WORKSPACE.bzlmod in tests, prep e2e tests for bazel 8+ by @jbedard in #2705
New Contributors
- @MatrixFrog made their first contribution in #2697
- @smocherla-brex made their first contribution in #2702
Full Changelog: v3.0.0-rc2...v3.0.0-rc3
v3.0.0-rc2
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.0.0-rc2")
# 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(deps): update pre-commit hook koalaman/shellcheck-precommit to v0.11.0 by @renovate[bot] in #2678
- chore(deps): update pre-commit hook commitizen-tools/commitizen to v3.31.0 by @renovate[bot] in #2677
- chore(deps): update dependency jsonpath-plus to v10 [security] by @renovate[bot] in #2692
- fix: support negated pnpm os|cpu constraints by @jbedard in #2696
Full Changelog: v3.0.0-rc1...v3.0.0-rc2
v3.0.0-rc1
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.0.0-rc1")
# 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 pnpm versions by @jbedard in #2668
- chore(deps): update webfactory/ssh-agent action to v0.9.1 by @renovate[bot] in #2669
- chore(deps): update bazel-contrib/.github action to v7.3.0 by @renovate[bot] in #2670
- chore: upgrade pnpm, rollup deps by @jbedard in #2667
- chore(deps): update pre-commit hook keith/pre-commit-buildifier to v8 by @renovate[bot] in #2681
- test: update e2e test MODULE deps by @jbedard in #2683
- chore(deps): update @rollup dependencies by @renovate[bot] in #2671
- fix: crash when printing .bazelignore error message with bazel8 by @jbedard in #2687
- chore: update ci bazel9 testing 9.0.0 by @jbedard in #2689
- fix: allow link: deps to non-project directories by @jbedard in #2691
Full Changelog: v3.0.0-rc0...v3.0.0-rc1