Skip to content

Commit 012b726

Browse files
authored
maintenance (#713)
* maint: ci: bump github actions * maint: bump babashka fs * maint: bump babashka process * maint: test: bump logback classic * maint: dev: bump cider nrepl * maint: dev: bump kondo * maint: dev: bump flow-storm * maint: test: bump clojure 1.12 * maint: dev: bump tools build * maint: dev: bump nrepl * maint: test: bump babashka cli * maint: dev: update kondo lib imports * maint: ci: bump github upload artifact action
1 parent c3b62b5 commit 012b726

4 files changed

Lines changed: 53 additions & 17 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
(ns babashka.fs
2+
(:require [clj-kondo.hooks-api :as api]))
3+
4+
(defn- symbol-node? [node]
5+
(and (api/token-node? node)
6+
(symbol? (api/sexpr node))))
7+
8+
(defn with-temp-dir
9+
[{:keys [node]}]
10+
(let [args (rest (:children node))
11+
binding-like-vector (first args)
12+
body (rest args)]
13+
(when-not (zero? (count args)) ;; let clj-kondo report on arity
14+
(if-not (api/vector-node? binding-like-vector)
15+
(api/reg-finding! (assoc (meta binding-like-vector)
16+
:message "babashka.fs/with-temp-dir requires a vector for first arg"
17+
:type :babashka-fs/with-temp-dir-first-arg-not-vector))
18+
(let [[binding-sym options & rest-in-vec] (:children binding-like-vector)]
19+
(when (not (symbol-node? binding-sym))
20+
(api/reg-finding! (assoc (meta (or binding-sym binding-like-vector))
21+
:message "babashka.fs/with-temp-dir vector arg requires binding-name symbol as first value"
22+
:type :babashka-fs/with-temp-dir-vector-arg-needs-binding-symbol)))
23+
(doseq [extra-vector-arg rest-in-vec]
24+
(api/reg-finding! (assoc (meta extra-vector-arg)
25+
:message "babashka.fs/with-temp-dir vector arg accepts at most 2 values"
26+
:type :babashka-fs/with-temp-dir-vector-arg-extra-value)))
27+
28+
(when binding-sym
29+
{:node (api/list-node
30+
;; satisfy linter by creating binding for for binding-sym
31+
(list*
32+
(api/token-node 'let)
33+
;; it doesn't really matter what we bind to, so long as it is bound
34+
(api/vector-node [binding-sym (api/token-node nil)])
35+
options ;; avoid unused binding when options is a binding
36+
body))}))))))

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v5
19+
uses: actions/checkout@v6
2020

2121
- name: Restore Clojure deps from cache
22-
uses: actions/cache/restore@v4
22+
uses: actions/cache/restore@v5
2323
with:
2424
path: |
2525
~/.m2/repository

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
tests: ${{ steps.set-tests.outputs.tests }}
1919

2020
steps:
21-
- uses: actions/checkout@v5
21+
- uses: actions/checkout@v6
2222

2323
- name: Clojure deps cache
24-
uses: actions/cache@v4
24+
uses: actions/cache@v5
2525
with:
2626
path: |
2727
~/.m2/repository
@@ -115,10 +115,10 @@ jobs:
115115
unzip edgedriver_mac64_m1.zip -d $RUNNER_TEMP/edgedriver
116116
echo "$RUNNER_TEMP/edgedriver" >> $GITHUB_PATH
117117
118-
- uses: actions/checkout@v5
118+
- uses: actions/checkout@v6
119119

120120
- name: Restore Clojure deps from cache
121-
uses: actions/cache/restore@v4
121+
uses: actions/cache/restore@v5
122122
with:
123123
path: |
124124
~/.m2/repository
@@ -160,7 +160,7 @@ jobs:
160160

161161
- name: Upload test debug output
162162
if: always()
163-
uses: actions/upload-artifact@v4
163+
uses: actions/upload-artifact@v6
164164
with:
165165
name: ${{ matrix.id }}-debug-screenshots
166166
path: target/debug-screenshots/*

deps.edn

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{:paths ["src" "resources"]
22
:deps {org.clojure/clojure {:mvn/version "1.10.3"} ;; min clojure version
3-
babashka/fs {:mvn/version "0.5.27"}
4-
babashka/process {:mvn/version "0.6.23"}
3+
babashka/fs {:mvn/version "0.5.30"}
4+
babashka/process {:mvn/version "0.6.24"}
55
org.babashka/http-client {:mvn/version "0.4.23"}
66
org.clj-commons/slingshot {:mvn/version "0.13.0"}
77
cheshire/cheshire {:mvn/version "6.1.0"}
@@ -17,12 +17,12 @@
1717
:github-coords clj-commons/etaoin}}
1818

1919
:1.11 {:replace-deps {org.clojure/clojure {:mvn/version "1.11.4"}}}
20-
:1.12 {:replace-deps {org.clojure/clojure {:mvn/version "1.12.3"}}}
20+
:1.12 {:replace-deps {org.clojure/clojure {:mvn/version "1.12.4"}}}
2121
:debug {:extra-paths ["env/dev/resources"]}
2222
:test {:extra-paths ["test" "env/test/resources" "build"]
2323
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}
24-
org.babashka/cli {:mvn/version "0.8.66"}
25-
ch.qos.logback/logback-classic {:mvn/version "1.5.19"}
24+
org.babashka/cli {:mvn/version "0.8.67"}
25+
ch.qos.logback/logback-classic {:mvn/version "1.5.22"}
2626
;; for http-client which uses apache http client 4.x which uses commons logging
2727
org.slf4j/jcl-over-slf4j {:mvn/version "2.0.17"}}
2828
:exec-fn test-shared/test
@@ -51,7 +51,7 @@
5151
:main-opts ["-m" "babashka.cli.exec"]}
5252

5353
:clofidence {:classpath-overrides {org.clojure/clojure nil}
54-
:extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.3-1"}
54+
:extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.4"}
5555
com.github.flow-storm/clofidence {:mvn/version "0.4.2"}}
5656
:exec-fn clofidence.main/run
5757
:exec-args {:report-name "Etaoin Test Coverage"
@@ -61,7 +61,7 @@
6161
:jvm-opts ["-Dclojure.storm.instrumentOnlyPrefixes=etaoin"]}
6262

6363
;; for consistent linting we use a specific version of clj-kondo through the jvm
64-
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2025.09.22"}}
64+
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2025.10.23"}}
6565
:main-opts ["-m" "clj-kondo.main"]}
6666

6767
:eastwood {:extra-deps {jonase/eastwood {:mvn/version "1.4.3"}}
@@ -72,7 +72,7 @@
7272
:exclude-linters [:local-shadows-var]
7373
:ignored-faults {:deprecations {etaoin.api-test true}}}]}
7474

75-
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.10"}}
75+
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.11"}}
7676
:extra-paths ["build"]
7777
:ns-default build}
7878

@@ -88,8 +88,8 @@
8888

8989
:repl/cider
9090
{:extra-deps {org.clojure/clojure {:mvn/version "1.12.3"}
91-
nrepl/nrepl {:mvn/version "1.4.0"}
92-
cider/cider-nrepl {:mvn/version "0.57.0"}
91+
nrepl/nrepl {:mvn/version "1.5.1"}
92+
cider/cider-nrepl {:mvn/version "0.58.0"}
9393
refactor-nrepl/refactor-nrepl {:mvn/version "3.11.0"}}
9494
:jvm-opts ["-XX:-OmitStackTraceInFastThrow"]
9595
:main-opts ["-m" "nrepl.cmdline"

0 commit comments

Comments
 (0)