github marko-js/marko @marko/runtime-tags@6.3.34

3 hours ago

Patch Changes

  • #3822 352bca2 Thanks @DylanPiercey! - Single-letter camelCase event attributes (onX) now compile as event handlers, matching the runtime's event detection.

  • #3866 0eced38 Thanks @DylanPiercey! - Page asset tags are now emitted after a leading <!doctype>; a page entry without a literal <head> previously wrote them ahead of the doctype, silently putting the document in quirks mode.

  • #3858 7799b0a Thanks @DylanPiercey! - Carriage returns in server-rendered attribute values are now escaped as &[#13](https://github.com/marko-js/marko/issues/13);; the HTML parser previously normalized them to line feeds, diverging from client rendering.

  • #3841 dde49dd Thanks @DylanPiercey! - A checkbox controlled through a spread checkedValue alongside static attributes no longer unchecks when unrelated state updates; the stale-attribute removal now recognizes checkedValue as owning checked, matching full spreads.

  • #3839 3cc6b1c Thanks @DylanPiercey! - Mixing refined and plain bound attributes on the same variable (value:parseInt:=x and value:=x) now generates a change handler per refinement instead of reusing the first one for all.

  • #3819 9cb5d2a Thanks @DylanPiercey! - Align cheatsheet.md prose with the documentation style guidelines (sentence-case emphasis, short headings, no em-dashes); content unchanged.

  • #3835 3e69b12 Thanks @DylanPiercey! - An empty key in a class object (class={ "": cond }) no longer throws on client render; it is dropped, matching server rendering.

  • #3837 d13cc15 Thanks @DylanPiercey! - A control-flow branch whose entire markup is an Object.prototype member name (e.g. bare text constructor) no longer crashes client rendering; the clone cache key is prefixed so inherited properties can't collide.

  • #3860 ae57723 Thanks @DylanPiercey! - Caret restoration in controlled inputs now handles astral letters and digits (CJK Extension B, math alphanumerics, ...); previously the cursor jumped to the end of the value on edits near them.

  • #3843 877f821 Thanks @DylanPiercey! - A custom tag invoked with arguments and a body (<my-tag("a")>hi</my-tag>) is now a compile error instead of silently dropping the body; dynamic tags still allow arguments with fallback content.

  • #3863 5f8f1b5 Thanks @DylanPiercey! - Reusing a value that was serialized as a deferred Map/Set member (e.g. a member of a circular collection) in a later stream flush no longer crashes the serializer.

  • #3825 f1b18db Thanks @DylanPiercey! - Events whose type collides with a Function property (on-name, on-length, …) now register their delegated listener instead of silently never firing.

  • #3829 295b86e Thanks @DylanPiercey! - Debug builds now resume event handlers on camelCase dynamic native tags (e.g. a dynamic <linearGradient> inside <svg>); the debug element accessor casing previously disagreed between server and resume, leaving handlers silently dead.

  • #3832 f1aa0ec Thanks @DylanPiercey! - State read by event handlers spread onto a dynamic tag from a <const> now serializes for resume; previously the handlers were wired after resume but read their state as undefined.

  • #3868 6adab5a Thanks @DylanPiercey! - Fix a client-side crash or destroyed sibling elements when a template contains a placeholder that statically evaluates to an empty string (e.g. ${""} or ${NaN}): it rendered no text but still claimed a walk step, shifting every later step in the section by one.

  • #3817 647d520 Thanks @DylanPiercey! - Reading event.currentTarget in a native tag event handler is now a type error whose message points at the handler's second parameter (the typed element), since event delegation makes currentTarget unusable at runtime.

  • #3791 de3bb9f Thanks @DylanPiercey! - Fix dead markojs.com links in compile errors and editor autocomplete: /docs/syntax/ URLs now point at the language reference, and core-tag anchors account for headings that differ from the tag name.

  • #3811 80edc6a Thanks @DylanPiercey! - Fix Sorted.isSuperset rejecting valid supersets, and give controllable change handlers (including on dynamic tags) their own serialize reasons so their functions stay registered now that intersection pruning is accurate. Bound native inputs serialize slightly less, and computed bound attributes (value:=state[key]) now register their handlers.

  • #3823 0fd5689 Thanks @DylanPiercey! - A falsy <for by> value (e.g. by=cond && "id") now means "no key" in the browser runtime, matching server rendering, instead of throwing by is not a function on update.

  • #3844 de8fb5f Thanks @DylanPiercey! - Reading a loop parameter anywhere in a <for by=...> expression (e.g. by=item.id) is now a compile error with a code frame, instead of compiling clean and throwing a ReferenceError at first render.

  • #3820 9567e06 Thanks @DylanPiercey! - Debug builds now error when a <for> tag's from or step attribute is a non-number, instead of silently concatenating indices.

  • #3824 90d9630 Thanks @DylanPiercey! - Debug server rendering now validates spread attributes the same way the browser runtime does: invalid attribute names error even with void values, and mutually exclusive controllable attributes split across a spread and static attributes are reported.

  • #3854 ede4050 Thanks @DylanPiercey! - <if value=cond>, <else-if value=cond> and <show value=cond> now compile like the = shorthand, matching every other core tag's handling of the written-out attribute.

  • #3865 1f67f47 Thanks @DylanPiercey! - A streaming sink that throws (e.g. a client disconnect mid-write) no longer degrades progressive streaming for other renders in flight on the same server.

  • #3857 2505756 Thanks @DylanPiercey! - A native tag whose content= attribute evaluates statically (e.g. <div content=undefined/>) no longer aborts the browser-output compile with an internal error.

  • #3760 efe38e8 Thanks @DylanPiercey! - Report the underlying error when serialization fails while flushing a Class-API page that renders Tags-API content, instead of emitting a resume script that fails in the browser as M is not defined.

  • #3834 ae8e0f4 Thanks @DylanPiercey! - Fix children consuming input only through a rest pattern or direct alias: their input groups now map their real feeders (restoring resume serialization for fed values), and the generated $input alias export no longer references its target before declaration.

  • #3772 c72635d Thanks @DylanPiercey! - Fix a Cannot read properties of undefined (reading 'serializeState') crash when a Class-API component rendering Tags-API content is rendered directly — through renderToString or @marko/testing-library — rather than as a page with <init-components>.

  • #3838 ce12ada Thanks @DylanPiercey! - Registered object/class methods with computed or static keys now keep those flags in browser output; a computed-key handler previously lowered to a literal key and silently wired nothing.

  • #3830 14f004b Thanks @DylanPiercey! - Resume-only pages containing a dynamic native tag with spread attributes no longer crash during hydration: _resume_dynamic_tag now enables branch visit processing, which the bundler could previously tree-shake away along with _dynamic_tag.

  • #3859 1b9348b Thanks @DylanPiercey! - Resume registration ids are now unambiguous; previously two same-named tag variables (e.g. two <div/x> element refs) or bindings with _-joined names could share one id, silently resolving to the wrong value after resume.

  • #3826 eab1c0b Thanks @DylanPiercey! - A <return valueChange> that becomes falsy now revokes the tag-variable change handler, so later parent assignments are readonly (debug error / no-op) instead of silently mutating through the stale handler.

  • #3821 b27066f Thanks @DylanPiercey! - A duplicate value/valueChange attribute on <return> is now a compile error instead of producing code that throws a ReferenceError at render time.

  • #3800 2a1552e Thanks @DylanPiercey! - Reword the tag-variable compile errors in the reference tracker to name the variable and link the docs — including the former "Cannot assign to hoisted tag variable.", which now explains the positional rule.

  • #3813 45b91f4 Thanks @DylanPiercey! - Share the await frame scheduler between addAwaitCounter and _await_promise, slightly shrinking dom bundles that use <await>.

  • #3790 14475c0 Thanks @DylanPiercey! - Declare a types stub for the <show> tag so editors and mtc type-check its input like the other core tags.

  • #3850 6fd0a30 Thanks @DylanPiercey! - Fix hydration when the Class runtime initializes before the Tags runtime: a class component rerendering in the browser now forces the tags runtime to resume first, so revived content (input.renderBody) and existing tags branches are found instead of crashing with Invalid dynamic tag value or discarding server-rendered DOM.

  • #3789 70b2887 Thanks @DylanPiercey! - Name the actual handler attribute (checkedChange, checkedValueChange, openChange, …) in the server-side controllable debug assertion instead of always reporting valueChange.

  • #3828 d0a2946 Thanks @DylanPiercey! - The load import attribute is now stripped from compiled HTML output; unbundled server modules previously kept with { load: ... }, which Node rejects at import time.

  • #3852 014a6ad Thanks @DylanPiercey! - Type stub fixes for editors and @marko/type-check: valueless <let/x/> type-checks, <html-comment>/<html-script>/<html-style> tag variables type as element getters, and <try>'s @catch parameter is any so reading err.message is clean.

  • #3855 61c333d Thanks @DylanPiercey! - Escape sequences in a template-literal tag name (e.g. <${`h\x31`}>) are now decoded instead of reaching the emitted markup verbatim.

  • #3797 f01d949 Thanks @DylanPiercey! - Error at compile time when a <try> receives an attribute tag other than <@placeholder>/<@catch>, with a near-miss suggestion — a typo previously compiled clean and silently dropped the pending/error UI.

  • #3806 8398441 Thanks @DylanPiercey! - Validate the load import attribute (trigger syntax and import specifiers) even when linkAssets is not configured, instead of silently falling back to an eager import.

  • #3782 b99657e Thanks @DylanPiercey! - Warn in debug builds when a NaN or bigint 0n text or style value is silently dropped from the output.

  • #3796 3ceed71 Thanks @DylanPiercey! - Warn at compile time when a <script> body returns a cleanup function, which is discarded; point at $signal.onabort and <lifecycle onDestroy>.

  • Updated dependencies [4bc0479, 877f821, 1a881a5, 97ab05e, eb25d4c, 05f3a1a, 798521c]:

    • @marko/compiler@5.41.18

Don't miss a new marko release

NewReleases is sending notifications on new releases.