@@ -234,6 +234,12 @@ write_file(
234234 content = ["v16.5.0" ],
235235)
236236
237+ write_file (
238+ name = "write_node_version_24" ,
239+ out = "expected_node_24" ,
240+ content = ["v24.11.1" ],
241+ )
242+
237243# To see what nodejs version is used by default
238244my_nodejs (
239245 name = "run_no_toolchain" ,
@@ -312,3 +318,24 @@ diff_test(
312318 file1 = "write_node_version_15" ,
313319 file2 = "thing_toolchain_15" ,
314320)
321+
322+ my_nodejs (
323+ name = "run_24" ,
324+ out = "thing_toolchain_24" ,
325+ entry_point = "version.js" ,
326+ # using the select statement will download toolchains for all three platforms
327+ # you can also just provide an individual toolchain if you don't want to download them all
328+ toolchain = select ({
329+ "@bazel_tools//src/conditions:linux_x86_64" : "@node24_linux_amd64//:toolchain" ,
330+ "@bazel_tools//src/conditions:linux_aarch64" : "@node24_linux_arm64//:toolchain" ,
331+ "@bazel_tools//src/conditions:darwin_x86_64" : "@node24_darwin_amd64//:toolchain" ,
332+ "@bazel_tools//src/conditions:darwin_arm64" : "@node24_darwin_arm64//:toolchain" ,
333+ "@bazel_tools//src/conditions:windows" : "@node24_windows_amd64//:toolchain" ,
334+ }),
335+ )
336+
337+ diff_test (
338+ name = "test_node_version_24" ,
339+ file1 = "write_node_version_24" ,
340+ file2 = "thing_toolchain_24" ,
341+ )
0 commit comments