Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.19.0
24.20.0
16 changes: 8 additions & 8 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ use_repo(rules_ts_ext, "npm_typescript")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(
node_repositories = {
"24.19.0-darwin_arm64": ("node-v24.19.0-darwin-arm64.tar.gz", "node-v24.19.0-darwin-arm64", "8294b7aa9b03997481c06babf1e8b270c859358f27da57a11509afe537ac381d"),
"24.19.0-darwin_amd64": ("node-v24.19.0-darwin-x64.tar.gz", "node-v24.19.0-darwin-x64", "d1b5e999db158c62fe8f7267a4476b035d8bd93b1a605bac24a3f0dd166e3316"),
"24.19.0-linux_arm64": ("node-v24.19.0-linux-arm64.tar.xz", "node-v24.19.0-linux-arm64", "01443c1e1a29e531ccad5a46fefa6df490d2189c49f7955904aecdbb0fe86fdc"),
"24.19.0-linux_ppc64le": ("node-v24.19.0-linux-ppc64le.tar.xz", "node-v24.19.0-linux-ppc64le", "c510c6ce12f07010f771e6edb22a3fe23f4f2e6f40b1ffd4941aed0646a0d8b3"),
"24.19.0-linux_s390x": ("node-v24.19.0-linux-s390x.tar.xz", "node-v24.19.0-linux-s390x", "a4792e65962ffa0af42627aacf1122a60c3c88dbf4e4184f06820d66f9da8ba4"),
"24.19.0-linux_amd64": ("node-v24.19.0-linux-x64.tar.xz", "node-v24.19.0-linux-x64", "14b342e71204f811bde6153be8e04b62aef63c236fef92b55f9c83154b409647"),
"24.19.0-windows_amd64": ("node-v24.19.0-win-x64.zip", "node-v24.19.0-win-x64", "57f71ab3652e797d84acddc79c81cc9ff1c6ddb2a1974cdb83f00fee9bff4c73"),
"24.20.0-darwin_arm64": ("node-v24.20.0-darwin-arm64.tar.gz", "node-v24.20.0-darwin-arm64", "40e5607e5ecb3db9192723776da2d75d966260fc74a7a9e731c1bd67dda96bc8"),
"24.20.0-darwin_amd64": ("node-v24.20.0-darwin-x64.tar.gz", "node-v24.20.0-darwin-x64", "9e5b2644cf107befb6aefca676b96d3296bc10138096f022ed378d6233ed81f4"),
"24.20.0-linux_arm64": ("node-v24.20.0-linux-arm64.tar.xz", "node-v24.20.0-linux-arm64", "5f4ddab610c1ab2016b3c227cebdbf6d9495161487e4739c7b90090595f465f7"),
"24.20.0-linux_ppc64le": ("node-v24.20.0-linux-ppc64le.tar.xz", "node-v24.20.0-linux-ppc64le", "341307dcee20d88332307008f2a480450c54f42d5149e7c4c8a18d937e37b5c1"),
"24.20.0-linux_s390x": ("node-v24.20.0-linux-s390x.tar.xz", "node-v24.20.0-linux-s390x", "ca381121cb5a8d38c2954b6699cea09a83fba1b03141a71a8348f08df02de245"),
"24.20.0-linux_amd64": ("node-v24.20.0-linux-x64.tar.xz", "node-v24.20.0-linux-x64", "2f2c0da162318f0de47665410c7c8c2ed3d36c8f3105de4bbc61176c70a7cbf2"),
"24.20.0-windows_amd64": ("node-v24.20.0-win-x64.zip", "node-v24.20.0-win-x64", "6cac9ffbca8f6a47091e4b5c772e0606049c3871cb67d900c0cedde630e545ba"),
},
node_version = "24.19.0",
node_version = "24.20.0",
)
Comment on lines 54 to 65

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This node.toolchain configuration is duplicated across multiple MODULE.bazel files (this one, bazel/rules/rules_angular/MODULE.bazel, and bazel/rules/rules_browsers/MODULE.bazel). This duplication makes dependency updates like this one tedious and prone to errors.

To improve maintainability, consider extracting the Node.js version and repository information into a central .bzl file. This would centralize the configuration, making future updates much simpler.

