Skip to content

v3.0.0

Latest

Choose a tag to compare

@ad-si ad-si released this 03 Nov 12:48
0e00736

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 new exports field only exposes shaven, shaven/server, and shaven/browser,
    so deep imports like shaven/source/library/server.js no longer work.
  • The standalone browser bundle moved to build/shaven.js
    and exposes shaven directly as a global function (was shaven.default).
  • Callback functions are no longer called for elements which are not rendered
    (e.g. ['p', callback, null]). Previously they received false.
  • toString() returns an empty string if the root element is not rendered
    (was false on the server and undefined in 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.js is now a proper ES module for bundlers