-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add nodejs26 #2085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nodejs26 #2085
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| schemaVersion: "2.0.0" | ||
| commandTests: | ||
| - name: nodejs | ||
| command: "/nodejs/bin/node" | ||
| args: ["--version"] | ||
| expectedOutput: ["v26.1.0"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,6 +189,46 @@ def _node_impl(module_ctx): | |
| control = "//nodejs:control", | ||
| ) | ||
|
|
||
| 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", | ||
| ) | ||
|
Comment on lines
+192
to
+230
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 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. |
||
|
|
||
| return module_ctx.extension_metadata( | ||
| root_module_direct_deps = [ | ||
| "nodejs22_amd64", | ||
|
|
@@ -200,6 +240,10 @@ def _node_impl(module_ctx): | |
| "nodejs24_arm64", | ||
| "nodejs24_ppc64le", | ||
| "nodejs24_s390x", | ||
| "nodejs26_amd64", | ||
| "nodejs26_arm64", | ||
| "nodejs26_ppc64le", | ||
| "nodejs26_s390x", | ||
| ], | ||
| root_module_direct_dev_deps = [], | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,3 +35,5 @@ packages: | |
| - libgcc-s1 | ||
| - libgomp1 | ||
| - libstdc++6 | ||
| # node26 | ||
| - libatomic1 | ||
There was a problem hiding this comment.
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.