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
82 changes: 41 additions & 41 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/nodejs20.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: ["v20.19.4"]
expectedOutput: ["v20.19.5"]
2 changes: 1 addition & 1 deletion nodejs/testdata/nodejs22.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: ["v22.18.0"]
expectedOutput: ["v22.19.0"]
80 changes: 40 additions & 40 deletions private/extensions/node.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -99,100 +99,100 @@ def _node_impl(module_ctx):

node_archive(
name = "nodejs20_amd64",
sha256 = "d80a33707605ced9a31b8f543cea9ab512bc3d2fef2c148f31a50e939ff07560",
strip_prefix = "node-v20.19.4-linux-x64/",
urls = ["https://nodejs.org/dist/v20.19.4/node-v20.19.4-linux-x64.tar.gz"],
version = "20.19.4",
sha256 = "4eba5fbe1fb10753bc06e42f001a91c5cec16798b7764a3e9257adc59af47fe1",
strip_prefix = "node-v20.19.5-linux-x64/",
urls = ["https://nodejs.org/dist/v20.19.5/node-v20.19.5-linux-x64.tar.gz"],
version = "20.19.5",
architecture = "amd64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs20_arm64",
sha256 = "d200798332b7a56d355888ce58e6a639fac7939a4833e5bc8780c66888e1ce4d",
strip_prefix = "node-v20.19.4-linux-arm64/",
urls = ["https://nodejs.org/dist/v20.19.4/node-v20.19.4-linux-arm64.tar.gz"],
version = "20.19.4",
sha256 = "a08b513de673853ca16395ec461a104a99bf0e941ebb7baedb98b30cd221d8cc",
strip_prefix = "node-v20.19.5-linux-arm64/",
urls = ["https://nodejs.org/dist/v20.19.5/node-v20.19.5-linux-arm64.tar.gz"],
version = "20.19.5",
architecture = "arm64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs20_arm",
sha256 = "bdff86d5ff91214c6d6c421b42b35442daebcf42f85bbfb6643e7a950a093c3b",
strip_prefix = "node-v20.19.4-linux-armv7l/",
urls = ["https://nodejs.org/dist/v20.19.4/node-v20.19.4-linux-armv7l.tar.gz"],
version = "20.19.4",
sha256 = "3237e6c5c3a34bbb7db4f4f7c8c3618bd67452a8bee0b77abd6e791e527b366e",
strip_prefix = "node-v20.19.5-linux-armv7l/",
urls = ["https://nodejs.org/dist/v20.19.5/node-v20.19.5-linux-armv7l.tar.gz"],
version = "20.19.5",
architecture = "arm",
control = "//nodejs:control",
)

node_archive(
name = "nodejs20_ppc64le",
sha256 = "572e3a4cc5371680b763eddda3df45704e3478d3c2d3c774927186184fba3ac9",
strip_prefix = "node-v20.19.4-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v20.19.4/node-v20.19.4-linux-ppc64le.tar.gz"],
version = "20.19.4",
sha256 = "11be028464768c8704ba8b4fba6e1c0eb0cfbab1c12c9e6eda5fa51df60326cc",
strip_prefix = "node-v20.19.5-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v20.19.5/node-v20.19.5-linux-ppc64le.tar.gz"],
version = "20.19.5",
architecture = "ppc64le",
control = "//nodejs:control",
)

node_archive(
name = "nodejs20_s390x",
sha256 = "17a95c4591478bf3ccd8919ff74810feb46d320c73e90430ac8ef0fb724705ae",
strip_prefix = "node-v20.19.4-linux-s390x/",
urls = ["https://nodejs.org/dist/v20.19.4/node-v20.19.4-linux-s390x.tar.gz"],
version = "20.19.4",
sha256 = "a0e5a52c8ab552a0255520d60d3209d97913d6229d9bb05c56135be8f41ae79e",
strip_prefix = "node-v20.19.5-linux-s390x/",
urls = ["https://nodejs.org/dist/v20.19.5/node-v20.19.5-linux-s390x.tar.gz"],
version = "20.19.5",
architecture = "s390x",
control = "//nodejs:control",
)

