Skip to content

change yaml library to go.yaml.in/yaml/v3 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/wasm/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/speakeasy-api/jsonpath/pkg/jsonpath/config"
"github.com/speakeasy-api/jsonpath/pkg/jsonpath/token"
"github.com/speakeasy-api/jsonpath/pkg/overlay"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
"reflect"
"syscall/js"
)
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ go 1.22
require (
github.com/pmezard/go-difflib v1.0.0
github.com/stretchr/testify v1.9.0
gopkg.in/yaml.v3 v3.0.1
go.yaml.in/yaml/v3 v3.0.4
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/pretty v0.1.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/pmezard/go-difflib/difflib"
"github.com/speakeasy-api/jsonpath/pkg/jsonpath"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
"os"
"slices"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion pkg/jsonpath/filter.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package jsonpath

import (
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
"strconv"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/jsonpath/jsonpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"github.com/speakeasy-api/jsonpath/pkg/jsonpath/config"
"github.com/speakeasy-api/jsonpath/pkg/jsonpath/token"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)

func NewPath(input string, opts ...config.Option) (*JSONPath, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/jsonpath/segment.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package jsonpath

import (
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/jsonpath/yaml_eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package jsonpath

import (
"fmt"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
"reflect"
"regexp"
"strconv"
Expand Down
2 changes: 1 addition & 1 deletion pkg/jsonpath/yaml_eval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)

func TestLiteralEquals(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/jsonpath/yaml_query.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package jsonpath

import (
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)

type Evaluator interface {
Expand Down
2 changes: 1 addition & 1 deletion pkg/jsonpath/yaml_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package jsonpath
import (
"github.com/speakeasy-api/jsonpath/pkg/jsonpath/config"
"github.com/speakeasy-api/jsonpath/pkg/jsonpath/token"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
"reflect"
"strings"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion pkg/overlay/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package overlay
import (
"github.com/speakeasy-api/jsonpath/pkg/jsonpath"
"github.com/speakeasy-api/jsonpath/pkg/jsonpath/config"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)

// ApplyTo will take an overlay and apply its changes to the given YAML
Expand Down
2 changes: 1 addition & 1 deletion pkg/overlay/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
"os"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/overlay/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strings"

"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)

// Compare compares input specifications from two files and returns an overlay
Expand Down
2 changes: 1 addition & 1 deletion pkg/overlay/compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/speakeasy-api/jsonpath/pkg/overlay"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
"os"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/overlay/parents.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package overlay

import "gopkg.in/yaml.v3"
import "go.yaml.in/yaml/v3"

type parentIndex map[*yaml.Node]*yaml.Node

Expand Down
2 changes: 1 addition & 1 deletion pkg/overlay/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package overlay

import (
"fmt"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
"io"
"os"
"path/filepath"
Expand Down
2 changes: 1 addition & 1 deletion pkg/overlay/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package overlay

import (
"bytes"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)

// Extensible provides a place for extensions to be added to components of the
Expand Down