Embedded JS template engine for Node, Deno, and the browser. Lighweight, fast, and pluggable. Written in TypeScript
MIT License
Bot releases are hidden (Show)
stc
(#282) 7f51eadPublished by nebrelbug 7 months ago
Published by nebrelbug 7 months ago
Published by nebrelbug 11 months ago
Published by nebrelbug about 1 year ago
Published by nebrelbug about 1 year ago
Published by nebrelbug over 1 year ago
Published by nebrelbug over 1 year ago
This release mainly includes changes in Eta's CI process, but also fixes the build on deno.land/x/eta (which was broken in 3.0.0 and 3.0.1).
Published by nebrelbug over 1 year ago
eta.module.mjs
contained the 2.0.0 code 🤦Published by nebrelbug over 1 year ago
After months of work, I'm super excited to release Eta version 3! 🎉 🎉
The philosophy and end goal of Eta remain the same: to be a lightweight, developer-friendly, and very fast template engine. The syntax also remains almost exactly the same. Eta's API, however, has changed in some important ways. Head over to https://eta.js.org/ to learn more about the changes and begin migrating your code!
Published by nebrelbug over 1 year ago
Published by nebrelbug over 1 year ago
Published by nebrelbug over 1 year ago
config.parse
, prompted by #135Published by nebrelbug over 1 year ago
Published by nebrelbug over 1 year ago
.gitignore
Published by nebrelbug over 1 year ago
This commit includes fixes for several security vulnerabilities. Specifically, in version 1, Eta merged the data
parameter of renderFile()
into config
-- meaning that malicious untrusted user data, passed through in a very specific way, could potentially modify the values of varName
, include
, includeFile
, and useWith
, and thus insert arbitrary code into user template functions.
With this release, such behavior is removed. Configuration cannot be passed through the data
parameter to eta.renderFile()
.
Most users will be able to update from version 1 to version 2 without changing any code. All users are encouraged to update as soon as possible.
renderFile
explicitly, rather than merged with the data
parameterapp.set()
to modify views
and view cache
will no longer change Eta's configuration of views
and cache
.
views
and view cache
options under the hood, users should configure both Eta and Express with desired values (example below)settings["view options"]
propertyExample Code Changes
// Change THIS:
renderFile(filePath, { cache: true }) // This worked in v1 but does not work in v2
// To THIS:
renderFile(filePath, {}, { cache: true }) // This works in v1 and v2
// Change THIS:
var eta = require("eta")
app.set("view engine", "eta")
app.set("views", "./views")
app.set("view cache", true)
// To THIS:
var eta = require("eta")
app.engine("eta", eta.renderFile)
eta.configure({ views: "./views", cache: true }) // configure eta
app.set("views", "./views") // configure Express
app.set("view cache", true) // configure Express
app.set("view engine", "eta")
Published by nebrelbug over 1 year ago
Published by nebrelbug over 1 year ago
exports
and type
fieldsPublished by nebrelbug over 1 year ago
Published by nebrelbug almost 2 years ago
render
, renderAsync
, renderFile
and renderFileAsync
(#199) 242e9fc