0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 21:48:32 +00:00
renovatebot_renovate/lib/config/presets/internal/helpers.ts
Victor Sollerhed d664fcae16
fix(presets): helpers:pinGitHubActionDigestsToSemver optional v versioning prefix (#27453)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-02-20 19:31:40 +00:00

45 lines
1.2 KiB
TypeScript

import type { Preset } from '../types';
/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */
export const presets: Record<string, Preset> = {
disableTypesNodeMajor: {
description: 'Disable `major` updates to `@types/node`.',
packageRules: [
{
enabled: false,
matchPackageNames: ['@types/node'],
matchUpdateTypes: ['major'],
},
],
},
followTypescriptNext: {
description: 'Keep `typescript` version in sync with the `next` tag.',
extends: [':followTag(typescript, next)'],
},
followTypescriptRc: {
description: 'Keep `typescript` version in sync with the `rc` tag.',
extends: [':followTag(typescript, rc)'],
},
pinGitHubActionDigests: {
description: 'Pin `github-action` digests.',
packageRules: [
{
matchDepTypes: ['action'],
pinDigests: true,
},
],
},
pinGitHubActionDigestsToSemver: {
description: 'Convert pinned GitHub Action digests to SemVer.',
packageRules: [
{
extends: ['helpers:pinGitHubActionDigests'],
extractVersion: '^(?<version>v\\d+\\.\\d+\\.\\d+)$',
versioning:
'regex:^v?(?<major>\\d+)(\\.(?<minor>\\d+)\\.(?<patch>\\d+))?$',
},
],
},
};