mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-27 05:09:37 +00:00
c3958c9bd6
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com> Co-authored-by: Rhys Arkins <rhys@arkins.net> Co-authored-by: Michael Kriese <michael.kriese@visualon.de> Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Aleksandr Mezin <mezin.alexander@gmail.com> Co-authored-by: Jasmin Müller <9011011+jazzlyn@users.noreply.github.com>
31 lines
832 B
TypeScript
31 lines
832 B
TypeScript
import type { ReleaseResult } from '..';
|
|
import type { PackageDescription } from './types';
|
|
|
|
/**
|
|
* Checks if two release metadata objects match.
|
|
*
|
|
* @param lhs - The first release result.
|
|
* @param rhs - The second release result.
|
|
* @returns True if the metadata matches, otherwise false.
|
|
*/
|
|
export function releaseMetaInformationMatches(
|
|
lhs: ReleaseResult,
|
|
rhs: ReleaseResult,
|
|
): boolean {
|
|
return lhs.homepage === rhs.homepage;
|
|
}
|
|
|
|
/**
|
|
* Formats the package description into a ReleaseResult.
|
|
*
|
|
* @param packagesDesc - list of package description objects.
|
|
* @returns A formatted ReleaseResult.
|
|
*/
|
|
export function formatReleaseResult(
|
|
packagesDesc: PackageDescription[],
|
|
): ReleaseResult {
|
|
return {
|
|
releases: packagesDesc.map((p) => ({ version: p.Version! })),
|
|
homepage: packagesDesc[0]?.Homepage,
|
|
};
|
|
}
|