Skip to content

v0.3.0 — to edn shipped, full round-trip works

Choose a tag to compare

@franks42 franks42 released this 03 May 20:11
· 32 commits to main since this release

Major milestone — both flagship commands now shipped. Anchored to Nushell 0.112.2.

With this release, the cljsh round-trip works end-to-end:

bb produce.clj | from edn | where size > 1000 | sort-by size | to edn | bb consume.clj

What's new

to edn (the reverse direction) is here. Records emit as maps with keyword keys by default ({:name "alice"}), matching Clojure idiom and what bb-side consumers expect. Lists and tables emit as vectors of maps. Date emits as #inst "..." (round-trips). Nushell-native types without an EDN equivalent fall back to primitives:

Nushell type EDN output Notes
Duration integer ms lossy: ns precision dropped
Filesize integer bytes unit dropped
Binary base64 string not a tagged literal
Range, Closure, CellPath, CustomValue, Error #<TypeName> placeholder best-effort, not round-trippable

to edn accepts Value, ListStream (collected first — so where ... | to edn works without | collect), and Empty inputs. ByteStream is rejected with a clear error since raw bytes don't make sense for serialization.

Tests

47/47 integration tests passing on Nushell 0.112.2. 13 new cases for to edn including the full cljsh round-trip pipeline.

Install

curl -L https://github.com/franks42/nu_plugin_edn/releases/download/v0.3.0/nu_plugin_edn-v0.3.0-nu0.112.2 -o nu_plugin_edn
chmod +x nu_plugin_edn
nu -c 'plugin add ./nu_plugin_edn; plugin use edn'

Requires babashka (bb on PATH) and Nushell 0.112.2 specifically — the protocol does a strict version equality check and will reject mismatched releases. When a new Nushell ships, this plugin needs a corresponding rebuild (verifying no protocol-shape changes, then bumping the anchor); see the project's CLAUDE.md for the upgrade procedure.

Planned for the next milestone

--pretty, --meta, --lines, --keep-keyword-prefix, --string-keys flags on to edn, plus source spans on parse errors. See CLAUDE.md for the roadmap.