2 Commits

Author SHA1 Message Date
Sebastian Poxhofer 7286ebea6b refactor(versioning/gomod): parse the commit of pseudo-versions (#47097) 2026-10-16 09:52:08 +00:00
Sebastian Poxhofer 6b7c7e1763 feat(versioning): add a gomod versioning (#46392)
* feat(versioning): add a `gomod` versioning

First step of #44184: a versioning for Go modules that behaves like `semver`
for now and is not the default anywhere yet, so it can be tried on repositories
before the `go` datasource switches to it.

It exports `isPseudoVersion()`, which follows `IsPseudoVersion()` from
golang.org/x/mod/module and recognises all three pseudo-version forms, as the
place for Go version helpers that do not belong to the `go` directive's
`go-mod-directive` versioning.

* refactor(versioning/gomod): accept an undefined version in isPseudoVersion()

Review feedback on #46145: the callers check optional values such as
`upgrade.newValue`, so `isPseudoVersion()` takes `undefined` and answers
`false` for it, and they no longer need their own guard.

* refactor(versioning/gomod): return early for an undefined version in isPseudoVersion()
2026-09-28 10:37:29 +00:00