Skip to content

Commit

Permalink
maint: bump deps to current
Browse files Browse the repository at this point in the history
Of note:
- address new clj-kondo findings (dynamic tests vars were uninitialized).
  • Loading branch information
lread committed Mar 14, 2024
1 parent 17f2f23 commit 9eb42ff
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .clj-kondo/http-kit/http-kit/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

{:hooks
{:analyze-call {org.httpkit.server/with-channel httpkit.with-channel/with-channel}}}
16 changes: 16 additions & 0 deletions .clj-kondo/http-kit/http-kit/httpkit/with_channel.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(ns httpkit.with-channel
(:require [clj-kondo.hooks-api :as api]))

(defn with-channel [{node :node}]
(let [[request channel & body] (rest (:children node))]
(when-not (and request channel) (throw (ex-info "No request or channel provided" {})))
(when-not (api/token-node? channel) (throw (ex-info "Missing channel argument" {})))
(let [new-node
(api/list-node
(list*
(api/token-node 'let)
(api/vector-node [channel (api/vector-node [])])
request
body))]

{:node new-node})))
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Git User so that we can later commit
uses: fregante/[email protected]

- name: Clojure deps cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.m2/repository
Expand All @@ -31,13 +31,13 @@ jobs:
restore-keys: cljdeps-

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'

- name: Install Clojure Tools
uses: DeLaGuardo/setup-clojure@10.3
uses: DeLaGuardo/setup-clojure@12.5
with:
bb: 'latest'

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
tests: ${{ steps.set-tests.outputs.tests }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Clojure deps cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.m2/repository
Expand All @@ -23,13 +23,13 @@ jobs:
restore-keys: cljdeps-

- name: "Setup Java"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'

- name: Install Clojure Tools
uses: DeLaGuardo/setup-clojure@10.3
uses: DeLaGuardo/setup-clojure@12.5
with:
bb: 'latest'

Expand Down Expand Up @@ -71,10 +71,10 @@ jobs:
if: ${{ matrix.os == 'ubuntu' }}
run: sudo apt-get -y install fluxbox

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Clojure deps cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.m2/repository
Expand All @@ -84,13 +84,13 @@ jobs:
restore-keys: cljdeps-

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'

- name: Install Clojure Tools
uses: DeLaGuardo/setup-clojure@10.3
uses: DeLaGuardo/setup-clojure@12.5
with:
bb: 'latest'

Expand Down
44 changes: 24 additions & 20 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.9.0"} ;; min clojure version
babashka/fs {:mvn/version "0.3.17"}
babashka/process {:mvn/version "0.4.16"}
babashka/fs {:mvn/version "0.5.20"}
babashka/process {:mvn/version "0.5.22"}
clj-http/clj-http {:mvn/version "3.12.3"} ;; for jvm use
org.clj-commons/clj-http-lite {:mvn/version "1.0.13"} ;; for babashka use
slingshot/slingshot {:mvn/version "0.12.2"}
cheshire/cheshire {:mvn/version "5.11.0"}
org.clojure/tools.cli {:mvn/version "1.0.214"}
org.clojure/tools.logging {:mvn/version "1.2.4"}}
cheshire/cheshire {:mvn/version "5.12.0"}
org.clojure/tools.cli {:mvn/version "1.1.230"}
org.clojure/tools.logging {:mvn/version "1.3.0"}}
:aliases
{:1.11 {:replace-deps {org.clojure/clojure {:mvn/version "1.11.1"}}}
{:1.11 {:replace-deps {org.clojure/clojure {:mvn/version "1.11.2"}}}
:1.12 {:replace-deps {org.clojure/clojure {:mvn/version "1.12.0-alpha9"}}}
:debug {:extra-paths ["env/dev/resources"]}
:test {:extra-paths ["test" "env/test/resources"]
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}
org.babashka/cli {:mvn/version "0.7.51"}
ch.qos.logback/logback-classic {:mvn/version "1.4.7"}
org.babashka/cli {:mvn/version "0.8.58"}
ch.qos.logback/logback-classic {:mvn/version "1.3.14"}
;; for http-client which uses apache http client 4.x which uses commons logging
org.slf4j/jcl-over-slf4j {:mvn/version "2.0.7"}}
org.slf4j/jcl-over-slf4j {:mvn/version "2.0.12"}}
:exec-fn cognitect.test-runner.api/test
:org.babashka/cli {:coerce {:nses [:symbol]
:patterns [:string]
Expand All @@ -25,15 +26,15 @@
:script {:extra-paths ["script"]}

;; test-doc-blocks - gen tests
:test-doc-blocks {:replace-deps {org.clojure/clojure {:mvn/version "1.11.1"}
:test-doc-blocks {:replace-deps {org.clojure/clojure {:mvn/version "1.11.2"}
com.github.lread/test-doc-blocks {:mvn/version "1.0.166-alpha"}}
:replace-paths []
:ns-default lread.test-doc-blocks
:exec-args {:docs ["doc/01-user-guide.adoc"]}}

;; test-doc-blocks - run tests
;; usage: test:test-docs
:test-docs {:override-deps {org.clojure/clojure {:mvn/version "1.11.1"}}
:test-docs {:override-deps {org.clojure/clojure {:mvn/version "1.11.2"}}
:extra-paths ["target/test-doc-blocks/test"]
:exec-fn cognitect.test-runner.api/test
:exec-args {:dirs ["target/test-doc-blocks/test"]}
Expand All @@ -43,23 +44,26 @@
:main-opts ["-m" "babashka.cli.exec"]}

;; for consistent linting we use a specific version of clj-kondo through the jvm
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2023.04.14"}}
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2024.03.13"}}
:main-opts ["-m" "clj-kondo.main"]}

:build {:deps {io.github.clojure/tools.build {:mvn/version "0.9.4"}
slipset/deps-deploy {:mvn/version "0.2.1"}}
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.0"}
slipset/deps-deploy {:mvn/version "0.2.2"}}
:ns-default build}

:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.3.1043"}
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.8.1185"}
org.clojure/clojure {:mvn/version "1.11.1"}
org.slf4j/slf4j-simple {:mvn/version "2.0.7"} ;; to rid ourselves of logger warnings
org.slf4j/slf4j-simple {:mvn/version "2.0.12"} ;; to rid ourselves of logger warnings
}
:main-opts ["-m" "antq.core"]}
:main-opts ["-m" "antq.core"
"--exclude=ch.qos.logback/[email protected]" ;; requires min jdk 11, we are currently jdk8 compatible
"--exclude=ch.qos.logback/[email protected]" ;; requires min jdk 11, we are currently jdk8 compatible
]}

