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

latest release: @marko/compiler@5.42.18
one hour ago

Patch Changes

  • #4666 8719e0b Thanks @DylanPiercey! - An <if> or <for> whose condition reads a tag variable its child's <return> changes in the browser now links each branch's owner from its resume marker instead of serializing it, as one reading client-assigned state already did.

  • #4670 1885815 Thanks @DylanPiercey! - A dynamic tag whose name computes a value from passed content, such as <${open && input.content}/>, or <${open ? content : undefined}/> in a <define>, now compiles and renders that value: its caller no longer imports a $input_content_direct signal the child never exports, nor renders the content in place of the computed name.

  • #4649 0905a25 Thanks @DylanPiercey! - Drop the range markers around content that starts or ends with a <define> call, such as a <for> row, an <if> branch or a template rendering a <define> declared above it: the client clones two fewer comment nodes per row (four for a template whose edge is a <define> call, rendered in a loop), and the server writes one fewer comment per row or branch.

  • #4669 5c837ed Thanks @DylanPiercey! - Read members of a <define> or <id> tag variable without optional chaining, since neither is ever nullish.

  • #4658 5567818 Thanks @DylanPiercey! - A <define> param that every call passes as a constant no longer makes the server send what only that param's changes would read, such as a closure value or the <define> itself, a function nothing would send is no longer registered for resume, and a rest nothing would send is declared in the branch that renders it instead of outside it.

  • #4665 5d9472e Thanks @DylanPiercey! - A function whose readers' reasons name template params no write guard groups together compiles again, instead of failing with "cannot ask for a param reason group that was not analyzed".

  • #4660 fd28aca Thanks @DylanPiercey! - Class API content that a Tags template renders now updates in place on its Class parent's later rerenders, so Class components inside it keep their state, and it reads the real out.global in a production build. A Class template that takes no input also renders as a native tag's content, as a Tags template does.

  • #4672 f8ce4c7 Thanks @DylanPiercey! - Fix lazily loaded tags nested in other lazily loaded tags staying inert on resume: one whose module loads before its parent's and renders content, a template or a function the parent passes it, and lazily loaded tags that import each other and each read a value the other passes.

  • #4653 1b49ca4 Thanks @DylanPiercey! - A dynamic tag rendering a native element writes its content as a static native tag does, without branch markers inside the element.

  • #4671 49f6b7a Thanks @DylanPiercey! - A <@content> attribute tag is now a compile error under any tag, since a tag's content is its body: write it as the tag's body, or pass it with content=. Attribute tags under a native tag are an error too: a compile error on a native tag or on a dynamic tag whose name only resolves to native tags, and an error in debug builds when a dynamic tag renders a native tag with an attribute tag in its input. A native tag's content, from content=, a spread or a dynamic tag, is body content, a <define> tag variable or attribute tag holding it, or a falsy value; anything else is an error in debug builds.

  • #4655 64835e1 Thanks @DylanPiercey! - An attribute tag whose dynamic attributes or spread a child reads through a rest (<const/{ item: { content, ...attrs } }=input/>) updates on a resumed page instead of throwing.

  • #4660 fd28aca Thanks @DylanPiercey! - On a page with Class API components, a Tags <define>, attribute tag or template module namespace (import * as Child from "./child.marko") rendered through a dynamic tag no longer fails with Invalid dynamic tag value or remounts on the first update after resume, and an attribute tag with no content renders the dynamic tag's body as it does without them.

  • #4660 fd28aca Thanks @DylanPiercey! - On a page with Class API components, a Tags template renders a Class parent's content or attribute tag body wherever it renders content, through a native tag spread (<div ...input.foo/>), content= or a dynamic tag; a dynamic tag also renders one forwarded through a Class component. These previously rendered nothing or failed with Invalid dynamic tag value.

  • #4663 296f719 Thanks @DylanPiercey! - The Class API interop layer loads from its own @marko/runtime-tags/dom/compat.feat and @marko/runtime-tags/html/compat.feat entries instead of the main dom and html entries, so only pages that mix in Class API components load it, and the server and development runtimes of a Tags-only app no longer include it. marko now depends on the exact @marko/runtime-tags version it ships with; an earlier marko cannot load this layer from a newer @marko/runtime-tags, so upgrade both together.

  • #4647 3bc26a9 Thanks @DylanPiercey! - Fix content or attribute tags a recursive <define> renders with arguments failing every server render with "Unable to serialize".

  • #4654 8289fb4 Thanks @DylanPiercey! - Read a property of a rest element as the rest's, not the object it came from, when the same handler also reads that object (an excluded property read the object's value instead of undefined).

  • #4656 b3d8818 Thanks @DylanPiercey! - A spread into a custom tag whose input rest leaves out a property named like the rest itself (<const/{ rest: x, ...rest }=input/>) no longer generates a duplicate parameter, which failed to build.

  • #4666 8719e0b Thanks @DylanPiercey! - Content that reads a tag variable and resumes after the tag that declares it, such as an <await> body behind a @placeholder or content in nested lazy tags, now shows the value the child's <return> changed it to on the client before that content arrived, where it showed the server's value and missed the change. In <for> rows inside nested lazy tags, a debug render no longer throws "Unable to serialize a value shared between independently lazy loaded content" and an optimized one no longer drops a later row's update.

  • #4660 fd28aca Thanks @DylanPiercey! - On a page with Class API components, a dynamic tag given data that has a renderer's key, such as an id property in a development build (a Class API attribute tag with an id attribute forwarded to a Tags child), no longer mistakes it for a template and fails; it renders the body as for any other non-template value.

  • #4657 ea7bcc8 Thanks @DylanPiercey! - Read a template's input and return types from Marko.Template alone, rather than also from a member that only the language tools' generated types define, and type the result of a Marko 5 template's mount with its return type.

  • Updated dependencies [fcb6837]:

    • @marko/compiler@5.42.18

Don't miss a new marko release

NewReleases is sending notifications on new releases.