Skip to content

Commit 37d3664

Browse files
alan-agius4alxhub
authored andcommitted
build: run //packages/common/http/test on Node.js 18 (#50247)
This commits adds configures `//packages/common/http/test` to use Node.js 18 toolchain which is needed to test the fetch implementation which use Node.js 18 APIs. We also disable RBE for this target as it doesn't work with Node.js 18 right now. See angular/dev-infra#1017 PR Close #50247
1 parent 9648fc4 commit 37d3664

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

WORKSPACE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ nodejs_register_toolchains(
6767
node_version = "16.14.0",
6868
)
6969

70+
nodejs_register_toolchains(
71+
name = "node18",
72+
node_version = "18.10.0",
73+
)
74+
7075
# Download npm dependencies.
7176
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
7277
load("//integration:npm_package_archives.bzl", "npm_package_archives")

packages/common/http/test/BUILD.bazel

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ ts_library(
2929
jasmine_node_test(
3030
name = "test",
3131
bootstrap = ["//tools/testing:node"],
32+
tags = [
33+
# Remote execution doesn't work with Node.js 18 right now.
34+
# See https://github.com/angular/dev-infra/issues/1017
35+
"no-remote-exec",
36+
],
37+
# TODO remove once the Node 18 is the default toolchain.
38+
toolchain = select({
39+
"@bazel_tools//src/conditions:linux_x86_64": "@node18_linux_amd64//:node_toolchain",
40+
"@bazel_tools//src/conditions:darwin": "@node18_darwin_amd64//:node_toolchain",
41+
"@bazel_tools//src/conditions:windows": "@node18_windows_amd64//:node_toolchain",
42+
}),
3243
deps = [
3344
":test_lib",
3445
],

0 commit comments

Comments
 (0)