Repository navigation
Breaking changes
renderFileoptions are now a separate argument:renderFile(filename, data, options?, callback?). Values in template data no longer configure the engine (includingautoEscape,cache,views,data.settings, anddata.options). This fixes a security issue where user-controlled render data could disable escaping; an advisory will follow.- Express:
app.engine('sqrl', Sqrl.renderFile)still works, but Express locals (cache,settings) no longer configure Squirrelly. Use a small wrapper to passcache/views. See the migration guide. - Callbacks:
renderandrenderFileshare the(data, options?, callback?)forms. Callbacks work with sync templates and are called exactly once. - Types:
TemplateFunctionreturnsstring | Promise<string>.
Fixes
- Linear-time parsing of long literal text (#271, thanks @VadimToptunov)
- ESM bundle no longer requires
requireat import time, fixing Vite/browser imports (#272, thanks @draarivpatel-ui) useWith: trueno longer breaks when data has acbfield
Maintenance
- CI moved to GitHub Actions; Travis and Coveralls removed
Thanks to Vishal Suwalka for responsibly reporting the security issue.