Skip to content

Commit

Permalink
test: add node20 toolchain tests (#1500)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard authored Mar 13, 2024
1 parent 533e7fa commit b6269ed
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
11 changes: 11 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ node_dev = use_extension(
dev_dependency = True,
)
use_repo(node_dev, "nodejs_toolchains")
use_repo(node_dev, "node20_linux_amd64")
use_repo(node_dev, "node20_darwin_arm64")
use_repo(node_dev, "node20_darwin_amd64")
use_repo(node_dev, "node20_linux_arm64")
use_repo(node_dev, "node20_linux_s390x")
use_repo(node_dev, "node20_linux_ppc64le")
use_repo(node_dev, "node20_windows_amd64")
use_repo(node_dev, "node18_linux_amd64")
use_repo(node_dev, "node18_darwin_arm64")
use_repo(node_dev, "node18_darwin_amd64")
Expand All @@ -96,6 +103,10 @@ node_dev.toolchain(
name = "node18",
node_version = "18.13.0",
)
node_dev.toolchain(
name = "node20",
node_version = "20.11.1",
)

############################################
# npm dependencies used by examples
Expand Down
5 changes: 5 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ nodejs_register_toolchains(
node_version = "18.13.0",
)

nodejs_register_toolchains(
name = "node20",
node_version = "20.11.1",
)

load("@bazel_skylib//lib:unittest.bzl", "register_unittest_toolchains")

register_unittest_toolchains()
Expand Down
6 changes: 6 additions & 0 deletions js/private/test/node-patches/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ TESTS = [
TOOLCHAINS_NAMES = [
"node16",
"node18",
"node20",
]

TOOLCHAINS_VERSIONS = [
Expand All @@ -27,6 +28,11 @@ TOOLCHAINS_VERSIONS = [
"@bazel_tools//src/conditions:darwin": "@node18_darwin_amd64//:node_toolchain",
"@bazel_tools//src/conditions:windows": "@node18_windows_amd64//:node_toolchain",
}),
select({
"@bazel_tools//src/conditions:linux_x86_64": "@node20_linux_amd64//:node_toolchain",
"@bazel_tools//src/conditions:darwin": "@node20_darwin_amd64//:node_toolchain",
"@bazel_tools//src/conditions:windows": "@node20_windows_amd64//:node_toolchain",
}),
]

# We need to copy the entry points to the bin so that the tests below don't follow the execroot
Expand Down
6 changes: 6 additions & 0 deletions js/private/test/node-patches_legacy/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ TESTS = [
TOOLCHAINS_NAMES = [
"node16",
"node18",
"node20",
]

TOOLCHAINS_VERSIONS = [
Expand All @@ -27,6 +28,11 @@ TOOLCHAINS_VERSIONS = [
"@bazel_tools//src/conditions:darwin": "@node18_darwin_amd64//:node_toolchain",
"@bazel_tools//src/conditions:windows": "@node18_windows_amd64//:node_toolchain",
}),
select({
"@bazel_tools//src/conditions:linux_x86_64": "@node20_linux_amd64//:node_toolchain",
"@bazel_tools//src/conditions:darwin": "@node20_darwin_amd64//:node_toolchain",
"@bazel_tools//src/conditions:windows": "@node20_windows_amd64//:node_toolchain",
}),
]

# We need to copy the entry points to the bin so that the tests below don't follow the execroot
Expand Down

0 comments on commit b6269ed

Please sign in to comment.