Skip to content

Releases: lukeed/tempura

v0.4.0

26 Oct 15:21
Compare
Choose a tag to compare

Breaking

  • Security Fix: Ensure esc always returns a string: 58a5c36
    NOTE: This should only be a breaking change if you used esc directly.
    Previously, any non-string input was returned as is. Now, everything is returned as a string.
    This change prevents XSS attacks within Array values:

    let html = '<div>' + tempura.esc(['<img src=x onerror="alert(1)" />']) + '<div>';
    // before: '<div><img src=x onerror="alert(1)" /></div>'
    // after: '<div>&ltimg src=x onerror=&quot;alert(1)&quot; /></div>'

Full Changelog: v0.3.2...v0.4.0

v0.3.2

04 Aug 01:30
Compare
Choose a tag to compare

Patches

  • (types) Allow loose Blocks type argument: dbd1fd1

Chores

v0.3.1

04 Aug 00:35
Compare
Choose a tag to compare

Patches

  • Correct TypeScript definitions: 87de678

Chores

v0.3.0

24 Jul 05:06
Compare
Choose a tag to compare

Features

  • Add new loose option to relax the #expect requirement: 72bcb52, e8f8df8

    By default, any template variables must be known ahead of time – either through options.props or through #expect declarations. However, when enabled, options.loose relaxes this constraint.

Chores

v0.2.0

15 Jul 04:36
Compare
Choose a tag to compare

Features

  • Add tempura/rollup plugin: 764f8fc
    Tempura now ships with its own Rollup plugin!

  • Add tempura/esbuild plugin: 9a3df0d
    Tempura also ships with its own esbuild plugin, too!

Patches

  • Use in operator for custom block existence check: 61b6de0
    Allows for options.blocks.foo = null-style placeholders.

Examples

  • Add worker example directory: 7396509, 175a112
    Illustrates how to use the new tempura/rollup and/or tempura/esbuild plugins.
    This builds an example Cloudflare Worker, but is applicable to any built/bundle application.

Chores