Patch Changes
-
#3313
8e03f4aThanks @LuLaValva! - Add the native<search>tag. -
#4248
d36b447Thanks @DylanPiercey! - Append the coding-agent fix guide to a thrownCompileError'slabelas well as itsmessage, so bundler plugins that printlabelin place of the framed message keep the pointer. -
#4245
8af26ebThanks @DylanPiercey! - An invalid parameter in an attribute method (<a onClick(1){}>) is now reported as a compile error with a code frame at the parameter, instead of crashing with Babel'sTypeError: Property params[0] of FunctionExpression …. -
#4241
6485a1fThanks @DylanPiercey! -CompileResultnow follows the options passed tocompile*:astandmaparenullunlessast: true/sourceMapsare set, andcodeisnullwithcode: false. Code that readsastormapmay need a null check.TagDefinitionandAttributeDefinitionmark fields that real definitions can omit as optional, declaresetFlag, andparseTypeArgs/parseTypeParamsare now declared. -
#4253
0bde97cThanks @DylanPiercey! - Ship a README and point the package homepage at the Compiler API reference on markojs.com. -
#4268
413c8f3Thanks @DylanPiercey! - Keep themarko/translatorinterop translator when an app onmarko@5also depends on@marko/runtime-tags, instead of switching to the translator that rejects the Class API. When two Marko runtimes are depended on, the compile error now names both and points at thetranslatoroption. -
#4247
348266eThanks @DylanPiercey! - Keep the comments inside an open tag in source output, which were deleted before. Each is printed before the attribute after it, or after the last one, and a comma follows a value that a comment comes after, so the comment is not read as part of it. -
#4238
1c73664Thanks @DylanPiercey! - Keep TypeScript on attribute methods and tag params inoutput: "source"and"migrate": a shorthand method keeps its type parameters and parameter types (onClick<T>(event: T) {}), a function value with a return type is no longer rewritten as a shorthand that drops it, and tag params keep their types (|x: T|). -
#4255
0848d17Thanks @DylanPiercey! - End a compiled template's source mapsourceRootwith a path separator, so Node's--enable-source-mapsand URL-based consumers such as browser devtools resolve the original.markofile instead of a path with the directory and file name run together. -
#4238
1c73664Thanks @DylanPiercey! - Escape text content inoutput: "source"and"migrate"with htmljs-parser'sescapeText, so a literal\${text}no longer comes back as a live placeholder, and stop inserting a space between adjacent text nodes, which rendered as an extra space. -
#4242
4c04d1dThanks @DylanPiercey! - Accept a tag var that ends in a line comment (<div/el // the box\n class="box"/>), which htmljs-parser folds into the var, and keep the comment from swallowing the rest of the tag in source output. -
#4244
710a6f2Thanks @DylanPiercey! - Template text now collapses only HTML's ASCII whitespace (space, tab, newline, carriage return, form feed). A non-breaking space, U+2028, U+2029 or U+FEFF typed in text is kept instead of becoming a plain space, matching attribute values.