Repository navigation
Shaven is now written in TypeScript and ships type declarations.
Breaking changes
- The package entry points moved to
build/(build/server.js,build/browser.js).
The newexportsfield only exposesshaven,shaven/server, andshaven/browser,
so deep imports likeshaven/source/library/server.jsno longer work. - The standalone browser bundle moved to
build/shaven.js
and exposesshavendirectly as a global function (wasshaven.default). - Callback functions are no longer called for elements which are not rendered
(e.g.['p', callback, null]). Previously they receivedfalse. toString()returns an empty string if the root element is not rendered
(wasfalseon the server andundefinedin the browser).
Fixes
- References are checked for uniqueness against other references instead of ids.
An id and a reference with the same name no longer throw on the server
or trigger an assertion in the browser,
and the error message names the duplicate reference.
Other changes
- Type declarations for all public APIs (
ShavenArray,ShavenObject,Config, …) build/browser.jsis now a proper ES module for bundlers