:repl/cider
{:extra-deps {nrepl/nrepl {:mvn/version "1.0.0"}
cider/cider-nrepl {:mvn/version "0.30.0"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.6.0"}}
{:extra-deps {nrepl/nrepl {:mvn/version "1.1.1"}
cider/cider-nrepl {:mvn/version "0.47.0"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}}
:jvm-opts ["-XX:-OmitStackTraceInFastThrow"]
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"
Expand Down
2 changes: 1 addition & 1 deletion test/etaoin/api_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
(get-drivers-from-prop)
(get-default-drivers)))

(def ^:dynamic *driver*)
(def ^:dynamic *driver* nil)

;; tests failed in safari 13.1.1 https://bugs.webkit.org/show_bug.cgi?id=202589 use STP newest
(defn fixture-browsers [f]
Expand Down
6 changes: 3 additions & 3 deletions test/etaoin/ide_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
[etaoin.ide.flow :as ide]
[etaoin.test-report :as test-report]))

(def ^:dynamic *driver*)
(def ^:dynamic *base-url*)
(def ^:dynamic *test-file-path*)
(def ^:dynamic *driver* nil)
(def ^:dynamic *base-url* nil)
(def ^:dynamic *test-file-path* nil)

(defn get-default-drivers
"Default and supported drivers for ide tests"
Expand Down
4 changes: 2 additions & 2 deletions test/etaoin/test_report.clj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(ns etaoin.test-report
(:require [clojure.test]))

(def ^:dynamic *context*)
(def ^:dynamic *context* nil)

(def platform
(if (System/getProperty "babashka.version") "bb" "jvm"))

(defmethod clojure.test/report :begin-test-var [m]
(let [test-name (-> m :var meta :name)]
(if (bound? #'*context*)
(if *context*
(println (format "=== %s [%s][%s]" test-name platform *context*))
(println (format "=== %s [%s]" test-name platform)))))

0 comments on commit 9eb42ff

Please sign in to comment.