v2.0.4
Bugfixes
- There was a naive optimisation for resolving relative paths within the walker implementations, which manifested in a few different issues. This has been refactored with a robust implementation.
- Searching for
.treefmt.toml
and relying on$PRJ_ROOT
have been re-introduced for parity withv1
. - We were not gracefully handling the case where a file was removed from the filesystem but not yet staged. We now log a warning and continue when this happens.
New CI flag
You can now run treefmt
with a --ci
flag which does the following:
- ensures
INFO
level logging at a minimum - enables
--no-cache
and--fail-on-change
- introduces a small startup delay, so we do not start processing until the second after the process starts, thereby ensuring the accuracy of our change detection based on second-level
mod
time. This was causing intermittent failures in CI due to how fast agit
checkout and subsequenttreefmt
invocation were occurring.
Changelog
- 52d8c48: Update nixpkgs.toml (@mattalxndr)
- 17c1785: Update treefmt.toml (@mattalxndr)
- d4aaba9: feat: ci mode (@brianmcgee)
- 0a8ffe0: feat: move filtering of directories and symlinks into walker implementations (@brianmcgee)
- ff8b1ed: feat: refactor relative path function for filesystem walker (@brianmcgee)
- 0953dd5: feat: refactor relative path function for git walker (@brianmcgee)
- bc1ae33: feat: search for .treefmt.toml (@zimbatm)
- 43c2071: fix(cli): restore PRJ_ROOT env var (@zimbatm)
- f9bc8b0: fix(git): gracefully handle a file in the index but not in the filesystem (@brianmcgee)
- a018c29: fix: relative path resolution in filesystem walker (@brianmcgee)