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.8.0"]
expectedOutput: ["v24.9.0"]
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 = "daf68404b478b4c3616666580d02500a24148c0f439e4d0134d65ce70e90e655",
strip_prefix = "node-v24.8.0-linux-x64/",
urls = ["https://nodejs.org/dist/v24.8.0/node-v24.8.0-linux-x64.tar.gz"],
version = "24.8.0",
sha256 = "d57d6c28a35785f58f33899a0aa0bfc83f7a8ef4448b6cf3f7d0961efc7b9189",
strip_prefix = "node-v24.9.0-linux-x64/",
urls = ["https://nodejs.org/dist/v24.9.0/node-v24.9.0-linux-x64.tar.gz"],
version = "24.9.0",
architecture = "amd64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs24_arm64",
sha256 = "5eb16b14af5a5f494ed54770822144e847c744fe590f8df093ad4927cf3dd7fd",
strip_prefix = "node-v24.8.0-linux-arm64/",
urls = ["https://nodejs.org/dist/v24.8.0/node-v24.8.0-linux-arm64.tar.gz"],
version = "24.8.0",
sha256 = "dab232a90169737a48149149dd6707e7fdcbaefbaa94b4871047a38e93db947f",
strip_prefix = "node-v24.9.0-linux-arm64/",
urls = ["https://nodejs.org/dist/v24.9.0/node-v24.9.0-linux-arm64.tar.gz"],
version = "24.9.0",
architecture = "arm64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs24_ppc64le",
sha256 = "20a0856e7b152a5e83b4fd6fe3d509aa54b75d6170cd89066c341d56f6c5de76",
strip_prefix = "node-v24.8.0-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v24.8.0/node-v24.8.0-linux-ppc64le.tar.gz"],
version = "24.8.0",
sha256 = "557d4e3f779f5af4fc29944647e6afd76901c5be7bc0c2bd8785a199a1bc0271",
strip_prefix = "node-v24.9.0-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v24.9.0/node-v24.9.0-linux-ppc64le.tar.gz"],
version = "24.9.0",
architecture = "ppc64le",
control = "//nodejs:control",
)

node_archive(
name = "nodejs24_s390x",
sha256 = "708d4edfafca2218fa98e0e8b8c20dc148334f2f882fcea1237c6536e8586d06",
strip_prefix = "node-v24.8.0-linux-s390x/",
urls = ["https://nodejs.org/dist/v24.8.0/node-v24.8.0-linux-s390x.tar.gz"],
version = "24.8.0",
sha256 = "9baab2eb6b8d9efd2e3533ac79b572e697510f6582fdb572ba636c4d7b01d2b1",
strip_prefix = "node-v24.9.0-linux-s390x/",
urls = ["https://nodejs.org/dist/v24.9.0/node-v24.9.0-linux-s390x.tar.gz"],
version = "24.9.0",
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 duplication, consider refactoring this block to define the version and architecture-specific data in a structure, and then loop over it to generate the node_archive repositories. This will make future version updates much simpler and less prone to copy-paste errors. A similar refactoring could be applied to the definitions for Node.js 20 and 22.

    NODE24_VERSION = "24.9.0"
    NODE24_ARCHS = {
        "amd64": ("linux-x64", "d57d6c28a35785f58f33899a0aa0bfc83f7a8ef4448b6cf3f7d0961efc7b9189"),
        "arm64": ("linux-arm64", "dab232a90169737a48149149dd6707e7fdcbaefbaa94b4871047a38e93db947f"),
        "ppc64le": ("linux-ppc64le", "557d4e3f779f5af4fc29944647e6afd76901c5be7bc0c2bd8785a199a1bc0271"),
        "s390x": ("linux-s390x", "9baab2eb6b8d9efd2e3533ac79b572e697510f6582fdb572ba636c4d7b01d2b1"),
    }

    for arch, (platform, sha256) in NODE24_ARCHS.items():
        node_archive(
            name = "nodejs24_" + arch,
            sha256 = sha256,
            strip_prefix = "node-v{version}-{platform}/".format(version = NODE24_VERSION, platform = platform),
            urls = ["https://nodejs.org/dist/v{version}/node-v{version}-{platform}.tar.gz".format(version = NODE24_VERSION, platform = platform)],
            version = NODE24_VERSION,
            architecture = arch,
            control = "//nodejs:control",
        )

Expand Down
Loading