We are struggling to integrate Renovate and rules_nodejs properly: Since rules_nodejs always lags a bit behind in node versions, we get a lot of very noisy updates (that fail, because rules_nodejs doesn't recognize the version yet).
Our plan is to automatically update the Renovate configuration (via bazel write_source_files rules) to include appropriate configuration (we do a similar thing with the pnpm version for rules_js).
However, since the supported Node versions are not exported, we cannot do this.
I'd like to propose the following (happy to do the implementation work, just wanted to check in first):
Refactor NODE_VERSIONS from Map[String, String] to Map[String, Map[String, String]] (version -> platform -> repository info).
Expose the keys of that dictionary as KNOWN_NODE_VERSIONS (in //nodejs:repositories.bzl).
What is the current behavior?
The list of versions that is supported is private.
https://github.com/bazelbuild/rules_nodejs/blob/6f9c4ad26b4558712a8d921c76a3038311b1594f/nodejs/private/node_versions.bzl#L6
Also, it is somewhat unstructured, as can be seen by how
DEFAULT_NODE_VERSION
is calculated:https://github.com/bazelbuild/rules_nodejs/blob/6f9c4ad26b4558712a8d921c76a3038311b1594f/nodejs/repositories.bzl#L19-L24
Describe the feature
We are struggling to integrate Renovate and
rules_nodejs
properly: Sincerules_nodejs
always lags a bit behind in node versions, we get a lot of very noisy updates (that fail, becauserules_nodejs
doesn't recognize the version yet).Our plan is to automatically update the Renovate configuration (via bazel
write_source_files
rules) to include appropriate configuration (we do a similar thing with thepnpm
version forrules_js
).However, since the supported Node versions are not exported, we cannot do this.
I'd like to propose the following (happy to do the implementation work, just wanted to check in first):
NODE_VERSIONS
fromMap[String, String]
toMap[String, Map[String, String]]
(version -> platform -> repository info).KNOWN_NODE_VERSIONS
(in//nodejs:repositories.bzl
).