diff --git a/.clj-kondo/config.edn b/.clj-kondo/config.edn index f1c850e..32dff48 100644 --- a/.clj-kondo/config.edn +++ b/.clj-kondo/config.edn @@ -9,7 +9,8 @@ {:macroexpand {etaoin.impl.util/defmethods etaoin.impl.util/defmethods etaoin.impl.util/with-tmp-file etaoin.impl.util/with-tmp-file}} - :linters {:deprecated-var + :linters {:redundant-ignore {:level :off} + :deprecated-var {:exclude {etaoin.api/child {:namespaces [etaoin.api-test]} etaoin.api/children {:namespaces [etaoin.api-test]}}} :unresolved-symbol diff --git a/.clj-kondo/taoensso/encore/config.edn b/.clj-kondo/taoensso/encore/config.edn index 7b0ff3c..62a26ca 100644 --- a/.clj-kondo/taoensso/encore/config.edn +++ b/.clj-kondo/taoensso/encore/config.edn @@ -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}}} diff --git a/.clj-kondo/taoensso/encore/taoensso/encore.clj b/.clj-kondo/taoensso/encore/taoensso/encore.clj index 7f6d30a..5af6de9 100644 --- a/.clj-kondo/taoensso/encore/taoensso/encore.clj +++ b/.clj-kondo/taoensso/encore/taoensso/encore.clj @@ -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})) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2773ec8..1596853 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,7 +36,7 @@ jobs: java-version: '21' - name: Install Clojure Tools - uses: DeLaGuardo/setup-clojure@12.5 + uses: DeLaGuardo/setup-clojure@13.0 with: bb: 'latest' cli: 'latest' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4959515..d30743f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: java-version: '11' - name: Install Clojure Tools - uses: DeLaGuardo/setup-clojure@12.5 + uses: DeLaGuardo/setup-clojure@13.0 with: bb: 'latest' @@ -147,7 +147,7 @@ jobs: java-version: ${{ matrix.jdk-version }} - name: Install Clojure Tools - uses: DeLaGuardo/setup-clojure@12.5 + uses: DeLaGuardo/setup-clojure@13.0 with: bb: 'latest' diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 7de28dd..8f3846c 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -20,6 +20,8 @@ A release with an intentional breaking changes is marked with: == Unreleased * Changes +** Bumped deps. +({lread}) ** {issue}676[#676]: Fix new driver creation so that it sidesteps some underlying Firefox race conditions and improves CI test stability. ({person}dgr[@dgr]) ** {issue}679[#679]: Add `new-window` function that exposes WebDriver's New Window endpoint. ({person}dgr[@dgr]) ** {issue}682[#682]: Fixed a bug in `fill-human-multi` to correctly call `fill-human` rather than `fill`. ({person}dgr[@dgr]) diff --git a/bb.edn b/bb.edn index 41cbb33..0d5ce8d 100644 --- a/bb.edn +++ b/bb.edn @@ -1,13 +1,13 @@ {:min-bb-version "0.8.2" :paths ["script" "build"] :deps {doric/doric {:mvn/version "0.9.0"} - org.clj-commons/pretty {:mvn/version "3.0.0"} + org.clj-commons/pretty {:mvn/version "3.2.0"} lread/status-line {:git/url "https://github.com/lread/status-line.git" :sha "cf44c15f30ea3867227fa61ceb823e5e942c707f"} dev.nubank/docopt {:mvn/version "0.6.1-fix7"} - org.babashka/http-server {:mvn/version "0.1.12"} + org.babashka/http-server {:mvn/version "0.1.13"} wevre/natural-compare {:mvn/version "0.0.10"} - io.github.babashka/neil {:git/tag "v0.3.67" :git/sha "054ca51"}} + io.github.babashka/neil {:git/tag "v0.3.68" :git/sha "78ffab1"}} :tasks {;; setup :requires ([babashka.classpath :as cp] diff --git a/deps.edn b/deps.edn index 02d3d77..1217c64 100644 --- a/deps.edn +++ b/deps.edn @@ -2,7 +2,7 @@ :deps {org.clojure/clojure {:mvn/version "1.10.3"} ;; min clojure version babashka/fs {:mvn/version "0.5.22"} babashka/process {:mvn/version "0.5.22"} - org.babashka/http-client {:mvn/version "0.4.20"} + org.babashka/http-client {:mvn/version "0.4.22"} slingshot/slingshot {:mvn/version "0.12.2"} cheshire/cheshire {:mvn/version "5.13.0"} org.clojure/tools.cli {:mvn/version "1.1.230"} @@ -17,11 +17,11 @@ :github-coords clj-commons/etaoin}} :1.11 {:replace-deps {org.clojure/clojure {:mvn/version "1.11.4"}}} - :1.12 {:replace-deps {org.clojure/clojure {:mvn/version "1.12.0-rc1"}}} + :1.12 {:replace-deps {org.clojure/clojure {:mvn/version "1.12.0"}}} :debug {:extra-paths ["env/dev/resources"]} :test {:extra-paths ["test" "env/test/resources" "build"] :extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"} - org.babashka/cli {:mvn/version "0.8.60"} + org.babashka/cli {:mvn/version "0.8.61"} 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.16"}} @@ -33,7 +33,7 @@ :script {:extra-paths ["script"]} ;; test-doc-blocks - gen tests - :test-doc-blocks {:replace-deps {org.clojure/clojure {:mvn/version "1.11.4"} + :test-doc-blocks {:replace-deps {org.clojure/clojure {:mvn/version "1.12.0"} com.github.lread/test-doc-blocks {:mvn/version "1.1.20"}} :replace-paths [] :ns-default lread.test-doc-blocks @@ -41,7 +41,7 @@ ;; test-doc-blocks - run tests ;; usage: test:test-docs - :test-docs {:override-deps {org.clojure/clojure {:mvn/version "1.11.4"}} + :test-docs {:override-deps {org.clojure/clojure {:mvn/version "1.12.0"}} :extra-paths ["target/test-doc-blocks/test"] :exec-fn cognitect.test-runner.api/test :exec-args {:dirs ["target/test-doc-blocks/test"]} @@ -51,8 +51,8 @@ :main-opts ["-m" "babashka.cli.exec"]} :clofidence {:classpath-overrides {org.clojure/clojure nil} - :extra-deps {com.github.flow-storm/clojure {:mvn/version "1.11.4"} - com.github.flow-storm/clofidence {:mvn/version "0.3.1"}} + :extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.0-1"} + com.github.flow-storm/clofidence {:mvn/version "0.4.0"}} :exec-fn clofidence.main/run :exec-args {:report-name "Etaoin Test Coverage" :output-folder "target/clofidence" @@ -61,7 +61,7 @@ :jvm-opts ["-Dclojure.storm.instrumentOnlyPrefixes=etaoin"]} ;; for consistent linting we use a specific version of clj-kondo through the jvm - :clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2024.08.01"}} + :clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2024.11.14"}} :main-opts ["-m" "clj-kondo.main"]} :eastwood {:extra-deps {jonase/eastwood {:mvn/version "1.4.3"}} @@ -80,8 +80,8 @@ ;; caused by, I think, conflicting maven deps :deploy {:extra-deps {slipset/deps-deploy {:mvn/version "0.2.2"}}} - :outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.8.1206"} - org.clojure/clojure {:mvn/version "1.11.1"} + :outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.11.1250"} + org.clojure/clojure {:mvn/version "1.12.0"} org.slf4j/slf4j-simple {:mvn/version "2.0.16"} ;; to rid ourselves of logger warnings } :main-opts ["-m" "antq.core" @@ -90,9 +90,9 @@ ]} :repl/cider - {:extra-deps {org.clojure/clojure {:mvn/version "1.11.4"} + {:extra-deps {org.clojure/clojure {:mvn/version "1.12.0"} nrepl/nrepl {:mvn/version "1.3.0"} - cider/cider-nrepl {:mvn/version "0.49.2"} + cider/cider-nrepl {:mvn/version "0.50.2"} refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}} :jvm-opts ["-XX:-OmitStackTraceInFastThrow"] :main-opts ["-m" "nrepl.cmdline" diff --git a/script/docker_install.clj b/script/docker_install.clj index 90e303f..c83eb13 100644 --- a/script/docker_install.clj +++ b/script/docker_install.clj @@ -58,7 +58,7 @@ "`id` is also name of executable" [{:keys [id version url]}] (status/line :head "Installing %s %s" id version) - (let [dl-file (str "/tmp/%s.zip") + (let [dl-file "/tmp/chrome-installer.zip" install-dir (str "/opt/" id "-" version)] (fs/create-dirs install-dir) (status/line :head "%s: downloading: %s" id url) diff --git a/script/publish.clj b/script/publish.clj index 5b8b588..08c8083 100644 --- a/script/publish.clj +++ b/script/publish.clj @@ -160,9 +160,9 @@ ;; followed by any attributes "$1" ;; followed by datestamp - (str " - " (yyyy-mm-dd-now-utc)) + " - " (yyyy-mm-dd-now-utc) ;; followed by an AsciiDoc anchor for easy referencing - (str " [[v" version "]]") + " [[v" version "]]" ;; followed by section content "$2" ;; followed by link to commit log diff --git a/script/test_matrix.clj b/script/test_matrix.clj index 2ee986a..60c319c 100644 --- a/script/test_matrix.clj +++ b/script/test_matrix.clj @@ -41,12 +41,12 @@ :desc (str "test-doc " os " jdk" jdk-version)} ) (defn- github-actions-matrix [] - (let [jdks ["11" "17" "21"] + (let [jdks ["11" "17" "21" "23"] oses ["ubuntu" "macos" "windows"] ide-browsers ["chrome" "firefox"] api-browsers ["chrome" "firefox" "edge" "safari"] platforms ["jvm" "bb"] - default-opts {:jdk-version "21"}] + default-opts {:jdk-version "21"}] ;; if only testing on one, test on latest LTS (->> (concat (for [os oses platform platforms] diff --git a/src/etaoin/api.clj b/src/etaoin/api.clj index 2addbe3..0794760 100644 --- a/src/etaoin/api.clj +++ b/src/etaoin/api.clj @@ -226,7 +226,7 @@ (let [obj (get web-driver-obj identifier ::not-found)] (if (= obj ::not-found) (throw (ex-info (str "Could not find object tagged with " identifier - " in " (str web-driver-obj)) + " in " web-driver-obj) {:web-driver-obj web-driver-obj :identifier identifier})) obj)))