github marko-js/marko @marko/compiler@5.42.9

latest release: @marko/runtime-tags@6.3.56
4 hours ago

Patch Changes

  • #4302 13cea0d Thanks @DylanPiercey! - Keep each comment in its own syntax in output: "source", which printed // a note and /* a note */ as <!-- --> HTML comments. The parser records the syntax on a new MarkoComment.kind field ("html", "line" or "block"), which the t.markoComment(value, kind) builder also takes.

  • #4300 6c36c96 Thanks @DylanPiercey! - Parse a template in time linear in its tag count. Each parsed tag used to re-key every sibling parsed before it, so 16k sibling tags took about 2.9 s to parse instead of 0.35 s.

  • #4303 05b06d7 Thanks @DylanPiercey! - Expression parse errors no longer name Babel's internal parseExpression() API. An expression that is empty or only comments now reports "Expected an expression, but found only whitespace or comments.", and one followed by more input, such as ${a b}, reports "Expected a single expression, but found b after it."

  • #4302 70451d2 Thanks @DylanPiercey! - Strip a tag's type arguments and type parameters with stripTypes, so output: "source" prints <foo<T>|x: T|> as <foo|x|> and <foo<string>/> as <foo/>, like every other type annotation in the template.

  • #4300 0878583 Thanks @DylanPiercey! - Window a compile error's code frame around the error column when a framed line is longer than 160 characters, so a long line (an inlined data URI, generated markup) no longer makes the error message grow with the source. The label still follows the markers, and the reported line and column are unchanged.

Don't miss a new marko release

NewReleases is sending notifications on new releases.