renovate
Version:
Automated dependency updates. Flexible so you don't need to be.
126 lines (125 loc) • 4.83 kB
JavaScript
//#region lib/config/presets/internal/helpers.preset.ts
const presets = {
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)"]
},
forgejoDigestChangelogs: {
description: "Ensure that every dependency pinned by digest and sourced from Forgejo contains a link to the commit-to-commit diff",
packageRules: [{
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
matchDatasources: ["forgejo-releases", "forgejo-tags"],
matchUpdateTypes: ["digest"]
}, {
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
matchDatasources: ["git-refs", "git-tags"],
matchJsonata: ["$detectPlatform(sourceUrl) = 'forgejo'"],
matchUpdateTypes: ["digest"]
}]
},
giteaDigestChangelogs: {
description: "Ensure that every dependency pinned by digest and sourced from Gitea contains a link to the commit-to-commit diff",
packageRules: [{
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
matchDatasources: ["gitea-releases", "gitea-tags"],
matchUpdateTypes: ["digest"]
}, {
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
matchDatasources: ["git-refs", "git-tags"],
matchJsonata: ["$detectPlatform(sourceUrl) = 'gitea'"],
matchUpdateTypes: ["digest"]
}]
},
githubDigestChangelogs: {
description: "Ensure that every dependency pinned by digest and sourced from GitHub.com and Github enterprise contains a link to the commit-to-commit diff",
packageRules: [{
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
matchDatasources: [
"github-digest",
"github-releases",
"github-tags"
],
matchUpdateTypes: ["digest"]
}, {
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
matchDatasources: ["git-refs", "git-tags"],
matchJsonata: ["$detectPlatform(sourceUrl) = 'github'"],
matchUpdateTypes: ["digest"]
}]
},
gitlabDigestChangelogs: {
description: "Ensure that every dependency pinned by digest and sourced from GitLab.com contains a link to the commit-to-commit diff",
packageRules: [{
changelogUrl: "{{sourceUrl}}/-/compare/{{currentDigest}}...{{newDigest}}",
matchDatasources: ["git-refs", "git-tags"],
matchJsonata: ["$detectPlatform(sourceUrl) = 'gitlab'"],
matchUpdateTypes: ["digest"]
}, {
changelogUrl: "{{sourceUrl}}/-/compare/{{currentDigest}}...{{newDigest}}",
matchDatasources: ["gitlab-releases", "gitlab-tags"],
matchUpdateTypes: ["digest"]
}]
},
goXPackagesChangelogLink: {
description: "Correctly link to the source code for golang.org/x packages",
packageRules: [{
matchManagers: ["gomod"],
matchUpdateTypes: [
"major",
"minor",
"patch"
],
prBodyDefinitions: { Change: "{{#if (containsString depName 'golang.org/x/')}}[`{{{displayFrom}}}` → `{{{displayTo}}}`](https://cs.opensource.google/{{{replace '^golang\\.org' 'go' depName}}}/+/refs/tags/{{{currentValue}}}...refs/tags/{{{newValue}}}){{else}}`{{{displayFrom}}}` → `{{{displayTo}}}`{{/if}}" }
}]
},
goXPackagesNameLink: {
description: "Link to pkg.go.dev/... for golang.org/x packages' title",
packageRules: [{
matchManagers: ["gomod"],
prBodyDefinitions: { Package: "{{#if (containsString depName 'golang.org/x/')}}[{{{depName}}}](https://pkg.go.dev/{{{depName}}}){{else}}{{{depNameLinked}}}{{/if}}" }
}]
},
pinGitHubActionDigests: {
description: "Pin `github-action` digests.",
packageRules: [{
matchDepTypes: ["action"],
pinDigests: true
}]
},
pinGitHubActionDigestsToSemver: {
description: "Convert pinned GitHub Action digests to SemVer.",
extends: ["helpers:pinGitHubActionDigests"],
packageRules: [{
extractVersion: "^(?<version>v?\\d+\\.\\d+\\.\\d+)$",
matchDepTypes: ["action"],
versioning: "regex:^v?(?<major>\\d+)(\\.(?<minor>\\d+)\\.(?<patch>\\d+))?$"
}]
},
renovateChangelog: {
description: "Provide a link to octochangelog's improved breakdown for Renovate's changelogs",
packageRules: [{
matchSourceUrls: ["https://github.com/renovatebot/renovate"],
matchUpdateTypes: [
"major",
"minor",
"patch"
],
prBodyDefinitions: { Change: "[`{{{displayFrom}}}` → `{{{displayTo}}}`](https://octochangelog.com/compare?repo=renovatebot%2Frenovate&from={{ currentVersion }}&to={{ newVersion }})" }
}]
}
};
//#endregion
export { presets };
//# sourceMappingURL=helpers.preset.js.map