diff --git a/CHANGELOG.md b/CHANGELOG.md index 495c622..b2fff67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ +- [#114](https://github.com/babashka/scittle/issues/114): Enable source maps ([@jeroenvandijk](https://github.com/jeroenvandijk)) +- [#140](https://github.com/babashka/scittle/issues/140): Enable customizing the nrepl websocket port ([@PEZ](https://github.com/PEZ)) + +## v0.7.28 (2025-09-13) + +- [#137](https://github.com/babashka/scittle/issues/137): fix JS interop with reserved JS keyword (incorrectly munged) by bumping SCI + ## v0.7.27 (2025-08-21) - [#95](https://github.com/babashka/scittle/issues/121): support string requires diff --git a/README.md b/README.md index 52d3130..01e1607 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ release Updates Github pages with new release build. ## Credits Idea by Arne Brasseur a.k.a [plexus](https://github.com/plexus). +Name by Alessandra Sierra (the name occurs first in [this](https://stuartsierra.com/2019/12/21/clojure-start-time-in-2019/) blog post). ## License diff --git a/deps.edn b/deps.edn index 06144e1..f7a5121 100644 --- a/deps.edn +++ b/deps.edn @@ -1,9 +1,9 @@ {:paths ["src" "resources"] :deps - {org.clojure/clojure {:mvn/version "1.11.1"} + {org.clojure/clojure {:mvn/version "1.12.2"} thheller/shadow-cljs {:mvn/version "3.1.8"} org.babashka/sci {:git/url "https://github.com/babashka/sci" - :git/sha "893fc8394dafe6c76bed69a5685c59f35dd189db"} + :git/sha "6758ba028da559c536a06becbbedade7b0ba6448"} #_{:local/root "../babashka/sci"} reagent/reagent {:mvn/version "1.1.1"} no.cjohansen/replicant {:mvn/version "2025.03.27"} diff --git a/doc/dev.md b/doc/dev.md index c4447b6..b6bd354 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.28` - Create Github release with updated links from `doc/links.md` - `bb gh-pages` - + - - + + - + diff --git a/doc/js-libraries.md b/doc/js-libraries.md index a51d065..72cafb8 100644 --- a/doc/js-libraries.md +++ b/doc/js-libraries.md @@ -1,14 +1,14 @@ # Loading JS libraries -Since `v0.7.27` scittle allows to load libraries from the global enviroment. +Since `v0.7.28` scittle allows to load libraries from the global enviroment. This means you can load a library in a ` + + - + ``` Also include the CLJS file that you want to evaluate with nREPL: @@ -42,6 +42,16 @@ you should be able evaluate expressions in `playground.cljs`. See a demo Note that the nREPL server connection stays alive even after the browser window refreshes. +### Custom host address + +By default, the browser will connect to a websocket on the same host as it is loaded +from, using `window.location.hostname`. If you need something else you can specify +that setting the window variable `SCITTLE_NREPL_WEBSOCKET_HOST` like so: + +``` html + +``` + ### CIDER Choose `cider-connect-cljs`, select port `1339`, followed by the `nbb` REPL diff --git a/doc/nrepl/index.html b/doc/nrepl/index.html index 82a903b..5890a47 100644 --- a/doc/nrepl/index.html +++ b/doc/nrepl/index.html @@ -1,9 +1,9 @@
- + - + diff --git a/package-lock.json b/package-lock.json index 9408bff..e5bd260 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.27" + "version": "0.7.28" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -129,5 +129,5 @@ } } }, - "version": "0.7.27" + "version": "0.7.28" } diff --git a/package.json b/package.json index 71d9dbd..ab333e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scittle", - "version": "0.7.27", + "version": "0.7.28", "files": [ "dist" ], diff --git a/resources/public/cljs/replicant_tictactoe/game.cljs b/resources/public/cljs/replicant_tictactoe/game.cljs index 3f62d7f..9296baf 100644 --- a/resources/public/cljs/replicant_tictactoe/game.cljs +++ b/resources/public/cljs/replicant_tictactoe/game.cljs @@ -13,10 +13,13 @@ path)) (defn get-winning-path [{:keys [size tics]} y x] - (or (winner? tics (mapv #(vector y %) (range 0 size))) - (winner? tics (mapv #(vector % x) (range 0 size))) - (when (= y x) - (winner? tics (mapv #(vector % %) (range 0 size)))))) + (let [flip-y (fn [y] (- size 1 y))] + (or (winner? tics (mapv #(vector y %) (range 0 size))) + (winner? tics (mapv #(vector % x) (range 0 size))) + (when (= y x) + (winner? tics (mapv #(vector % %) (range 0 size)))) + (when (= (flip-y y) x) + (winner? tics (mapv #(vector (flip-y %) %) (range 0 size))))))) (defn maybe-conclude [game y x] (if-let [path (get-winning-path game y x)] diff --git a/resources/public/codemirror.html b/resources/public/codemirror.html index 417c977..800624b 100644 --- a/resources/public/codemirror.html +++ b/resources/public/codemirror.html @@ -1,13 +1,13 @@ - + - - - + + + - + + + + - +