Skip to content

Releases: aspect-build/rules_js

v2.8.3

02 Dec 19:54
409b866

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.8.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 = "f6118e480c4f12fe88b1a52bab1c7f1886fc10fc2e7588f2eba3b2a53ff05a83",
    strip_prefix = "rules_js-2.8.3",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.8.3/rules_js-v2.8.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

  • refactor: enable strict type checking of fs patches src by @jbedard in #2510
  • refactor: remove unreachable fs patch code by @jbedard in #2511
  • chore: simplify github workflows cache keys by @jbedard in #2519
  • refactor: directly use yq.bzl, jq.bzl by @jbedard in #2506
  • test: remove use of gitpkg.vercel.app tarball in tests by @jbedard in #2526
  • chore: run github workflows tests on ubuntu-22.04-4core runner by @jbedard in #2527
  • perf: avoid exceptions in fs patches using throwIfNoEntry: false by @jbedard in #2512
  • fix: support pnpm v10+ configuration in pnpm-workspace.yaml by @jbedard in #2518
  • test: add platform specific optional deps test by @jbedard in #2536
  • chore(deps): update dependency aspect_tools_telemetry to v0.3.1 by @renovate[bot] in #2517
  • chore(deps): update dependency bazel to v7.7.1 by @renovate[bot] in #2520

Full Changelog: v2.8.2...v2.8.3

v2.8.2

