From 4d88c178361fdd3f8205dce8f5b8d1a206c459d3 Mon Sep 17 00:00:00 2001 From: Robert Luo Date: Sat, 11 Oct 2025 17:36:15 +0800 Subject: [PATCH 1/5] bump deps version --- .github/workflows/main.yml | 2 +- deps.edn | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 124d153..b6b4f08 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: - uses: DeLaGuardo/setup-clojure@10.1 with: - cli: '1.11.1.1435' + cli: '1.12.3.1577' - uses: actions/cache@v3 with: diff --git a/deps.edn b/deps.edn index 9b2ac43..2dc1289 100644 --- a/deps.edn +++ b/deps.edn @@ -1,17 +1,17 @@ {:paths ["src"] :aliases {:dev ;for development {:extra-paths ["test"] - :extra-deps {manifold/manifold {:mvn/version "0.4.1"} - org.clojure/clojurescript {:mvn/version "1.11.121"}}} + :extra-deps {manifold/manifold {:mvn/version "0.4.3"} + org.clojure/clojurescript {:mvn/version "1.12.42"}}} :test ;run tests under console. e.g. clj -M:dev:test - {:extra-deps {lambdaisland/kaocha {:mvn/version "1.87.1366"} + {:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"} lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"}} :main-opts ["-m" "kaocha.runner"]} :cljs-test {:extra-paths ["test"] - :extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"}} + :extra-deps {olical/cljs-test-runner {:mvn/version "3.8.1"}} :main-opts ["-m" "cljs-test-runner.main"]} :build ;customized building process running. e.g. clj -T:build ci {:deps {io.github.robertluo/build-clj {:git/sha "5d45f58cc20747c136bb320c9b13d65d2bf4cf58"}} :ns-default build} - :clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2023.12.15"}}}}} + :clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2025.09.22"}}}}} From 0d47404cb37c4314f492db8dcf23fa498c038de8 Mon Sep 17 00:00:00 2001 From: Robert Luo Date: Sat, 11 Oct 2025 22:22:41 +0800 Subject: [PATCH 2/5] fnk focus on symbol without ns --- src/robertluo/fun_map.cljc | 11 ++++++++--- test/robertluo/fun_map_test.cljc | 9 ++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/robertluo/fun_map.cljc b/src/robertluo/fun_map.cljc index 736375e..2d9fbf1 100644 --- a/src/robertluo/fun_map.cljc +++ b/src/robertluo/fun_map.cljc @@ -91,9 +91,14 @@ `args` key of the fun-map, it will *focus* on the keys also." {:style/indent 1} [args & body] - `(fw {:keys ~args - :focus ~args} - ~@body))) + (let [focus (mapv (comp symbol name) args)] + `(fw {:keys ~args + :focus ~focus} + ~@body)))) + +(comment + (macroexpand-1 '(fnk [a :ns/b] (+ a b))) + ) ;;;;;; life cycle map diff --git a/test/robertluo/fun_map_test.cljc b/test/robertluo/fun_map_test.cljc index a32481b..f5b92b2 100644 --- a/test/robertluo/fun_map_test.cljc +++ b/test/robertluo/fun_map_test.cljc @@ -1,6 +1,6 @@ (ns robertluo.fun-map-test (:require - [clojure.test :refer [deftest testing is]] + [clojure.test :refer [deftest testing is are]] #?(:clj [robertluo.fun-map :refer [fun-map? fnk fw fun-map closeable life-cycle-map touch halt! lookup]] :cljs @@ -155,3 +155,10 @@ (deftest lookup-test (is (= 3 (get (lookup identity) 3))) (is (= [:foo :foo] (find (lookup identity) :foo))))) + +(deftest fnk-focus-test + "testing fnk focus using right symbol (without ns)" + (let [m (fun-map {:a (fnk [:ns/b] b)})] + (are [v exp] (= exp (-> m (assoc :ns/b v) :a)) + 2 2 + 3 3))) From 2764ac74873f14d0158a9a07e4b58329b5a6df77 Mon Sep 17 00:00:00 2001 From: Robert Luo Date: Sat, 11 Oct 2025 22:49:33 +0800 Subject: [PATCH 3/5] bump ci versions --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b6b4f08..83a4259 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,26 +14,26 @@ jobs: environment: deploy steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 with: fetch-depth: 0 - - uses: DeLaGuardo/setup-clojure@10.1 + - uses: DeLaGuardo/setup-clojure@13.4 with: cli: '1.12.3.1577' - - uses: actions/cache@v3 + - uses: actions/cache@v4.3.0 with: path: ~/.m2 key: default-build - run: clojure -T:build ci - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v5.5.1 - name: deploy if: github.event.release run: clojure -T:build deploy env: CLOJARS_USERNAME: ${{secrets.CLOJARS_USERNAME}} - CLOJARS_PASSWORD: ${{secrets.CLOJARS_PASSWORD}} \ No newline at end of file + CLOJARS_PASSWORD: ${{secrets.CLOJARS_PASSWORD}} From aa707b52f2e701b5b2dcde1bd9385768e94aa82b Mon Sep 17 00:00:00 2001 From: Robert Luo Date: Sat, 11 Oct 2025 22:53:30 +0800 Subject: [PATCH 4/5] bump ci versions --- deps.edn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps.edn b/deps.edn index 2dc1289..506a86b 100644 --- a/deps.edn +++ b/deps.edn @@ -9,7 +9,7 @@ :main-opts ["-m" "kaocha.runner"]} :cljs-test {:extra-paths ["test"] - :extra-deps {olical/cljs-test-runner {:mvn/version "3.8.1"}} + :extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"}} :main-opts ["-m" "cljs-test-runner.main"]} :build ;customized building process running. e.g. clj -T:build ci {:deps {io.github.robertluo/build-clj {:git/sha "5d45f58cc20747c136bb320c9b13d65d2bf4cf58"}} From 237d8b07b314fd53d0d82bda150ac838a538bcc9 Mon Sep 17 00:00:00 2001 From: Robert Luo Date: Sat, 11 Oct 2025 22:55:28 +0800 Subject: [PATCH 5/5] bump ci versions --- deps.edn | 4 ++-- test/robertluo/fun_map_test.cljc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deps.edn b/deps.edn index 506a86b..fa60514 100644 --- a/deps.edn +++ b/deps.edn @@ -2,14 +2,14 @@ :aliases {:dev ;for development {:extra-paths ["test"] :extra-deps {manifold/manifold {:mvn/version "0.4.3"} - org.clojure/clojurescript {:mvn/version "1.12.42"}}} + org.clojure/clojurescript {:mvn/version "1.11.121"}}} :test ;run tests under console. e.g. clj -M:dev:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"} lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"}} :main-opts ["-m" "kaocha.runner"]} :cljs-test {:extra-paths ["test"] - :extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"}} + :extra-deps {olical/cljs-test-runner {:mvn/version "3.8.1"}} :main-opts ["-m" "cljs-test-runner.main"]} :build ;customized building process running. e.g. clj -T:build ci {:deps {io.github.robertluo/build-clj {:git/sha "5d45f58cc20747c136bb320c9b13d65d2bf4cf58"}} diff --git a/test/robertluo/fun_map_test.cljc b/test/robertluo/fun_map_test.cljc index f5b92b2..b7e4545 100644 --- a/test/robertluo/fun_map_test.cljc +++ b/test/robertluo/fun_map_test.cljc @@ -156,7 +156,7 @@ (is (= 3 (get (lookup identity) 3))) (is (= [:foo :foo] (find (lookup identity) :foo))))) -(deftest fnk-focus-test +(deftest fnk-focus-symbol-test "testing fnk focus using right symbol (without ns)" (let [m (fun-map {:a (fnk [:ns/b] b)})] (are [v exp] (= exp (-> m (assoc :ns/b v) :a))