fix: jq version prefix, watchexec monorepo tag filter

- jq: add version_prefixes = jq- to strip jq- from version strings
- watchexec: add tag_prefix = cli- to filter monorepo tags correctly
- classifyGitHub: skip tags not matching tag_prefix in monorepos
- comparecache: add watchexec version normalization

Match count: 74/106
This commit is contained in:
AJ ONeal
2026-03-10 18:33:26 -06:00
parent a4e9f875cd
commit 2d01a1cf54
4 changed files with 10 additions and 0 deletions

View File

@@ -556,6 +556,11 @@ func normalizeVersionFunc(pkg string) func(string) string {
}
return v
}
case "watchexec":
return func(v string) string {
// watchexec monorepo: cli-v1.20.5 → v1.20.5
return strings.TrimPrefix(v, "cli-")
}
case "go":
return func(v string) string {
// Go: go1.10 → 1.10.0 (pad to 3 parts)

View File

@@ -231,6 +231,9 @@ func classifyGitHub(pkg string, conf *installerconf.Conf, d *rawcache.Dir) ([]st
version := rel.TagName
if tagPrefix != "" {
if !strings.HasPrefix(version, tagPrefix) {
continue // skip tags from other packages in monorepos
}
version = strings.TrimPrefix(version, tagPrefix)
}

View File

@@ -1,3 +1,4 @@
source = github
owner = stedolan
repo = jq
version_prefixes = jq-

View File

@@ -1,3 +1,4 @@
source = github
owner = watchexec
repo = watchexec
tag_prefix = cli-