From 7ded50697219cc1a57c61fe049b5348c5d9455e9 Mon Sep 17 00:00:00 2001 From: Risu <79110363+risu729@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:22:21 +0900 Subject: [PATCH 1/2] chore(.github/renovate.json5): use renovate config preset --- .github/renovate.json5 | 27 ++++++++++ renovate.json5 | 113 ----------------------------------------- 2 files changed, 27 insertions(+), 113 deletions(-) create mode 100644 .github/renovate.json5 delete mode 100644 renovate.json5 diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 00000000..fa096057 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,27 @@ +{ + // ref: https://docs.renovatebot.com/configuration-options/ + $schema: "https://docs.renovatebot.com/renovate-schema.json", + extends: [ + "github>risu729/renovate-config#1.2.2", + ], + packageRules: [ + // disable pinning for dependencies and peerDependencies + { + matchFileNames: ["package.json"], + matchDepTypes: ["dependencies"], + // bump for dependencies and release a patch update + rangeStrategy: "bump", + }, + { + matchFileNames: ["package.json"], + matchDepTypes: ["peerDependencies"], + // widen range for peerDependencies as far as possible + rangeStrategy: "widen", + }, + // set semantic commit types + { + matchFileNames: ["tests/"], + semanticCommitType: "test", + }, + ], +} diff --git a/renovate.json5 b/renovate.json5 deleted file mode 100644 index 770e5642..00000000 --- a/renovate.json5 +++ /dev/null @@ -1,113 +0,0 @@ -{ - // ref: https://docs.renovatebot.com/configuration-options/ - $schema: "https://docs.renovatebot.com/renovate-schema.json", - extends: [ - "config:best-practices", - ":pinVersions", - // cspell:ignore automerge - ":automergeMinor", - ":automergeDigest", - ":prHourlyLimitNone", - ":prConcurrentLimitNone", - ], - labels: [ - "dependencies", - "{{#unless (equals manager 'regex')}}{{manager}}{{/unless}}", - ], - // ref: https://docs.renovatebot.com/modules/manager/regex/#advanced-capture - customManagers: [ - // renovate does not support tools not listed - // ref: https://docs.renovatebot.com/modules/manager/mise/#additional-information - { - customType: "regex", - description: "Updates tool versions in mise.toml (asdf backend, github-releases datasource)", - // prettier-ignore - fileMatch: ["^mise\.toml$"], - // cspell:ignore datasource - datasourceTemplate: "github-releases", - matchStrings: [ - // test: https://regex101.com/r/tNMUFo - // prettier-ignore - "# renovate: packageName=(?.+?)(?: extractVersion=(?.+?))?\\n\"?(?[^:]+?)\"? *= *\"(?.+?)\"", - ], - }, - { - customType: "regex", - description: "Updates tool versions in mise.toml (asdf backend, other datasource)", - // prettier-ignore - fileMatch: ["^mise\.toml$"], - matchStrings: [ - // test: https://regex101.com/r/8grHta - // prettier-ignore - "# renovate: datasource=(?[a-z-]+?)(?: packageName=(?.+?))?(?: versioning=(?[a-z-]+?))?(?: extractVersion=(?.+?))?\\n\"?(?[^:]+?)\"? *= *\"?(?.+?)\"? *(?:#.*)?\\n", - ], - }, - // renovate does not support backends except core and asdf - // ref: https://github.com/renovatebot/renovate/issues/30387 - { - customType: "regex", - description: "Updates tool versions in mise.toml (Cargo backend)", - // prettier-ignore - fileMatch: ["^mise\.toml$"], - datasourceTemplate: "crate", - matchStrings: [ - // test: https://regex101.com/r/K6Imdx - // prettier-ignore - "\"cargo:(?[^:]+?)\" *= *\"(?.+?)\"", - ], - }, - { - customType: "regex", - description: "Updates tool versions in mise.toml (npm backend)", - // prettier-ignore - fileMatch: ["^mise\.toml$"], - datasourceTemplate: "npm", - matchStrings: [ - // test: https://regex101.com/r/avOpdb - // prettier-ignore - "\"npm:(?[^:]+?)\" *= *\"(?.+?)\"", - ], - }, - { - customType: "regex", - description: "Updates tool versions in mise.toml (ubi backend)", - // prettier-ignore - fileMatch: ["^mise\.toml$"], - datasourceTemplate: "github-releases", - matchStrings: [ - // test: https://regex101.com/r/RRA3NI - // prettier-ignore - "(?:# renovate: extractVersion=(?.+?)\\n)?\"ubi:(?[^:]+?)\" *= *\".+?(?\\d+\\..+?)\"", - ], - }, - ], - packageRules: [ - // disable pinning for dependencies and peerDependencies - { - matchFileNames: ["package.json"], - matchDepTypes: ["dependencies"], - // bump for dependencies and release a patch update - rangeStrategy: "bump", - }, - { - matchFileNames: ["package.json"], - matchDepTypes: ["peerDependencies"], - // widen range for peerDependencies as far as possible - rangeStrategy: "widen", - }, - // set semantic commit types - { - matchFileNames: ["tests/"], - semanticCommitType: "test", - }, - { - matchCategories: ["ci"], - semanticCommitType: "ci", - }, - // add labels - { - matchFileNames: ["mise.toml"], - addLabels: ["mise"], - }, - ], -} From e71a50d9b76c7a810efba43d7a28f97081fca8de Mon Sep 17 00:00:00 2001 From: Risu <79110363+risu729@users.noreply.github.com> Date: Fri, 3 Jan 2025 23:34:44 +0900 Subject: [PATCH 2/2] chore(.github/renovate.json5): un-ignore test directories --- .github/renovate.json5 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index fa096057..bcbf1669 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -4,6 +4,11 @@ extends: [ "github>risu729/renovate-config#1.2.2", ], + // un-ignore test directories + // ref: https://docs.renovatebot.com/presets-default/#ignoremodulesandtests +"ignorePaths": [ + "**/node_modules/**" + ], packageRules: [ // disable pinning for dependencies and peerDependencies {