renovate/lib/modules/manager/ansible-galaxy/util.ts
Rhys Arkins 143c9a6751 refactor: rename lookupName -> packageName (#14494)
Renames `lookupName` to be `packageName`.

BREAKING CHANGE: Use `packageName` instead of `lookupName` if interacting with Renovate datasources directly.
2022-03-04 09:04:02 +01:00

12 lines
536 B
TypeScript

import { regEx } from '../../../util/regex';
export const newBlockRegEx = /^\s*-\s*((\w+):\s*(.*))$/;
export const blockLineRegEx = /^\s*((\w+):\s*(.*))$/;
export const galaxyDepRegex = /[\w-]+\.[\w-]+/;
export const dependencyRegex = /^dependencies:/;
export const galaxyRegEx = regEx(
/^\s+(?<packageName>[\w.]+):\s*["'](?<version>.+)["']\s*/
);
export const nameMatchRegex = regEx(
/(?<source>((git\+)?(?:(git|ssh|https?):\/\/)?(.*@)?(?<hostname>[\w.-]+)(?:(:\d+)?\/|:))(?<depName>[\w./-]+)(?:\.git)?)(,(?<version>[\w.]*))?/
);