From a0e46da91e72432b52968f2f8dcf36e6d130d3f6 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Wed, 20 Aug 2025 15:16:53 +0200 Subject: [PATCH 01/18] 0.7.26 --- doc/dev.md | 10 ++++---- doc/links.md | 38 ++++++++++++++-------------- doc/nrepl/README.md | 2 +- doc/nrepl/index.html | 4 +-- resources/public/codemirror.html | 8 +++--- resources/public/html/cljs-ajax.html | 4 +-- resources/public/html/export.html | 2 +- resources/public/html/reagent.html | 4 +-- resources/public/index.html | 2 +- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/doc/dev.md b/doc/dev.md index 9c48c8c..c4447b6 100644 --- a/doc/dev.md +++ b/doc/dev.md @@ -90,20 +90,20 @@ To create a new NPM release: - Prepare version `package.json`, except patch (if anything should change here) - Run `bb npm-publish`: this will compile, bump patch version, create tag and and push to npm and Github -- `bb replace-version 0.6.16 0.7.24` +- `bb replace-version 0.6.16 0.7.26` - Create Github release with updated links from `doc/links.md` - `bb gh-pages` - + - - + + - + diff --git a/doc/links.md b/doc/links.md index 98b9734..9943b02 100644 --- a/doc/links.md +++ b/doc/links.md @@ -1,20 +1,20 @@ -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.js-interop.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.cljs-ajax.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.reagent.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.re-frame.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.replicant.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.promesa.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.pprint.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/scittle.nrepl.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.js-interop.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.cljs-ajax.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.reagent.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.re-frame.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.replicant.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.promesa.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.pprint.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.nrepl.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.js-interop.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.cljs-ajax.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.reagent.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.re-frame.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.replicant.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.promesa.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.pprint.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.nrepl.js -https://cdn.jsdelivr.net/npm/scittle@0.7.24/dist/dev/scittle.cljs-devtools.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.js-interop.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.cljs-ajax.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.reagent.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.re-frame.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.replicant.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.promesa.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.pprint.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.nrepl.js +https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.cljs-devtools.js diff --git a/doc/nrepl/README.md b/doc/nrepl/README.md index 49ab456..f3dbe26 100644 --- a/doc/nrepl/README.md +++ b/doc/nrepl/README.md @@ -21,7 +21,7 @@ the normal routine: ``` html - + ``` Also include the CLJS file that you want to evaluate with nREPL: diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html index 96316fe..82a903b 100644 --- a/doc/nrepl/index.html +++ b/doc/nrepl/index.html @@ -1,9 +1,9 @@ - + - + diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html index 1470da4..417c977 100644 --- a/resources/public/codemirror.html +++ b/resources/public/codemirror.html @@ -1,13 +1,13 @@ - + - - - + + + - + + + + - + + + + + + + +``` + +## ES modules + +The async nature of ES modules makes them a litte bit more difficult to work +with in scittle. You need to disable automatic evaluation of script tags first +using `scittle.core.disable_auto_eval()`. In a `module` type ` + + + + + + + +``` diff --git a/resources/public/index.html b/resources/public/index.html index 8645ebe..670d821 100644 --- a/resources/public/index.html +++ b/resources/public/index.html @@ -160,6 +160,12 @@ (js/console.log "In cljs")) + +

JS libraries

+ + To use JavaScript libraries with Scittle, + see README.md +

REPL

