Skip to content

Releases: diogenesc/better-expr-editor

v0.2.3

22 May 14:15

Choose a tag to compare

Fix: sync package.json version from git tag before npm publish

v0.2.2

22 May 13:19

Choose a tag to compare

Consolidate 3 release workflows into 1 with 3 jobs

v0.2.1

22 May 12:55

Choose a tag to compare

chore: bump to 0.2.1

v0.2.0 — Custom expr functions & editor extensibility

22 May 02:35

Choose a tag to compare

Extensible Editor for Custom Expr Functions

Adds a Go library package pkg/wasmlib that allows users to register custom expr functions and rebuild their own WASM binary. The editor frontend dynamically loads function metadata from WASM for autocomplete, hover tooltips, and syntax highlighting.

Highlights

  • pkg/wasmlib: Reusable Go package. Call wasmlib.Register() + wasmlib.Serve() — no boilerplate.
  • Autocomplete for all 55 built-in plus custom functions (signatures, descriptions).
  • Hover tooltips showing function signatures and docs.
  • Dynamic function loading: WASM reports registered functions via exprFuncDefs() — JS merges them automatically.

Usage

package main

import "github.com/diogenesc/better-expr-editor/pkg/wasmlib"

func main() {
    wasmlib.Register("myFunc", myFuncImpl,
        new(func(int) bool),
    ).Signature("myFunc(x int) => bool").
      Detail("Checks something")

    wasmlib.Serve()
}

Build: GOOS=js GOARCH=wasm go build -o public/expr.wasm ./wasm

v0.1.5 — Real-time expr validation lint

22 May 02:32

Choose a tag to compare

What's new

  • Real-time lint: The editor now validates expressions as you type (750ms debounce) via the WASM expr compiler. Errors appear as gutter markers with position-accurate diagnostics.
  • Predicate-wrapper detection: When map(arr, {'key': val}) (or filter/all/any etc.) triggers unexpected token Operator(":"), the error message now explains why and suggests the workaround: {let it = #; {'key': it.field}}.

Files changed

  • src/lint.ts — new CodeMirror lint extension calling WASM exprCompile()
  • src/editor.tscreateEditor() now includes lint; createCMEditor accepts Extension[]
  • src/index.ts — main editor view includes lint extensions

v0.1.4

21 May 19:28

Choose a tag to compare

fix: correct repository URL for npm provenance

v0.1.3

21 May 19:25

Choose a tag to compare

chore: bump to 0.1.3

v0.1.2

21 May 19:18

Choose a tag to compare

docs: make README friendlier, lead with npx

v0.1.1

21 May 19:15

Choose a tag to compare

fix: clean up npm-package infra, update workflow for root publish

v0.1.0

21 May 18:51

Choose a tag to compare

fix: restore private: true to prevent accidental publish from root