Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Aug 1, 2025

This PR contains the following updates:

Package Update Change Pending
google/yamlfmt minor 0.17.10.20.0 v0.21.0

Release Notes

google/yamlfmt (google/yamlfmt)

v0.20.0

Compare Source

Features

-version flag works when using go install

The previous method of version retrieval only worked when downloading the binary through GitHub releases or one of the community-made packages. When using go install, the version would always be dev because the ldflags weren't being used to set the version. It now falls back to debug.BuildInfo so that the version will be displayed properly when installing through this method.

Fixes

Performance Issues when formatting large files

Details in #​283. Two fixes were submitted:

  • Use of strings.Repeat instead of manually looping during string construction #​284
  • Changing logic to only construct a diff string when the debug code is active #​287

If you have experienced similar performance issues, these fixes should help.

Contributors

Thanks @​artur-beznosyuk-verkada for the performance issue analysis and the strings.Repeat fix.

v0.19.0

Compare Source

With v0.19.0, I have fully reverted all the pre-commit changes done in the v0.18.0 line. I apologize for any drama this caused in your CI. I have learned my lesson and won't modify the pre-commit hook any further. Maybe something will change in the future if someone joins the team maintaining the hook (see https://redirect.github.com/google/yamlfmt/discussions/278) but I personally will not do it.

I have updated the pre-commit docs to include some configuration tricks for how to get around the problems this original form of the hook can cause. Hopefully this should be enough to resolve problems that some users originally experienced that inspired my attempt in the v0.18.0 series.

v0.18.1

Compare Source

The previous fix for pre-commit was poorly done. The default experience for a pre-commit hook is to pass all the discovered filenames to the entry, and when yamlfmt receives references to exact files in its list of arguments, by design it will run them through the formatter without checking whether the config would want to run them. With the fix in v0.18.0, this would cause all files in a repo, including non-yaml ones, to run through the formatter unconditionally. I think I have finally settled on a proper implementation, which is explained in the docs.

On a related note, if you are knowledgeable about pre-commit and interested in the future of this project as a pre-commit hook, please take a look at my recent announcement: #​278

v0.18.0

Compare Source

The primary reason for this release is a change to the pre-commit hook that might be breaking to some users.

Features

pre-commit hook no longer specifies filetypes

The expectation for yamlfmt is to be run in a working directory of many different filetypes, and to configure what you as a user want the tool to run on based on configuration (file extensions, doublestar patterns, etc). The hook no longer specifies types: [yaml] like it used to. You can restore this behaviour by overriding it in your pre-commit config like so:

- repo: https://github.com/google/yamlfmt
  rev: v0.18.0
  hooks:
    - id: yamlfmt
      types: [yaml]

However, you will likely have a better experience by reconfiguring yamlfmt to match the intended experience.

Default usage message on misuse of command

If you use the command yamlfmt with no arguments, and no config is discovered, the tool will now output a default usage message to indicate to the user how to properly use the command.

v0.17.2

Compare Source

Bug Fixes

Alias nodes no longer come with an extra whitespace

In an attempt to fix a behaviour in yaml.v3's default encoding behaviour that would produce invalid YAML what an alias was used as a key (see #​242) I introduced a regression where my fix was too wide of a net and produced an additional whitespace in scenarios where it wasn't necessary (see #​250). To the extent of my testing this appears to be fixed now, however if that is not the case please feel free to re-open #​250 with the example case that isn't covered or open a new issue.

Contributors

Thank you @​octo for the bug fix in #​260!


Configuration

📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), 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.

@renovate renovate bot force-pushed the renovate/google-yamlfmt-0.x branch from 5d04dd5 to 579f94b Compare November 4, 2025 20:45
@renovate renovate bot changed the title chore(deps): Update dependency google/yamlfmt to v0.17.2 chore(deps): Update dependency google/yamlfmt to v0.18.0 Nov 4, 2025
@renovate renovate bot force-pushed the renovate/google-yamlfmt-0.x branch from 579f94b to c7b0cbe Compare November 6, 2025 17:36
@renovate renovate bot changed the title chore(deps): Update dependency google/yamlfmt to v0.18.0 chore(deps): Update dependency google/yamlfmt to v0.18.1 Nov 6, 2025
@renovate renovate bot force-pushed the renovate/google-yamlfmt-0.x branch from c7b0cbe to f7cd115 Compare November 7, 2025 15:45
@renovate renovate bot changed the title chore(deps): Update dependency google/yamlfmt to v0.18.1 chore(deps): Update dependency google/yamlfmt to v0.19.0 Nov 7, 2025
Co-authored-by: Tim Schwenke <tim@trallnag.com>
@renovate renovate bot changed the title chore(deps): Update dependency google/yamlfmt to v0.19.0 chore(deps): Update dependency google/yamlfmt to v0.20.0 Nov 12, 2025
@renovate renovate bot force-pushed the renovate/google-yamlfmt-0.x branch from f7cd115 to 75449da Compare November 12, 2025 17:47
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