Skip to content

Commit

Permalink
Make requiring utils from cljs.repl work (#189)
Browse files Browse the repository at this point in the history
* Bump sci and sci-configs to latest versions

* Aliasing clojure.repl to cljs.repl (doesn't seem to work)

* Fix aliasing

* Implement NYIP `clojure.repl/pst`

* Update changelog

* Add the NYIP pst to the proper clojure.repl namespace

* Name pst-nyip

* Fixes #188
  • Loading branch information
PEZ committed Aug 6, 2024
1 parent 4e66523 commit 05b0e89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changes to Joyride

## [Unreleased]

- [Make requiring utils from `cljs.repl` work](https://github.com/BetterThanTomorrow/joyride/issues/188)

## [0.0.43] - 2024-02-12

- Add uuid constructor to sci
Expand Down
4 changes: 2 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
org.babashka/sci
#_{:local/root "../babashka/sci"}
{:git/url "https://github.com/babashka/sci"
:git/sha "ad79a6c476affd1f8208efbfdba57992a68c8056"}
:git/sha "05eec0a37b3df3173a58372a5a05f7f22a4c3780"}
org.babashka/sci.configs
#_{:local/root "../sci.configs"}
{:git/url "https://github.com/babashka/sci.configs"
:git/sha "3cd48a595bace287554b1735bb378bad1d22b931"}}
:git/sha "b87302d5569852ce4410271d089bc4cc3da7050a"}}
:aliases {:dev {}}}
6 changes: 5 additions & 1 deletion src/joyride/sci.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@

(def core-namespace (sci/create-ns 'clojure.core nil))

(def pst-nyip (fn [_] (throw (js/Error. "pst not yet implemented"))))

(def joyride-code
{'*file* sci/file
'extension-context (sci/copy-var db/extension-context joyride-ns)
Expand All @@ -117,14 +119,16 @@
'remove-tap (sci/copy-var remove-tap core-namespace)
'uuid (sci/copy-var uuid core-namespace)}
'clojure.zip zip-namespace
'clojure.repl {'pst pst-nyip}
'cljs.test cljs-test-config/cljs-test-namespace
'cljs.pprint cljs-pprint-config/cljs-pprint-namespace
'promesa.core promesa-config/promesa-namespace
'joyride.core joyride-code
'rewrite-clj.zip rewrite-clj-zip-ns
'rewrite-clj.parser rewrite-clj-parser-ns
'rewrite-clj.node rewrite-clj-node-ns}
:ns-aliases {'clojure.test 'cljs.test}
:ns-aliases '{clojure.test cljs.test
cljs.repl clojure.repl}
:load-fn (fn [{:keys [ns libname opts]}]
(cond
(symbol? libname)
Expand Down

0 comments on commit 05b0e89

Please sign in to comment.