Skip to content

@marko/compiler@5.40.2

Latest

Choose a tag to compare

Patch Changes

  • #3388 642c68d Thanks @DylanPiercey! - Make common syntax errors self-guiding. Call-style control flow (<if(cond)>, <await(x) p>, <show(x)>) now says how to write the condition/value as an attribute; bare JS declarations at the template root (let count = 0;) and slashless <let count=0>/<const x=1> point at the tag-variable form and static; unknown tags from other frameworks get curated pointers (<slot><${input.content}/>, <state><let>) before falling back to nearest-name suggestions; JSX-style brace-wrapped attribute values (onClick={handler} and values that only parse once unwrapped) explain that attribute values are plain JavaScript expressions; attribute tags on <await> point at <try> with <@placeholder>/<@catch>. Also fixes a typo in the nested-attribute-tags assertion message ("Tag not support" → "Tag does not support").

  • #3390 ec97955 Thanks @DylanPiercey! - Report every analyze-stage error in a template at once instead of stopping at the first. Analyze failures are now recorded through the compiler's diagnostics channel (diagnosticError), and the compiler mirrors the parse layer by throwing all error diagnostics together at the end of the analyze stage (duplicates deduped, capped at 8) — or, when compiling with errorRecovery, keeping them as recoverable diagnostics for editors instead of throwing. The tags translator reports tag-level analysis failures this way, skipping the failed tag's subtree to avoid cascading follow-on errors. Templates with a single error produce byte-identical output.