Patch Changes
-
#4634
589dda1Thanks @DylanPiercey! - A static nullishvalueChangewritten as the first attribute of an attribute-backed<input>(type="checkbox","radio","hidden", …) now compiles the same as one written anywhere else among its attributes. -
#4626
cd3c1bcThanks @DylanPiercey! - Fix a client crash ($…_content__setup is not defined) when a<define>in a<for>body reads only the loop's key and its own params, and is rendered statically (<D/>) or dynamically (<${D}/>). -
#4641
37b12d1Thanks @DylanPiercey! - Build an attribute tag or input object once when the child only spreads it onto an element or invokes the functions in it, instead of rebuilding it whenever state its handlers read changes. -
#4645
4ff0791Thanks @DylanPiercey! - A keyed<for>inside an<if>,<await>,<try>, another<for>or tag content now keeps its O(1) row selection: when the loop compares its key to a value declared further out (class=(selected === row.id && "danger")), a change updates only the previous and next selected rows instead of every row subscribing to the value. -
#4643
6cfc211Thanks @DylanPiercey! - Skip the escape scan for numbers in server-rendered text, which renders numeric-heavy pages faster. -
#4603
7183eb4Thanks @DylanPiercey! - Shrink client code for<for to>and<for until>loops: a loop whosefromandstepare constants uses the unkeyed loop, which needs no reordering, and an omitted or defaultfrom(0) orstep(1) is no longer passed to the loop. -
#4644
33e9ebfThanks @DylanPiercey! - Write compiler-generated change handlers (:=) and attribute tag<for>callbacks, and a few runtime closures, as expression-bodied arrows, which minify smaller. -
#4618
6f6f929Thanks @DylanPiercey! - Fix a resumed<define>body or<for>row that combines a value of the template its parent always writes (such asinput.p1a<script>also reads) with one of its own (a param or<let>): when its own value changed on the client, it threw reading the template's value, since the link to its owner scope was not written. -
#4637
fce28acThanks @DylanPiercey! - Fix the wording of compile errors:<return>names its control-flow parent without quotes,<style>'s html-attribute error links the<style>andhtml-styledocs like<script>'s, and a range<for>suggestsby=(num) => ...for a stringby. -
#4617
066f9a3Thanks @DylanPiercey! - Fix a<for>whose bound or list reads several values, or a child tag's returned value, updating its rows before it adds or removes them: rows it was about to remove were updated with the new values first, which threw where a row read by index (${input.items[i].name}afterinput.itemsshrank) and rewrote a removed row's selected state. Rows now update after the loop settles them. -
#4632
7048535Thanks @DylanPiercey! - Fix a resumed<for>whose bound or list reads a child tag's returned value that cannot change in the browser (one computed from server-only input), together with state the browser changes: the child's scope offset is not written for it, so the rows' update was orderedNaNand could run before the loop removed rows, throwing where a row read by index or leaving a removed row's selection behind. A loop's rows update now queues like the loop's value does, in its own slot after the owner's renders, so it falls back to the owner's order the same way. -
#4640
f4fc401Thanks @DylanPiercey! - FixCannot drop a merged referencewhen a recursive tag call passes content the tag never renders and that content holds control flow such as<if>or<for>. -
#4642
e2c7630Thanks @DylanPiercey! - Resolve a branch's parsed markup from its content instead of rebuilding a cache key from the whole template on every clone, which speeds up creating loop rows and conditional branches. -
#4634
589dda1Thanks @DylanPiercey! - In a Tags template compiled alongside Marko 5,out["global"]now reads$globallikeout.global, andout[global](a variable namedglobal) is now the "Onlyout.globalis supported" compile error instead of silently reading$global. -
#4635
adc765eThanks @DylanPiercey! - A binding used as a computed member key on an assignment, such asobj[key] = 1, is now only read: a<const>rest binding there no longer fails to compile, and other keys keep their per-property updates. -
#4610
13f8aa1Thanks @DylanPiercey! - Fix cleanup on a resumed page when a<for>or<if>removes content that has no resume marker of its own, such as a child tag's static<for>rows, or a tag whose content is only another tag: removing it now aborts its$signal, runs itsonDestroyand stops its updates, as a client render does. -
#4638
fb05fb1Thanks @DylanPiercey! - Attribute tag content whose only client code is a<return>of its<for>param no longer throwsCannot set properties of undefined (setting 'returns')as its module loads in a debug build. -
#4620
23aed68Thanks @DylanPiercey! - When a migrator or transform builds a node without a source location, compile errors and diagnostics about it now mark the nearest part of the template that has one (the node's first located part, its attribute or its tag) instead of failing with "Cannot read properties of undefined", pointing at the start of the file, or pointing at an unrelatedawait. -
#4631
94223f7Thanks @DylanPiercey! - Drop theundefinedargument a<let>without an initial value passed to its signal in client output. -
#4611
81b2751Thanks @DylanPiercey! - Migrate Marko 5'sout.globalto$globalonly in Tags templates that the interop translator (marko) compiles, so a Tags-only project no longer rewritesout, and leave the scope crawl after migration to the compiler. Also skip binding lookups for identifiers the translator never rewrites. -
#4636
fdf683dThanks @DylanPiercey! - A tag named like a JavaScript built-in (<Map/>,<Date/>) with no tag file now reports "Unable to find entry point" instead of "Local variables must be in a dynamic tag", since nothing declares that name. -
#4602
e5c5bcdThanks @DylanPiercey! - Write a native tag's object literal spread (<div ...{ id: "x", onClick() {} }>) as the attributes it names, so static ones join the markup and the tag no longer resumes for the spread alone. -
#4607
68efc83Thanks @DylanPiercey! - Skip creating anAbortControllerfor an expression that only uses$signalto setonabort; its cleanup runs directly on teardown. -
#4613
fd9b1e0Thanks @DylanPiercey! - Write a single-use derived value's client update where it is computed, dropping a function and a call for each (a<for>item's property, a one-use<const>). -
Updated dependencies [
4a5e758,ff3cec9,fce28ac,f52e0bd,23aed68,81b2751,eab0534]:- @marko/compiler@5.42.17