Skip to content

Commit 70ef6bc

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 70ef6bc

File tree

6 files changed

+59
-682
lines changed

6 files changed

+59
-682
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ jobs:
115115
pnpm bazel build \
116116
--config=e2e \
117117
//tests/legacy-cli:e2e.npm_node22 \
118-
//tests/legacy-cli:e2e.esbuild_node22 \
119-
--platforms=tools:windows_x64
118+
//tests/legacy-cli:e2e.esbuild_node22
120119
- name: Store built Windows E2E tests
121120
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
122121
with:

.github/workflows/pr.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ jobs:
140140
run: |
141141
pnpm bazel build \
142142
--config=e2e \
143-
//tests/legacy-cli:e2e.esbuild_node22 \
144-
--platforms=tools:windows_x64
143+
//tests/legacy-cli:e2e.esbuild_node22
145144
- name: Store built Windows E2E tests
146145
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
147146
with:

MODULE.bazel

Lines changed: 34 additions & 60 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,75 +51,49 @@ 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")
55+
node.toolchain(node_version = "24.0.0")
6856
node.toolchain(
69-
name = "nodejs",
70-
node_repositories = NODE_24_REPO,
71-
node_version = NODE_24_VERSION,
72-
)
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")
81-
82-
node_dev = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
83-
84-
# Node.js 20
85-
node_dev.toolchain(
8657
name = "node20",
8758
node_version = "20.19.0",
8859
)
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")
96-
97-
# Node.js 22
98-
node_dev.toolchain(
60+
node.toolchain(
9961
name = "node22",
10062
node_version = "22.12.0",
10163
)
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")
109-
110-
# Node.js 24
111-
node_dev.toolchain(
64+
node.toolchain(
11265
name = "node24",
113-
node_repositories = NODE_24_REPO,
114-
node_version = NODE_24_VERSION,
66+
node_version = "24.0.0",
67+
)
68+
69+
# FIXME(6.0): a repo rule with name=foo should create a repo named @foo, not @foo_toolchains
70+
use_repo(
71+
node,
72+
"node20_darwin_amd64",
73+
"node20_darwin_arm64",
74+
"node20_linux_amd64",
75+
"node20_linux_arm64",
76+
"node20_toolchains",
77+
"node20_windows_amd64",
78+
"node22_darwin_amd64",
79+
"node22_darwin_arm64",
80+
"node22_linux_amd64",
81+
"node22_linux_arm64",
82+
"node22_toolchains",
83+
"node22_windows_amd64",
84+
"node24_darwin_amd64",
85+
"node24_darwin_arm64",
86+
"node24_linux_amd64",
87+
"node24_linux_arm64",
88+
"node24_toolchains",
89+
"node24_windows_amd64",
90+
"nodejs_darwin_amd64",
91+
"nodejs_darwin_arm64",
92+
"nodejs_linux_amd64",
93+
"nodejs_linux_arm64",
94+
"nodejs_toolchains",
95+
"nodejs_windows_amd64",
11596
)
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")
12397

12498
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
12599
npm.npm_translate_lock(

0 commit comments

Comments
 (0)