From c48f9868c6d5ee9fbc4e796a937cef3233fb5a00 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 21 Aug 2025 15:02:29 +0200 Subject: [PATCH 05/18] changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eba6bc3..495c622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,9 @@ ## v0.7.27 (2025-08-21) -- [#95](https://github.com/babashka/scittle/issues/121): support string requires of `globalThis` js deps ([@chr15m](https://github.com/chr15m)) +- [#95](https://github.com/babashka/scittle/issues/121): support string requires + of `globalThis` js deps ([@chr15m](https://github.com/chr15m)). See + [docs](https://github.com/babashka/scittle/blob/main/doc/js-libraries.md). - Potentially breaking: `(.-foo-bar {})` now behaves as `{}.foo_bar`, i.e. the property or method name is munged. ## v0.7.26 (2025-08-20) From 6b56464bd67c2a65de93270f5b3ab6d483260ffd Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 21 Aug 2025 15:03:00 +0200 Subject: [PATCH 06/18] 0.7.27 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index dad5d8c..9408bff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "react": "17.0.1", "react-dom": "17.0.1" }, - "version": "0.7.26" + "version": "0.7.27" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -129,5 +129,5 @@ } } }, - "version": "0.7.26" + "version": "0.7.27" } diff --git a/package.json b/package.json index 0b85ba0..71d9dbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scittle", - "version": "0.7.26", + "version": "0.7.27", "files": [ "dist" ], From 9e1feb81af87f5d79269cddef9df007408496788 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 21 Aug 2025 15:03:34 +0200 Subject: [PATCH 07/18] version --- doc/dev.md | 10 ++++---- doc/links.md | 38 ++++++++++++++-------------- doc/nrepl/README.md | 2 +- doc/nrepl/index.html | 4 +-- resources/public/codemirror.html | 8 +++--- resources/public/html/cljs-ajax.html | 4 +-- resources/public/html/export.html | 2 +- resources/public/html/reagent.html | 4 +-- resources/public/index.html | 2 +- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/doc/dev.md b/doc/dev.md index c4447b6..b3c9924 100644 --- a/doc/dev.md +++ b/doc/dev.md @@ -90,20 +90,20 @@ To create a new NPM release: - Prepare version `package.json`, except patch (if anything should change here) - Run `bb npm-publish`: this will compile, bump patch version, create tag and and push to npm and Github -- `bb replace-version 0.6.16 0.7.26` +- `bb replace-version 0.6.16 0.7.27` - Create Github release with updated links from `doc/links.md` - `bb gh-pages` - + - - + + - + diff --git a/doc/links.md b/doc/links.md index 9943b02..ce5f490 100644 --- a/doc/links.md +++ b/doc/links.md @@ -1,20 +1,20 @@ -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.js-interop.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.cljs-ajax.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.reagent.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.re-frame.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.replicant.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.promesa.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.pprint.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/scittle.nrepl.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js-interop.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.cljs-ajax.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.reagent.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.re-frame.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.replicant.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.promesa.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.pprint.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.nrepl.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.js-interop.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.cljs-ajax.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.reagent.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.re-frame.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.replicant.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.promesa.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.pprint.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.nrepl.js -https://cdn.jsdelivr.net/npm/scittle@0.7.26/dist/dev/scittle.cljs-devtools.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.js-interop.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.cljs-ajax.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.reagent.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.re-frame.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.replicant.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.promesa.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.pprint.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.nrepl.js +https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.cljs-devtools.js diff --git a/doc/nrepl/README.md b/doc/nrepl/README.md index f3dbe26..4414aa9 100644 --- a/doc/nrepl/README.md +++ b/doc/nrepl/README.md @@ -21,7 +21,7 @@ the normal routine: ``` html - + ``` Also include the CLJS file that you want to evaluate with nREPL: diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html index 82a903b..7a8e80e 100644 --- a/doc/nrepl/index.html +++ b/doc/nrepl/index.html @@ -1,9 +1,9 @@ - + - + diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html index 417c977..b936266 100644 --- a/resources/public/codemirror.html +++ b/resources/public/codemirror.html @@ -1,13 +1,13 @@ - + - - - + + + - + + + + - + + + - + ``` Also include the CLJS file that you want to evaluate with nREPL: diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html index 7a8e80e..5890a47 100644 --- a/doc/nrepl/index.html +++ b/doc/nrepl/index.html @@ -1,9 +1,9 @@ - + - + diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html index b936266..800624b 100644 --- a/resources/public/codemirror.html +++ b/resources/public/codemirror.html @@ -1,13 +1,13 @@ - + - - - + + + - + + + + - + +``` + ### CIDER Choose `cider-connect-cljs`, select port `1339`, followed by the `nbb` REPL diff --git a/src/scittle/nrepl.cljs b/src/scittle/nrepl.cljs index 08cb7bb..ec4c38c 100644 --- a/src/scittle/nrepl.cljs +++ b/src/scittle/nrepl.cljs @@ -8,7 +8,9 @@ (when-let [ws-port (.-SCITTLE_NREPL_WEBSOCKET_PORT js/window)] (set! (.-ws_nrepl js/window) - (new js/WebSocket (ws-url (.-hostname (.-location js/window)) ws-port "_nrepl")))) + (new js/WebSocket (ws-url (or (.-SCITTLE_NREPL_WEBSOCKET_HOST js/window) + (.-hostname (.-location js/window))) + ws-port "_nrepl")))) (when-let [ws (nrepl-server/nrepl-websocket)] (set! (.-onmessage ws) From f72c1c163aeddcb3451becad3c19d6482751f404 Mon Sep 17 00:00:00 2001 From: FrankS Date: Tue, 9 Dec 2025 13:11:25 -0800 Subject: [PATCH 18/18] Expose cljs.core/Cons in SCI config (#142) This allows (instance? cljs.core/Cons x) to work in Scittle code. The Cons type exists in the compiled ClojureScript runtime but was not exposed by name in SCI's symbol table. Libraries like Trove need this for type checking in their const-form? function. --- src/scittle/core.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scittle/core.cljs b/src/scittle/core.cljs index 6a7ac60..c603d9c 100644 --- a/src/scittle/core.cljs +++ b/src/scittle/core.cljs @@ -44,7 +44,8 @@ 'NaN? (sci/copy-var NaN? cljns) 'infinite? (sci/copy-var infinite? cljns) 'iteration (sci/copy-var iteration cljns) - 'abs (sci/copy-var abs cljns)} + 'abs (sci/copy-var abs cljns) + 'Cons cljs.core/Cons} 'goog.object {'set gobject/set 'get gobject/get} 'goog.string {'format gstring/format