Files
renovate/lib/modules/versioning/ubuntu/common.ts
T
renovate[bot] a561b74314 chore(deps): update dependency @biomejs/biome to v2.4.11 (main) (#42034)
* chore(deps): update dependency @biomejs/biome to v2.4.11

| datasource | package        | from  | to     |
| ---------- | -------------- | ----- | ------ |
| npm        | @biomejs/biome | 2.4.6 | 2.4.11 |

* fixup linter changes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2026-04-20 21:45:46 +00:00

41 lines
938 B
TypeScript

import { regEx } from '../../../util/regex.ts';
const regex = regEx(/^(?<codename>\w+)-(?<date>\d{8})(?<suffix>\.\d{1,2})?$/);
function isDatedCodeName(input: string): boolean {
return regex.test(input);
}
function getDatedContainerImageCodename(version: string): null | string {
const groups = regex.exec(version);
if (!groups?.groups) {
return null;
}
return groups.groups.codename;
}
function getDatedContainerImageVersion(version: string): null | number {
const groups = regex.exec(version);
if (!groups?.groups) {
return null;
}
return parseInt(groups.groups.date, 10);
}
function getDatedContainerImageSuffix(version: string): null | string {
const groups = regex.exec(version);
if (!groups?.groups?.suffix) {
return null;
}
return groups.groups.suffix;
}
export {
getDatedContainerImageCodename,
getDatedContainerImageSuffix,
getDatedContainerImageVersion,
isDatedCodeName,
};