Repository navigation
Patch Changes
-
#4761
7f75778Thanks @DylanPiercey! - A$signalread in a native tag's attribute or spread now aborts when that attribute re-runs or its tag is removed, rather than right after every render. -
#4757
5607497Thanks @DylanPiercey! - Generated names learn which names a template already uses from Babel's scope, which has recorded them, instead of walking the whole template again. -
#4769
1cc46dfThanks @DylanPiercey! - An element reference read as a value by a<script>above its tag and again as a value the server writes below it no longer fails the server render with an undefined getter. -
#4762
5631611Thanks @DylanPiercey! - A hoisted tag variable read only by code the server never runs (an event handler or<script>, or a function only event handlers read) no longer registers its getter for resume or creates one on the server, which never writes it. -
#4789
bc5b704Thanks @DylanPiercey! - The translator keeps each analysis's and output's state on the analysis or output it belongs to, instead of in module-level WeakMaps whose entries for finished compiles slowed garbage collection in long-running processes such as dev servers. -
#4756
fc26b52Thanks @DylanPiercey! - Drop the stubs of debug-only helpers from the optimized runtime: only the debug runtime exports the helpers that debug output alone calls. -
#4772
c3af14eThanks @DylanPiercey! - An array or object literal as a native tag's event or change handler, written in place (onClick=[input.action]) or named through a<const>, is now a compile error, instead of throwing when rendered in debug builds and when the event fires in optimized ones. A<let>valueChange=that names such a<const>is now a compile error too. -
#4770
7dec312Thanks @DylanPiercey! - Assigning a destructured tag parameter (<define/Tag|{ value }|>givenvalue:=count, or<for|{ value }|>) no longer makes the server render throw aReferenceErrorfor its change handler. -
#4774
025bbe3Thanks @DylanPiercey! - A lazy tag or template the client renders after a resumed page'sloadtrigger fired now loads without waiting for that trigger again, including while the module the trigger started is still loading. -
#4767
e8f1c9aThanks @DylanPiercey! - A tag imported with aloadtrigger and rendered through a dynamic tag (<${show ? Child : null}/>) now waits for its trigger on a client render, as the tag written directly does, instead of loading as soon as it renders. -
#4765
302a509Thanks @DylanPiercey! - A<let>valueChange=that is certainly not a function, such as an array or object literal, a string built from input or a number, is now a compile error, as a literal constant already was. A value only known at run time that is not a function now throws a debug error namingvalueChangewhen the<let>is assigned, instead ofscope[valueChangeAccessor] is not a function. -
#4777
977ae4dThanks @DylanPiercey! - Checking whether a lazy module has loaded no longer converts the load triggers still waiting on it to a string each time. -
#4783
f69bc0bThanks @DylanPiercey! - Update a dynamic<title>,<style>, or<script>body by changing its text node in place instead of replacing it. -
#4766
6fab332Thanks @DylanPiercey! - Assigning a tag variable in a function invoked where it is written while rendering (${(() => { count = 1 })()}) is now the same compile error as assigning it outside a function, and a debug build throws when a<let>is assigned while its scope first renders in the browser. -
#4768
4d46a2aThanks @DylanPiercey! - A class name may now appear only once in aclassvalue, and debug builds no longer write aclassorstylevalue's parts out again in a separate check on every render. The compiler rejects a repeated literal name, such asclass=["a", "b a"], and in development the server throws as it writes a class with a repeated name, which checks every combination of a few toggles as the template's module loads. The server also checks in development that a style property appears in only one part of astylevalue. -
#4764
4351da0Thanks @DylanPiercey! - A toggled class's names must be one space apart, as the client splits them: a literal key spaced otherwise ({ "a b": on }) is a compile error, and debug builds throw for a style import read spaced otherwise. The debug class check no longer reports an empty class name for literal parts with extra whitespace, and the client adds or removes a toggled class's several names in one call. -
#4760
bb54d4bThanks @DylanPiercey! - A destructuring assignment to tag variables in a function nested in a render value (such as a handler an inline function returns) no longer writes them again withundefinedon the client. -
#4771
d790870Thanks @DylanPiercey! - A native tag attribute whose whole value is$signal(as aclassobject's value, a controlled attribute, or beside a spread) no longer compiles to an unbound$signal, which threw aReferenceError. -
#4776
6abd02fThanks @DylanPiercey! - Trim the client runtime: values that are nevernullare tested with== null, and a resume payload's scopes are applied by their truthiness rather thanArray.isArray. -
#4778
fa6b530Thanks @DylanPiercey! - Stop reporting a lazy tag's failed input chunk as an unhandled rejection when its setup chunk failed too and<try>already caught the failure. -
#4786
a0fd64eThanks @DylanPiercey! - A server render keeps the registrations bound to its scopes (functions, tag variables, element getters) in a map of its own instead of a globalWeakMap, and a registered function that reads nothing from the render is created and registered once when its template loads. This reduces garbage collection on pages with many such registrations. -
#4775
90fc0cfThanks @DylanPiercey! - Assigning a destructured value whose change handler the same pattern names after it (<child/{ value, valueChange }/>,|{ value, valueChange }|) now calls that handler by the author's name instead of a second, generated one. A renamed handler ({ valueChange: onValue, value }) no longer makes the server output declare it twice, which failed to compile. An assignment in a function a render-time value creates ([1].map((valueChange) => () => { value = 1 })) now calls the handler even where an inner name shadows it, instead of throwing that it is not a function. -
#4773
a582c89Thanks @DylanPiercey! - An element reference read as a value only by code the server never runs (an event handler or<script>, or a function only event handlers read) no longer registers its getter for resume or creates one on the server. -
Updated dependencies [
bc5b704,f019ff6,f019ff6,19d3136]:- @marko/compiler@5.44.0