kibana/WORKSPACE.bazel
Jon 53f5c7377c
Upgrade Node.js to 22.16.0 (#205983)
https://nodejs.org/en/blog/announcements/v22-release-announce
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md

Closes https://github.com/elastic/kibana/issues/198790

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Eyo Okon Eyo <eyo.eyo@elastic.co>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2025-06-18 08:55:18 -05:00

65 lines
3 KiB
Text

# Define the workspace base name and a managed directory by bazel
# that will hold the node_modules called @npm
workspace(
name = "kibana",
managed_directories = {"@npm": ["node_modules"]},
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch Node.js rules
http_archive(
name = "build_bazel_rules_nodejs",
patch_args = ["-p1"],
patches = ["//:src/dev/bazel/rules_nodejs_patches/normalized_paths_for_windows_runfiles.patch"],
sha256 = "6f15d75f9e99c19d9291ff8e64e4eb594a6b7d25517760a75ad3621a7a48c2df",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.7.0/rules_nodejs-4.7.0.tar.gz"],
)
# Now that we have the rules let's import from them to complete the work
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
# Setup the Node.js toolchain for the architectures we want to support
node_repositories(
node_repositories = {
"22.16.0-darwin_amd64": ("node-v22.16.0-darwin-x64.tar.gz", "node-v22.16.0-darwin-x64", "838d400f7e66c804e5d11e2ecb61d6e9e878611146baff69d6a2def3cc23f4ac"),
"22.16.0-darwin_arm64": ("node-v22.16.0-darwin-arm64.tar.gz", "node-v22.16.0-darwin-arm64", "1d7f34ec4c03e12d8b33481e5c4560432d7dc31a0ef3ff5a4d9a8ada7cf6ecc9"),
"22.16.0-linux_arm64": ("node-v22.16.0-linux-arm64.tar.xz", "node-v22.16.0-linux-arm64", "073eb4febbed18267a5ba60be6ff1bca2eee7e4d5a42e2aae654fcb1589a13d6"),
"22.16.0-linux_amd64": ("node-v22.16.0-linux-x64.tar.xz", "node-v22.16.0-linux-x64", "f3050672ef884765055b8d8f7c5a1cd0dfb4ffa07e03703a924d698bc9a223b3"),
"22.16.0-windows_amd64": ("node-v22.16.0-win-x64.zip", "node-v22.16.0-win-x64", "21c2d9735c80b8f86dab19305aa6a9f6f59bbc808f68de3eef09d5832e3bfbbd"),
},
node_version = "22.16.0",
node_urls = [
"https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-glibc-217/dist/v{version}/{filename}",
],
yarn_repositories = {
"1.22.21": ("yarn-v1.22.21.tar.gz", "yarn-v1.22.21", "a55bb4e85405f5dfd6e7154a444e7e33ad305d7ca858bad8546e932a6688df08"),
},
yarn_version = "1.22.21",
yarn_urls = [
"https://github.com/yarnpkg/yarn/releases/download/v{version}/{filename}",
],
)
# Run yarn_install rule to take care of dependencies
#
# NOTE: FORCE_COLOR env var forces colors on non tty mode
yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
data = [
"//:.yarnrc",
"//:preinstall_check.js",
],
exports_directories_only = True,
symlink_node_modules = True,
quiet = False,
frozen_lockfile = False,
environment = {
"GECKODRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"CHROMEDRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"CHROMEDRIVER_CDNBINARIESURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"CYPRESS_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/cypress",
}
)