Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nodejs/testdata/nodejs24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ commandTests:
- name: nodejs
command: "/nodejs/bin/node"
args: ["--version"]
expectedOutput: ["v24.11.0"]
expectedOutput: ["v24.11.1"]
32 changes: 16 additions & 16 deletions private/extensions/node.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -199,40 +199,40 @@ def _node_impl(module_ctx):

node_archive(
name = "nodejs24_amd64",
sha256 = "b3c071cdf47aab867c3b2aa287257df12ec5d7c962bf922b32fd33226c4295fd",
strip_prefix = "node-v24.11.0-linux-x64/",
urls = ["https://nodejs.org/dist/v24.11.0/node-v24.11.0-linux-x64.tar.gz"],
version = "24.11.0",
sha256 = "58a5ff5cc8f2200e458bea22e329d5c1994aa1b111d499ca46ec2411d58239ca",
strip_prefix = "node-v24.11.1-linux-x64/",
urls = ["https://nodejs.org/dist/v24.11.1/node-v24.11.1-linux-x64.tar.gz"],
version = "24.11.1",
architecture = "amd64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs24_arm64",
sha256 = "4786d00c4d259d3ff0b2328307f764ef3ced65f2d6e9502d433e68d66238509d",
strip_prefix = "node-v24.11.0-linux-arm64/",
urls = ["https://nodejs.org/dist/v24.11.0/node-v24.11.0-linux-arm64.tar.gz"],
version = "24.11.0",
sha256 = "0dc93ec5c798b0d347f068db6d205d03dea9a71765e6a53922b682b91265d71f",
strip_prefix = "node-v24.11.1-linux-arm64/",
urls = ["https://nodejs.org/dist/v24.11.1/node-v24.11.1-linux-arm64.tar.gz"],
version = "24.11.1",
architecture = "arm64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs24_ppc64le",
sha256 = "7e7ba4326fe8588f11e763c55217bcf45f5e0b7bcbf1e26bbbbb2225a9ae4721",
strip_prefix = "node-v24.11.0-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v24.11.0/node-v24.11.0-linux-ppc64le.tar.gz"],
version = "24.11.0",
sha256 = "cd41407f3352de2f066ea26c5c5d0ea9b6362374d6b618385a9f2e9dad220616",
strip_prefix = "node-v24.11.1-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v24.11.1/node-v24.11.1-linux-ppc64le.tar.gz"],
version = "24.11.1",
architecture = "ppc64le",
control = "//nodejs:control",
)

node_archive(
name = "nodejs24_s390x",
sha256 = "7af0d92e74b07a2b8e91089ee4fccc7b5433fd8b63259bced3a34668998cbdf7",
strip_prefix = "node-v24.11.0-linux-s390x/",
urls = ["https://nodejs.org/dist/v24.11.0/node-v24.11.0-linux-s390x.tar.gz"],
version = "24.11.0",
sha256 = "5d4c8bca5f8f2593f9081dee39834760e85a16fa61c950f3e86ec85996f00550",
strip_prefix = "node-v24.11.1-linux-s390x/",
urls = ["https://nodejs.org/dist/v24.11.1/node-v24.11.1-linux-s390x.tar.gz"],
version = "24.11.1",
architecture = "s390x",
control = "//nodejs:control",
)
Comment on lines 200 to 238
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and reduce code duplication, you can define the version and architecture-specific data in a dictionary and use a loop to generate the node_archive calls. This will make future version bumps for Node.js 24 easier and less error-prone.

    _NODE24_VERSION = "24.11.1"
    _NODE24_ARCHS = {
        "amd64": ("x64", "58a5ff5cc8f2200e458bea22e329d5c1994aa1b111d499ca46ec2411d58239ca"),
        "arm64": ("arm64", "0dc93ec5c798b0d347f068db6d205d03dea9a71765e6a53922b682b91265d71f"),
        "ppc64le": ("ppc64le", "cd41407f3352de2f066ea26c5c5d0ea9b6362374d6b618385a9f2e9dad220616"),
        "s390x": ("s390x", "5d4c8bca5f8f2593f9081dee39834760e85a16fa61c950f3e86ec85996f00550"),
    }

    for _arch, (_suffix, _sha) in _NODE24_ARCHS.items():
        node_archive(
            name = "nodejs24_" + _arch,
            sha256 = _sha,
            strip_prefix = "node-v{version}-linux-{suffix}/".format(version = _NODE24_VERSION, suffix = _suffix),
            urls = ["https://nodejs.org/dist/v{version}/node-v{version}-linux-{suffix}.tar.gz".format(version = _NODE24_VERSION, suffix = _suffix)],
            version = _NODE24_VERSION,
            architecture = _arch,
            control = "//nodejs:control",
        )

Expand Down
Loading