Skip to content

Commit

Permalink
maint: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
lread committed Dec 28, 2024
1 parent 9e1fcbe commit 9ae56ef
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 15 deletions.
6 changes: 5 additions & 1 deletion .clj-kondo/taoensso/encore/config.edn
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{:hooks {:analyze-call {taoensso.encore/defalias taoensso.encore/defalias}}}
{:hooks
{:analyze-call
{taoensso.encore/defalias taoensso.encore/defalias
taoensso.encore/defn-cached taoensso.encore/defn-cached
taoensso.encore/defonce taoensso.encore/defonce}}}
57 changes: 46 additions & 11 deletions .clj-kondo/taoensso/encore/taoensso/encore.clj
Original file line number Diff line number Diff line change
@@ -1,16 +1,51 @@
(ns taoensso.encore
"I don't personally use clj-kondo, so these hooks are
kindly authored and maintained by contributors.
PRs very welcome! - Peter Taoussanis"
(:refer-clojure :exclude [defonce])
(:require
[clj-kondo.hooks-api :as hooks]))

(defn defalias [{:keys [node]}]
(defn defalias
[{:keys [node]}]
(let [[sym-raw src-raw] (rest (:children node))
src (if src-raw src-raw sym-raw)
sym (if src-raw
sym-raw
(symbol (name (hooks/sexpr src))))]
{:node (with-meta
(hooks/list-node
[(hooks/token-node 'def)
(hooks/token-node (hooks/sexpr sym))
(hooks/token-node (hooks/sexpr src))])
(meta src))}))
src (or src-raw sym-raw)
sym (if src-raw sym-raw (symbol (name (hooks/sexpr src))))]
{:node
(with-meta
(hooks/list-node
[(hooks/token-node 'def)
(hooks/token-node (hooks/sexpr sym))
(hooks/token-node (hooks/sexpr src))])
(meta src))}))

(defn defn-cached
[{:keys [node]}]
(let [[sym _opts binding-vec & body] (rest (:children node))]
{:node
(hooks/list-node
(list
(hooks/token-node 'def)
sym
(hooks/list-node
(list*
(hooks/token-node 'fn)
binding-vec
body))))}))

(defn defonce
[{:keys [node]}]
;; args = [sym doc-string? attr-map? init-expr]
(let [[sym & args] (rest (:children node))
[doc-string args] (if (and (hooks/string-node? (first args)) (next args)) [(hooks/sexpr (first args)) (next args)] [nil args])
[attr-map init-expr] (if (and (hooks/map-node? (first args)) (next args)) [(hooks/sexpr (first args)) (fnext args)] [nil (first args)])

attr-map (if doc-string (assoc attr-map :doc doc-string) attr-map)
sym+meta (if attr-map (with-meta sym attr-map) sym)
rewritten
(hooks/list-node
[(hooks/token-node 'clojure.core/defonce)
sym+meta
init-expr])]

{:node rewritten}))
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
java-version: '23'

- name: Install Clojure tools
uses: DeLaGuardo/setup-clojure@12.5
uses: DeLaGuardo/setup-clojure@13.1
with:
cli: 'latest'
bb: 'latest'
Expand Down
4 changes: 2 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
:deps {org.clojure/clojure {:mvn/version "1.12.0"}}

:aliases
{:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.5"}
{:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.6"}
slipset/deps-deploy {:mvn/version "0.2.2"}}
:ns-default build}

:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.10.1241"}
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.11.1260"}
org.slf4j/slf4j-simple {:mvn/version "2.0.16"} ;; to rid ourselves of logger warnings
}
:main-opts ["-m" "antq.core" "--ignore-locals"]}}}

0 comments on commit 9ae56ef

Please sign in to comment.