Skip to content
Merged
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- [#3976](https://github.com/ignite/cli/pull/3976) Remove error checks for Cobra command value get calls
- [#4002](https://github.com/ignite/cli/pull/4002) Bump buf build
- [#4008](https://github.com/ignite/cli/pull/4008) Rename `pkg/yaml` to `pkg/xyaml`
- [#4075](https://github.com/ignite/cli/pull/4075) Use `gopkg.in/yaml.v3` instead `gopkg.in/yaml.v2`

### Fixes

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ require (
golang.org/x/vuln v1.0.4
google.golang.org/grpc v1.62.1
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
mvdan.cc/gofumpt v0.6.0
sigs.k8s.io/yaml v1.4.0
)
Expand Down Expand Up @@ -467,7 +467,7 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.5.1 // indirect
honnef.co/go/tools v0.4.7 // indirect
mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 // indirect
Expand Down
2 changes: 1 addition & 1 deletion ignite/config/chain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"

"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

v0 "github.com/ignite/cli/v29/ignite/config/chain/v0"
v1 "github.com/ignite/cli/v29/ignite/config/chain/v1"
Expand Down
6 changes: 4 additions & 2 deletions ignite/config/chain/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package chain
import (
"io"

"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

"github.com/ignite/cli/v29/ignite/config/chain/version"
)
Expand Down Expand Up @@ -36,5 +36,7 @@ func MigrateLatest(current io.Reader, latest io.Writer) error {
return err
}

return yaml.NewEncoder(latest).Encode(cfg)
encoder := yaml.NewEncoder(latest)
encoder.SetIndent(2)
return encoder.Encode(cfg)
}
2 changes: 1 addition & 1 deletion ignite/config/chain/network/testdata/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

v1 "github.com/ignite/cli/v29/ignite/config/chain/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion ignite/config/chain/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"

"github.com/cosmos/cosmos-sdk/types/bech32"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

"github.com/ignite/cli/v29/ignite/config/chain/version"
"github.com/ignite/cli/v29/ignite/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion ignite/config/chain/v0/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"

"github.com/imdario/mergo"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

"github.com/ignite/cli/v29/ignite/config/chain/base"
"github.com/ignite/cli/v29/ignite/config/chain/version"
Expand Down
6 changes: 3 additions & 3 deletions ignite/config/chain/v0/testdata/config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
accounts:
- name: alice
coins: ["100000000uatom", "100000000000000000000aevmos"]
coins: [ "100000000uatom", "100000000000000000000aevmos" ]
mnemonic: "ozone unfold device pave lemon potato omit insect column wise cover hint narrow large provide kidney episode clay notable milk mention dizzy muffin crazy"
- name: bob
coins: ["5000000000000aevmos"]
coins: [ "5000000000000aevmos" ]
address: "cosmos1adn9gxjmrc3hrsdx5zpc9sj2ra7kgqkmphf8yw"
validator:
name: alice
staked: "100000000000000000000aevmos"
faucet:
name: bob
coins: ["10aevmos"]
coins: [ "10aevmos" ]
host: 0.0.0.0:4600
port: 4600
build:
Expand Down
2 changes: 1 addition & 1 deletion ignite/config/chain/v0/testdata/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

v0 "github.com/ignite/cli/v29/ignite/config/chain/v0"
)
Expand Down
2 changes: 1 addition & 1 deletion ignite/config/chain/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"

"github.com/imdario/mergo"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

"github.com/ignite/cli/v29/ignite/config/chain/base"
"github.com/ignite/cli/v29/ignite/config/chain/version"
Expand Down
47 changes: 23 additions & 24 deletions ignite/config/chain/v1/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ build:
proto:
path: proto
third_party_paths:
- third_party/proto
- proto_vendor
- third_party/proto
- proto_vendor
accounts:
- name: alice
coins:
- 100000000uatom
- 100000000000000000000aevmos
mnemonic: ozone unfold device pave lemon potato omit insect column wise cover hint
narrow large provide kidney episode clay notable milk mention dizzy muffin crazy
- name: bob
coins:
- 5000000000000aevmos
address: cosmos1adn9gxjmrc3hrsdx5zpc9sj2ra7kgqkmphf8yw
- name: alice
coins:
- 100000000uatom
- 100000000000000000000aevmos
mnemonic: ozone unfold device pave lemon potato omit insect column wise cover hint narrow large provide kidney episode clay notable milk mention dizzy muffin crazy
- name: bob
coins:
- 5000000000000aevmos
address: cosmos1adn9gxjmrc3hrsdx5zpc9sj2ra7kgqkmphf8yw
faucet:
name: bob
coins:
- 10aevmos
- 10aevmos
host: 0.0.0.0:4600
port: 4600
genesis:
Expand All @@ -34,8 +33,8 @@ genesis:
gov:
deposit_params:
min_deposit:
- amount: "10000000"
denom: aevmos
- amount: "10000000"
denom: aevmos
mint:
params:
mint_denom: aevmos
Expand All @@ -44,12 +43,12 @@ genesis:
bond_denom: aevmos
chain_id: evmosd_9000-1
validators:
- name: alice
bonded: 100000000000000000000aevmos
app:
evm-rpc:
address: 0.0.0.0:8545
ws-address: 0.0.0.0:8546
client:
keyring-backend: os
home: $HOME/.evmosd
- name: alice
bonded: 100000000000000000000aevmos
app:
evm-rpc:
address: 0.0.0.0:8545
ws-address: 0.0.0.0:8546
client:
keyring-backend: os
home: $HOME/.evmosd
53 changes: 26 additions & 27 deletions ignite/config/chain/v1/testdata/config2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ build:
proto:
path: proto
third_party_paths:
- third_party/proto
- proto_vendor
- third_party/proto
- proto_vendor
accounts:
- name: alice
coins:
- 100000000uatom
- 100000000000000000000aevmos
mnemonic: ozone unfold device pave lemon potato omit insect column wise cover hint
narrow large provide kidney episode clay notable milk mention dizzy muffin crazy
- name: bob
coins:
- 5000000000000aevmos
address: cosmos1adn9gxjmrc3hrsdx5zpc9sj2ra7kgqkmphf8yw
- name: alice
coins:
- 100000000uatom
- 100000000000000000000aevmos
mnemonic: ozone unfold device pave lemon potato omit insect column wise cover hint narrow large provide kidney episode clay notable milk mention dizzy muffin crazy
- name: bob
coins:
- 5000000000000aevmos
address: cosmos1adn9gxjmrc3hrsdx5zpc9sj2ra7kgqkmphf8yw
faucet:
name: bob
coins:
- 10aevmos
- 10aevmos
host: 0.0.0.0:4600
port: 4600
genesis:
Expand All @@ -30,18 +29,18 @@ genesis:
denom: aevmos
chain_id: evmosd_9000-1
validators:
- name: alice
bonded: 100000000000000000000aevmos
app:
evm-rpc:
address: 0.0.0.0:8545
ws-address: 0.0.0.0:8546
home: $HOME/.evmosd
- name: alice
bonded: 100000000000000000000aevmos
app:
evm-rpc:
address: 0.0.0.0:8545
ws-address: 0.0.0.0:8546
home: $HOME/.evmosd
apps:
- name: plugin1
path: /path/to/plugin1
- name: plugin2
path: /path/to/plugin2
with:
foo: bar
bar: baz
- name: plugin1
path: /path/to/plugin1
- name: plugin2
path: /path/to/plugin2
with:
foo: bar
bar: baz
2 changes: 1 addition & 1 deletion ignite/config/chain/v1/testdata/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

v1 "github.com/ignite/cli/v29/ignite/config/chain/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion ignite/config/plugins/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

"golang.org/x/exp/slices"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

"github.com/ignite/cli/v29/ignite/pkg/errors"
"github.com/ignite/cli/v29/ignite/pkg/gomodule"
Expand Down
18 changes: 9 additions & 9 deletions ignite/config/plugins/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,15 @@ func TestConfigSave(t *testing.T) {
return cfg
},
expectedContent: `apps:
- path: /path/to/plugin1
- path: /path/to/plugin22
with:
bar: baz
foo: bar
key: val
- path: /path/to/plugin3
with:
key: val
- path: /path/to/plugin1
- path: /path/to/plugin22
with:
bar: baz
foo: bar
key: val
- path: /path/to/plugin3
with:
key: val
`,
},
}
Expand Down
2 changes: 1 addition & 1 deletion ignite/config/plugins/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"path/filepath"

