diff --git a/.clj-kondo/imports/babashka/fs/babashka/fs.clj_kondo b/.clj-kondo/imports/babashka/fs/babashka/fs.clj_kondo new file mode 100644 index 0000000..73d4409 --- /dev/null +++ b/.clj-kondo/imports/babashka/fs/babashka/fs.clj_kondo @@ -0,0 +1,36 @@ +(ns babashka.fs + (:require [clj-kondo.hooks-api :as api])) + +(defn- symbol-node? [node] + (and (api/token-node? node) + (symbol? (api/sexpr node)))) + +(defn with-temp-dir + [{:keys [node]}] + (let [args (rest (:children node)) + binding-like-vector (first args) + body (rest args)] + (when-not (zero? (count args)) ;; let clj-kondo report on arity + (if-not (api/vector-node? binding-like-vector) + (api/reg-finding! (assoc (meta binding-like-vector) + :message "babashka.fs/with-temp-dir requires a vector for first arg" + :type :babashka-fs/with-temp-dir-first-arg-not-vector)) + (let [[binding-sym options & rest-in-vec] (:children binding-like-vector)] + (when (not (symbol-node? binding-sym)) + (api/reg-finding! (assoc (meta (or binding-sym binding-like-vector)) + :message "babashka.fs/with-temp-dir vector arg requires binding-name symbol as first value" + :type :babashka-fs/with-temp-dir-vector-arg-needs-binding-symbol))) + (doseq [extra-vector-arg rest-in-vec] + (api/reg-finding! (assoc (meta extra-vector-arg) + :message "babashka.fs/with-temp-dir vector arg accepts at most 2 values" + :type :babashka-fs/with-temp-dir-vector-arg-extra-value))) + + (when binding-sym + {:node (api/list-node + ;; satisfy linter by creating binding for for binding-sym + (list* + (api/token-node 'let) + ;; it doesn't really matter what we bind to, so long as it is bound + (api/vector-node [binding-sym (api/token-node nil)]) + options ;; avoid unused binding when options is a binding + body))})))))) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 139c6af..6626a44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -21,7 +21,7 @@ jobs: uses: fregante/setup-git-user@v2 - name: Clojure deps cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ~/.m2/repository diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ad62cf..5f8931c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,10 +26,10 @@ jobs: if: matrix.os == 'windows' - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Clojure deps cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ~/.m2/repository diff --git a/deps.edn b/deps.edn index eb6b7fe..d9f597a 100644 --- a/deps.edn +++ b/deps.edn @@ -2,10 +2,10 @@ :deps {org.clojure/clojure {:mvn/version "1.11.4"} org.clojure/tools.reader {:mvn/version "1.5.2"} - babashka/fs {:mvn/version "0.5.27"} - clj-kondo/clj-kondo {:mvn/version "2025.09.22"} + babashka/fs {:mvn/version "0.5.30"} + clj-kondo/clj-kondo {:mvn/version "2025.10.23"} dev.nubank/docopt {:mvn/version "0.6.1-fix7"} - metosin/malli {:mvn/version "0.19.2"} + metosin/malli {:mvn/version "0.20.0"} rewrite-clj/rewrite-clj {:mvn/version "1.2.50"}} :aliases {;; we use babashka/neil for project attributes @@ -23,14 +23,14 @@ :1.9 {:override-deps {org.clojure/clojure {:mvn/version "1.9.0"}}} :1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.3"}}} :1.11 {:override-deps {org.clojure/clojure {:mvn/version "1.11.4"}}} - :1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.3"}}} + :1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.4"}}} ;; ;; REPL to support bb dev-jvm & dev-cljs tasks, see script/dev_repl.clj ;; :nrepl - {:extra-deps {nrepl/nrepl {:mvn/version "1.4.0"} - cider/cider-nrepl {:mvn/version "0.57.0"} + {:extra-deps {nrepl/nrepl {:mvn/version "1.5.1"} + cider/cider-nrepl {:mvn/version "0.58.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.11.0"}} :jvm-opts ["-XX:-OmitStackTraceInFastThrow" "-Djdk.attach.allowAttachSelf"] :main-opts ["-m" "nrepl.cmdline" @@ -40,8 +40,8 @@ :flowstorm {;; for disabling the official compiler :classpath-overrides {org.clojure/clojure nil} - :extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.3-1"} - com.github.flow-storm/flow-storm-dbg {:mvn/version "4.5.7"}} + :extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.4"} + com.github.flow-storm/flow-storm-dbg {:mvn/version "4.5.9"}} :jvm-opts ["-Dclojure.storm.instrumentEnable=true"]} ;; clojure -X support for local examples @@ -104,7 +104,7 @@ ;; ;; Deployment ;; - :build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.10"}} + :build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.11"}} :extra-paths ["src" "build"] :ns-default build}