Bump NodeJS version to 20.9.0 This brings in support for NodeJS 20.9.0 in the same way as done by Gerrit core change I610f0063fa70f36ead170d3bc85cc9f1928f924c. We are using rules_nodejs 5.8 release line that stopped becoming NodeJS version updates. Patch `private/node_versions.bzl` from rules_nodejs in place to consume new NodeJS versions. As pointed out in this feature request: [1], currently used rules_nodesjs 5.x release line will not become any new updates. The way forward is to migrate to rules_nodejs 6.x or to rules_js. [1] https://github.com/bazelbuild/rules_nodejs/issues/3703 Change-Id: Iee1b3d6fe60592369ea656cdefb700959f879f62 Release-Notes: skip
diff --git a/gerrit_polymer.bzl b/gerrit_polymer.bzl index f2bb143..e5c608c 100644 --- a/gerrit_polymer.bzl +++ b/gerrit_polymer.bzl
@@ -2,6 +2,14 @@ def gerrit_polymer(): http_archive( + name = "rules_nodejs", + patch_args = ["-p1"], + patches = ["@com_googlesource_gerrit_bazlets//tools:rules_nodejs-5.8.4-node_versions.bzl.patch"], + sha256 = "8fc8e300cb67b89ceebd5b8ba6896ff273c84f6099fc88d23f24e7102319d8fd", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.4/rules_nodejs-core-5.8.4.tar.gz"], + ) + + http_archive( name = "build_bazel_rules_nodejs", sha256 = "94070eff79305be05b7699207fbac5d2608054dd53e6109f7d00d923919ff45a", urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.2/rules_nodejs-5.8.2.tar.gz"],
diff --git a/tools/rules_nodejs-5.8.4-node_versions.bzl.patch b/tools/rules_nodejs-5.8.4-node_versions.bzl.patch new file mode 100644 index 0000000..7df62d6 --- /dev/null +++ b/tools/rules_nodejs-5.8.4-node_versions.bzl.patch
@@ -0,0 +1,17 @@ +diff --git a/nodejs/private/node_versions.bzl b/nodejs/private/node_versions.bzl +index bbb45b26..8758b3cc 100644 +--- a/nodejs/private/node_versions.bzl ++++ b/nodejs/private/node_versions.bzl +@@ -2311,4 +2311,12 @@ NODE_VERSIONS = { + "18.17.0-linux_s390x": ("node-v18.17.0-linux-s390x.tar.xz", "node-v18.17.0-linux-s390x", "876ca54c246d24e346d0c740fbb72c9fb7353369127f20492bc923ee6d0121db"), + "18.17.0-linux_amd64": ("node-v18.17.0-linux-x64.tar.xz", "node-v18.17.0-linux-x64", "f36facda28c4d5ce76b3a1b4344e688d29d9254943a47f2f1909b1a10acb1959"), + "18.17.0-windows_amd64": ("node-v18.17.0-win-x64.zip", "node-v18.17.0-win-x64", "06e30b4e70b18d794651ef132c39080e5eaaa1187f938721d57edae2824f4e96"), ++ # 20.9.0 ++ "20.9.0-darwin_arm64": ("node-v20.9.0-darwin-arm64.tar.gz", "node-v20.9.0-darwin-arm64", "31d2d46ae8d8a3982f54e2ff1e60c2e4a8e80bf78a3e8b46dcaac95ac5d7ce6a"), ++ "20.9.0-darwin_amd64": ("node-v20.9.0-darwin-x64.tar.gz", "node-v20.9.0-darwin-x64", "fc5b73f2a78c17bbe926cdb1447d652f9f094c79582f1be6471b4b38a2e1ccc8"), ++ "20.9.0-linux_arm64": ("node-v20.9.0-linux-arm64.tar.xz", "node-v20.9.0-linux-arm64", "ced3ecece4b7c3a664bca3d9e34a0e3b9a31078525283a6fdb7ea2de8ca5683b"), ++ "20.9.0-linux_ppc64le": ("node-v20.9.0-linux-ppc64le.tar.xz", "node-v20.9.0-linux-ppc64le", "3c6cea5d614cfbb95d92de43fbc2f8ecd66e431502fe5efc4f3c02637897bd45"), ++ "20.9.0-linux_s390x": ("node-v20.9.0-linux-s390x.tar.xz", "node-v20.9.0-linux-s390x", "af1f4e63756ff685d452166c4d5ba93a308e816ee7c46015b5e086163d9f011b"), ++ "20.9.0-linux_amd64": ("node-v20.9.0-linux-x64.tar.xz", "node-v20.9.0-linux-x64", "9033989810bf86220ae46b1381bdcdc6c83a0294869ba2ad39e1061f1e69217a"), ++ "20.9.0-windows_amd64": ("node-v20.9.0-win-x64.zip", "node-v20.9.0-win-x64", "70d87dad2378c63216ff83d5a754c61d2886fc39d32ce0d2ea6de763a22d3780"), + }