From 65886c190f18e634ca4873765707d36f411622f0 Mon Sep 17 00:00:00 2001 From: Miikka Koskinen Date: Thu, 8 Nov 2018 10:00:23 +0200 Subject: [PATCH 1/2] Do not use cljs.string/replace-all, it's private The 1.10.439 release of compiler complains about it. Fixes #169. --- modules/reitit-core/src/reitit/impl.cljc | 2 +- project.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/reitit-core/src/reitit/impl.cljc b/modules/reitit-core/src/reitit/impl.cljc index 0a29f490..3ba337ab 100644 --- a/modules/reitit-core/src/reitit/impl.cljc +++ b/modules/reitit-core/src/reitit/impl.cljc @@ -82,7 +82,7 @@ ;; TODO: is this correct? (defn- re-quote [x] #?(:clj (Pattern/quote x) - :cljs (str/replace-all x #"([.?*+^$[\\]\\\\(){}|-])" "\\$1"))) + :cljs (str/replace x #"([.?*+^$[\\]\\\\(){}|-])" "\\$1"))) (defn- path-regex [{:keys [path-parts path-constraints] :as route}] (let [[pp & pps] path-parts diff --git a/project.clj b/project.clj index 82303da3..e183ad0c 100644 --- a/project.clj +++ b/project.clj @@ -55,7 +55,7 @@ "modules/reitit-sieppari/src"] :dependencies [[org.clojure/clojure "1.9.0"] - [org.clojure/clojurescript "1.10.339"] + [org.clojure/clojurescript "1.10.439"] ;; modules dependencies [metosin/reitit] From 1a13a2422409cd614d69551806d7cc6c601543e2 Mon Sep 17 00:00:00 2001 From: Miikka Koskinen Date: Thu, 8 Nov 2018 10:00:57 +0200 Subject: [PATCH 2/2] In ClojureScript, satisfies? is a macro Thus `partial` can't be used with it. --- modules/reitit-ring/src/reitit/ring/spec.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/reitit-ring/src/reitit/ring/spec.cljc b/modules/reitit-ring/src/reitit/ring/spec.cljc index 1ec586be..a4b6b89f 100644 --- a/modules/reitit-ring/src/reitit/ring/spec.cljc +++ b/modules/reitit-ring/src/reitit/ring/spec.cljc @@ -7,7 +7,7 @@ ;; Specs ;; -(s/def ::middleware (s/coll-of (partial satisfies? middleware/IntoMiddleware))) +(s/def ::middleware (s/coll-of #(satisfies? middleware/IntoMiddleware %))) (s/def ::data (s/keys :req-un [::rs/handler]