Skip to content

Commit 6f399cc

Browse files
committed
build: update dependency rules_nodejs to v6.6.0
See associated pull request for more information. Closes #31552 as a pr takeover
1 parent a31533c commit 6f399cc

File tree

3 files changed

+67
-644
lines changed

3 files changed

+67
-644
lines changed

BUILD.bazel

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,15 @@ validate_ts_version_matching(
108108
module_lock_file = "MODULE.bazel.lock",
109109
package_json = "package.json",
110110
)
111+
112+
# This is needed following https://github.com/bazel-contrib/rules_nodejs/pull/3859
113+
toolchain(
114+
name = "node22_windows_no_exec_config_toolchain",
115+
exec_compatible_with = [],
116+
target_compatible_with = [
117+
"@platforms//os:windows",
118+
"@platforms//cpu:x86_64",
119+
],
120+
toolchain = "@node22_windows_amd64//:toolchain",
121+
toolchain_type = "@rules_nodejs//nodejs:toolchain_type",
122+
)

MODULE.bazel

Lines changed: 35 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module(
55
)
66

77
bazel_dep(name = "yq.bzl", version = "0.3.1")
8-
bazel_dep(name = "rules_nodejs", version = "6.5.2")
8+
bazel_dep(name = "rules_nodejs", version = "6.6.0")
99
bazel_dep(name = "aspect_rules_js", version = "2.6.2")
1010
bazel_dep(name = "aspect_rules_ts", version = "3.7.0")
1111
bazel_dep(name = "rules_pkg", version = "0.8.1")
@@ -51,33 +51,17 @@ git_override(
5151
remote = "https://github.com/devversion/rules_browsers.git",
5252
)
5353

