Skip to content

v1.5.20

Choose a tag to compare

@github-actions github-actions released this 10 Jul 08:17

✨ Features

  • Auto-expose — setup without a return. A component's setup no longer needs to end with a
    return { … } mirror of its bindings. Omit it and Weave synthesizes one, exposing exactly the names
    the template reads — a private helper, a timer, an intermediate value the template never names stays
    private. Writing an explicit top-level return opts out (it is used verbatim). The runtime module and
    weave check apply the same transform, so the runtime context and the type-checked context are
    identical. See Learn → Components → You can skip the return.

  • No void Tag; for template-only component imports. A child component you import but use only in a
    template (<Badge/>) is recognized as used by the Weave editor tooling — it is no longer flagged
    "unused import", so the void Badge; keep-alive lines are unnecessary (the imports stay, for
    go-to-definition). Pinned by a regression test.

  • Call common globals inline in templates. setTimeout, confirm, requestAnimationFrame,
    FormData, crypto, and other everyday DOM/timer globals now resolve to the real global inside a
    template expression (e.g. on:click={{ () => setTimeout(close, 200) }}) instead of being mistaken for
    component data. Parser errors also now point at the exact line, not the top of the file.

  • Bare boolean attributes on components. <Button disabled> now passes the boolean true (not the
    empty string), so boolean props work as written and weave check no longer flags '' vs boolean. A
    quoted attribute still passes a string.

  • Typed @snippet parameters. Annotate a snippet parameter — @snippet row(ctx: ListRowContext<Task>)
    — and its body is type-checked against the type (typos caught). Un-annotated parameters stay any. This
    makes the rowTemplate / itemTemplate / tabTemplate authoring pattern fully typed.

  • Prop defaults — export const propDefaults. Give a component static default prop values in one place
    instead of () => props.x ?? default per prop. A prop the parent omits reads the default; one it passes
    wins (and stays reactive). Defaulted props become optional for the parent, so weave check won't demand
    them. export const propDefaults = { size: 'md', variant: 'primary' };

  • bind: on components. <Stepper bind:value={{ count }} /> now works — two-way is the same syntax on
    a component (passing the signal) as on a DOM <input>, instead of a compile error.

  • A skill suite for building Weave apps. Eleven focused, per-subsystem skills (component, reactivity,
    templates, router, forms, store, i18n, data, ui, tooling — plus an orchestrator) that guide an AI editor
    through building Weave apps of any complexity, each grounded in the real API. New apps scaffold them
    automatically; existing apps copy the skills/ folder into their editor's skills directory.

🐛 Fixes

  • Arrow-parameter shadowing in templates. A template expression whose inline arrow reuses a
    component-binding name — e.g. items().map((value) => value * 2) where value is also a binding —
    compiled to invalid JS ((ctx.value) =>) and broke the build. Codegen now leaves arrow parameters
    alone.

  • bind:group with non-string signals. A radio group bound to a Signal<number> now checks the right
    option and writes back a number (not the string). And a form's async validation now settles precisely
    (a reactive watch, not a timed poll).