Skip to content

v0.14.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 01 Nov 14:20
· 2 commits to main since this release
1c3f200

Shoutouts To The Community Release

I have been in not the best health the last while, which is why this release took so long to cut. On the bright side, this release features more contributions from the community than from myself. Thank you to everyone who contributed!

Features

strip_directives

yaml.v3 does not support directives. The best thing to do would be to add some amount of support for directives, which I will do in the future just taking it as far as the parser not failing upon finding a directive. In the short term, I added a hotfix style feature that will strip the directives before formatting and put them back in. The feature is fraught with edge cases and only works reliably with directives at the top of the file. See the explanations I added in the docs.

gitignore_excludes searches up the directory structure for the nearest .gitignore

Arguably a fix, the gitignore_excludes feature will now look up the directory structure for the nearest .gitignore which unlocks monorepo usage patterns for yamlfmt.

JSON schema

The community has added a JSON Schema! I'm calling it out in release notes, but this is not tied to yamlfmt releases in any way. If you have any fixes or improvements to make, they will not need to be tied to git tags being cut.

I am not super familiar with JSON Schema; I will try my best not to break it and keep it up to date but I'm not gonna be great at addressing potential deeper issues with it.

Validating releases with cosign

The release artifacts now generate other artifacts that allow you to verify releases using the cosign tool.

Fixes

The line_ending setting in the formatter config is respected again

This was a regression in v0.13.0 where I did some refactors to config discovery. I uncovered an edge case in my original code to handle the line_ending setting in the formatter block (vs the global version). This has been fixed in this release.

eof_newline no longer panics on an empty file

If the file was empty, the eof_newline feature would panic. Never thought of that! This has been fixed.

Contributors

@thiagowfx added the JSON Schema
@Shion1305 fixed the eof_newline panic
@dhth added cosign support to releases
@nikaro added .gitignore discovery

I think this is the most contributors I've had in a release! Thank you everyone!

Changelog (generated)

  • feat: introduce a json schema file for yamlfmt by @thiagowfx in #193
  • 🐛 panic against empty file with eof_newline feature, resolves: #196 by @Shion1305 in #197
  • fix: look for gitignore file until the git root by @nikaro in #200
  • fix(json schema): remove additionalProperties any by @thiagowfx in #202
  • Add JSON schema validity test by @braydonk in #203
  • ci: sign checksum file with cosign by @dhth in #207
  • Clarify that cosign support will only be present starting from v0.14.0 by @braydonk in #212
  • command: correctly propogate line_ending setting by @braydonk in #216
  • Add feature strip_directives by @braydonk in #217

Full Changelog: v0.13.0...v0.14.0