|
| 1 | +1.0.0 |
| 2 | +===== |
| 3 | +pre-commit will now be following [semver](http://semver.org/). Thanks to all |
| 4 | +of the [contributors](https://github.com/pre-commit/pre-commit/graphs/contributors) |
| 5 | +that have helped us get this far! |
| 6 | + |
| 7 | +### Features |
| 8 | + |
| 9 | +- pre-commit's cache directory has moved from `~/.pre-commit` to |
| 10 | + `$XDG_CACHE_HOME/pre-commit` (usually `~/.cache/pre-commit`). |
| 11 | + - `pre-commit clean` now cleans up both the old and new directory. |
| 12 | + - If you were caching this directory in CI, you'll want to adjust the |
| 13 | + location. |
| 14 | + - #562 issue by @nagromc. |
| 15 | + - #602 PR by @asottile. |
| 16 | +- A new configuration format for `.pre-commit-config.yaml` is introduced which |
| 17 | + will enable future development. |
| 18 | + - The new format has a top-level map instead of a top-level list. The |
| 19 | + new format puts the hook repositories in a `hooks` key. |
| 20 | + - Old list-based configurations will continue to be supported. |
| 21 | + - A command `pre-commit migrate-config` has been introduced to "upgrade" |
| 22 | + the configuration format to the new map-based configuration. |
| 23 | + - `pre-commit autoupdate` now automatically calls `migrate-config`. |
| 24 | + - In a later release, list-based configurations will issue a deprecation |
| 25 | + warning. |
| 26 | + - An example diff for upgrading a configuration: |
| 27 | + |
| 28 | + ```diff |
| 29 | + +repos: |
| 30 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 31 | + sha: v0.9.2 |
| 32 | + hooks: |
| 33 | + ``` |
| 34 | + - #414 issue by @asottile. |
| 35 | + - #610 PR by @asottile. |
| 36 | + |
| 37 | +### Updating |
| 38 | + |
| 39 | +- Run `pre-commit migrate-config` to convert `.pre-commit-config.yaml` to the |
| 40 | + new map format. |
| 41 | +- Update any references from `~/.pre-commit` to `~/.cache/pre-commit`. |
| 42 | + |
1 | 43 | 0.18.3 |
2 | 44 | ====== |
3 | 45 | - Allow --config to affect `pre-commit install` |
|
0 commit comments