Skip to content

Commit 5e9c2b2

Browse files
committed
Vendor github.com/braydonk/yaml
The yaml.v3 package upstream is now archived. This means there is no hope of my patches ever being committed upstream. As such, there is nothing to gain by maintaining this library in a separate repo. It will be easier for people to contribute to if it's in this repo. I will keep github.com/braydonk/yaml alive purely for the select few who pull the package for the couple of patches that upstream never merged.
1 parent 928ce33 commit 5e9c2b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+17635
-11
lines changed

cmd/yamlfmt/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"strconv"
2525
"strings"
2626

27-
"github.com/braydonk/yaml"
27+
"github.com/google/yamlfmt/pkg/yaml"
2828
"github.com/google/yamlfmt"
2929
"github.com/google/yamlfmt/command"
3030
"github.com/google/yamlfmt/engine"

command/command.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ import (
2323

2424
"github.com/google/yamlfmt"
2525
"github.com/google/yamlfmt/engine"
26+
"github.com/google/yamlfmt/pkg/yaml"
2627
"github.com/mitchellh/mapstructure"
27-
28-
"github.com/braydonk/yaml"
2928
)
3029

3130
type FormatterConfig struct {

docs/config-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,5 @@ This hotfix is flaky. It is very hard to reconstruct data like this without pars
105105

106106
In addition, while with this feature the `%YAML` directive may work, the formatter very specifically supports only the [YAML 1.2 spec](https://yaml.org/spec/1.2.2/). So the `%YAML:1.0` directive won't have the desired effect when passing a file through `yamlfmt`, and if you have 1.0-only syntax in your document the formatter may end up failing in other ways that will be unfixable.
107107

108-
[1]: https://www.github.com/braydonk/yaml
108+
[1]: ../pkg/yaml/
109109
[Specifying Paths]: ./paths.md

formatters/basic/anchors/check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"errors"
1919
"fmt"
2020

21-
"github.com/braydonk/yaml"
21+
"github.com/google/yamlfmt/pkg/yaml"
2222
)
2323

2424
func Check(n yaml.Node) error {

formatters/basic/anchors/check_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"strings"
1919
"testing"
2020

21-
"github.com/braydonk/yaml"
21+
"github.com/google/yamlfmt/pkg/yaml"
2222
"github.com/google/yamlfmt/formatters/basic/anchors"
2323
)
2424

formatters/basic/features.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
package basic
1616

1717
import (
18-
"github.com/braydonk/yaml"
18+
"github.com/google/yamlfmt/pkg/yaml"
1919
"github.com/google/yamlfmt"
2020
"github.com/google/yamlfmt/formatters/basic/anchors"
2121
"github.com/google/yamlfmt/internal/features"

formatters/basic/formatter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"errors"
2121
"io"
2222

23-
"github.com/braydonk/yaml"
23+
"github.com/google/yamlfmt/pkg/yaml"
2424
"github.com/google/yamlfmt"
2525
"github.com/mitchellh/mapstructure"
2626
)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ go 1.21
44

55
require (
66
github.com/bmatcuk/doublestar/v4 v4.7.1
7-
github.com/braydonk/yaml v0.9.0
87
github.com/google/go-cmp v0.6.0
98
github.com/mitchellh/mapstructure v1.5.0
109
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
1110
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1
11+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
1212
)
1313

1414
require golang.org/x/text v0.14.0 // indirect

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q=
22
github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
3-
github.com/braydonk/yaml v0.9.0 h1:ewGMrVmEVpsm3VwXQDR388sLg5+aQ8Yihp6/hc4m+h4=
4-
github.com/braydonk/yaml v0.9.0/go.mod h1:hcm3h581tudlirk8XEUPDBAimBPbmnL0Y45hCRl47N4=
53
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
64
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
75
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=

pkg/yaml/LICENSE

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
This project is covered by two different licenses: MIT and Apache.
3+
4+
#### MIT License ####
5+
6+
The following files were ported to Go from C files of libyaml, and thus
7+
are still covered by their original MIT license, with the additional
8+
copyright staring in 2011 when the project was ported over:
9+
10+
apic.go emitterc.go parserc.go readerc.go scannerc.go
11+
writerc.go yamlh.go yamlprivateh.go
12+
13+
Copyright (c) 2006-2010 Kirill Simonov
14+
Copyright (c) 2006-2011 Kirill Simonov
15+
16+
Permission is hereby granted, free of charge, to any person obtaining a copy of
17+
this software and associated documentation files (the "Software"), to deal in
18+
the Software without restriction, including without limitation the rights to
19+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
20+
of the Software, and to permit persons to whom the Software is furnished to do
21+
so, subject to the following conditions:
22+
23+
The above copyright notice and this permission notice shall be included in all
24+
copies or substantial portions of the Software.
25+
26+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32+
SOFTWARE.
33+
34+
### Apache License ###
35+
36+
All the remaining project files are covered by the Apache license:
37+
38+
Copyright (c) 2011-2019 Canonical Ltd
39+
40+
Licensed under the Apache License, Version 2.0 (the "License");
41+
you may not use this file except in compliance with the License.
42+
You may obtain a copy of the License at
43+
44+
http://www.apache.org/licenses/LICENSE-2.0
45+
46+
Unless required by applicable law or agreed to in writing, software
47+
distributed under the License is distributed on an "AS IS" BASIS,
48+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49+
See the License for the specific language governing permissions and
50+
limitations under the License.

0 commit comments

Comments
 (0)