Releases: nrepl/weasel
Releases · nrepl/weasel
0.8.0
Changes
- Bump the minimum dependencies to Clojure 1.12 and ClojureScript 1.12.
- Bump
http-kitto 2.8.1 and (dev-only)piggiebackto 0.6.0. - The REPL client now talks over the platform's native
WebSocketinstead of
the legacygoog.net.WebSocket/clojure.browser.netmachinery. As a
result the client runs in any modern JavaScript runtime (browsers, Node 22+,
Deno, Bun, web/service workers), not just the browser. Two consequences worth
calling out:- The
weasel.impls.websocketnamespace, previously agoog.net-based
protocol implementation, is now a small functional wrapper. Code that
depended on its old vars (websocket-connection, theIConnection
protocol, etc.) needs updating. - The objects passed to the
:on-errorand:on-closecallbacks are now
nativeWebSocketevents rather thangoog.net.WebSocketevents.
- The
Enhancements
- The client now reconnects automatically when the connection drops (page
reload, server restart, flaky network) using an exponential backoff. It is
on by default and tunable via the:reconnect?,:reconnect-delayand
:max-reconnect-delayoptions. Callweasel.repl/disconnectto close the
connection and stop reconnecting. - Added an optional application-level heartbeat (
:ping/:pong) that detects a
silently dead connection and triggers a reconnect. It is off by default and
enabled via the:heartbeat-intervaloption; it never disrupts a server that
doesn't answer pings. - The server no longer rejects a second client. Several clients may be connected
at once; evaluations go to the most recently connected one (so a new client
takes over the REPL) while the others stay connected and their output still
reaches the REPL. An evaluation whose target client disconnects mid-flight now
reports an error instead of hanging the REPL. - The server now validates the
Originheader of incoming WebSocket
connections. By default only local origins (localhost,127.0.0.1,[::1])
are accepted, closing a hole where any page open in the developer's browser
could connect to the REPL. Use the new:allowed-originsrepl-env option (a
collection of origins, a predicate, or:all) to widen it. Non-browser
clients send noOriginheader and are unaffected. - Ship a
deps.ednso the library can be consumed via the Clojure CLI / tools.deps. - Add a GitHub Actions CI pipeline and a basic test suite, including a Node
round-trip integration test that exercises the full eval cycle over a real
WebSocket.
0.7.1
0.7.0
0.6.0
0.5.0
0.4.2
Full Changelog: 0.4.1...0.4.2
0.4.1
Full Changelog: 0.3.0...0.4.1
0.3.0
0.2.0
0.1.0
Full Changelog: https://github.com/nrepl/weasel/commits/0.1.0