fix(package): accept uppercase artifact digests

This commit is contained in:
Vincent Koc
2026-06-20 19:52:59 +02:00
parent b0df6dc10e
commit b3968f69c9
2 changed files with 14 additions and 1 deletions

View File

@@ -376,7 +376,7 @@ async function sha256(file) {
}
function assertSha256(value) {
if (!/^[a-f0-9]{64}$/u.test(value)) {
if (!/^[a-f0-9]{64}$/iu.test(value)) {
throw new Error(`package_sha256 must be a lowercase or uppercase 64-character SHA-256 digest`);
}
}
@@ -393,6 +393,8 @@ async function assertExpectedSha256(file, expected) {
return actual;
}
export const assertExpectedSha256ForTest = assertExpectedSha256;
async function findSingleTarball(dir) {
const root = path.resolve(ROOT_DIR, dir);
const pending = [root];