diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e1df1c9..50fc1a92 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,35 +9,35 @@ jobs: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v7 with: - go-version: 1.25.x - - uses: actions/checkout@v4 - - uses: golangci/golangci-lint-action@v8 + go-version: 1.27.x + - uses: actions/checkout@v7 + - uses: golangci/golangci-lint-action@v9 with: - version: v2.4.0 + version: v2.13.1 test_windows: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) runs-on: windows-latest steps: - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v7 with: - go-version: 1.25.x - - uses: actions/checkout@v4 + go-version: 1.27.x + - uses: actions/checkout@v7 - run: go build ./cmd/goverter - run: go test ./... test: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v7 with: - go-version: 1.25.x - - uses: actions/checkout@v4 + go-version: 1.27.x + - uses: actions/checkout@v7 - run: go build ./cmd/goverter - run: go test -coverpkg ./... -coverprofile=coverage.txt -covermode=atomic ./... - run: grep -v '/example/' coverage.txt > filtered-coverage.txt - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v7 with: disable_search: true files: ./filtered-coverage.txt @@ -47,24 +47,24 @@ jobs: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v7 with: go-version: 1.25.x - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - run: | go get -u golang.org/x/tools go mod tidy - run: go test ./... env: SKIP_VERSION_DEPENDENT: 'true' - test_go123: + test_go125: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v7 with: - go-version: 1.23.x - - uses: actions/checkout@v4 + go-version: 1.25.x + - uses: actions/checkout@v7 - run: go build ./cmd/goverter - run: go test ./... env: @@ -73,10 +73,10 @@ jobs: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v7 with: - go-version: 1.25.x - - uses: actions/checkout@v4 + go-version: 1.27.x + - uses: actions/checkout@v7 - run: mkdir covdata - run: GOCOVERDIR="$PWD/covdata" go generate ./... - run: go tool covdata textfmt -i=./covdata -o example-coverage.txt @@ -93,10 +93,10 @@ jobs: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: - node-version: 20 + node-version: 26 cache: yarn cache-dependency-path: docs/yarn.lock - working-directory: docs diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index d7be4c63..6645854e 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -18,20 +18,20 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 with: fetch-depth: 0 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v7 with: - node-version: 20 + node-version: 26 cache: yarn cache-dependency-path: docs/yarn.lock - - uses: actions/configure-pages@v5 + - uses: actions/configure-pages@v6 - working-directory: docs run: | yarn install --frozen-lockfile yarn docs:build - - uses: actions/upload-pages-artifact@v3 + - uses: actions/upload-pages-artifact@v5 with: path: docs/.vitepress/dist deploy: @@ -44,4 +44,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 diff --git a/.golangci.yml b/.golangci.yml index 98552e44..d92b3f2d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,7 +3,6 @@ linters: enable: - asciicheck - godot - - gomodguard - goprintffuncname - misspell - nakedret @@ -47,7 +46,6 @@ formatters: enable: - gci - gofmt - - gofumpt - goimports settings: gofumpt: diff --git a/docs/changelog.md b/docs/changelog.md index 58fe206b..9dfe2c81 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -6,8 +6,13 @@ import GH from './GH.vue'; ## unreleased +## v1.10.0 + - Add [`annotate:unmapped`](./reference/annotate.md) to annotate unmapped - fields in the generated code. + fields in the generated code. +- Add support for go1.27 +- Increase minimal go version to go1.25 due to breaking changes in x/tools for + go1.27 ## v1.9.4 diff --git a/example/enum/transform-custom/go.mod b/example/enum/transform-custom/go.mod index 136830e8..1ccb2b94 100644 --- a/example/enum/transform-custom/go.mod +++ b/example/enum/transform-custom/go.mod @@ -1,8 +1,6 @@ module goverter/example -go 1.23.0 - -toolchain go1.24.5 +go 1.25.0 replace github.com/jmattheis/goverter => ../../../ @@ -10,7 +8,7 @@ require github.com/jmattheis/goverter v1.3.2 require ( github.com/dave/jennifer v1.6.0 // indirect - golang.org/x/mod v0.24.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/tools v0.31.0 // indirect + golang.org/x/mod v0.39.0 // indirect + golang.org/x/sync v0.22.0 // indirect + golang.org/x/tools v0.49.0 // indirect ) diff --git a/example/enum/transform-custom/go.sum b/example/enum/transform-custom/go.sum index 5dc0f2d0..dec0908d 100644 --- a/example/enum/transform-custom/go.sum +++ b/example/enum/transform-custom/go.sum @@ -8,11 +8,11 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= -golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= +golang.org/x/mod v0.39.0 h1:UF5zwQdCRRUpHfyPwr7d4UrGiVeldIsogtzWVnczL74= +golang.org/x/mod v0.39.0/go.mod h1:bvIbwjQ0HUFFf5AKukeeYQG4ZBUG9yxQbR9aEweIwYY= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= +golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/example/protobuf/go.mod b/example/protobuf/go.mod index dc867246..fec0b547 100644 --- a/example/protobuf/go.mod +++ b/example/protobuf/go.mod @@ -1,5 +1,5 @@ module goverter/example -go 1.21.4 +go 1.25.0 require google.golang.org/protobuf v1.31.0 diff --git a/example/protobuf/go.sum b/example/protobuf/go.sum index 01667b2f..9ea5597b 100644 --- a/example/protobuf/go.sum +++ b/example/protobuf/go.sum @@ -1,2 +1,8 @@ +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/example/wrap-errors-using/go.mod b/example/wrap-errors-using/go.mod index fd8feb47..67a49c2f 100644 --- a/example/wrap-errors-using/go.mod +++ b/example/wrap-errors-using/go.mod @@ -1,5 +1,5 @@ module goverter/example -go 1.18.0 +go 1.25.0 require github.com/goverter/patherr v1.0.0 diff --git a/go.mod b/go.mod index ff3b064f..1ffe3b50 100644 --- a/go.mod +++ b/go.mod @@ -1,19 +1,17 @@ module github.com/jmattheis/goverter -go 1.23.0 - -toolchain go1.25.0 +go 1.25.0 require ( github.com/dave/jennifer v1.6.0 github.com/stretchr/testify v1.8.1 - golang.org/x/tools v0.31.0 + golang.org/x/tools v0.49.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/mod v0.24.0 // indirect - golang.org/x/sync v0.12.0 // indirect + golang.org/x/mod v0.39.0 // indirect + golang.org/x/sync v0.22.0 // indirect ) diff --git a/go.sum b/go.sum index 196b9f77..06e74cb1 100644 --- a/go.sum +++ b/go.sum @@ -14,12 +14,12 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= -golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= +golang.org/x/mod v0.39.0 h1:UF5zwQdCRRUpHfyPwr7d4UrGiVeldIsogtzWVnczL74= +golang.org/x/mod v0.39.0/go.mod h1:bvIbwjQ0HUFFf5AKukeeYQG4ZBUG9yxQbR9aEweIwYY= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= +golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=