feat: add updater for package.json

This commit is contained in:
Mattzi 2025-07-14 14:29:10 +02:00
parent 942aa80aa9
commit ecbd148e7a
14 changed files with 174 additions and 44 deletions

View file

@ -8,7 +8,7 @@ import (
var GenericUpdaterSemVerRegex = regexp.MustCompile(`\d+\.\d+\.\d+(-[\w.]+)?(.*x-releaser-pleaser-version)`)
func Generic(info ReleaseInfo) Updater {
return func(content string) (string, error) {
return func(content string, filename string) (string, error) {
// We strip the "v" prefix to avoid adding/removing it from the users input.
version := strings.TrimPrefix(info.Version, "v")