Skip to content

Releases: bobbicodes/lang-clojure-eval

Enable all requires

04 Jul 21:51
a4e582d
Compare
Choose a tag to compare

Well I had a feeling that bringing in rewrite-clj would be worth it...

We have to parse each evaluation to see if it contains a namespace with a :require and if so, inject them along with the Java interop namespaces. The trick was to keep track of the last namespace declaration evaluated and not replace it when evaluating a region that does not contain one.

Enable Java interop in any namespace

04 Jul 19:25
81e1d1a
Compare
Choose a tag to compare

Fixed an issue where interop functions would become unavailable if the user switches namespaces. Adds a dependency for rewrite-clj (and ~100KB to the unzipped package) which I'm not sure was a good idea because I probably could have just used a regex. It also duplicates functionality of the Lezer parser, which I probably also could have used.

Also fixed a bug that the editor contents could be evaluated while there was still an uncleared result. Now we simply run clearEval() prior to each eval.

Supports (some) Java interop

04 Jul 06:31
88a895d
Compare
Choose a tag to compare

Added several common methods from the Character class:

  • isISOControl
  • isLetter
  • isAlphabetic
  • isSpace
  • isUpperCase
  • isLowerCase
  • toUpperCase
  • toLowerCase
  • digit

and Integer/parseInt.

Add browser tests

30 Jun 17:15
Compare
Choose a tag to compare

Uses @vitest/browser. Covers functions:

  • evalCell
  • clearEval
  • evalTopLevel
  • evalAtCursor

v0.0.18

29 Jun 17:30
Compare
Choose a tag to compare

Bug fix:

  • Cursor position would change when cell is evaluated

v0.0.17

29 Jun 08:34
Compare
Choose a tag to compare
refactor to use arrow functions

Bug fix: evalCell

29 Jun 07:44
Compare
Choose a tag to compare
v0.0.16

release v0.0.16

Better errors, prevent infinite loops

29 Jun 07:38
Compare
Choose a tag to compare
v0.0.15

better errors, handle infinite sequences

Revert truncate results

28 Jun 12:48
Compare
Choose a tag to compare

I decided to wait to do this until I come up with a better truncation strategy. Until then, it's a dirty free-for-all.

Pretty print/truncate eval results

28 Jun 12:23
Compare
Choose a tag to compare
v0.0.13

pretty print/truncate eval results