Skip to content

Commit 36de8d9

Browse files
committed
Fix #718: expose spec
1 parent 748f73e commit 36de8d9

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

Diff for: deps.edn

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
:exclusions [org.babashka/sci]}
8787
;; emmy needs SCI, here we use the same version as in render:
8888
org.babashka/sci {:git/url "https://github.com/babashka/sci"
89-
:git/sha "c556f4474303c61da72e7a07eef496dcbf66a56e"}
89+
:git/sha "6d9380f55b3038769d5856fc67e7d7939ac981ef"}
9090
io.github.nextjournal/clerk-slideshow {:git/sha "11a83fea564da04b9d17734f2031a4921d917893"}}}
9191

9292
:nextjournal/garden {:exec-fn nextjournal.clerk/serve!

Diff for: render/deps.edn

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
binaryage/devtools {:mvn/version "1.0.3"}
44
cider/cider-nrepl {:mvn/version "0.28.3"}
55
org.babashka/sci {:git/url "https://github.com/babashka/sci"
6-
:git/sha "c556f4474303c61da72e7a07eef496dcbf66a56e"}
6+
:git/sha "6d9380f55b3038769d5856fc67e7d7939ac981ef"}
77
org.clojure/clojurescript {:mvn/version "1.11.132"}
88
io.github.babashka/sci.nrepl {:mvn/version "0.0.2"}
99
reagent/reagent {:mvn/version "1.2.0"}
10-
io.github.babashka/sci.configs {:git/sha "8253c69a537bcc82e8ff122e5f905fe9d1e303f0"
10+
io.github.babashka/sci.configs {:git/sha "eb1fcaacf6f98c27adf22002173d40ae4f9cfcb0"
1111
:exclusions [org.babashka/sci]}
1212
io.github.nextjournal/clojure-mode {:git/sha "1f55406087814a0dda6806396aa596dbe13ea302"}
1313
thheller/shadow-cljs {:mvn/version "2.23.1"}

Diff for: src/nextjournal/clerk/cljs_libs.clj

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@
4949
reagent.ratom
5050
user
5151
clojure.pprint
52-
cljs.pprint}))
52+
cljs.pprint
53+
clojure.spec.alpha
54+
cljs.spec.alpha
55+
clojure.spec.gen.alpha
56+
cljs.spec.gen.alpha}))
5357

5458
(defn- ns-decl?
5559
"Returns true if form is a (ns ...) declaration."

Diff for: src/nextjournal/clerk/sci_env.cljs

+12-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@
3939
[sci.configs.applied-science.js-interop :as sci.configs.js-interop]
4040
[sci.configs.reagent.reagent :as sci.configs.reagent]
4141
[sci.configs.cljs.pprint :as sci.configs.pprint]
42+
[sci.configs.cljs.spec.alpha :as sci.configs.spec]
4243
[sci.core :as sci]
4344
[sci.ctx-store]
4445
[sci.nrepl.server :as nrepl]
45-
[shadow.esm]))
46+
[shadow.esm]
47+
[cljs.repl]))
4648

4749
(defn ->render-fn+opts-with-*eval*-binding
4850
"Establishes the `*eval*` binding to support alternative
@@ -164,7 +166,10 @@
164166
"w3c-keyname" w3c-keyname}
165167
:ns-aliases '{clojure.math cljs.math
166168
cljs.repl clojure.repl
167-
clojure.pprint cljs.pprint}
169+
clojure.pprint cljs.pprint
170+
clojure.spec.alpha cljs.spec.alpha
171+
clojure.spec.gen.alpha cljs.spec.gen.alpha
172+
clojure.spec.test.alpha cljs.spec.test.alpha}
168173
:namespaces (merge {'nextjournal.clerk.viewer viewer-namespace
169174
'nextjournal.clerk viewer-namespace ;; TODO: expose cljs variant of `nextjournal.clerk` with docstrings
170175
'nextjournal.clerk.sci-env {'load-string+
@@ -173,7 +178,9 @@
173178
'clojure.core {'read-string read-string
174179
'implements? (sci/copy-var implements?* core-ns)
175180
'time (sci/copy-var time core-ns)
176-
'system-time (sci/copy-var system-time core-ns)}
181+
'system-time (sci/copy-var system-time core-ns)
182+
infinite? (sci/copy-var infinite? core-ns)
183+
'update-vals (sci/copy-var update-vals core-ns)}
177184
'clojure.repl {'pst pst-stub}}
178185
(sci-copy-nss
179186
'cljs.math
@@ -194,7 +201,8 @@
194201

195202
sci.configs.js-interop/namespaces
196203
sci.configs.reagent/namespaces
197-
sci.configs.pprint/namespaces)})
204+
sci.configs.pprint/namespaces
205+
sci.configs.spec/namespaces)})
198206

199207
(defn ^:export eval-form [f]
200208
(sci/binding [sci/ns @last-ns]

0 commit comments

Comments
 (0)