Skip to content

Commit 751e677

Browse files
committed
feat: upgrade to Node.js 20.18.0 for modern dependency compatibility
- Update Node.js from 18.20.8 to 20.18.0 to satisfy dependencies requiring Node >= 20 - Add Node.js 20.18.0 checksums for all platforms to checksums registry - Update MODULE.bazel and extensions.bzl to use Node.js 20.18.0 by default - Update both JSON and embedded registry data for consistency - Resolves '[email protected] requires node >= 20' and similar dependency issues This addresses npm EBADENGINE warnings from modern packages that have dropped support for Node.js 18.x. The hermetic Node.js 20.18.0 build is working, but npm subprocess PATH issues remain to be fixed.
1 parent 67c08f0 commit 751e677

File tree

5 files changed

+131
-26
lines changed

5 files changed

+131
-26
lines changed

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ bazel_dep(name = "rules_nodejs", version = "6.5.0")
161161

162162
# Configure Node.js version and tools
163163
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
164-
node.toolchain(node_version = "18.20.8")
164+
node.toolchain(node_version = "20.18.0")
165165
use_repo(node, "nodejs_toolchains")
166166

167167
# JavaScript/TypeScript WebAssembly components with JCO
168168
jco = use_extension("//wasm:extensions.bzl", "jco")
169169
jco.register(
170170
name = "jco",
171-
node_version = "18.19.0",
171+
node_version = "20.18.0",
172172
version = "1.4.0",
173173
)
174174
use_repo(jco, "jco_toolchain")

MODULE.bazel.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