"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

"github.com/ignite/cli/v29/ignite/pkg/errors"
)
Expand Down
1 change: 0 additions & 1 deletion ignite/pkg/cosmosanalysis/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ func discoverRuntimeAppModules(chainRoot string) ([]string, error) {
}
return nil
})

if err != nil {
return nil, err
}
Expand Down
2 changes: 0 additions & 2 deletions ignite/pkg/cosmosanalysis/cosmosanalysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ func DeepFindImplementation(modulePath string, interfaceList []string) (found []
found = append(found, currFound...)
return nil
})

if err != nil {
return nil, err
}
Expand Down Expand Up @@ -267,7 +266,6 @@ func FindAppFilePath(chainRoot string) (path string, err error) {

return nil
})

if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion ignite/pkg/cosmosgen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"path/filepath"
"slices"

"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

"github.com/ignite/cli/v29/ignite/pkg/cache"
"github.com/ignite/cli/v29/ignite/pkg/cliui/colors"
Expand Down
2 changes: 0 additions & 2 deletions ignite/pkg/cosmosgen/generate_vuex.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func (g *generator) updateVueDependencies() error {
tsClientName: fmt.Sprintf("file:%s", tsClientVueRelPath),
},
})

if err != nil {
return errors.Errorf("failed to link ts-client dependency to the Vue app: %w", err)
}
Expand Down Expand Up @@ -136,7 +135,6 @@ func (g *generator) updateVuexDependencies() error {
tsClientName: fmt.Sprintf("file:%s", tsClientVuexRelPath),
},
})

if err != nil {
return errors.Errorf("failed to link ts-client dependency to the Vuex stores: %w", err)
}
Expand Down
1 change: 0 additions & 1 deletion ignite/pkg/goanalysis/goanalysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func DiscoverMain(path string) (pkgPaths []string, err error) {

return nil
})

if err != nil {
return nil, err
}
Expand Down
2 changes: 0 additions & 2 deletions ignite/pkg/repoversion/repoversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func Determine(path string) (v Version, err error) {

return nil
})

if err != nil {
return Version{}, err
}
Expand Down Expand Up @@ -94,7 +93,6 @@ func Determine(path string) (v Version, err error) {

return nil
})

if err != nil {
return Version{}, err
}
Expand Down
4 changes: 2 additions & 2 deletions ignite/pkg/xyaml/map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

"github.com/ignite/cli/v29/ignite/pkg/xyaml"
)
Expand Down Expand Up @@ -40,5 +40,5 @@ func TestUnmarshalWithNativeMapType(t *testing.T) {
// Assert
require.NoError(t, err)
require.NotNil(t, output["foo"])
require.IsType(t, (map[interface{}]interface{})(nil), output["foo"])
require.IsType(t, (map[string]interface{})(nil), output["foo"])
}
Loading