Skip to content

Add nodejs26#2085

Merged
loosebazooka merged 2 commits into
GoogleContainerTools:mainfrom
omBratteng:feat-node-26
May 13, 2026
Merged

Add nodejs26#2085
loosebazooka merged 2 commits into
GoogleContainerTools:mainfrom
omBratteng:feat-node-26

Conversation

@omBratteng
Copy link
Copy Markdown
Collaborator

Adds nodejs 26 support and adds libatomic1

Closes #2077 and #1981

@omBratteng omBratteng requested a review from loosebazooka May 13, 2026 07:41
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for Node.js 26 to Debian 13 distroless images, updating repository definitions, configuration files, and documentation. It also introduces libatomic1 as a dependency for Node.js 26 to support dynamic linking. Feedback recommends refactoring repository definitions to minimize duplication and ensuring the libatomic1 inclusion logic is forward-compatible for future versions.

Comment thread nodejs/nodejs.bzl Outdated
Comment on lines +192 to +230
node_archive(
name = "nodejs26_amd64",
sha256 = "62d555c329e05e3625109f2e3a8b5195b368d5ef38266292469d32f63cd98ffd",
strip_prefix = "node-v26.1.0-linux-x64/",
urls = ["https://nodejs.org/dist/v26.1.0/node-v26.1.0-linux-x64.tar.gz"],
version = "26.1.0",
architecture = "amd64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs26_arm64",
sha256 = "fcb4c339eef70c909cae72091008a6497278e2d0fcd221c0653068cf4ea4f0c7",
strip_prefix = "node-v26.1.0-linux-arm64/",
urls = ["https://nodejs.org/dist/v26.1.0/node-v26.1.0-linux-arm64.tar.gz"],
version = "26.1.0",
architecture = "arm64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs26_ppc64le",
sha256 = "f3ee72a29d3d25a626bae1672667a500b12c284fcfc00f5d6162e3762ebf173f",
strip_prefix = "node-v26.1.0-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v26.1.0/node-v26.1.0-linux-ppc64le.tar.gz"],
version = "26.1.0",
architecture = "ppc64le",
control = "//nodejs:control",
)

node_archive(
name = "nodejs26_s390x",
sha256 = "6e381e4a3b353f335d297abfe4c7d9485459247519df10445b17cc89d8c7f7a5",
strip_prefix = "node-v26.1.0-linux-s390x/",
urls = ["https://nodejs.org/dist/v26.1.0/node-v26.1.0-linux-s390x.tar.gz"],
version = "26.1.0",
architecture = "s390x",
control = "//nodejs:control",
)
Copy link
Copy Markdown
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 could define the version and architecture-specific details in a map and loop over it to generate these node_archive calls. This would make it easier to update in the future.

For example:

NODE26_VERSION = "26.1.0"
NODE26_ARCHS = {
    "amd64": ("x64", "62d555c329e05e3625109f2e3a8b5195b368d5ef38266292469d32f63cd98ffd"),
    "arm64": ("arm64", "fcb4c339eef70c909cae72091008a6497278e2d0fcd221c0653068cf4ea4f0c7"),
    "ppc64le": ("ppc64le", "f3ee72a29d3d25a626bae1672667a500b12c284fcfc00f5d6162e3762ebf173f"),
    "s390x": ("s390x", "6e381e4a3b353f335d297abfe4c7d9485459247519df10445b17cc89d8c7f7a5"),
}

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

While this would be a good improvement, it would be even better to apply this pattern to the definitions for Node.js 22 and 24 as well for consistency, which could be done in a follow-up change.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Comment thread nodejs/nodejs.bzl
tars = [
"@nodejs" + major_version + "_" + arch,
],
] + extra_tars,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we kind of moved away from this style, but I'll change it in a followup.

@loosebazooka loosebazooka merged commit 8599106 into GoogleContainerTools:main May 13, 2026
10 checks passed
@omBratteng omBratteng deleted the feat-node-26 branch May 13, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node 26

2 participants