checksums/registry.bzl

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def _get_fallback_checksums(tool_name):
328328
"nodejs": {
329329
"tool_name": "nodejs",
330330
"github_repo": "nodejs/node",
331-
"latest_version": "18.19.0",
331+
"latest_version": "20.18.0",
332332
"build_type": "download",
333333
"versions": {
334334
"18.19.0": {
@@ -366,6 +366,76 @@ def _get_fallback_checksums(tool_name):
366366
},
367367
},
368368
},
369+
"18.20.8": {
370+
"release_date": "2024-09-03",
371+
"platforms": {
372+
"darwin_amd64": {
373+
"sha256": "ed2554677188f4afc0d050ecd8bd56effb2572d6518f8da6d40321ede6698509",
374+
"url_suffix": "darwin-x64.tar.gz",
375+
"binary_path": "node-v{}-darwin-x64/bin/node",
376+
"npm_path": "node-v{}-darwin-x64/bin/npm",
377+
},
378+
"darwin_arm64": {
379+
"sha256": "bae4965d29d29bd32f96364eefbe3bca576a03e917ddbb70b9330d75f2cacd76",
380+
"url_suffix": "darwin-arm64.tar.gz",
381+
"binary_path": "node-v{}-darwin-arm64/bin/node",
382+
"npm_path": "node-v{}-darwin-arm64/bin/npm",
383+
},
384+
"linux_amd64": {
385+
"sha256": "27a9f3f14d5e99ad05a07ed3524ba3ee92f8ff8b6db5ff80b00f9feb5ec8097a",
386+
"url_suffix": "linux-x64.tar.gz",
387+
"binary_path": "node-v{}-linux-x64/bin/node",
388+
"npm_path": "node-v{}-linux-x64/bin/npm",
389+
},
390+
"linux_arm64": {
391+
"sha256": "2e3dfc51154e6fea9fc86a90c4ea8f3ecb8b60acaf7367c4b76691da192571c1",
392+
"url_suffix": "linux-arm64.tar.gz",
393+
"binary_path": "node-v{}-linux-arm64/bin/node",
394+
"npm_path": "node-v{}-linux-arm64/bin/npm",
395+
},
396+
"windows_amd64": {
397+
"sha256": "1a1e40260a6facba83636e4cd0ba01eb5bd1386896824b36645afba44857384a",
398+
"url_suffix": "win-x64.zip",
399+
"binary_path": "node-v{}-win-x64/node.exe",
400+
"npm_path": "node-v{}-win-x64/npm.cmd",
401+
},
402+
},
403+
},
404+
"20.18.0": {
405+
"release_date": "2024-10-03",
406+
"platforms": {
407+
"darwin_amd64": {
408+
"sha256": "c02aa7560612a4e2cc359fd89fae7aedde370c06db621f2040a4a9f830a125dc",
409+
"url_suffix": "darwin-x64.tar.gz",
410+
"binary_path": "node-v{}-darwin-x64/bin/node",
411+
"npm_path": "node-v{}-darwin-x64/bin/npm",
412+
},
413+
"darwin_arm64": {
414+
"sha256": "92e180624259d082562592bb12548037c6a417069be29e452ec5d158d657b4be",
415+
"url_suffix": "darwin-arm64.tar.gz",
416+
"binary_path": "node-v{}-darwin-arm64/bin/node",
417+
"npm_path": "node-v{}-darwin-arm64/bin/npm",
418+
},
419+
"linux_amd64": {
420+
"sha256": "24a5d58a1d4c2903478f4b7c3cfd2eeb5cea2cae3baee11a4dc6a1fed25fec6c",
421+
"url_suffix": "linux-x64.tar.gz",
422+
"binary_path": "node-v{}-linux-x64/bin/node",
423+
"npm_path": "node-v{}-linux-x64/bin/npm",
424+
},
425+
"linux_arm64": {
426+
"sha256": "38bccb35c06ee4edbcd00c77976e3fad1d69d2e57c3c0c363d1700a2a2493278",
427+
"url_suffix": "linux-arm64.tar.gz",
428+
"binary_path": "node-v{}-linux-arm64/bin/node",
429+
"npm_path": "node-v{}-linux-arm64/bin/npm",
430+
},
431+
"windows_amd64": {
432+
"sha256": "f5cea43414cc33024bbe5867f208d1c9c915d6a38e92abeee07ed9e563662297",
433+
"url_suffix": "win-x64.zip",
434+
"binary_path": "node-v{}-win-x64/node.exe",
435+
"npm_path": "node-v{}-win-x64/npm.cmd",
436+
},
437+
},
438+
},
369439
},
370440
},
371441
"wizer": {

checksums/tools/nodejs.json

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"tool_name": "nodejs",
33
"github_repo": "nodejs/node",
4-
"latest_version": "18.20.8",
4+
"latest_version": "20.18.0",
55
"last_checked": "2025-08-17T10:30:00Z",
66
"note": "Node.js runtime for hermetic jco toolchain installation",
77
"versions": {
@@ -74,6 +74,41 @@
7474
"npm_path": "node-v{}-win-x64/npm.cmd"
7575
}
7676
}
77+
},
78+
"20.18.0": {
79+
"release_date": "2024-10-03",
80+
"platforms": {
81+
"darwin_amd64": {
82+
"sha256": "c02aa7560612a4e2cc359fd89fae7aedde370c06db621f2040a4a9f830a125dc",
83+
"url_suffix": "darwin-x64.tar.gz",
84+
"binary_path": "node-v{}-darwin-x64/bin/node",
85+
"npm_path": "node-v{}-darwin-x64/bin/npm"
86+
},
87+
"darwin_arm64": {
88+
"sha256": "92e180624259d082562592bb12548037c6a417069be29e452ec5d158d657b4be",
89+
"url_suffix": "darwin-arm64.tar.gz",
90+
"binary_path": "node-v{}-darwin-arm64/bin/node",
91+
"npm_path": "node-v{}-darwin-arm64/bin/npm"
92+
},
93+
"linux_amd64": {
94+
"sha256": "24a5d58a1d4c2903478f4b7c3cfd2eeb5cea2cae3baee11a4dc6a1fed25fec6c",
95+
"url_suffix": "linux-x64.tar.gz",
96+
"binary_path": "node-v{}-linux-x64/bin/node",
97+
"npm_path": "node-v{}-linux-x64/bin/npm"
98+
},
99+
"linux_arm64": {
100+
"sha256": "38bccb35c06ee4edbcd00c77976e3fad1d69d2e57c3c0c363d1700a2a2493278",
101+
"url_suffix": "linux-arm64.tar.gz",
102+
"binary_path": "node-v{}-linux-arm64/bin/node",
103+
"npm_path": "node-v{}-linux-arm64/bin/npm"
104+
},
105+
"windows_amd64": {
106+
"sha256": "f5cea43414cc33024bbe5867f208d1c9c915d6a38e92abeee07ed9e563662297",
107+
"url_suffix": "win-x64.zip",
108+
"binary_path": "node-v{}-win-x64/node.exe",
109+
"npm_path": "node-v{}-win-x64/npm.cmd"
110+
}
111+
}
77112
}
78113
}
79114
}

wasm/extensions.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,15 @@ def _jco_extension_impl(module_ctx):
240240
jco_toolchain_repository(
241241
name = name + "_toolchain",
242242
version = registration.version,
243-
node_version = getattr(registration, "node_version", "18.20.8"),
243+
node_version = getattr(registration, "node_version", "20.18.0"),
244244
)
245245

246246
# If no registrations, create default toolchain
247247
if not registrations:
248248
jco_toolchain_repository(
249249
name = "jco_toolchain",
250250
version = "1.4.0",
251-
node_version = "18.20.8",
251+
node_version = "20.18.0",
252252
)
253253

254254
# Module extension for jco (JavaScript Component Tools)
@@ -267,7 +267,7 @@ jco = module_extension(
267267
),
268268
"node_version": attr.string(
269269
doc = "Node.js version for hermetic strategy",
270-
default = "18.20.8",
270+
default = "20.18.0",
271271
),
272272
},
273273
),

0 commit comments

Comments
 (0)