mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-12 11:05:37 +00:00
Bumping goccy
This commit is contained in:
parent
31ad7fbaa2
commit
0f390b27aa
2
.gitignore
vendored
2
.gitignore
vendored
@ -44,6 +44,8 @@ test*.yml
|
|||||||
test*.xml
|
test*.xml
|
||||||
test*.toml
|
test*.toml
|
||||||
test*.yaml
|
test*.yaml
|
||||||
|
test_dir1/
|
||||||
|
test_dir2/
|
||||||
0.yml
|
0.yml
|
||||||
1.yml
|
1.yml
|
||||||
2.yml
|
2.yml
|
||||||
|
@ -207,21 +207,21 @@ EOM
|
|||||||
|
|
||||||
testSplitWithDirectories() {
|
testSplitWithDirectories() {
|
||||||
cat >test.yml <<EOL
|
cat >test.yml <<EOL
|
||||||
f: test_dir1/file1
|
f: test_dir1/test_file1
|
||||||
---
|
---
|
||||||
f: test_dir2/dir22/file2
|
f: test_dir2/dir22/test_file2
|
||||||
---
|
---
|
||||||
f: file3
|
f: test_file3
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
./yq e --no-doc -s ".f" test.yml
|
./yq e --no-doc -s ".f" test.yml
|
||||||
|
|
||||||
doc1=$(cat test_dir1/file1.yml)
|
doc1=$(cat test_dir1/test_file1.yml)
|
||||||
assertEquals "f: test_dir1/file1" "$doc1"
|
assertEquals "f: test_dir1/test_file1" "$doc1"
|
||||||
doc2=$(cat test_dir2/dir22/file2.yml)
|
doc2=$(cat test_dir2/dir22/test_file2.yml)
|
||||||
assertEquals "f: test_dir2/dir22/file2" "$doc2"
|
assertEquals "f: test_dir2/dir22/test_file2" "$doc2"
|
||||||
doc3=$(cat file3.yml)
|
doc3=$(cat test_file3.yml)
|
||||||
assertEquals "f: file3" "$doc3"
|
assertEquals "f: test_file3" "$doc3"
|
||||||
}
|
}
|
||||||
|
|
||||||
source ./scripts/shunit2
|
source ./scripts/shunit2
|
||||||
|
2
go.mod
2
go.mod
@ -8,7 +8,7 @@ require (
|
|||||||
github.com/elliotchance/orderedmap v1.7.1
|
github.com/elliotchance/orderedmap v1.7.1
|
||||||
github.com/fatih/color v1.18.0
|
github.com/fatih/color v1.18.0
|
||||||
github.com/goccy/go-json v0.10.4
|
github.com/goccy/go-json v0.10.4
|
||||||
github.com/goccy/go-yaml v1.13.0
|
github.com/goccy/go-yaml v1.13.3
|
||||||
github.com/jinzhu/copier v0.4.0
|
github.com/jinzhu/copier v0.4.0
|
||||||
github.com/magiconair/properties v1.8.9
|
github.com/magiconair/properties v1.8.9
|
||||||
github.com/pelletier/go-toml/v2 v2.2.3
|
github.com/pelletier/go-toml/v2 v2.2.3
|
||||||
|
4
go.sum
4
go.sum
@ -26,8 +26,8 @@ github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27
|
|||||||
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||||
github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM=
|
github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM=
|
||||||
github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||||
github.com/goccy/go-yaml v1.13.0 h1:0Wtp0FZLd7Sm8gERmR9S6Iczzb3vItJj7NaHmFg8pTs=
|
github.com/goccy/go-yaml v1.13.3 h1:IXRULR8mAa0MXQobzzp0VOfMUJ8EnaQ4x3jhf7S0/nI=
|
||||||
github.com/goccy/go-yaml v1.13.0/go.mod h1:IjYwxUiJDoqpx2RmbdjMUceGHZwYLon3sfOGl5Hi9lc=
|
github.com/goccy/go-yaml v1.13.3/go.mod h1:IjYwxUiJDoqpx2RmbdjMUceGHZwYLon3sfOGl5Hi9lc=
|
||||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
|
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
|
||||||
|
@ -20,17 +20,11 @@ var goccyYamlFormatScenarios = []formatScenario{
|
|||||||
expected: "3.1\n",
|
expected: "3.1\n",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: "basic - 3.1",
|
description: "basic - mike",
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
input: "mike: 3",
|
input: "mike: 3",
|
||||||
expected: "mike: 3\n",
|
expected: "mike: 3\n",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
description: "basic - 3.1",
|
|
||||||
skipDoc: true,
|
|
||||||
input: "{mike: 3}",
|
|
||||||
expected: "{mike: 3}\n",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
description: "basic - map multiple entries",
|
description: "basic - map multiple entries",
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
@ -40,23 +34,23 @@ var goccyYamlFormatScenarios = []formatScenario{
|
|||||||
{
|
{
|
||||||
description: "basic - 3.1",
|
description: "basic - 3.1",
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
input: "{\nmike: 3\n}",
|
input: "{\n mike: 3\n}",
|
||||||
expected: "{mike: 3}\n",
|
expected: "{mike: 3}\n",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: "basic - 3.1",
|
description: "basic - tag with number",
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
input: "mike: !!cat 3",
|
input: "mike: !!cat 3",
|
||||||
expected: "mike: !!cat 3\n",
|
expected: "mike: !!cat 3\n",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: "basic - 3.1",
|
description: "basic - array of numbers",
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
input: "- 3",
|
input: "- 3",
|
||||||
expected: "- 3\n",
|
expected: "- 3\n",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: "basic - 3.1",
|
description: "basic - single line array",
|
||||||
skipDoc: true,
|
skipDoc: true,
|
||||||
input: "[3]",
|
input: "[3]",
|
||||||
expected: "[3]\n",
|
expected: "[3]\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user