Releases: marko-js/marko
@marko/runtime-tags@6.1.23
Patch Changes
- #3306
bcbd992Thanks @DylanPiercey! - Collapse pass-through signals for<for>and tag-body params that are only read by member access, shrinking the generated DOM bundle.
@marko/runtime-tags@6.1.22
Patch Changes
- #3281
802234eThanks @DylanPiercey! - Render native attribute values at compile time. Conditional and logical attribute values are pushed down to their branches so the literal side is serialized at build time, and a sharedname=prefix is hoisted out so only the differing value stays dynamic — e.g.title=x ? "a" : "b"compiles totitle=${x ? "a" : "b"}, andaria-hidden=x && "true"serializes the"true"side without re-evaluatingx. Becauseclass/styleomit a falsy value,class=x && "active"further simplifies tox ? " class=active" : "". Aclassobject/array with a static base is resolved up front without re-evaluating any toggle: a single toggle picks a precomputed literal, a few index a hoisted table packed from the toggles, and more concatenate the string for_attr_class— in every case the class array/object is no longer allocated and the quoting is resolved at build time.
@marko/runtime-tags@6.1.21
Patch Changes
-
#3303
ccd2b37Thanks @DylanPiercey! - Fix two resume bugs in control-flow branches: a client-created<if>/<for>/dynamic-tag branch could be orphaned from the branch tree (leaking effect/onDestroycleanup) when its owner was driven only by input, and a bare<await>(no enclosing<try>) could throw aHierarchyRequestErrorwhen its promise re-resolved after resume.The closest branch for a control-flow owner is now derived during resume from the branch markers it already emits — nested under its enclosing stateful branch the same way branches link to their parents — so no extra closest-branch id is serialized.
@marko/runtime-tags@6.1.20
Patch Changes
-
#3298
c199491Thanks @DylanPiercey! - Run a lazily-loaded branch's setup effects only after it is connected. When a lazy tag loads with pending input values its insertion is deferred until those values resolve, but its setup -- and the effects it queues, such as<script>content and event-attach effects -- previously ran before the branch's nodes were inserted. Setup now runs in that same deferred render, so its effects run only once the branch is connected, whether or not a<try>ancestor is present. -
#3300
4f8f805Thanks @DylanPiercey! - Fix a batch of runtime and translator bugs:- Sibling dynamic attribute tags first discovered within a single control-flow branch now share a group, so the DOM output no longer assigns to an undeclared variable (ReferenceError) and correctly delivers each tag's reactive value.
- Multi-segment
<style.module.css>shorthand extensions now compile instead of being rejected as unsupported html attributes. - Optimized builds no longer emit the dev-only
_assert_initwrapper for derived own-variable reads (the guard read a stale config value instead of the activeoptimizeoption). - Known attribute lookups no longer resolve
Object.prototypemembers for attribute names likeconstructorortoString. $signaldeduplication is keyed correctly for the first expression in a section, avoiding a duplicate abort controller and reset.- A serialized
RegExpwhose source contains<is now escaped so it cannot break out of the inline resume<script>. - An
Errorserialized with an explicitly falsycause(0,"",false,null) now preserves the cause on resume instead of dropping it. - An uncontrolled
<select>no longer force-selects an empty/falsy-value<option>. - A controlled-checked
<input>(e.g. a radio button) no longer drops its staticvalueattribute; the controlled-attribute skip is now scoped per branch consistently in both the server and client runtimes. - Rendering a Marko 5 class component as tags with
nullinput no longer throws.
@marko/compiler@5.40.0
Minor Changes
- #3301
ecc342cThanks @DylanPiercey! - Discover custom tags grouped one level deep inside non-tag folders under atagsdirectory (e.g.tags/icons/icon-chevron.markoexposes<icon-chevron>).
@marko/runtime-tags@6.1.18
Patch Changes
-
#3289
45fb443Thanks @DylanPiercey! - Improve dead code and serialization reductions when using the tags/class compat layer -
167712cThanks @DylanPiercey! - Fix a crash when re-rendering an inert (server only) Class API child rendered by a Tags API parent.
@marko/runtime-tags@6.1.17
Patch Changes
-
#3282
0144550Thanks @DylanPiercey! - Add theScopablealias toMarkoTagBody. It was already treated as scopable by the runtime checks (isScopable/isScope, so it gets its own scope) but was missing from theScopablealias group, so Babel's scope-crawl reset visitor — which is registered via that alias — never reset a tag body's bindings during an ancestor/program-levelscope.crawl(); it appended freshly-collected references on top of stale ones. Combined with an AST mutation that moves a reference out of a removed subtree (e.g. flattening a text-only<if>), a tag-body parameter (<await>value,<for>item) could retain a reference into the removed nodes, making the analyzer emit invalid output such asconst = _content_resume(...)that crashed the bundler. -
Updated dependencies [
0144550]:- @marko/compiler@5.39.66
@marko/runtime-tags@6.1.16
Patch Changes
-
#3271
bf09dabThanks @DylanPiercey! - Render a non-promise<await>value synchronously even when the<await>is inside a<try>. Previously the browser runtime could only render it synchronously at the top level and deferred to the next tick inside a<try>(because the await value is resolved before its content branch is created); it now renders in the same pass. -
#3269
fdb5627Thanks @DylanPiercey! - Render a<await>tag synchronously when its value is not a promise, instead of crashing withvalue.then is not a function. This matches the server runtime, which already renders non-promise values synchronously. -
#3273
47bbd04Thanks @DylanPiercey! - Collapse value signals that only forward their scope and value to another signal ((scope, value) => fn(scope, value)) down to the target signal itself, removing the redundant wrapper closure from the generated output. -
#3265
3a66e8bThanks @DylanPiercey! - Render known tag content passthroughs (<${input.x}/>with no tag variable, arguments, attributes or body) through a leaner_dynamic_tag_contentsignal instead of the general_dynamic_tag. When a known custom tag or<define>tag forwards statically known body content, the parent now calls this specialized signal, which skips renderer normalization, the native (string) tag branch, tag variables and parameter handling. Where that content branch is included in the client build (e.g. mounted inside a client-toggled<if>), this drops the heavy_dynamic_tagdependencies and roughly halves the bundled cost of that code. Server-rendered content is tree-shaken from the client as before, so those bundles and resume behavior are unchanged. -
#3278
8b34976Thanks @DylanPiercey! - Optimize text rendering: collapse text-only<if>/<else>chains in native elements to a single placeholder, escape only the dynamic parts of a placeholder (static strings are escaped at compile time), and hoist static leading/trailing text out of placeholders into static text nodes. -
#3274
d043f9cThanks @DylanPiercey! - Fix static (server only) pages not linking their client side assets. Colocated style files (egtemplate.style.css),<style>blocks, and imports matching thehydrateIncludeImportsoption are now included in a page's client entry even when nothing in its template tree is interactive, so completely static routes are no longer rendered unstyled.
@marko/compiler@5.39.66
Patch Changes
- #3282
0144550Thanks @DylanPiercey! - Add theScopablealias toMarkoTagBody. It was already treated as scopable by the runtime checks (isScopable/isScope, so it gets its own scope) but was missing from theScopablealias group, so Babel's scope-crawl reset visitor — which is registered via that alias — never reset a tag body's bindings during an ancestor/program-levelscope.crawl(); it appended freshly-collected references on top of stale ones. Combined with an AST mutation that moves a reference out of a removed subtree (e.g. flattening a text-only<if>), a tag-body parameter (<await>value,<for>item) could retain a reference into the removed nodes, making the analyzer emit invalid output such asconst = _content_resume(...)that crashed the bundler.
@marko/runtime-tags@6.1.15
Patch Changes
- #3266
69e199dThanks @DylanPiercey! - Error in development when a dynamic tag (<${value}>) receives a non-renderable value — a primitive, or an object without a validcontentrenderer.MARKO_DEBUG-only and stripped from production.