Releases: kitajs/html
Releases · kitajs/html
v2.0.1
Breaking Changes
html.compile
now only accepts functions, which is not backwards compatible withv1.x
, read mode.- Migrated namespace from
html
toHtml
(capital H), which reduces on naming collisions ashtml
is a pretty common variable name. - Added
@kitajs/html/register
to avoid the need of importingHtml
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
Breaking Changes
html.compile
now only accepts functions, which is not backwards compatible withv1.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
Important Changes
- Fixed declaration errors (#17)
- Added support for unknown attributes.
Full Changelog: v1.4.6...v1.4.7
v1.4.6
Important Changes
- Added
hgroup
. Thanks @florentulve. (#16)
New Contributors
- @florentulve made their first contribution in #16
Full Changelog: v1.4.5...v1.4.6
v1.4.5
- Fixed tests
- Removed unused key attribute
Full Changelog: v1.4.4...v1.4.5
v1.4.4
- Fixed CSSProperties type
Full Changelog: v1.4.3...v1.4.4
v1.4.3
- 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
- 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
- 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
- Improved performance up to 200%.
- Added native
escapeInnerHtml
attribute to help avoid XSS injections