node_archive(
name = "nodejs22_amd64",
sha256 = "a2e703725d8683be86bb5da967bf8272f4518bdaf10f21389e2b2c9eaeae8c8a",
strip_prefix = "node-v22.18.0-linux-x64/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-x64.tar.gz"],
version = "22.18.0",
sha256 = "d36e56998220085782c0ca965f9d51b7726335aed2f5fc7321c6c0ad233aa96d",
strip_prefix = "node-v22.19.0-linux-x64/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-x64.tar.gz"],
version = "22.19.0",
architecture = "amd64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs22_arm64",
sha256 = "d415eeea90a2fdb60c66dd386b258acbfc4d1fa4720a8df5dea7369fbdbcddee",
strip_prefix = "node-v22.18.0-linux-arm64/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-arm64.tar.gz"],
version = "22.18.0",
sha256 = "d32817b937219b8f131a28546035183d79e7fd17a86e38ccb8772901a7cd9009",
strip_prefix = "node-v22.19.0-linux-arm64/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-arm64.tar.gz"],
version = "22.19.0",
architecture = "arm64",
control = "//nodejs:control",
)

node_archive(
name = "nodejs22_arm",
sha256 = "57830914581dc3640e8d95378b76c6910860f42531959e4e88eb445e0cd982b0",
strip_prefix = "node-v22.18.0-linux-armv7l/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-armv7l.tar.gz"],
version = "22.18.0",
sha256 = "969037e6da2a710904d121dcb998510bc0d5d4d61d70ce5eb578096cf36c60e8",
strip_prefix = "node-v22.19.0-linux-armv7l/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-armv7l.tar.gz"],
version = "22.19.0",
architecture = "arm",
control = "//nodejs:control",
)

node_archive(
name = "nodejs22_ppc64le",
sha256 = "38f965cbaa5e730dbd3b1afe895cfdb86da96371474827d05d847d338a0c9c97",
strip_prefix = "node-v22.18.0-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-ppc64le.tar.gz"],
version = "22.18.0",
sha256 = "b18b05265c5586e0a7797831ed747eeac7300fd2c495b8b5276596823b076e12",
strip_prefix = "node-v22.19.0-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-ppc64le.tar.gz"],
version = "22.19.0",
architecture = "ppc64le",
control = "//nodejs:control",
)

node_archive(
name = "nodejs22_s390x",
sha256 = "f3578b0e7cdf247045f6eeb766febd74942954352161102cb6040a4d4c3b4c3c",
strip_prefix = "node-v22.18.0-linux-s390x/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-s390x.tar.gz"],
version = "22.18.0",
sha256 = "d434665268adf0670a36676f5f3f46aaf5e13aad3fc81dac87119e871745bf22",
strip_prefix = "node-v22.19.0-linux-s390x/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-s390x.tar.gz"],
version = "22.19.0",
architecture = "s390x",
control = "//nodejs:control",
)
Comment on lines 150 to 198
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The definitions for Node.js version 22 archives are very repetitive. You can refactor this block to use a loop over a data structure, which would make it more concise and easier to maintain. This would also reduce the chance of errors when updating versions in the future.

