| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
| local_repository( | |
| name = "rules_nodejs", | |
| path = "../..", | |
| ) | |
| load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains") | |
| # The order matters because Bazel will provide the first registered toolchain when a rule asks Bazel to select it | |
| # This applies to the resolved_toolchain | |
| nodejs_register_toolchains(node_version = "16.5.0") | |
| nodejs_register_toolchains( | |
| name = "node17", | |
| node_version = "17.9.1", | |
| ) | |
| nodejs_register_toolchains( | |
| name = "node15", | |
| node_urls = [ | |
| "https://nodejs.org/dist/v{version}/{filename}", | |
| "https://mirrors.dotsrc.org/nodejs/release/v{version}/{filename}", | |
| ], | |
| node_version = "15.14.0", | |
| ) | |
| nodejs_register_toolchains( | |
| name = "node24", | |
| node_version = "24.12.0", | |
| ) | |
| http_archive( | |
| name = "npm_acorn-8.5.0", | |
| build_file_content = """load("@bazel_lib//lib:copy_directory.bzl", "copy_directory") | |
| # Turn a source directory into a TreeArtifact for RBE-compat | |
| copy_directory( | |
| name = "npm_acorn-8.5.0", | |
| src = "package", | |
| # We must give this as the directory in order for it to appear on NODE_PATH | |
| out = "acorn", | |
| visibility = ["//visibility:public"], | |
| )""", | |
| sha256 = "d8f9d40c4656537a60bf0c6daae6f0553f54df5ff2518f86464b7c785f20376b", | |
| urls = ["https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz"], | |
| ) | |
| http_archive( | |
| name = "bazel_lib", | |
| sha256 = "46960e9fa6c9352d883768280951ac388dba8cb9ff0256182fb77925eae2b6ac", | |
| strip_prefix = "bazel-lib-3.0.0-beta.1", | |
| url = "https://github.com/bazel-contrib/bazel-lib/releases/download/v3.0.0-beta.1/bazel-lib-v3.0.0-beta.1.tar.gz", | |
| ) | |
| load("@bazel_lib//lib:repositories.bzl", "bazel_lib_dependencies", "bazel_lib_register_toolchains") | |
| bazel_lib_dependencies() | |
| bazel_lib_register_toolchains() |