Skip to content

Commit 288bc78

Browse files
committed
Don't automatically remove old files with emit!
Instead provide a `clean!` function that takes care of cleaning files from the current and old configuration locations.
1 parent 73d32cc commit 288bc78

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Malli is in well matured [alpha](README.md#alpha).
1717
## UNRELEASED
1818

1919
* `malli.clj-kondo/emit!` saves to `.clj-kondo/imports` now as recommended by clj-kondo. [#1216](https://github.com/metosin/malli/pull/1216)
20+
* `malli.clj-kondo/emit!` no longer deletes anything automatically. Use `malli.clj-kondo/clean!` to clean up.
2021

2122
## 0.19.1 (2025-06-09)
2223
* Technical release

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3300,6 +3300,15 @@ Emitting config into `./.clj-kondo/imports/metosin/malli-types-clj/config.edn`:
33003300
(mc/emit!)
33013301
```
33023302

3303+
Removing the generated configurations. Note that this removes also
3304+
from locations where old versions of malli used to store the
3305+
configuration file:
3306+
3307+
<!-- :test-doc-blocks/skip -->
3308+
```clojure
3309+
(mc/clean!)
3310+
```
3311+
33033312
In action:
33043313

33053314
![malli](docs/img/clj-kondo.png)

src/malli/clj_kondo.cljc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@
187187
(save! config key nil))
188188
([config key options]
189189
(let [cfg-file (-config-file-path key options)]
190-
(clean! key options)
191190
(io/make-parents cfg-file)
192191
(spit cfg-file (with-out-str (fipp/pprint config {:width 120})))
193192
config))))

0 commit comments

Comments
 (0)