Suggested change
node_archive(
name = "nodejs22_amd64",
sha256 = "a2e703725d8683be86bb5da967bf8272f4518bdaf10f21389e2b2c9eaeae8c8a",
strip_prefix = "node-v22.18.0-linux-x64/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-x64.tar.gz"],
version = "22.18.0",
sha256 = "d36e56998220085782c0ca965f9d51b7726335aed2f5fc7321c6c0ad233aa96d",
strip_prefix = "node-v22.19.0-linux-x64/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-x64.tar.gz"],
version = "22.19.0",
architecture = "amd64",
control = "//nodejs:control",
)
node_archive(
name = "nodejs22_arm64",
sha256 = "d415eeea90a2fdb60c66dd386b258acbfc4d1fa4720a8df5dea7369fbdbcddee",
strip_prefix = "node-v22.18.0-linux-arm64/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-arm64.tar.gz"],
version = "22.18.0",
sha256 = "d32817b937219b8f131a28546035183d79e7fd17a86e38ccb8772901a7cd9009",
strip_prefix = "node-v22.19.0-linux-arm64/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-arm64.tar.gz"],
version = "22.19.0",
architecture = "arm64",
control = "//nodejs:control",
)
node_archive(
name = "nodejs22_arm",
sha256 = "57830914581dc3640e8d95378b76c6910860f42531959e4e88eb445e0cd982b0",
strip_prefix = "node-v22.18.0-linux-armv7l/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-armv7l.tar.gz"],
version = "22.18.0",
sha256 = "969037e6da2a710904d121dcb998510bc0d5d4d61d70ce5eb578096cf36c60e8",
strip_prefix = "node-v22.19.0-linux-armv7l/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-armv7l.tar.gz"],
version = "22.19.0",
architecture = "arm",
control = "//nodejs:control",
)
node_archive(
name = "nodejs22_ppc64le",
sha256 = "38f965cbaa5e730dbd3b1afe895cfdb86da96371474827d05d847d338a0c9c97",
strip_prefix = "node-v22.18.0-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-ppc64le.tar.gz"],
version = "22.18.0",
sha256 = "b18b05265c5586e0a7797831ed747eeac7300fd2c495b8b5276596823b076e12",
strip_prefix = "node-v22.19.0-linux-ppc64le/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-ppc64le.tar.gz"],
version = "22.19.0",
architecture = "ppc64le",
control = "//nodejs:control",
)
node_archive(
name = "nodejs22_s390x",
sha256 = "f3578b0e7cdf247045f6eeb766febd74942954352161102cb6040a4d4c3b4c3c",
strip_prefix = "node-v22.18.0-linux-s390x/",
urls = ["https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-s390x.tar.gz"],
version = "22.18.0",
sha256 = "d434665268adf0670a36676f5f3f46aaf5e13aad3fc81dac87119e871745bf22",
strip_prefix = "node-v22.19.0-linux-s390x/",
urls = ["https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-s390x.tar.gz"],
version = "22.19.0",
architecture = "s390x",
control = "//nodejs:control",
)
_NODE22_VERSION = "22.19.0"
_NODE22_ARCH_INFO = {
"amd64": ("x64", "d36e56998220085782c0ca965f9d51b7726335aed2f5fc7321c6c0ad233aa96d"),
"arm64": ("arm64", "d32817b937219b8f131a28546035183d79e7fd17a86e38ccb8772901a7cd9009"),
"arm": ("armv7l", "969037e6da2a710904d121dcb998510bc0d5d4d61d70ce5eb578096cf36c60e8"),
"ppc64le": ("ppc64le", "b18b05265c5586e0a7797831ed747eeac7300fd2c495b8b5276596823b076e12"),
"s390x": ("s390x", "d434665268adf0670a36676f5f3f46aaf5e13aad3fc81dac87119e871745bf22"),
}
for arch, (suffix, sha) in _NODE22_ARCH_INFO.items():
node_archive(
name = "nodejs22_" + arch,
sha256 = sha,
strip_prefix = "node-v{v}-linux-{s}/".format(v=_NODE22_VERSION, s=suffix),
urls = ["https://nodejs.org/dist/v{v}/node-v{v}-linux-{s}.tar.gz".format(v=_NODE22_VERSION, s=suffix)],
version = _NODE22_VERSION,
architecture = arch,
control = "//nodejs:control",
)

Expand Down
Loading