fix issue with walker caused by change in cljs 1.10

This commit is contained in:
nathanmarz 2018-03-22 15:43:53 -04:00
parent 1a05546f27
commit d4887c2090
3 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,7 @@
## 1.1.1-SNAPSHOT
* ClojureScript 1.10 introduced a change causing the `walker` navigator to fail to walk records. `ALL` has been updated to operate over `MapEntry` in ClojureScript, fixing the issue.
## 1.1.0 - 2018-01-02
* Add `vtransform` variant of `transform` that takes in collected values as a vector in the first argument rather than spliced into argument list.

View file

@ -31,7 +31,7 @@
:profiles {:dev {:dependencies
[[org.clojure/test.check "0.9.0"]
[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.9.229"]]}
[org.clojure/clojurescript "1.10.126"]]}
:test {:dependencies [[org.clojure/clojure "1.7.0"]]}}

View file

@ -73,7 +73,6 @@
nil)
;; in cljs they're PersistentVector so don't need a special case
#?(:clj clojure.lang.MapEntry)
#?(:clj
(all-transform [structure next-fn]
@ -82,6 +81,13 @@
(clojure.lang.MapEntry. newk newv))))
#?(:cljs cljs.core/MapEntry)
#?(:cljs
(all-transform [structure next-fn]
(let [newk (next-fn (key structure))
newv (next-fn (val structure))]
(cljs.core/->MapEntry newk newv nil))))
#?(:clj clojure.lang.IPersistentVector :cljs cljs.core/PersistentVector)
(all-transform [structure next-fn]
(into []