Releases: diogenesc/better-expr-editor
Releases · diogenesc/better-expr-editor
v0.2.3
v0.2.2
Consolidate 3 release workflows into 1 with 3 jobs
v0.2.1
chore: bump to 0.2.1
v0.2.0 — Custom expr functions & editor extensibility
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. Callwasmlib.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
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})(orfilter/all/anyetc.) triggersunexpected 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 WASMexprCompile()src/editor.ts—createEditor()now includes lint;createCMEditoracceptsExtension[]src/index.ts— main editor view includes lint extensions
v0.1.4
fix: correct repository URL for npm provenance
v0.1.3
chore: bump to 0.1.3
v0.1.2
docs: make README friendlier, lead with npx
v0.1.1
fix: clean up npm-package infra, update workflow for root publish
v0.1.0
fix: restore private: true to prevent accidental publish from root