0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/config/presets/internal/monorepos.ts
Rhys Arkins 879f7cc212 feat(packageRules): migrate matchers and excludes (#28602)
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-07-25 15:28:16 +02:00

27 lines
759 B
TypeScript

import monorepoGroups from '../../../data/monorepo.json';
import { toArray } from '../../../util/array';
import type { Preset } from '../types';
export const presets: Record<string, Preset> = {};
for (const [name, value] of Object.entries(monorepoGroups.repoGroups)) {
presets[name] = {
description: `${name} monorepo`,
matchSourceUrls: toArray(value),
};
}
for (const [name, value] of Object.entries(monorepoGroups.orgGroups)) {
presets[name] = {
description: `${name} monorepo`,
matchSourceUrls: toArray(value).map((url: string) => `${url}**`),
};
}
for (const [name, value] of Object.entries(monorepoGroups.patternGroups)) {
presets[name] = {
description: `${name} monorepo`,
matchPackageNames: toArray(value),
};
}