For example, you could create a bazel/node_config.bzl file and then use it like this:

# In bazel/node_config.bzl
NODE_VERSION = "24.20.0"
NODE_REPOSITORIES = { ... } # The full dictionary of repositories

# In each MODULE.bazel
load("//bazel:node_config.bzl", "NODE_REPOSITORIES", "NODE_VERSION")

node.toolchain(
    node_repositories = NODE_REPOSITORIES,
    node_version = NODE_VERSION,
)

use_repo(node, "nodejs_toolchains")

Expand Down
16 changes: 8 additions & 8 deletions bazel/rules/rules_angular/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ use_repo(rules_ts_ext, npm_typescript = "rules_angular_npm_typescript")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(
node_repositories = {
"24.19.0-darwin_arm64": ("node-v24.19.0-darwin-arm64.tar.gz", "node-v24.19.0-darwin-arm64", "8294b7aa9b03997481c06babf1e8b270c859358f27da57a11509afe537ac381d"),
"24.19.0-darwin_amd64": ("node-v24.19.0-darwin-x64.tar.gz", "node-v24.19.0-darwin-x64", "d1b5e999db158c62fe8f7267a4476b035d8bd93b1a605bac24a3f0dd166e3316"),
"24.19.0-linux_arm64": ("node-v24.19.0-linux-arm64.tar.xz", "node-v24.19.0-linux-arm64", "01443c1e1a29e531ccad5a46fefa6df490d2189c49f7955904aecdbb0fe86fdc"),
"24.19.0-linux_ppc64le": ("node-v24.19.0-linux-ppc64le.tar.xz", "node-v24.19.0-linux-ppc64le", "c510c6ce12f07010f771e6edb22a3fe23f4f2e6f40b1ffd4941aed0646a0d8b3"),
"24.19.0-linux_s390x": ("node-v24.19.0-linux-s390x.tar.xz", "node-v24.19.0-linux-s390x", "a4792e65962ffa0af42627aacf1122a60c3c88dbf4e4184f06820d66f9da8ba4"),
"24.19.0-linux_amd64": ("node-v24.19.0-linux-x64.tar.xz", "node-v24.19.0-linux-x64", "14b342e71204f811bde6153be8e04b62aef63c236fef92b55f9c83154b409647"),
"24.19.0-windows_amd64": ("node-v24.19.0-win-x64.zip", "node-v24.19.0-win-x64", "57f71ab3652e797d84acddc79c81cc9ff1c6ddb2a1974cdb83f00fee9bff4c73"),
"24.20.0-darwin_arm64": ("node-v24.20.0-darwin-arm64.tar.gz", "node-v24.20.0-darwin-arm64", "40e5607e5ecb3db9192723776da2d75d966260fc74a7a9e731c1bd67dda96bc8"),
"24.20.0-darwin_amd64": ("node-v24.20.0-darwin-x64.tar.gz", "node-v24.20.0-darwin-x64", "9e5b2644cf107befb6aefca676b96d3296bc10138096f022ed378d6233ed81f4"),
"24.20.0-linux_arm64": ("node-v24.20.0-linux-arm64.tar.xz", "node-v24.20.0-linux-arm64", "5f4ddab610c1ab2016b3c227cebdbf6d9495161487e4739c7b90090595f465f7"),
"24.20.0-linux_ppc64le": ("node-v24.20.0-linux-ppc64le.tar.xz", "node-v24.20.0-linux-ppc64le", "341307dcee20d88332307008f2a480450c54f42d5149e7c4c8a18d937e37b5c1"),
"24.20.0-linux_s390x": ("node-v24.20.0-linux-s390x.tar.xz", "node-v24.20.0-linux-s390x", "ca381121cb5a8d38c2954b6699cea09a83fba1b03141a71a8348f08df02de245"),
"24.20.0-linux_amd64": ("node-v24.20.0-linux-x64.tar.xz", "node-v24.20.0-linux-x64", "2f2c0da162318f0de47665410c7c8c2ed3d36c8f3105de4bbc61176c70a7cbf2"),
"24.20.0-windows_amd64": ("node-v24.20.0-win-x64.zip", "node-v24.20.0-win-x64", "6cac9ffbca8f6a47091e4b5c772e0606049c3871cb67d900c0cedde630e545ba"),
},
node_version = "24.19.0",
node_version = "24.20.0",
)

pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
Expand Down
16 changes: 8 additions & 8 deletions bazel/rules/rules_browsers/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ bazel_dep(name = "rules_nodejs", version = "6.7.5")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(
node_repositories = {
"24.19.0-darwin_arm64": ("node-v24.19.0-darwin-arm64.tar.gz", "node-v24.19.0-darwin-arm64", "8294b7aa9b03997481c06babf1e8b270c859358f27da57a11509afe537ac381d"),
"24.19.0-darwin_amd64": ("node-v24.19.0-darwin-x64.tar.gz", "node-v24.19.0-darwin-x64", "d1b5e999db158c62fe8f7267a4476b035d8bd93b1a605bac24a3f0dd166e3316"),
"24.19.0-linux_arm64": ("node-v24.19.0-linux-arm64.tar.xz", "node-v24.19.0-linux-arm64", "01443c1e1a29e531ccad5a46fefa6df490d2189c49f7955904aecdbb0fe86fdc"),
"24.19.0-linux_ppc64le": ("node-v24.19.0-linux-ppc64le.tar.xz", "node-v24.19.0-linux-ppc64le", "c510c6ce12f07010f771e6edb22a3fe23f4f2e6f40b1ffd4941aed0646a0d8b3"),
"24.19.0-linux_s390x": ("node-v24.19.0-linux-s390x.tar.xz", "node-v24.19.0-linux-s390x", "a4792e65962ffa0af42627aacf1122a60c3c88dbf4e4184f06820d66f9da8ba4"),
"24.19.0-linux_amd64": ("node-v24.19.0-linux-x64.tar.xz", "node-v24.19.0-linux-x64", "14b342e71204f811bde6153be8e04b62aef63c236fef92b55f9c83154b409647"),
"24.19.0-windows_amd64": ("node-v24.19.0-win-x64.zip", "node-v24.19.0-win-x64", "57f71ab3652e797d84acddc79c81cc9ff1c6ddb2a1974cdb83f00fee9bff4c73"),
"24.20.0-darwin_arm64": ("node-v24.20.0-darwin-arm64.tar.gz", "node-v24.20.0-darwin-arm64", "40e5607e5ecb3db9192723776da2d75d966260fc74a7a9e731c1bd67dda96bc8"),
"24.20.0-darwin_amd64": ("node-v24.20.0-darwin-x64.tar.gz", "node-v24.20.0-darwin-x64", "9e5b2644cf107befb6aefca676b96d3296bc10138096f022ed378d6233ed81f4"),
"24.20.0-linux_arm64": ("node-v24.20.0-linux-arm64.tar.xz", "node-v24.20.0-linux-arm64", "5f4ddab610c1ab2016b3c227cebdbf6d9495161487e4739c7b90090595f465f7"),
"24.20.0-linux_ppc64le": ("node-v24.20.0-linux-ppc64le.tar.xz", "node-v24.20.0-linux-ppc64le", "341307dcee20d88332307008f2a480450c54f42d5149e7c4c8a18d937e37b5c1"),
"24.20.0-linux_s390x": ("node-v24.20.0-linux-s390x.tar.xz", "node-v24.20.0-linux-s390x", "ca381121cb5a8d38c2954b6699cea09a83fba1b03141a71a8348f08df02de245"),
"24.20.0-linux_amd64": ("node-v24.20.0-linux-x64.tar.xz", "node-v24.20.0-linux-x64", "2f2c0da162318f0de47665410c7c8c2ed3d36c8f3105de4bbc61176c70a7cbf2"),
"24.20.0-windows_amd64": ("node-v24.20.0-win-x64.zip", "node-v24.20.0-win-x64", "6cac9ffbca8f6a47091e4b5c772e0606049c3871cb67d900c0cedde630e545ba"),
},
node_version = "24.19.0",
node_version = "24.20.0",
)
use_repo(node, "nodejs_toolchains")

Expand Down