Skip to content

Releases: diogenesc/better-expr-editor

v0.2.3

Choose a tag to compare

@github-actions github-actions released this 22 May 14:15
Fix: sync package.json version from git tag before npm publish

v0.2.2

Choose a tag to compare

@github-actions github-actions released this 22 May 13:19
Consolidate 3 release workflows into 1 with 3 jobs

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 22 May 12:55
chore: bump to 0.2.1

v0.2.0 — Custom expr functions & editor extensibility

Choose a tag to compare

@diogenesc diogenesc released this 22 May 02:35

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

Choose a tag to compare

@diogenesc diogenesc released this 22 May 02:32

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

Choose a tag to compare

@github-actions github-actions released this 21 May 19:28
fix: correct repository URL for npm provenance

v0.1.3

Choose a tag to compare

@github-actions github-actions released this 21 May 19:25
chore: bump to 0.1.3

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 21 May 19:18
docs: make README friendlier, lead with npx

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 21 May 19:15
fix: clean up npm-package infra, update workflow for root publish

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 21 May 18:51
fix: restore private: true to prevent accidental publish from root