Releases: aspect-build/rules_js
v2.0.0-rc6
Important
See #1671 for list of BREAKING CHANGES in rules_js 2.0. We'll copy over the list of BREAKING CHANGES to these release notes soon.
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.0.0-rc6")
####### 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.2.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "16.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 = "a723815986f3dd8b2c58d0ea76fde0ed56eed65de3212df712e631e5fc7d8790",
strip_prefix = "rules_js-2.0.0-rc6",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-rc6/rules_js-v2.0.0-rc6.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
- [perf] Optimize npm_package_store by @DavidZbarsky-at in #1801
- Optimize _is_gnu_tar check by @DavidZbarsky-at in #1807
- refactor: remove optional empty depset direct by @jbedard in #1790
- perf: do not check JsInfo hasattr for always-set attributes by @jbedard in #1786
- perf: only validate deprecated js_info params when extra params specified by @jbedard in #1799
- refactor: sort lock translation action cache content by @jbedard in #1796
- perf: do not include sources,types when transitive_sources,type already included by @jbedard in #1803
- perf: reduce use of bazel_skylib paths.join by @jbedard in #1812
- Changes by create-pull-request action by @github-actions in #1809
- perf: do not double process lifecycle_hooks* attributes in bzlmod by @jbedard in #1805
- perf: change js_helpers gather_* utils to accept list, not depset by @jbedard in #1787
- refactor: change npm_import(is_gnu_tar) to system_tar by @jbedard in #1811
- perf: Allow opting out of arg/env expansion by @DavidZbarsky-at in #1810
- test: npm: dependencies by @jbedard in #1815
- perf: remove unused template vars by @jbedard in #1819
- fix: use .cjs extension for fs patches by @jbedard in #1818
- fix(pnpm): npm: aliases to packages with peer deps by @jbedard in #1824
- refactor(pnpm): strip special characters from pkg labels by @jbedard in #1821
- refactor: remove unused peer_dependencies field by @jbedard in #1826
- perf: reduce string concatenation in lockfile parsing by @jbedard in #1817
- chore(deps): update aspect by @renovate in #1631
- chore(deps): update bazel rulesets by @renovate in #1633
- Revert "chore(deps): update bazel (#1633)" by @jbedard in #1831
- Revert "chore(deps): update aspect rulesets (#1631)" by @jbedard in #1833
- test: align pnpm_workspace[_rerooted] tests by @jbedard in #1832
- refactor: cleanup npm_package_store.bzl by @jbedard in #1834
- fix: transitive js_library npm package deps by @jbedard in #1836
- perf: reduce use of starlark .split by @jbedard in #1820
Full Changelog: v2.0.0-rc5...v2.0.0-rc6
v2.0.0-rc5
Important
See #1671 for list of BREAKING CHANGES in rules_js 2.0. We'll copy over the list of BREAKING CHANGES to these release notes soon.
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.0.0-rc5")
####### 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.2.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "16.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 = "3bad4ab669d4d38d0d137275b946a46ce6f8f17fecc6c7affba64966a9054246",
strip_prefix = "rules_js-2.0.0-rc5",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-rc5/rules_js-v2.0.0-rc5.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
- Changes by create-pull-request action by @github-actions in #1779
- fix: fix issue with bzlmod toolchain registration by bumping minimum rules_nodejs to 6.1.2 by @gregmagolan in #1780
- chore: fixup pattern for try-import of user.bazelrc by @gregmagolan in #1789
- perf: do not put files_runfiles in files + transitive_files by @jbedard in #1782
- perf: avoid cloning data_files when not copy_data_files_to_bin by @jbedard in #1783
- perf: avoid large temp arrays, use single loop by @jbedard in #1784
- perf: avoid js_info param validation on default values by @jbedard in #1785
- chore: bump minimum rules_nodejs to 6.2.0 by @gregmagolan in #1792
- chore: fixup load statement ordering in generated bzl by @gregmagolan in #1795
- fix: handle malformed npm packages gracefully in extract action by @gregmagolan in #1794
- perf: minimize cost of checking bazel version by @dzbarsky in #1800
- perf: use string.elems for char iteration by @DavidZbarsky-at in #1802
- Changes by create-pull-request action by @github-actions in #1804
New Contributors
- @DavidZbarsky-at made their first contribution in #1802
Full Changelog: v2.0.0-rc4...v2.0.0-rc5
v2.0.0-rc4
Important
See #1671 for list of BREAKING CHANGES in rules_js 2.0. We'll copy over the list of BREAKING CHANGES to these release notes soon.
Downstream rulesets will also require updates to their latest RCs along with this upgrade:
https://github.com/aspect-build/rules_cypress/releases/tag/v0.6.0-rc0
https://github.com/aspect-build/rules_esbuild/releases/tag/v0.21.0-rc1
https://github.com/aspect-build/rules_jasmine/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_jest/releases/tag/v0.22.0-rc0
https://github.com/aspect-build/rules_rollup/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_swc/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_ts/releases/tag/v3.0.0-rc0
https://github.com/aspect-build/rules_webpack/releases/tag/v0.16.0-rc0
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.0.0-rc4")
####### 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.1.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "16.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 = "00ee2310ced0cf524ba0b5f82805874a485b400a9bd1b13a4d1a487c4764e02a",
strip_prefix = "rules_js-2.0.0-rc4",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-rc4/rules_js-v2.0.0-rc4.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(pnpm): pnpm9 npm: dependencies with peers by @jbedard in #1776
- refactor: remote non-functional exclude_declarations_from_npm_packages alias by @gregmagolan in #1778
- Changes by create-pull-request action by @github-actions in #1771
- refactor(pnpm): move pnpm parsing logic to pnpm.bzl by @jbedard in #1777
New Contributors
- @github-actions made their first contribution in #1771
Full Changelog: v2.0.0-rc3...v2.0.0-rc4
v2.0.0-rc3
Important
See #1671 for list of BREAKING CHANGES in rules_js 2.0. We'll copy over the list of BREAKING CHANGES to these release notes soon.
Downstream rulesets will also require updates to their latest RCs along with this upgrade:
https://github.com/aspect-build/rules_cypress/releases/tag/v0.6.0-rc0
https://github.com/aspect-build/rules_esbuild/releases/tag/v0.21.0-rc0
https://github.com/aspect-build/rules_jasmine/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_jest/releases/tag/v0.22.0-rc0
https://github.com/aspect-build/rules_rollup/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_swc/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_ts/releases/tag/v3.0.0-rc0
https://github.com/aspect-build/rules_webpack/releases/tag/v0.16.0-rc0
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.0.0-rc3")
####### 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.1.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "16.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 = "3dfccf2713288e0518c0485b65574ca66426c6e06495299abe6f5c64e3bc6314",
strip_prefix = "rules_js-2.0.0-rc3",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-rc3/rules_js-v2.0.0-rc3.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(pnpm): npm aliases to url specifiers by @jbedard in #1772
- test: add test cases for individual pnpm lockfile issues by @jbedard in #1773
- refactor(pnpm): remove .parse_pnpm_package_key util by @jbedard in #1774
- fix(pnpm): pnpm9 transitive npm: dependenies by @jbedard in #1775
Full Changelog: v2.0.0-rc2...v2.0.0-rc3
v2.0.0-rc2
Important
See #1671 for list of BREAKING CHANGES in rules_js 2.0. We'll copy over the list of BREAKING CHANGES to these release notes soon.
Downstream rulesets will also require updates to their latest RCs along with this upgrade:
https://github.com/aspect-build/rules_cypress/releases/tag/v0.6.0-rc0
https://github.com/aspect-build/rules_esbuild/releases/tag/v0.21.0-rc0
https://github.com/aspect-build/rules_jasmine/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_jest/releases/tag/v0.22.0-rc0
https://github.com/aspect-build/rules_rollup/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_swc/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_ts/releases/tag/v3.0.0-rc0
https://github.com/aspect-build/rules_webpack/releases/tag/v0.16.0-rc0
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.0.0-rc2")
####### 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.1.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "16.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 = "25e06ac98ce2dd44d74e728e63e1c88e707d0972db20d7e7339c8e458335b4e3",
strip_prefix = "rules_js-2.0.0-rc2",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-rc2/rules_js-v2.0.0-rc2.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
- chore: bump miminum dep to aspect_bazel_lib 2.7.6 by @gregmagolan in #1755
- refactor: simplify handling of #423, package aliases by @jbedard in #1757
- refactor: move npm_registry_url to utils by @jbedard in #1758
- refactor: do not include registry url in package keys by @jbedard in #1759
- feat: add include_npm_sources to npm_package by @gregmagolan in #1760
- docs: update section on "Exec failed due to IOException" by @fmeum in #1761
- fix: include package store directory in default output of npm_link_package_store by @gregmagolan in #1762
- chore: bump minimum aspect_bazel_lib to 2.7.7 by @gregmagolan in #1763
- test: add lockfile test cases by @jbedard in #1764
- chore: automate pnpm version mirroring by @alexeagle in #1766
- fix(pnpm): support pnpm9 URL, github version package versions by @jbedard in #1765
- fix(pnpm): support npm: alias dependencies with pnpm lockfile v5 by @jbedard in #1767
- chore: bump to rules_oci 1.7.6 by @gregmagolan in #1768
- refactor: sort generated npm_translate_lock store targets by @jbedard in #1769
- fix(pnpm): support npm: aliases to packages in alternate registries by @jbedard in #1770
New Contributors
Full Changelog: v2.0.0-rc1...v2.0.0-rc2
v2.0.0-rc1
Important
See #1671 for list of BREAKING CHANGES in rules_js 2.0. We'll copy over the list of BREAKING CHANGES to these release notes soon.
Downstream rulesets will also require updates to their latest RCs along with this upgrade:
https://github.com/aspect-build/rules_cypress/releases/tag/v0.6.0-rc0
https://github.com/aspect-build/rules_esbuild/releases/tag/v0.21.0-rc0
https://github.com/aspect-build/rules_jasmine/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_jest/releases/tag/v0.22.0-rc0
https://github.com/aspect-build/rules_rollup/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_swc/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_ts/releases/tag/v3.0.0-rc0
https://github.com/aspect-build/rules_webpack/releases/tag/v0.16.0-rc0
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.0.0-rc1")
####### 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.1.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "16.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 = "7085e915cdba6f2dc0ce93bef59f5d040a539b510b840456b6ac7ccc2bee7886",
strip_prefix = "rules_js-2.0.0-rc1",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-rc1/rules_js-v2.0.0-rc1.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
New Contributors
Full Changelog: v2.0.0-alpha.8...v2.0.0-rc1
v2.0.0-rc0
Important
See #1671 for list of BREAKING CHANGES in rules_js 2.0. We'll copy over the list of BREAKING CHANGES to these release notes soon.
Downstream rulesets will also require updates to their latest RCs along with this upgrade:
https://github.com/aspect-build/rules_cypress/releases/tag/v0.6.0-rc0
https://github.com/aspect-build/rules_esbuild/releases/tag/v0.21.0-rc0
https://github.com/aspect-build/rules_jasmine/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_jest/releases/tag/v0.22.0-rc0
https://github.com/aspect-build/rules_rollup/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_swc/releases/tag/v2.0.0-rc0
https://github.com/aspect-build/rules_ts/releases/tag/v3.0.0-rc0
https://github.com/aspect-build/rules_webpack/releases/tag/v0.16.0-rc0
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.0.0-rc0")
####### 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.1.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "16.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 = "389021e29b3aeed2f6fb3a7a1478f8fc52947a6500b198a7ec0f3358c2842415",
strip_prefix = "rules_js-2.0.0-rc0",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-rc0/rules_js-v2.0.0-rc0.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
- test: generate fresh lockfile each time for pnpm lockfile test by @jbedard in #1750
- refactor: normalize pnpm lockfile data in parser by @jbedard in #1735
Full Changelog: v2.0.0-alpha.7...v2.0.0-rc0
v2.0.0-alpha.8
Important
rules_js maintainers are working towards a rules_js 2.0 RC release. We don't recommended upgrading to this alpha release. Downstream rule sets such as rules_ts
will also require updates that we're currently working on (tracking issue #1671). The list of BREAKING CHANGES will be included in the 2.0 RC release notes.
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.0.0-alpha.8")
####### 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.1.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "16.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 = "902ff55091f27869547c3420360b491234f3e96d633f88933736bb16afb464b6",
strip_prefix = "rules_js-2.0.0-alpha.8",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-alpha.8/rules_js-v2.0.0-alpha.8.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
- test: generate fresh lockfile each time for pnpm lockfile test by @jbedard in #1750
- refactor: normalize pnpm lockfile data in parser by @jbedard in #1735
Full Changelog: v2.0.0-alpha.7...v2.0.0-alpha.8
v2.0.0-alpha.7
Important
rules_js maintainers are working towards a rules_js 2.0 RC release. We don't recommended upgrading to this alpha release. Downstream rule sets such as rules_ts
will also require updates that we're currently working on (tracking issue #1671). The list of BREAKING CHANGES will be included in the 2.0 RC release notes.
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.0.0-alpha.7")
####### 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.1.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "16.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 = "5a28b79064a23b944413c6d0c2bdd3a154ac384c8dcf21a9bf54d91efef94163",
strip_prefix = "rules_js-2.0.0-alpha.7",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.0-alpha.7/rules_js-v2.0.0-alpha.7.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
- chore: update aspect.dev URL references to aspect.build by @gregmagolan in #1747
- chore: add pnpm versions 8.15.4 through 9.1.1 by @gregmagolan in #1730
Full Changelog: v1.42.3...v2.0.0-alpha.7
v1.42.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 = "1.42.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 = "5.8.2")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(node_version = "16.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 = "2cfb3875e1231cefd3fada6774f2c0c5a99db0070e0e48ea398acbff7c6c765b",
strip_prefix = "rules_js-1.42.3",
url = "https://github.com/aspect-build/rules_js/releases/download/v1.42.3/rules_js-v1.42.3.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,
)
# For convenience, npm_translate_lock does this call automatically.
# Uncomment if you don't call npm_translate_lock at all.
#load("@bazel_features//:deps.bzl", "bazel_features_deps")
#bazel_features_deps()
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()
To use rules_js with bazel-lib 2.x, you must additionally register the coreutils toolchain.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_coreutils_toolchains")
register_coreutils_toolchains()
What's Changed
- refactor: align pnpm lock v6+ with v5 target names by @jbedard in #1733
- fix: error message .format generated with missing argument by @jbedard in #1736
- docs: include pnpm in bzlmod install snippet by @alexeagle in #1740
- fix: allow users to provide the version of @pnpm repo by @alexeagle in #1741
- chore: add missing package.json files to npm_translate_lock by @jbedard in #1746
Full Changelog: v1.42.1...v1.42.3