v5.4.0
Minor Changes
-
712a39d: Error logging improvements (thanks @tmcw for the help on this!)
Re-implements Vento's
stringifyErrorfunction tailored specifically for Eleventy in order to show errors in a nice format that Eleventy expectsNotably, the one case where this doesn't work is if Vento cannot capture a position from the source code due to limitations in Node/Bun. In this case, we'll log a warning to the console...
[warning] A `SyntaxError` was thrown, but the exact position within the source code cannot be obtained [warning] Use DEBUG="Eleventy:Vento*" to view raw `ErrorContext` information...and log the entire context object to the
DEBUGnamespaceEleventy:Vento:Error:Eleventy:Vento:Error ErrorContext (via Vento) { Eleventy:Vento:Error type: 'SyntaxError', Eleventy:Vento:Error message: "Unexpected token '{'", Eleventy:Vento:Error source: '<div class="image-grid">\n' + Eleventy:Vento:Error ' {{ for image of collections.{{gallery}} }}\n' + Eleventy:Vento:Error ' <img src="{{ image }} ">\n' + Eleventy:Vento:Error ' {{ /for }}\n' + Eleventy:Vento:Error '</div>\n', Eleventy:Vento:Error code: '\n' + Eleventy:Vento:Error ' var {image,collections,gallery} = it;\n' + Eleventy:Vento:Error ' {\n' + Eleventy:Vento:Error '__exports.content += "<div class=\\"image-grid\\">\\n ";\n' + Eleventy:Vento:Error '__pos=27;\n' + Eleventy:Vento:Error 'for (let image of __env.utils.toIterator(collections.{{gallery}})) {\n' + Eleventy:Vento:Error '__exports.content += "\\n <img src=\\"";\n' + Eleventy:Vento:Error '__pos=84;\n' + Eleventy:Vento:Error '__exports.content += (image) ?? "";\n' + Eleventy:Vento:Error '__exports.content += " \\">\\n ";\n' + Eleventy:Vento:Error '}\n' + Eleventy:Vento:Error '__exports.content += "\\n</div>\\n";\n' + Eleventy:Vento:Error '}\n' + Eleventy:Vento:Error ' ', Eleventy:Vento:Error file: '_includes/partials/imageGrid.vto' Eleventy:Vento:Error } +0ms
Patch Changes
- 9f8c8ae: Update ventojs to v2.3.1