Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add node20 toolchain tests #1500

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading