Skip to content

Commit

Permalink
build: run //packages/common/http/test on Node.js 18 (#50247)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alan-agius4 authored and alxhub committed Jun 8, 2023
1 parent 9648fc4 commit 37d3664
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ nodejs_register_toolchains(
node_version = "16.14.0",
)

nodejs_register_toolchains(
name = "node18",
node_version = "18.10.0",
)

# Download npm dependencies.
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
load("//integration:npm_package_archives.bzl", "npm_package_archives")
Expand Down
11 changes: 11 additions & 0 deletions packages/common/http/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ ts_library(
jasmine_node_test(
name = "test",
bootstrap = ["//tools/testing:node"],
tags = [
# Remote execution doesn't work with Node.js 18 right now.
# See https://github.com/angular/dev-infra/issues/1017
"no-remote-exec",
],
# TODO remove once the Node 18 is the default toolchain.
toolchain = select({
"@bazel_tools//src/conditions:linux_x86_64": "@node18_linux_amd64//:node_toolchain",
"@bazel_tools//src/conditions:darwin": "@node18_darwin_amd64//:node_toolchain",
"@bazel_tools//src/conditions:windows": "@node18_windows_amd64//:node_toolchain",
}),
deps = [
":test_lib",
],
Expand Down

0 comments on commit 37d3664

Please sign in to comment.