Skip to content

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

Renovate PR Review Results

⚖️ Safety Assessment: ✅ Safe

🔍 Release Content Analysis

Major Changes:

  • New KYAML Formatter: Adds support for Kubernetes KYAML format as an alternate formatter type (first non-basic formatter published)
  • Force Quote Style Feature: New configuration option to enforce single (') or double (") quotes for all strings in YAML documents
  • FileDiff Internal Structure Change: Modified FileDiff.Original and FileDiff.Formatted to use byte slices internally (only affects direct access to internal types)

Breaking Changes:

  • None affecting gat: The codebase only uses the public Factory and Formatter interfaces, which remain unchanged
  • FileDiff type changes are internal and not used by gat
  • Configuration validation is now stricter (invalid enum values properly fail), but gat passes nil config to NewFormatter()

Bug Fixes:

  • GitLab output format restored with missing required fields
  • Fixed /dev/stdin argument handling (prevented double reads on stdin)
  • Improved error handling in filepath walker to prevent panics on filesystem read failures

Security Fixes:

  • No security-related fixes mentioned in this release

🎯 Impact Scope Investigation

Usage Identification:

  • Primary usage location: internal/prettier/yaml.go:4-5 and internal/prettier/yaml.go:16-34
  • Usage pattern:
    factory: &basic.BasicFormatterFactory{}
    formatter, err := p.factory.NewFormatter(nil)
    b, err := formatter.Format([]byte(input))

API Compatibility Analysis:

  • Factory.NewFormatter(config map[string]interface{}) (Formatter, error) - Unchanged
  • Formatter.Format([]byte) ([]byte, error) - Unchanged
  • basic.BasicFormatterFactory - Unchanged

Dependencies Impact:

  • Go module hash change in go.sum confirms this is only a version bump
  • No transitive dependency changes detected in the diff

Configuration Impact:

  • gat passes nil to NewFormatter(), so stricter validation does not affect it
  • No configuration files need updates

💡 Recommended Actions

No actions required - This update can be merged safely because:

  1. API Compatibility: The public interfaces used by gat (Factory and Formatter) remain completely unchanged between v0.20.0 and v0.21.0
  2. Usage Pattern: gat only uses the stable public API (NewFormatter(nil) and Format([]byte)) and doesn't access any internal types like FileDiff
  3. Configuration Safety: Passing nil config bypasses the stricter validation changes
  4. Bug Fixes: The improvements (error handling, stdin processing) enhance stability without changing behavior
  5. Test Coverage: Existing test in internal/prettier/yaml_test.go validates the integration continues to work

Optional Follow-up (not blocking):

  • Consider adding tests for edge cases that benefit from improved error handling (filesystem access failures)

🔗 Reference Links

Generated by koki-develop/claude-renovate-review

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.

1 participant