add lowest-direct to getResolutionStrategy

This commit is contained in:
Ramona T 2026-03-26 18:33:10 -04:00 committed by GitHub
parent 5c62c59261
commit 83519d7ee3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -240,8 +240,11 @@ function getManifestFile(): string | undefined {
return undefined; return undefined;
} }
function getResolutionStrategy(): "highest" | "lowest" { function getResolutionStrategy(): "highest" | "lowest" | "lowest-direct" {
const resolutionStrategyInput = core.getInput("resolution-strategy"); const resolutionStrategyInput = core.getInput("resolution-strategy");
if (resolutionStrategyInput === "lowest-direct") {
return "lowest-direct";
}
if (resolutionStrategyInput === "lowest") { if (resolutionStrategyInput === "lowest") {
return "lowest"; return "lowest";
} }
@ -249,6 +252,6 @@ function getResolutionStrategy(): "highest" | "lowest" {
return "highest"; return "highest";
} }
throw new Error( throw new Error(
`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest' or 'lowest'.`, `Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest', 'lowest', or 'lowest-direct'.`,
); );
} }