Skip to content

Commit 36434c4

Browse files
committed
bzlmod: allow custom node_repositories definitions
1 parent ea47e8d commit 36434c4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: nodejs/extensions.bzl

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"extensions for bzlmod"
22

3+
load("//nodejs/private:node_versions.bzl", "NODE_VERSIONS")
34
load(
45
":repositories.bzl",
56
"DEFAULT_NODE_REPOSITORY",
@@ -47,6 +48,7 @@ def _toolchain_extension(module_ctx):
4748
nodejs_register_toolchains(
4849
name = k,
4950
node_version = v.node_version,
51+
node_repositories = v.node_versions,
5052
node_version_from_nvmrc = v.node_version_from_nvmrc,
5153
node_urls = v.node_urls,
5254
include_headers = v.include_headers,
@@ -62,6 +64,10 @@ _ATTRS = {
6264
doc = "Version of the Node.js interpreter",
6365
default = DEFAULT_NODE_VERSION,
6466
),
67+
"node_versions": attr.string_list_dict(
68+
doc = "Overrides to the default list of Node.js versions to download.",
69+
default = NODE_VERSIONS,
70+
),
6571
"node_version_from_nvmrc": attr.label(
6672
allow_single_file = True,
6773
doc = """The .nvmrc file containing the version of Node.js to use.

0 commit comments

Comments
 (0)