18 Nov 14:13
cad9b90

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.8.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 = "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 = "20fc40c64bf36054e9564333015bc2e212e975d6c0a50e1319de516c469e3538",
    strip_prefix = "rules_js-2.8.2",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.8.2/rules_js-v2.8.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

  • refactor: npm_translate_lock_generate.bzl cleanup by @dzbarsky in #2452
  • refactor: npm_translate_lock_generate.bzl cleanup by @dzbarsky in #2453
  • fix: bzlmod defs_bzl_filename, root_package, additional_file_content by @jbedard in #2462
  • test: enable all e2e tests on bzlmod by @jbedard in #2461
  • refactor: use strict dict property access on known structs (#2471) by @jbedard in #2472
  • Changes by create-pull-request action by @github-actions[bot] in #2454
  • test: importing of dev alias of a non-dev dep (#2482) by @jbedard in #2483

Full Changelog: v2.8.1...v2.8.2

v2.8.1

10 Nov 06:31
60c5a89

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.8.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 = "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 = "6e4637a63acbd2ca080f463cb18fc0d7439f2401adbfe0028f3f4544c9eb8085",
    strip_prefix = "rules_js-2.8.1",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.8.1/rules_js-v2.8.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

  • test: upgrade e2e/npm_translate_lock_empty to pnpm 9 by @jbedard in #2414
  • chore: upgrade e2e tests to pnpm v9+ by @jbedard in #2413
  • refactor: simplify/cleanup generate_repository_files macro by @jbedard in #2419
  • fix: respect dev vs non-dev dependencies of workspace projects at link time by @jbedard in #2418
  • chore: allow DirectoryPathInfo to vary bazel_lib vs aspect_bazel_lib by @alexeagle in #2421
  • refactor: sort entries in _NPM_PACKAGE_LOCATIONS by @jbedard in #2422
  • test: references to packages under multiple aliases by @jbedard in #2423
  • refactor: simplify generated npm_link_targets implementations by @jbedard in #2424
  • refactor: remove duplicate unused npm_link_targets generation code by @jbedard in #2426
  • refactor: group fp package store targets alongside third-party by @jbedard in #2425
  • refactor: group fp package linking alongside third-party by @jbedard in #2427
  • refactor: remove unnecessary none check by @jbedard in #2430
  • refactor: only generate package_json.bzl once per package instead of per link by @jbedard in #2433
  • refactor: reduce generated code for linking of first-party packages by @jbedard in #2429
  • chore: bump bazel-lib to pick up bazel 9 fix by @alexeagle in #2432
  • refactor: simplify generated npm_link_all_packages() code by @jbedard in #2428
  • refactor: remove old aspect CLI by @alexeagle in #2434
  • fix: avoid sh_binary by @alexeagle in #2436
  • chore: sanitize some file sizes in golden files by @alexeagle in #2437
  • chore: test on bazel 9 by @alexeagle in #2431
  • chore: downgrade rules_lint to 1.1.0 for bazel6 compat by @jbedard in #2440
  • fix: ensure default bzlmod pnpm version aligns with DEFAULT_PNPM_VERSION by @jbedard in #2439
  • test: run tests on same version as .bazelversion by @jbedard in #2443
  • refactor: move first-party package versioning logic into common code by @jbedard in #2442
  • test: snapshot tests for vendored tarball generated repos by @jbedard in #2444
  • refactor: remove duplicate pnpm v9 importer path normalization by @jbedard in #2446
  • fix: treat file: references in package store the same as pnpm by @jbedard in #2445
  • test: upgrade e2e tests to pnpm 9+ by @jbedard in #2451
  • refactor: use pnpm file: id field by @jbedard in #2449

Full Changelog: v2.8.0...v2.8.1

v2.8.0

04 Nov 14:16
f9dd346

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.8.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 = "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 = "e7ed62fa2188505b8124ffe20f51a5935b7c6fd23ba2f53673067886d7d812b3",
    strip_prefix = "rules_js-2.8.0",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.8.0/rules_js-v2.8.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[bot] in #2402
  • Changes by create-pull-request action by @github-actions[bot] in #2407
  • feat: add replace_package module extension tag by @Mivr in #2289
  • #2345 fix visibility enforcement for local package deps by @Mivr in #2357
  • fix: update mocha.bzl to use rootpath for configFile by @alexeagle in #2405
  • refactor: remove usage of system tar by @dzbarsky in #2410
  • test: update tests to pnpm v9+ by @jbedard in #2412
  • test: explicitly use pnpm8 in npm_translate_lock_auth by @jbedard in #2415
  • feat(npm): make repo rules reproducible by @jbedard in #2416

Full Changelog: v2.7.0...v2.8.0

v2.7.0

18 Oct 14:12
260de89

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.7.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 = "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 = "9dd50d3bacb2fe1d4a721098981b70290fe9ac56d3625791f490d2ab94f2cac6",
    strip_prefix = "rules_js-2.7.0",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.7.0/rules_js-v2.7.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

  • test: use rules_shell for sh_* in tests by @jbedard in #2390
  • chore: remove BCR homepage, as we now use the BCR UI itself by @alexeagle in #2391
  • Fix js_run_devserver shell script tools on Windows by @AlexHickie in #2393
  • Changes by create-pull-request action by @github-actions[bot] in #2392
  • feat: support prod and dev deps on npm_link_all_packages and npm_link_targets by @Mivr in #2298
  • Remove usage of dicts.add by @dzbarsky in #2396
  • Stop reading pnpm_lock from label_store, take 2 by @dzbarsky in #2395
  • Remove host_yq from label_store by @dzbarsky in #2398
  • Changes by create-pull-request action by @github-actions[bot] in #2394
  • feat: add dev script to update snapshots by @Mivr in #2397

New Contributors

Full Changelog: v2.6.2...v2.7.0

v2.6.2

09 Oct 17:28

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.6.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 = "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 = "4c7404aa9d7f8c458c1bdf79cc5ec1fced55cab25a3f1121b236de78e91f271b",
    strip_prefix = "rules_js-2.6.2",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.6.2/rules_js-v2.6.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

  • chore: use local buildifier target for pre-commit by @jbedard in #2376
  • test: add node16 testing of fs patches by @jbedard in #2377
  • refactor: move AspectWatchProtocol to standalone library by @jbedard in #2374
  • refactor: ensure fs patch tests are run on real fs library by @jbedard in #2378
  • Changes by create-pull-request action by @github-actions[bot] in #2375
  • test: test fs patches via cjs and esm by @jbedard in #2380
  • refactor: improve fs typings by @jbedard in #2383
  • refactor: cleanup importers handling in _get_npm_imports by @dzbarsky in #2386
  • chore: add missing e2e tests to workflows ci by @jbedard in #2387
  • docs: emphasize use of js_library over npm_package by @jbedard in #2388

Full Changelog: v2.6.1...v2.6.2

v2.6.1

04 Oct 14:12

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.6.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 = "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 = "7da70d68dd7670be9a08623da0f267953ad9d629aa39fc29dfc63d97d49eff83",
    strip_prefix = "rules_js-2.6.1",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.6.1/rules_js-v2.6.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

  • Changes by create-pull-request action by @github-actions[bot] in #2355
  • Revert "chore(deps): update bazel" by @jbedard in #2358
  • Changes by create-pull-request action by @github-actions[bot] in #2362
  • chore: upgrade tools and tests to node >18 by @jbedard in #2334
  • fix: update pnpm_version_from to support packageManager fields with +sha512.<hash> by @walkerburgin in #2369
  • chore(ci): test Bazel 8 and 9 on BCR by @alexeagle in #2364
  • test: use rules_nodejs@HEAD for testing of more recent node versions by @jbedard in #2370

New Contributors

Full Changelog: v2.6.0...v2.6.1

v2.6.0

15 Sep 23:47
000e7ce

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.6.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 = "c5d2b7ff3f98dd042aba13f3496ee768259eb53a5b7ce8052c94c149f27d69bb",
    strip_prefix = "rules_js-2.6.0",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.6.0/rules_js-v2.6.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

  • chore: remove Bazel compat by @alexeagle in #2331
  • Changes by create-pull-request action by @github-actions[bot] in #2292
  • fix: duplicate package versions with vendored and external by @jbedard in #2332
  • test: add snapshot tests for circular deps, lifecycle hooks by @jbedard in #2299
  • chore: upgrade typescript to v5+ by @jbedard in #2335
  • fix(pnpm): don't print dumb warning by @alexeagle in #2338
  • chore(deps): update bazel-contrib/publish-to-bcr action to v1 by @renovate[bot] in #2342
  • Changes by create-pull-request action by @github-actions[bot] in #2341
  • feat: add pnpm_version_from by @alexeagle in #2349
  • chore(deps): update dependency bazelrc-preset.bzl to v1.3.0 by @renovate[bot] in #2284
  • chore(deps): update actions/checkout action to v5 by @renovate[bot] in #2351
  • chore(deps): update bazel by @renovate[bot] in #2318

Full Changelog: v2.5.0...v2.6.0

v2.5.0

24 Aug 05:51
c51b75e

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.5.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 = "17c5964f6a4507488c2ce99ebd493ee111da5d5cab85ca99119eaae331d38989",
    strip_prefix = "rules_js-2.5.0",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.5.0/rules_js-v2.5.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

  • feat: update c8 to latest by @Mivr in #2304
  • test: upgrade github.com/ash2k/bazel-tools to rules_multirun by @jbedard in #2307
  • chore: upgrade aspect_tools_telemetry to 0.2.5 by @jbedard in #2310
  • chore(deps): Bump tools_telemetry by @arrdem in #2312
  • feat: add action environment variables to RunEnvironmentInfo by @Mivr in #2303
  • js_image_layer allow configurable directory/file permissions by @justinswe in #2313
  • fix: don't use version 0.0.0 by @alexeagle in #2320
  • chore: update tools_telemetry to 0.2.8 by @jbedard in #2323
  • chore(deps): update actions/checkout action to v5 by @renovate[bot] in #2301
  • fix: indeterministic node-gyp makefile that is only used during install hook by @joeljeske in #2321
  • Update config.yaml by @alexeagle in #2324
  • fix(js_run_devserver): do not output run--watch EXIT errors by default by @jbedard in #2326

New Contributors

Full Changelog: v2.4.2...v2.5.0

v2.4.2

29 Jul 19:29
03bde54

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.4.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 = "b71565da7a811964e30cccb405544d551561e4b56c65f0c0aeabe85638920bd6",
    strip_prefix = "rules_js-2.4.2",
    url = "https://github.com/aspect-build/rules_js/releases/download/v2.4.2/rules_js-v2.4.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: do not output every js_run_devserver watch protocol error by @jbedard in #2287
  • fix: cleanup js_run_devserver watch protocol socket callbacks by @jbedard in #2288

Full Changelog: v2.4.1...v2.4.2