Skip to content

fix(deps): update module github.com/google/yamlfmt to v0.21.0 - autoclosed#252

Closed
renovate[bot] wants to merge 1 commit intomainfrom
renovate/github.com-google-yamlfmt-0.x
Closed

fix(deps): update module github.com/google/yamlfmt to v0.21.0 - autoclosed#252
renovate[bot] wants to merge 1 commit intomainfrom
renovate/github.com-google-yamlfmt-0.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jan 10, 2026

This PR contains the following updates:

Package Change Age Confidence
github.com/google/yamlfmt v0.20.0v0.21.0 age confidence

Release Notes

google/yamlfmt (github.com/google/yamlfmt)

v0.21.0

Compare Source

Sorry to folks who were likely waiting on the stuff in this release, it's pretty packed. I got sick in December and took my holiday leave early, and I decided to fully and completely disconnect. Lots of stuff packed into this one now that I'm back. Happy new year!

Features

Force single or double quotes #​288

You can now force all quoted strings in a yaml document to be ' or ". See the basic formatter docs for more info.

KYAML Formatter #​302

yamlfmt can now support the new KYAML format from the Kubernetes project. The support for this is via a new formatter type called kyaml. I built support for alternate formatters into the architecture of yamlfmt all the way back when I first started the tool, but this is the first time I'm actually publishing a new formatter. I recommend a full read of the formatter documentation to get a sense of how to use this alternate formatter.

Bug Fixes

Gitlab output format #​272

I don't use Gitlab and didn't implement the feature so I'm not sure if this has been broken the whole time or if there was a schema change somewhere that bricked it, but Gitlab output format from yamlfmt was missing some required fields. This should work now with the new fields added into the output schema.

/dev/stdin as an argument instead of - did not work #​291

You're only allowed to read from stdin once in POSIX, but I inadvertently had a codepath that would read the file for a different purpose before reading it for formatting. This caused yamlfmt not to work under that circumstance. This edge case is handled now.

Filepath collector panic #​300

In a scenario where filepath.Walk fails to read something from the filesystem, I wasn't handling the error case properly. This never came up because I never had an error case ever appear locally and the linter that would yell at me about missed error checks didn't pick up that particular pattern that filepath.Walk propogates errors with. There should no longer be panics in error scenarios; new behaviour is that paths that failed to read will be surfaced and all other successful reads will be formatted.

Contributions

Thanks to @​slipknois for fixing the Gitlab output format.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 10, 2026

Renovate PR Review Results

⚖️ Safety Assessment: ✅ Safe

🔍 Release Content Analysis

yamlfmt v0.20.0 → v0.21.0 introduces new features and bug fixes without breaking the APIs used by gat:

New Features:

  • Force Quote Style (#288): New configuration option to enforce single or double quotes throughout YAML documents (opt-in feature via configuration)
  • KYAML Formatter (#302): New alternate formatter type supporting Kubernetes KYAML format (requires explicit opt-in via configuration)

Bug Fixes:

  • GitLab Output Format (#272): Added missing required fields to GitLab code quality reporting schema
  • /dev/stdin Handling (#291): Fixed issue where /dev/stdin as argument (vs. -) would fail due to multiple stdin reads
  • Filepath Collector Panic (#300): Improved error handling to report failed paths instead of panicking

API Changes:

  • FileDiff.Original and FileDiff.Formatted fields changed from strings to byte slices (NOT USED by gat)
  • Enum configuration validation now fails on invalid values instead of silently ignoring them (only affects configuration files, not programmatic API)

🎯 Impact Scope Investigation

Usage Analysis:

  • yamlfmt is used exclusively in internal/prettier/yaml.go for YAML code formatting
  • The gat codebase uses only the following stable APIs:
    • yamlfmt.Factory interface
    • basic.BasicFormatterFactory struct
    • Factory.NewFormatter(config map[string]interface{}) method
    • Formatter.Format([]byte) method

API Compatibility:

  • ✅ All APIs used by gat remain unchanged and backward compatible
  • ✅ The FileDiff API change does NOT affect gat (FileDiff is not used anywhere in the codebase)
  • ✅ New features (KYAML formatter, quote style) are opt-in and don't affect default behavior

Test Results:

  • ✅ All existing tests pass with v0.21.0: go test ./... - PASS
  • ✅ Build completes successfully: go build - SUCCESS
  • ✅ YAML prettier tests specifically pass: TestYAMLPrettier_Pretty - PASS

Dependency Impact:

  • No transitive dependency changes that would affect other packages
  • The update only modifies go.mod and go.sum files with version bumps

💡 Recommended Actions

  1. Merge the PR immediately - This is a safe, backward-compatible update
  2. No code changes required - All existing YAML formatting functionality works identically
  3. No configuration changes needed - Default behavior is preserved
  4. Optional: Consider leveraging new features - The quote style enforcement feature could be useful if consistent quote styling is desired in YAML output (future enhancement, not required)

🔗 Reference Links

Generated by koki-develop/claude-renovate-review

@renovate renovate bot force-pushed the renovate/github.com-google-yamlfmt-0.x branch from 7558fba to ec61da8 Compare January 28, 2026 10:03
@renovate renovate bot force-pushed the renovate/github.com-google-yamlfmt-0.x branch from ec61da8 to 5b63080 Compare February 2, 2026 18:35
@renovate renovate bot changed the title fix(deps): update module github.com/google/yamlfmt to v0.21.0 fix(deps): update module github.com/google/yamlfmt to v0.21.0 - autoclosed Feb 19, 2026
@renovate renovate bot closed this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

Comments