Skip to content

Releases: kitajs/html

v2.0.1

11 Sep 05:43
Compare
Choose a tag to compare

Breaking Changes

  • html.compile now only accepts functions, which is not backwards compatible with v1.x, read mode.
  • Migrated namespace from html to Html (capital H), which reduces on naming collisions as html is a pretty common variable name.
  • Added @kitajs/html/register to avoid the need of importing Html on each and every file.
  • Other things remained unchanged

Important Changes

  • Improved performance and benchmarks.

Benchmark

  • 2023-09-11T00:53:49.607Z
  • Node: v18.16.0
  • V8: 10.2.154.26-node.26
  • OS: darwin
  • Arch: arm64

Hello World

Runs @kitajs/html typed-html + .compile() + / @kitajs/html + / typed-html
10 0.0063ms 0.0107ms 1.68x 0.0013ms 5.07x 8.53x
10000 1.632ms 4.848ms 2.97x 0.9131ms 1.79x 5.31x
100000 9.4629ms 19.367ms 2.05x 2.3115ms 4.09x 8.38x

Many Props

Runs @kitajs/html typed-html + .compile() + / @kitajs/html + / typed-html
10 0.4629ms 1.3898ms 3x 0.0025ms 182.19x 547.04x
10000 372.5842ms 840.7459ms 2.26x 0.6308ms 590.66x 1332.84x
100000 3438.7935ms 7706.0509ms 2.24x 3.7163ms 925.32x 2073.56x

Big Component

Runs @kitajs/html typed-html + .compile() + / @kitajs/html + / typed-html
10 0.3075ms 0.8844ms 2.88x 0.0037ms 81.99x 235.85x
10000 222.5096ms 521.0473ms 2.34x 0.7118ms 312.61x 732.02x
100000 2211.6316ms 5229.3416ms 2.36x 4.1123ms 537.82x 1271.65x

Full Changelog: v2.0.0...v2.0.1

v2.0.0

11 Sep 01:09
Compare
Choose a tag to compare
v2.0.0 Pre-release
Pre-release

Breaking Changes

  • html.compile now only accepts functions, which is not backwards compatible with v1.x.
  • Other things remained unchanged.

Important Changes

  • html.compile improved into a more suitable version, read mode.
  • Improved performance and benchmarks.

Benchmark

  • 2023-09-11T00:53:49.607Z
  • Node: v18.16.0
  • V8: 10.2.154.26-node.26
  • OS: darwin
  • Arch: arm64

Hello World

Runs @kitajs/html typed-html + .compile() + / @kitajs/html + / typed-html
10 0.0063ms 0.0107ms 1.68x 0.0013ms 5.07x 8.53x
10000 1.632ms 4.848ms 2.97x 0.9131ms 1.79x 5.31x
100000 9.4629ms 19.367ms 2.05x 2.3115ms 4.09x 8.38x

Many Props

Runs @kitajs/html typed-html + .compile() + / @kitajs/html + / typed-html
10 0.4629ms 1.3898ms 3x 0.0025ms 182.19x 547.04x
10000 372.5842ms 840.7459ms 2.26x 0.6308ms 590.66x 1332.84x
100000 3438.7935ms 7706.0509ms 2.24x 3.7163ms 925.32x 2073.56x

Big Component

Runs @kitajs/html typed-html + .compile() + / @kitajs/html + / typed-html
10 0.3075ms 0.8844ms 2.88x 0.0037ms 81.99x 235.85x
10000 222.5096ms 521.0473ms 2.34x 0.7118ms 312.61x 732.02x
100000 2211.6316ms 5229.3416ms 2.36x 4.1123ms 537.82x 1271.65x

Full Changelog: v1.4.7...v2.0.0

v1.4.7

10 Sep 00:32
Compare
Choose a tag to compare

Important Changes

  • Fixed declaration errors (#17)
  • Added support for unknown attributes.

Full Changelog: v1.4.6...v1.4.7

v1.4.6

08 Sep 06:03
Compare
Choose a tag to compare

Important Changes

New Contributors

Full Changelog: v1.4.5...v1.4.6

v1.4.5

23 Aug 00:37
Compare
Choose a tag to compare
  • Fixed tests
  • Removed unused key attribute

Full Changelog: v1.4.4...v1.4.5

v1.4.4

23 Aug 00:27
Compare
Choose a tag to compare
  • Fixed CSSProperties type

Full Changelog: v1.4.3...v1.4.4

v1.4.3

23 Aug 00:13
c7acefd
Compare
Choose a tag to compare
  • Added CSSProperties type to ease type usage.
  • Updated tsconfig.json usage/examples.
  • Automatic dependabot updates
  • Updated dependencies

Full Changelog: v1.4.2...v1.4.3

v1.4.2

14 Aug 21:02
Compare
Choose a tag to compare
  • Added (deprecated) support for className attributes
  • Improved performance
  • camel case attributes are not transformed to kebab automatically, please use <tag of="">.

Full Changelog: v1.4.1...v1.4.2

v1.4.1

08 Aug 16:08
Compare
Choose a tag to compare
  • Better escapeHtml
  • Fixed css properties not being escaped
  • Moved from escapeInnerHtml to safe attribute

Full Changelog: https://github.com/kitajs/html/compare/v1.4.0...v1.4.1###

v1.4.0

05 Aug 20:44
Compare
Choose a tag to compare
  • Improved performance up to 200%.
  • Added native escapeInnerHtml attribute to help avoid XSS injections