Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
build: run //packages/common/http/test on Node.js 18
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
  • Loading branch information
alan-agius4 authored and JeanMeche committed Jun 6, 2023
commit a2ff05bc91869299dd0018a003f80e79da77a290
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