github marko-js/marko @marko/compiler@5.42.17

55 minutes ago

Patch Changes

  • #4614 4a5e758 Thanks @DylanPiercey! - t.markoPlaceholder(value) escapes its value again when no escape argument is passed, and the other Marko node builders set an omitted optional field to null, as Babel's builders do.

  • #4624 ff3cec9 Thanks @DylanPiercey! - Read the project's package.json through the fileSystem option when discovering taglibs, and read it again after taglib.clearCaches(), so a virtual or tracking file system sees it and a long-running dev process picks up new dependencies. Taglib JSON files are now read with a string encoding, like every other read, so a file system that only accepts a string encoding can load them.

  • #4637 fce28ac Thanks @DylanPiercey! - With errorRecovery, a template whose parse, migrate, transform or analyze recorded an error now compiles to an empty module with its diagnostics, as it would throw without recovery, instead of translating past the error into a crash, an endless loop, or code that does not parse.

  • #4621 f52e0bd Thanks @DylanPiercey! - Fix a //# sourceMappingURL= comment in a template's code (after an import, in a <script>, in an event handler) being taken as the template's input source map: the compiled source map was rewritten through the map that comment named, so it no longer pointed at the template; a named .map file was read from disk past the fileSystem option; and source and migrate output dropped the comment.

  • #4620 23aed68 Thanks @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 unrelated await.

  • #4611 81b2751 Thanks @DylanPiercey! - Crawl a template's scope after the migrate stage, so transform sees bindings that migrators added or removed.

  • #4622 eab0534 Thanks @DylanPiercey! - Show the error text when a compile fails with several errors, or a marko.json option is invalid, in JavaScript engines whose error stack leaves out the message. In Node, the combined message no longer includes the compiler's own stack frames for an error without a location, and a marko.json option error no longer embeds its cause's stack trace.

Don't miss a new marko release

NewReleases is sending notifications on new releases.