Skip to content

Releases: aspect-build/rules_js

v2.3.3

24 Mar 18:37
df99ca1
Compare
Choose a tag to compare

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.3.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 = "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 = "05576ae674015b112b7c40c165735386eb9917affe8013e310d5602a093f2382",
    strip_prefix = "rules_js-2.3.3",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.3.3/rules_js-v2.3.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

  • Changes by create-pull-request action by @github-actions in #2113
  • fix: quotes within js_image_layer regexes by @jbedard in #2145
  • fix: js_image_layer files matching no layer by @jbedard in #2143

Full Changelog: v2.3.2...v2.3.3

v2.3.2

22 Mar 00:35
Compare
Choose a tag to compare

Caution

This release contains some public api breakage for js_image_layer, use version v2.3.3 instead.
See: bazelbuild/bazel-central-registry#4125

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.3.2")

####### 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 = "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 = "7ee67690ed4d6b5c8cbf6d47bb68b639192a29397a9fe3d513981fecc25a5653",
    strip_prefix = "rules_js-2.3.2",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.3.2/rules_js-v2.3.2.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

Full Changelog: v2.3.1...v2.3.2

v2.3.1

21 Mar 23:34
8ef910d
Compare
Choose a tag to compare

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.3.1")

####### 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 = "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 = "a3b183d6eb52e0efc1595f4d7d30bc5627dc7ff6eb8be3b1b58c4baec754feb5",
    strip_prefix = "rules_js-2.3.1",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.3.1/rules_js-v2.3.1.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: js_image_layer when binary file is directly in bin_dir by @jbedard in #2141

Full Changelog: v2.3.0...v2.3.1

v2.3.0

21 Mar 18:11
1c1823d
Compare
Choose a tag to compare

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.3.0")

####### 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 = "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 = "bea8e9a120b14ff2cdf2410c5872cfc896b29dc361ac8c554d0c9f800154a0b7",
    strip_prefix = "rules_js-2.3.0",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.3.0/rules_js-v2.3.0.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

  • Update pnpm workspace example in docs to avoid edge cases by @sbussard in #2111
  • chore: remove non-bzlmod unit testing by @jbedard in #2116
  • fix: extract tar with correct environment by @alexeagle in #2117
  • chore: fix broken CI tests by @gregmagolan in #2118
  • [chore] fix CI test, disable performance optimization for js_run_devserver e2e test by @Mivr in #2128
  • Improve npm_import docs to include example also for bzlmod by @Mivr in #2126
  • Add new idea bazel plugin folder to gitignore by @Mivr in #2127
  • [feat] expand repo mapping test by @Mivr in #2125
  • [docs] update exclude pattern docs by @Mivr in #2132
  • [bugfix] handle multiple exclude patterns in exclude package contents by @Mivr in #2131
  • [chore] remove not needed empty lists from bazel files generation by @Mivr in #2134
  • [feat] handle star pattern in exclude package contents by @Mivr in #2133
  • fix: js_run_binary doesn't accept select() by @Aghassi in #2137
  • feat: implement layer_groups by @thesayyn in #2130

Full Changelog: v2.2.0...v2.3.0

v2.2.0

20 Feb 19:55
868f12d
Compare
Choose a tag to compare

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.2.0")

####### 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 = "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 = "d66f8abf914a0454a69181b7b17acaae56d7b0e2784cb26b40cb3273c4d836d1",
    strip_prefix = "rules_js-2.2.0",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.2.0/rules_js-v2.2.0.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

  • refactor: fix locale spam from tar by @alexeagle in #2079
  • Use Label.repo_name instead of Label.workspace_name by @EdSchouten in #2082
  • feat: add exclude patterns for npm packages by @Mivr in #2078
  • refactor(bazel 8): point out ignore_directories function by @alexeagle in #2053
  • chore: add latest pnpm 9.15.{3,4,5} versions by @github-actions in #2058
  • chore(deps): update aspect to v1.1.0 by @renovate in #2007
  • chore: mirror external pnpm v10 releases by @jbedard in #2102
  • chore: remove unused rules_go dev dep by @jbedard in #2087
  • Add example pnpm workspace configuration by @sbussard in #2105
  • fix(coverage): ensure js_library#srcs are instrumented for coverage by @alexeagle in #2106
  • Changes by create-pull-request action by @github-actions in #2104
  • chore(deps): update dependency buildifier_prebuilt to v8 by @renovate in #2097
  • devserver: use readline instead of reading from raw stdin by @dmiller-figma in #2099
  • chore(deps): update dependency bazel to v7.5.0 by @renovate in #2084

