diff --git a/CHANGES.md b/CHANGES.md index c0e4061..caf583b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ * declarepath can now be parameterized * Added params-reset which calls its path with the params index walked back by the number of params needed by its path. This enables recursive parameterized paths * Added convenience syntax for defprotocolpath with no params, e.g. (defprotocolpath foo) +* Rename VOID to STOP ## 0.9.2 * Added VOID selector which navigates nowhere diff --git a/project.clj b/project.clj index 1316047..f6b51b0 100644 --- a/project.clj +++ b/project.clj @@ -1,16 +1,16 @@ (def VERSION (.trim (slurp "VERSION"))) (defproject com.rpl/specter VERSION - :dependencies [[org.clojure/clojure "1.6.0"] - [org.clojure/clojurescript "0.0-3211"] - ] :jvm-opts ["-XX:-OmitStackTraceInFastThrow"] ; this prevents JVM from doing optimizations which can remove stack traces from NPE and other exceptions :source-paths ["src/clj"] :java-source-paths ["src/java"] :test-paths ["test", "target/test-classes"] :jar-exclusions [#"\.cljx"] :auto-clean false - :profiles {:dev {:dependencies + :profiles {:provided {:dependencies + [[org.clojure/clojure "1.6.0"] + [org.clojure/clojurescript "0.0-3211"]]} + :dev {:dependencies [[org.clojure/test.check "0.7.0"]] :plugins [[com.keminglabs/cljx "0.6.0"]] diff --git a/src/clj/com/rpl/specter.cljx b/src/clj/com/rpl/specter.cljx index 85c7129..d1b403e 100644 --- a/src/clj/com/rpl/specter.cljx +++ b/src/clj/com/rpl/specter.cljx @@ -150,7 +150,7 @@ (defpath ^{:doc "Stops navigation at this point. For selection returns nothing and for transformation returns the structure unchanged"} - VOID + STOP [] (select* [this structure next-fn] nil ) diff --git a/test/com/rpl/specter/core_test.cljx b/test/com/rpl/specter/core_test.cljx index 5f8f431..34a0397 100644 --- a/test/com/rpl/specter/core_test.cljx +++ b/test/com/rpl/specter/core_test.cljx @@ -574,11 +574,11 @@ (for-all+ [s1 (gen/vector (limit-size 5 gen/int))] (and - (empty? (s/select s/VOID s1)) - (empty? (s/select [s/VOID s/ALL s/ALL s/ALL s/ALL] s1)) - (= s1 (s/transform s/VOID inc s1)) - (= s1 (s/transform [s/ALL s/VOID s/ALL] inc s1)) - (= (s/transform [s/ALL (s/cond-path even? nil odd? s/VOID)] inc s1) + (empty? (s/select s/STOP s1)) + (empty? (s/select [s/STOP s/ALL s/ALL s/ALL s/ALL] s1)) + (= s1 (s/transform s/STOP inc s1)) + (= s1 (s/transform [s/ALL s/STOP s/ALL] inc s1)) + (= (s/transform [s/ALL (s/cond-path even? nil odd? s/STOP)] inc s1) (s/transform [s/ALL even?] inc s1)) )))