refactor(yaml): upgrade from gopkg.in/yaml.v2 to v3 #2039
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the YAML library used in Helmfile from
goccy/go-yaml
togopkg.in/yaml.v3
, along with associated code changes to reflect this migration. It removes support forgoccy/go-yaml
and its related functionality, ensuring thatyaml.v3
is the default library in Helmfile v1.x. The changes span multiple files, including configuration, runtime logic, tests, and documentation.YAML Library Migration:
goccy/go-yaml
togopkg.in/yaml.v3
across the codebase. (pkg/runtime/runtime.go
,pkg/yaml/yaml.go
,go.mod
) [1] [2] [3]HELMFILE_GOCCY_GOYAML
and replaced it withHELMFILE_GO_YAML_V3
to toggle betweenyaml.v2
andyaml.v3
. (pkg/envvar/const.go
,docs/index.md
) [1] [2]yaml.v3
features, including strict field validation and indentation settings. (pkg/yaml/yaml.go
)Test Updates:
yaml.v3
, including renaming variables and test descriptions. (pkg/app/app_test.go
,pkg/app/app_template_test.go
,pkg/tmpl/context_funcs_test.go
,pkg/yaml/yaml_test.go
) [1] [2] [3] [4]goccy/go-yaml
. (pkg/tmpl/context_funcs_test.go
)Documentation Updates:
goccy/go-yaml
and the introduction ofyaml.v3
as the default YAML library. (docs/index.md
)Dependency Management:
goccy/go-yaml
from direct dependencies and addedgopkg.in/yaml.v3
to the project. (go.mod
) [1] [2]These changes ensure compatibility with
yaml.v3
while simplifying the codebase by removing support forgoccy/go-yaml
.