-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from parenthesin/bump/deps-2024-10-28
bump: deps
- Loading branch information
Showing
9 changed files
with
248 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; Copyright 2024 Nubank NA | ||
|
||
; The use and distribution terms for this software are covered by the | ||
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0) | ||
; which can be found in the file epl-v10.html at the root of this distribution. | ||
; | ||
; By using this software in any fashion, you are agreeing to be bound by | ||
; the terms of this license. | ||
; | ||
; You must not remove this notice, or any other, from this software. | ||
|
||
{:hooks | ||
{:analyze-call | ||
{io.pedestal.log/trace hooks.io.pedestal.log/log-expr | ||
io.pedestal.log/debug hooks.io.pedestal.log/log-expr | ||
io.pedestal.log/info hooks.io.pedestal.log/log-expr | ||
io.pedestal.log/warn hooks.io.pedestal.log/log-expr | ||
io.pedestal.log/error hooks.io.pedestal.log/log-expr}}} |
26 changes: 26 additions & 0 deletions
26
.clj-kondo/io.pedestal/pedestal.log/hooks/io/pedestal/log.clj_kondo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
; Copyright 2024 Nubank NA | ||
|
||
; The use and distribution terms for this software are covered by the | ||
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0) | ||
; which can be found in the file epl-v10.html at the root of this distribution. | ||
; | ||
; By using this software in any fashion, you are agreeing to be bound by | ||
; the terms of this license. | ||
; | ||
; You must not remove this notice, or any other, from this software. | ||
|
||
(ns hooks.io.pedestal.log | ||
(:require [clj-kondo.hooks-api :as api])) | ||
|
||
(defn log-expr | ||
"Expands (log-expr :a :A :b :B ... ) | ||
to (hash-map :a :A :b :B ... ) per clj-kondo examples." | ||
[{:keys [:node]}] | ||
(let [[k v & _kvs] (rest (:children node))] | ||
(when-not (and k v) | ||
(throw (ex-info "No kv pair provided" {}))) | ||
(let [new-node (api/list-node | ||
(list* | ||
(api/token-node 'hash-map) | ||
(rest (:children node))))] | ||
{:node (vary-meta new-node assoc :clj-kondo/ignore [:unused-value])}))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{:lint-as {potemkin.collections/compile-if clojure.core/if | ||
potemkin.collections/reify-map-type clojure.core/reify | ||
potemkin.collections/def-map-type clj-kondo.lint-as/def-catch-all | ||
potemkin.collections/def-derived-map clj-kondo.lint-as/def-catch-all | ||
|
||
potemkin.types/reify+ clojure.core/reify | ||
potemkin.types/defprotocol+ clojure.core/defprotocol | ||
potemkin.types/deftype+ clojure.core/deftype | ||
potemkin.types/defrecord+ clojure.core/defrecord | ||
potemkin.types/definterface+ clojure.core/defprotocol | ||
potemkin.types/extend-protocol+ clojure.core/extend-protocol | ||
potemkin.types/def-abstract-type clj-kondo.lint-as/def-catch-all | ||
|
||
potemkin.utils/doit clojure.core/doseq | ||
potemkin.utils/doary clojure.core/doseq | ||
potemkin.utils/condp-case clojure.core/condp | ||
potemkin.utils/fast-bound-fn clojure.core/bound-fn | ||
|
||
potemkin.walk/prewalk clojure.walk/prewalk | ||
potemkin.walk/postwalk clojure.walk/postwalk | ||
potemkin.walk/walk clojure.walk/walk | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;;; top-level from import-vars | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
;; Have hooks | ||
;;potemkin/import-fn potemkin.namespaces/import-fn | ||
;;potemkin/import-macro potemkin.namespaces/import-macro | ||
;;potemkin/import-def potemkin.namespaces/import-def | ||
|
||
;; Internal, not transitive | ||
;;potemkin/unify-gensyms potemkin.macros/unify-gensyms | ||
;;potemkin/normalize-gensyms potemkin.macros/normalize-gensyms | ||
;;potemkin/equivalent? potemkin.macros/equivalent? | ||
|
||
potemkin/condp-case clojure.core/condp | ||
potemkin/doit potemkin.utils/doit | ||
potemkin/doary potemkin.utils/doary | ||
|
||
potemkin/def-abstract-type clj-kondo.lint-as/def-catch-all | ||
potemkin/reify+ clojure.core/reify | ||
potemkin/defprotocol+ clojure.core/defprotocol | ||
potemkin/deftype+ clojure.core/deftype | ||
potemkin/defrecord+ clojure.core/defrecord | ||
potemkin/definterface+ clojure.core/defprotocol | ||
potemkin/extend-protocol+ clojure.core/extend-protocol | ||
|
||
potemkin/reify-map-type clojure.core/reify | ||
potemkin/def-derived-map clj-kondo.lint-as/def-catch-all | ||
potemkin/def-map-type clj-kondo.lint-as/def-catch-all} | ||
|
||
;; leave import-vars alone, kondo special-cases it | ||
:hooks {:macroexpand {#_#_potemkin.namespaces/import-vars potemkin.namespaces/import-vars | ||
potemkin.namespaces/import-fn potemkin.namespaces/import-fn | ||
potemkin.namespaces/import-macro potemkin.namespaces/import-macro | ||
potemkin.namespaces/import-def potemkin.namespaces/import-def | ||
|
||
#_#_potemkin/import-vars potemkin.namespaces/import-vars | ||
potemkin/import-fn potemkin.namespaces/import-fn | ||
potemkin/import-macro potemkin.namespaces/import-macro | ||
potemkin/import-def potemkin.namespaces/import-def}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
(ns potemkin.namespaces | ||
(:require [clj-kondo.hooks-api :as api])) | ||
|
||
(defn import-macro* | ||
([sym] | ||
`(def ~(-> sym name symbol) ~sym)) | ||
([sym name] | ||
`(def ~name ~sym))) | ||
|
||
(defmacro import-fn | ||
([sym] | ||
(import-macro* sym)) | ||
([sym name] | ||
(import-macro* sym name))) | ||
|
||
(defmacro import-macro | ||
([sym] | ||
(import-macro* sym)) | ||
([sym name] | ||
(import-macro* sym name))) | ||
|
||
(defmacro import-def | ||
([sym] | ||
(import-macro* sym)) | ||
([sym name] | ||
(import-macro* sym name))) | ||
|
||
#_ | ||
(defmacro import-vars | ||
"Imports a list of vars from other namespaces." | ||
[& syms] | ||
(let [unravel (fn unravel [x] | ||
(if (sequential? x) | ||
(->> x | ||
rest | ||
(mapcat unravel) | ||
(map | ||
#(symbol | ||
(str (first x) | ||
(when-let [n (namespace %)] | ||
(str "." n))) | ||
(name %)))) | ||
[x])) | ||
syms (mapcat unravel syms) | ||
result `(do | ||
~@(map | ||
(fn [sym] | ||
(let [vr (resolve sym) | ||
m (meta vr)] | ||
(cond | ||
(nil? vr) `(throw (ex-info (format "`%s` does not exist" '~sym) {})) | ||
(:macro m) `(def ~(-> sym name symbol) ~sym) | ||
(:arglists m) `(def ~(-> sym name symbol) ~sym) | ||
:else `(def ~(-> sym name symbol) ~sym)))) | ||
syms))] | ||
result)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
{:paths ["src" "resources"] | ||
:deps {org.clojure/clojure {:mvn/version "1.11.3"} | ||
com.github.parenthesin/components {:mvn/version "0.3.0" | ||
:deps {org.clojure/clojure {:mvn/version "1.12.0"} | ||
com.github.parenthesin/components {:mvn/version "0.3.1" | ||
:exclusions [prismatic/schema]} | ||
com.github.seancorfield/honeysql {:mvn/version "2.6.1147"} | ||
metosin/malli {:mvn/version "0.16.2"} | ||
org.postgresql/postgresql {:mvn/version "42.7.3"}} | ||
com.github.seancorfield/honeysql {:mvn/version "2.6.1203"} | ||
metosin/malli {:mvn/version "0.16.4"} | ||
org.postgresql/postgresql {:mvn/version "42.7.4"}} | ||
:aliases | ||
{:dev {:extra-paths ["test" "dev"]} | ||
:test {:extra-paths ["test"] | ||
:extra-deps {org.clojars.bigsy/pg-embedded-clj {:mvn/version "1.0.1"} | ||
lambdaisland/kaocha {:mvn/version "1.91.1392"} | ||
lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"} | ||
nubank/matcher-combinators {:mvn/version "3.9.1"} | ||
nubank/state-flow {:mvn/version "5.17.0"}} | ||
nubank/state-flow {:mvn/version "5.18.0"}} | ||
:main-opts ["-m" "kaocha.runner"]} | ||
|
||
:clojure-lsp {:replace-deps {com.github.clojure-lsp/clojure-lsp-standalone {:mvn/version "2024.04.22-11.50.26"}} | ||
:clojure-lsp {:replace-deps {com.github.clojure-lsp/clojure-lsp-standalone {:mvn/version "2024.08.05-18.16.00"}} | ||
:main-opts ["-m" "clojure-lsp.main"]} | ||
|
||
:nrepl {:extra-deps {cider/cider-nrepl {:mvn/version "0.49.1"}} | ||
:nrepl {:extra-deps {cider/cider-nrepl {:mvn/version "0.50.2"}} | ||
:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} | ||
|
||
:migratus {:main-opts ["-m" "parenthesin.helpers.migrations"]} | ||
|
||
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.4"}} | ||
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.5"}} | ||
:ns-default build | ||
:exec-args {:uber-file "target/service.jar"}}}} |