New Contributors

Full Changelog: v2.1.3...v2.2.0

v2.1.3

23 Jan 23:22
f99b070
Compare
Choose a tag to compare

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.1.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 = "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 = "875b8d01af629dbf626eddc5cf239c9f0da20330f4d99ad956afc961096448dd",
    strip_prefix = "rules_js-2.1.3",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.1.3/rules_js-v2.1.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

  • Changes by create-pull-request action by @github-actions in #2023
  • Changes by create-pull-request action by @github-actions in #2030
  • test: add e2e/runfiles bazelversion by @jbedard in #2045
  • fix: include _repo_mapping in runfiles dir by @jfirebaugh in #2041
  • test: override bazel-lib in e2e/bzlmod to include windows fix by @jbedard in #2052
  • fix: cleanup js_run_devserver directory on SIGINT by @jbedard in #2046
  • chore: cleanup Workflows config by @gregmagolan in #2054
  • fix: override the locale when running bsdtar actions by @alexeagle in #2044
  • Changes by create-pull-request action by @github-actions in #2049
  • Add patch_tool argument to npm_translate_lock by @MichaelMitchell-at in #2048
  • chore: enable Aspect Workflows RBE by @gregmagolan in #2064
  • fix(npm): support workspace run_lifecycle_hooks=False by @jbedard in #2063
  • refactor: reduce unnecessary npm_translate_lock loop iterations by @jbedard in #2036
  • fix(npm): support pnpm v9.7+ patches without version specifier by @jbedard in #2059
  • test: add repositories.bzl snapshot tests for each lockfile version by @jbedard in #2057
  • test: demonstrate dev dependencies between workspace projects by @jbedard in #2056
  • refactor: reduce runtime string format calls, use local target paths by @jbedard in #2037
  • fix(npm): correct use of pnpm lockfile dev flag by @jbedard in #2065
  • chore: add comments/docs for pnpm lockfile fields by @jbedard in #2060
  • chore: update bcr maintainer info by @kormide in #2069
  • docs: add troubleshooting note and example of using node_options for nicer stack traces by @jbedard in #2072
  • fix(npm): use bazel 8 rctx.watch for pnpm-lock by @Mivr in #2074
  • docs: fix typo in lifecycle hook docs by @psalaberria002 in #2076

New Contributors

Full Changelog: v2.1.2...v2.1.3

v2.1.2

04 Dec 06:47
20b5216
Compare
Choose a tag to compare

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.1.2")

####### 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 = "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 = "fbc34d815a0cc52183a1a26732fc0329e26774a51abbe0f26fc9fd2dab6133b4",
    strip_prefix = "rules_js-2.1.2",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.1.2/rules_js-v2.1.2.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: route runfiles of js_library/JsInfo 1p linked dep through npm_package_store and npm_link_package_store by @gregmagolan in #2027

Full Changelog: v2.1.1...v2.1.2

v2.1.1

26 Nov 01:33
b0b0781
Compare
Choose a tag to compare

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.1.1")

####### 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 = "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 = "3388abe9b9728ef68ea8d8301f932b11b2c9a271d74741ddd5f3b34d1db843ac",
    strip_prefix = "rules_js-2.1.1",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.1.1/rules_js-v2.1.1.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: fix workspace js image tests by @jbedard in #1970
  • docs: rules_js 2.x migration guide moved to docsite by @gregmagolan in #1975
  • chore: update refs to bazel-lib which moved to bazel-contrib by @gregmagolan in #1976
  • fix(npm): support patches, lifecycle hooks for non-directory file: packages by @jbedard in #1980
  • build: disable aspect_bazelrc_presets tests in non-bzlmod by @jbedard in #1982
  • fix(npm): package file: versions not relative to the workspace root by @jbedard in #1981
  • fix: upgrade bazel-lib to include run_binary param parsing fix by @jbedard in #1987
  • build: do not run e2e/runfiles on non-bzlmod by @jbedard in #1986
  • Changes by create-pull-request action by @github-actions in #1990
  • chore: enable bazel6 ci tests by @jbedard in #1988
  • chore: upgrade bazel to v7.3.2 by @gregmagolan in #1969
  • refactor(npm): replace truthy value in set with True by @jbedard in #1992
  • build: only run bazel 6 unit tests with bzlmod by @jbedard in #1994
  • docs(js_run_devserver): add note about ibazel issue 100 by @jbedard in #2000
  • Changes by create-pull-request action by @github-actions in #2003
  • perf(npm): reduce use of .keys() for has-entry check by @jbedard in #2006
  • chore(deps): update dependency bazel to v7.4.0 by @renovate in #1939
  • fix(js_run_devserver): ensure files are synced before waiting for next build event by @jbedard in #1999
  • fix(npm): add missing patch copy action key by @jbedard in #2008
  • refactor(npm): add validation of parsed pnpm-lock data by @jbedard in #1979
  • chore: update ci to bazel 7.4 by @jbedard in #2010
  • docs: document exclude_types_from_npm_packages as deprecated by @jbedard in #2014
  • fix: include repo mapping in the sources by @thesayyn in #2011
  • perf(js_run_devserver): run fs delete operations in parallel by @jbedard in #2001
  • docs: update troubleshooting reference by @emmanuel-ferdman in #2016
  • chore: fix broken link by @alexeagle in #2022
  • Changes by create-pull-request action by @github-actions in #2018

