2020-06-25 04:32:41 -04:00
|
|
|
load("@npm//@bazel/typescript:index.bzl", "ts_library")
|
2020-07-24 11:47:30 -04:00
|
|
|
load("//tools:defaults.bzl", "jasmine_node_test")
|
2020-05-15 11:21:01 -04:00
|
|
|
|
|
|
|
ts_library(
|
|
|
|
name = "merge",
|
2020-07-24 11:47:30 -04:00
|
|
|
srcs = glob(
|
|
|
|
["**/*.ts"],
|
|
|
|
exclude = ["**/*.spec.ts"],
|
|
|
|
),
|
2020-05-15 11:21:01 -04:00
|
|
|
module_name = "@angular/dev-infra-private/pr/merge",
|
2020-10-01 19:06:56 -04:00
|
|
|
# prodmode target must be set to es5 as the Ora class, which is extended is not a proper
|
|
|
|
# prototyped object.
|
|
|
|
prodmode_target = "es5",
|
2020-05-15 11:21:01 -04:00
|
|
|
visibility = ["//dev-infra:__subpackages__"],
|
|
|
|
deps = [
|
|
|
|
"//dev-infra/commit-message",
|
2020-09-09 08:42:34 -04:00
|
|
|
"//dev-infra/release/config",
|
|
|
|
"//dev-infra/release/versioning",
|
2020-05-15 11:21:01 -04:00
|
|
|
"//dev-infra/utils",
|
|
|
|
"@npm//@octokit/rest",
|
|
|
|
"@npm//@types/inquirer",
|
|
|
|
"@npm//@types/node",
|
2020-07-24 11:47:30 -04:00
|
|
|
"@npm//@types/node-fetch",
|
2020-05-20 06:50:18 -04:00
|
|
|
"@npm//@types/semver",
|
2020-05-15 11:21:01 -04:00
|
|
|
"@npm//@types/yargs",
|
|
|
|
"@npm//chalk",
|
|
|
|
],
|
|
|
|
)
|
2020-07-24 11:47:30 -04:00
|
|
|
|
|
|
|
ts_library(
|
|
|
|
name = "test_lib",
|
|
|
|
testonly = True,
|
|
|
|
srcs = glob(["**/*.spec.ts"]),
|
|
|
|
deps = [
|
|
|
|
":merge",
|
2020-09-09 08:42:34 -04:00
|
|
|
"//dev-infra/release/config",
|
|
|
|
"//dev-infra/release/versioning",
|
2020-07-24 11:47:30 -04:00
|
|
|
"//dev-infra/utils",
|
|
|
|
"@npm//@types/jasmine",
|
|
|
|
"@npm//@types/node",
|
|
|
|
"@npm//@types/node-fetch",
|
|
|
|
"@npm//nock",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
jasmine_node_test(
|
|
|
|
name = "test",
|
|
|
|
# Disable the Bazel patched module resolution. It always loads ".mjs" files first. This
|
|
|
|
# breaks NodeJS execution for "node-fetch" as it uses experimental modules which are not
|
|
|
|
# enabled in NodeJS. TODO: Remove this with rules_nodejs 3.x where patching is optional.
|
|
|
|
# https://github.com/bazelbuild/rules_nodejs/commit/7d070ffadf9c3b41711382a4737b995f987c14fa.
|
|
|
|
args = ["--nobazel_patch_module_resolver"],
|
|
|
|
deps = [
|
|
|
|
":test_lib",
|
|
|
|
"@npm//node-fetch",
|
|
|
|
"@npm//semver",
|
|
|
|
],
|
|
|
|
)
|