54-
# The below is needed until https://github.com/bazel-contrib/rules_nodejs/pull/3853 is merged and released.
55-
NODE_24_VERSION = "24.0.0"
56-
57-
NODE_24_REPO = {
58-
"24.0.0-darwin_arm64": ("node-v24.0.0-darwin-arm64.tar.gz", "node-v24.0.0-darwin-arm64", "194e2f3dd3ec8c2adcaa713ed40f44c5ca38467880e160974ceac1659be60121"),
59-
"24.0.0-darwin_amd64": ("node-v24.0.0-darwin-x64.tar.gz", "node-v24.0.0-darwin-x64", "f716b3ce14a7e37a6cbf97c9de10d444d7da07ef833cd8da81dd944d111e6a4a"),
60-
"24.0.0-linux_arm64": ("node-v24.0.0-linux-arm64.tar.xz", "node-v24.0.0-linux-arm64", "d40ec7ffe0b82b02dce94208c84351424099bd70fa3a42b65c46d95322305040"),
61-
"24.0.0-linux_ppc64le": ("node-v24.0.0-linux-ppc64le.tar.xz", "node-v24.0.0-linux-ppc64le", "cfa0e8d51a2f9a446f1bfb81cdf4c7e95336ad622e2aa230e3fa1d093c63d77d"),
62-
"24.0.0-linux_s390x": ("node-v24.0.0-linux-s390x.tar.xz", "node-v24.0.0-linux-s390x", "e37a04c7ee05416ec1234fd3255e05b6b81287eb0424a57441c8b69f0a155021"),
63-
"24.0.0-linux_amd64": ("node-v24.0.0-linux-x64.tar.xz", "node-v24.0.0-linux-x64", "59b8af617dccd7f9f68cc8451b2aee1e86d6bd5cb92cd51dd6216a31b707efd7"),
64-
"24.0.0-windows_amd64": ("node-v24.0.0-win-x64.zip", "node-v24.0.0-win-x64", "3d0fff80c87bb9a8d7f49f2f27832aa34a1477d137af46f5b14df5498be81304"),
65-
}
66-
6754
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
68-
node.toolchain(
69-
name = "nodejs",
70-
node_repositories = NODE_24_REPO,
71-
node_version = NODE_24_VERSION,
55+
node.toolchain(node_version = "24.0.0")
56+
use_repo(
57+
node,
58+
"nodejs_darwin_amd64",
59+
"nodejs_darwin_arm64",
60+
"nodejs_linux_amd64",
61+
"nodejs_linux_arm64",
62+
"nodejs_toolchains",
63+
"nodejs_windows_amd64",
7264
)
73-
use_repo(node, "nodejs_toolchains")
74-
use_repo(node, "nodejs_darwin_amd64")
75-
use_repo(node, "nodejs_darwin_arm64")
76-
use_repo(node, "nodejs_linux_amd64")
77-
use_repo(node, "nodejs_linux_arm64")
78-
use_repo(node, "nodejs_linux_ppc64le")
79-
use_repo(node, "nodejs_linux_s390x")
80-
use_repo(node, "nodejs_windows_amd64")
8165

8266
node_dev = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
8367

@@ -86,40 +70,42 @@ node_dev.toolchain(
8670
name = "node20",
8771
node_version = "20.19.0",
8872
)
89-
use_repo(node_dev, "node20_darwin_arm64")
90-
use_repo(node_dev, "node20_darwin_amd64")
91-
use_repo(node_dev, "node20_linux_amd64")
92-
use_repo(node_dev, "node20_linux_arm64")
93-
use_repo(node_dev, "node20_linux_s390x")
94-
use_repo(node_dev, "node20_linux_ppc64le")
95-
use_repo(node_dev, "node20_windows_amd64")
9673

9774
# Node.js 22
9875
node_dev.toolchain(
9976
name = "node22",
10077
node_version = "22.12.0",
10178
)
102-
use_repo(node_dev, "node22_darwin_arm64")
103-
use_repo(node_dev, "node22_darwin_amd64")
104-
use_repo(node_dev, "node22_linux_amd64")
105-
use_repo(node_dev, "node22_linux_arm64")
106-
use_repo(node_dev, "node22_linux_s390x")
107-
use_repo(node_dev, "node22_linux_ppc64le")
108-
use_repo(node_dev, "node22_windows_amd64")
10979

11080
# Node.js 24
11181
node_dev.toolchain(
11282
name = "node24",
113-
node_repositories = NODE_24_REPO,
114-
node_version = NODE_24_VERSION,
83+
node_version = "24.0.0",
11584
)
116-
use_repo(node_dev, "node24_darwin_arm64")
117-
use_repo(node_dev, "node24_darwin_amd64")
118-
use_repo(node_dev, "node24_linux_amd64")
119-
use_repo(node_dev, "node24_linux_arm64")
120-
use_repo(node_dev, "node24_linux_s390x")
121-
use_repo(node_dev, "node24_linux_ppc64le")
122-
use_repo(node_dev, "node24_windows_amd64")
85+
use_repo(
86+
node_dev,
87+
"node20_darwin_amd64",
88+
"node20_darwin_arm64",
89+
"node20_linux_amd64",
90+
"node20_linux_arm64",
91+
"node20_toolchains",
92+
"node20_windows_amd64",
93+
"node22_darwin_amd64",
94+
"node22_darwin_arm64",
95+
"node22_linux_amd64",
96+
"node22_linux_arm64",
97+
"node22_toolchains",
98+
"node22_windows_amd64",
99+
"node24_darwin_amd64",
100+
"node24_darwin_arm64",
101+
"node24_linux_amd64",
102+
"node24_linux_arm64",
103+
"node24_toolchains",
104+
"node24_windows_amd64",
105+
)
106+
107+
# This is needed following https://github.com/bazel-contrib/rules_nodejs/pull/3859
108+
register_toolchains("//:node22_windows_no_exec_config_toolchain")
123109

124110
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
125111
npm.npm_translate_lock(

0 commit comments

Comments
 (0)