-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathMODULE.bazel
76 lines (69 loc) · 2.36 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
module(
name = "chrome_ssh_agent",
)
bazel_dep(name = "rules_go", version = "0.52.0")
bazel_dep(name = "gazelle", version = "0.41.0")
bazel_dep(name = "rules_nodejs", version = "6.3.3")
bazel_dep(name = "aspect_rules_js", version = "2.1.2")
bazel_dep(name = "aspect_rules_ts", version = "3.4.0")
bazel_dep(name = "aspect_rules_esbuild", version = "0.21.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_proto", version = "7.1.0")
# Explicitly manage Go version.
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(
name = "go_sdk",
# Use semver-coerced to handle versions where patches are left off (e.g., 1.19).
version = "1.23.5", # renovate: datasource=golang-version depName=golang versioning=semver-coerced
)
go_sdk.nogo(
nogo = "//:chrome_ssh_agent_nogo",
includes = [
"//:__subpackages__",
],
)
use_repo(go_sdk, "go_sdk")
# Pull in Go dependencies
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
# Direct dependencies only
"com_github_google_go_cmp",
"com_github_chromedp_chromedp",
"com_github_chromedp_cdproto",
"com_github_youmark_pkcs8",
"org_golang_x_crypto",
"org_golang_x_tools",
"com_github_norunners_vert",
)
# Pull in NPM dependencies
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
npm.npm_translate_lock(
name = "npm",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")
# Allow pnpm to be used in scripts. Example:
# bazel run -- @pnpm
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
use_repo(pnpm, "pnpm")
# Pull in typescript dependencies
rules_ts_ext = use_extension(
"@aspect_rules_ts//ts:extensions.bzl",
"ext",
dev_dependency = True,
)
rules_ts_ext.deps(
# Keep typescript version in sync with package.json
ts_version_from = "@npm//:typescript/resolved.json",
)
use_repo(rules_ts_ext, "npm_typescript")
# Pull in Chrome for use in tests
chrome = use_extension("//build_defs/chrome:extension.bzl", "chrome")
chrome.download(
version = "134.0.6966.0", # renovate: datasource=custom.chrome-for-testing depName=chrome versioning=loose
)
use_repo(chrome, "chrome_chrome_linux64")