keep-a-changelog
Version:
Node package to parse and generate changelogs following the [keepachangelog](https://keepachangelog.com/) format.
22 lines • 822 B
TypeScript
import type { Range, SemVer } from "./types.js";
/**
* Returns the lowest SemVer in the list that satisfies the range, or `undefined` if
* none of them do.
*
* @example Usage
* ```ts
* import { parse, parseRange, minSatisfying } from "@std/semver";
* import { assertEquals } from "@std/assert";
*
* const versions = ["0.2.0", "1.2.3", "1.3.0", "2.0.0", "2.1.0"].map(parse);
* const range = parseRange(">=1.0.0 <2.0.0");
*
* assertEquals(minSatisfying(versions, range), parse("1.2.3"));
* ```
*
* @param versions The versions to check.
* @param range The range of possible versions to compare to.
* @returns The lowest version in versions that satisfies the range.
*/
export declare function minSatisfying(versions: SemVer[], range: Range): SemVer | undefined;
//# sourceMappingURL=min_satisfying.d.ts.map