New Contributors

Full Changelog: v2.1.0...v2.1.1

v2.1.0

10 Oct 06:07
194622e
Compare
Choose a tag to compare

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.1.0")

####### 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 = "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 = "75c25a0f15a9e4592bbda45b57aa089e4bf17f9176fd735351e8c6444df87b52",
    strip_prefix = "rules_js-2.1.0",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.1.0/rules_js-v2.1.0.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 #1922
  • chore(deps): update webfactory/ssh-agent action to v0.9.0 by @renovate in #1634
  • Add support for + in canonical repo names by @fmeum in #1927
  • docs: Clarify that $npm_package.publish requires publishable = True by @fweikert in #1926
  • chore(deps): update aspect by @renovate in #1923
  • chore: restore windows testing by @alexeagle in #1920
  • Changes by create-pull-request action by @github-actions in #1930
  • chore: fix broken links by @alexeagle in #1931
  • chore: adopt conclusion job for stable status check by @alexeagle in #1921
  • test: add @bazel/runfiles test by @jbedard in #1895
  • chore(deps): update bazel by @renovate in #1928
  • chore(deps): update patch updates by @renovate in #1937
  • chore(deps): update @types by @renovate in #1558
  • chore(deps): update rollup by @renovate in #1874
  • chore(deps): update dependency bazel_skylib_gazelle_plugin to v1.7.1 - autoclosed by @renovate in #1943
  • chore(deps): update syncpack digest to 805e36f by @renovate in #1829
  • chore(deps): update dependency rollup to v3.29.5 [security] by @renovate in #1940
  • chore(deps): update dependency gazelle to v0.39.1 by @renovate in #1945
  • chore(deps): update dependency buildifier_prebuilt to v7 by @renovate in #1949
  • chore(deps): update peter-evans/create-pull-request action to v7 by @renovate in #1950
  • chore(deps): update dependency rules_go to v0.50.1 by @renovate in #1953
  • chore(deps): update dependency stardoc to v0.7.1 by @renovate in #1954
  • feat(pnpm): allow latest as version to get the latest version by @gzm0 in #1933
  • chore: disable renovate for unit test projects by @jbedard in #1960
  • chore(deps): update softprops/action-gh-release action to v2 by @renovate in #1951
  • Changes by create-pull-request action by @github-actions in #1965
  • ci: fix matrix job on GitHub Actions by @gregmagolan in #1967
  • docs: merge gather_files_from_js_infos rename PRs in migration docs by @gzm0 in #1891
  • chore: bump to Aspect CLI 2024.41.17 by @gregmagolan in #1968

New Contributors

Full Changelog: v2.0.2...v2.1.0

v2.0.2

01 Oct 15:22
bf93e47
Compare
Choose a tag to compare

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.2")

####### 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 = "91655ebd3178f979fcacd018f8f42aa9d3bc79c4fbddb7be9521971ec77e6aee",
    strip_prefix = "rules_js-2.0.2",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.0.2/rules_js-v2.0.2.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(npm): use actions.run instead of actions.run_shell by @jbedard in #1905
  • refactor(npm): improve pnpm.onlyBuiltDependencies error message by @jbedard in #1902
  • chore: use aspect workflows RBE by @kormide in #1908
  • chore: now testing on Aspect Workflows RBE by @gregmagolan in #1909
  • perf: avoid large array concatenation by @jbedard in #1883
  • doc: add callout for dependency on generate_bzl_library_targets by @plobsing in #1911
  • fix(npm): respect npm_package include_transitive_sources attribute by @jbedard in #1912
  • Changes by create-pull-request action by @github-actions in #1906
  • docs(pnpm): add note about pnpm vs bazel patching by @jbedard in #1916

New Contributors

Full Changelog: v2.0.1...v2.0.2