Skip to content

Commit c180c3e

Browse files
authored
fix: bump viper and mapstructure (#3364)
chore: bump viper and mapstructure
1 parent ea93054 commit c180c3e

File tree

7 files changed

+18
-34
lines changed

7 files changed

+18
-34
lines changed

go.mod

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ require (
2222
github.com/getsentry/sentry-go v0.31.1
2323
github.com/go-errors/errors v1.5.1
2424
github.com/go-git/go-git/v5 v5.14.0
25+
github.com/go-viper/mapstructure/v2 v2.2.1
2526
github.com/go-xmlfmt/xmlfmt v1.1.3
2627
github.com/golang-jwt/jwt/v5 v5.2.2
2728
github.com/golangci/golangci-lint v1.64.8
@@ -36,15 +37,14 @@ require (
3637
github.com/jackc/pgtype v1.14.4
3738
github.com/jackc/pgx/v4 v4.18.3
3839
github.com/joho/godotenv v1.5.1
39-
github.com/mitchellh/mapstructure v1.5.0
4040
github.com/muesli/reflow v0.3.0
4141
github.com/oapi-codegen/oapi-codegen/v2 v2.4.1
4242
github.com/oapi-codegen/runtime v1.1.1
4343
github.com/slack-go/slack v0.16.0
4444
github.com/spf13/afero v1.14.0
4545
github.com/spf13/cobra v1.9.1
4646
github.com/spf13/pflag v1.0.6
47-
github.com/spf13/viper v1.19.0
47+
github.com/spf13/viper v1.20.1
4848
github.com/stretchr/testify v1.10.0
4949
github.com/stripe/pg-schema-diff v0.8.0
5050
github.com/tidwall/jsonc v0.3.2
@@ -151,7 +151,6 @@ require (
151151
github.com/go-toolsmith/astp v1.1.0 // indirect
152152
github.com/go-toolsmith/strparse v1.1.0 // indirect
153153
github.com/go-toolsmith/typep v1.1.0 // indirect
154-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
155154
github.com/gobwas/glob v0.2.3 // indirect
156155
github.com/godbus/dbus/v5 v5.1.0 // indirect
157156
github.com/gofrs/flock v0.12.1 // indirect
@@ -180,7 +179,6 @@ require (
180179
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
181180
github.com/hashicorp/go-version v1.7.0 // indirect
182181
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
183-
github.com/hashicorp/hcl v1.0.0 // indirect
184182
github.com/hexops/gotextdiff v1.0.3 // indirect
185183
github.com/inconshreveable/mousetrap v1.1.0 // indirect
186184
github.com/invopop/yaml v0.3.1 // indirect
@@ -212,7 +210,6 @@ require (
212210
github.com/lib/pq v1.10.9 // indirect
213211
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
214212
github.com/macabu/inamedparam v0.1.3 // indirect
215-
github.com/magiconair/properties v1.8.7 // indirect
216213
github.com/mailru/easyjson v0.7.7 // indirect
217214
github.com/maratori/testableexamples v1.0.0 // indirect
218215
github.com/maratori/testpackage v1.1.1 // indirect
@@ -263,8 +260,7 @@ require (
263260
github.com/rogpeppe/go-internal v1.14.1 // indirect
264261
github.com/ryancurrah/gomodguard v1.3.5 // indirect
265262
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
266-
github.com/sagikazarmark/locafero v0.4.0 // indirect
267-
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
263+
github.com/sagikazarmark/locafero v0.7.0 // indirect
268264
github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f // indirect
269265
github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect
270266
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect
@@ -280,7 +276,7 @@ require (
280276
github.com/sourcegraph/conc v0.3.0 // indirect
281277
github.com/sourcegraph/go-diff v0.7.0 // indirect
282278
github.com/speakeasy-api/openapi-overlay v0.9.0 // indirect
283-
github.com/spf13/cast v1.6.0 // indirect
279+
github.com/spf13/cast v1.7.1 // indirect
284280
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
285281
github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect
286282
github.com/stretchr/objx v0.5.2 // indirect
@@ -326,7 +322,6 @@ require (
326322
go.uber.org/multierr v1.9.0 // indirect
327323
go.uber.org/zap v1.24.0 // indirect
328324
golang.org/x/crypto v0.36.0 // indirect
329-
golang.org/x/exp v0.0.0-20250103183323-7d7fa50e5329 // indirect
330325
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect
331326
golang.org/x/net v0.37.0 // indirect
332327
golang.org/x/sync v0.12.0 // indirect
@@ -336,7 +331,6 @@ require (
336331
google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect
337332
google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 // indirect
338333
google.golang.org/protobuf v1.36.5 // indirect
339-
gopkg.in/ini.v1 v1.67.0 // indirect
340334
gopkg.in/warnings.v0 v0.1.2 // indirect
341335
gopkg.in/yaml.v2 v2.4.0 // indirect
342336
honnef.co/go/tools v0.6.1 // indirect

go.sum

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
505505
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
506506
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
507507
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
508-
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
509-
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
510508
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
511509
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
512510
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
@@ -654,8 +652,6 @@ github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i
654652
github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk=
655653
github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I=
656654
github.com/magiconair/properties v1.5.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
657-
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
658-
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
659655
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
660656
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
661657
github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI=
@@ -697,8 +693,6 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
697693
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
698694
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
699695
github.com/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
700-
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
701-
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
702696
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
703697
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
704698
github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU=
@@ -856,10 +850,8 @@ github.com/ryancurrah/gomodguard v1.3.5 h1:cShyguSwUEeC0jS7ylOiG/idnd1TpJ1LfHGpV
856850
github.com/ryancurrah/gomodguard v1.3.5/go.mod h1:MXlEPQRxgfPQa62O8wzK3Ozbkv9Rkqr+wKjSxTdsNJE=
857851
github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU=
858852
github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ=
859-
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
860-
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
861-
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
862-
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
853+
github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
854+
github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
863855
github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wrYjDSCcZ78NoftLQyHBSLW/Cx79Y=
864856
github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
865857
github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0=
@@ -908,8 +900,8 @@ github.com/speakeasy-api/openapi-overlay v0.9.0/go.mod h1:f5FloQrHA7MsxYg9djzMD5
908900
github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA=
909901
github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo=
910902
github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
911-
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
912-
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
903+
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
904+
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
913905
github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
914906
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
915907
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
@@ -919,8 +911,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
919911
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
920912
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
921913
github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
922-
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
923-
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
914+
github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4=
915+
github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4=
924916
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
925917
github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0=
926918
github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I=
@@ -1487,8 +1479,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
14871479
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
14881480
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
14891481
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
1490-
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
1491-
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
14921482
gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM=
14931483
gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw=
14941484
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import (
2626
"github.com/BurntSushi/toml"
2727
"github.com/docker/go-units"
2828
"github.com/go-errors/errors"
29+
"github.com/go-viper/mapstructure/v2"
2930
"github.com/golang-jwt/jwt/v5"
3031
"github.com/joho/godotenv"
31-
"github.com/mitchellh/mapstructure"
3232
"github.com/spf13/viper"
3333
"github.com/supabase/cli/pkg/cast"
3434
"github.com/supabase/cli/pkg/fetcher"

pkg/config/config_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ func TestLoadFunctionErrorMessageParsing(t *testing.T) {
464464
// Run test
465465
err := config.Load("", fsys)
466466
// Check error contains both decode errors
467-
assert.ErrorContains(t, err, "* 'functions[hello]' has invalid keys: unknown_field")
467+
assert.ErrorContains(t, err, "'functions[hello]' has invalid keys: unknown_field")
468468
})
469469

470470
t.Run("returns error with function slug for invalid field value", func(t *testing.T) {
@@ -479,7 +479,7 @@ func TestLoadFunctionErrorMessageParsing(t *testing.T) {
479479
// Run test
480480
err := config.Load("", fsys)
481481
// Check error contains both decode errors
482-
assert.ErrorContains(t, err, `* cannot parse 'functions[hello].verify_jwt' as bool: strconv.ParseBool: parsing "not-a-bool"`)
482+
assert.ErrorContains(t, err, `cannot parse 'functions[hello].verify_jwt' as bool: strconv.ParseBool: parsing "not-a-bool"`)
483483
})
484484

485485
t.Run("returns error for unknown function fields", func(t *testing.T) {
@@ -494,7 +494,7 @@ func TestLoadFunctionErrorMessageParsing(t *testing.T) {
494494
}
495495
// Run test
496496
err := config.Load("", fsys)
497-
assert.ErrorContains(t, err, `* 'functions[name]' expected a map, got 'string'`)
498-
assert.ErrorContains(t, err, `* 'functions[verify_jwt]' expected a map, got 'bool'`)
497+
assert.ErrorContains(t, err, `'functions[name]' expected a map, got 'string'`)
498+
assert.ErrorContains(t, err, `'functions[verify_jwt]' expected a map, got 'bool'`)
499499
})
500500
}

pkg/config/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"regexp"
66

77
"github.com/go-errors/errors"
8-
"github.com/mitchellh/mapstructure"
8+
"github.com/go-viper/mapstructure/v2"
99
)
1010

1111
const (

pkg/config/constants_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"strings"
55
"testing"
66

7-
"github.com/mitchellh/mapstructure"
7+
"github.com/go-viper/mapstructure/v2"
88
"github.com/stretchr/testify/assert"
99
)
1010

pkg/config/secret.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
ecies "github.com/ecies/go/v2"
1010
"github.com/go-errors/errors"
11-
"github.com/mitchellh/mapstructure"
11+
"github.com/go-viper/mapstructure/v2"
1212
)
1313

1414
type Secret struct {

0 commit comments

Comments
 (0)