Skip to content

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 04 Oct 11:12
· 28 commits to main since this release
abd1ebe

A patch release with no API change. index.d.ts is identical to 0.4.0's.

Fixed

  • A panic inside usvg or resvg no longer kills the Node process. Parsing, rendering and renderNodePng now turn it into a JS error, in both the sync methods and their async variants. Until now the unwind reached napi's extern "C" frame and aborted the process. (#91)
  • node.renderPng() / renderPngAsync() report to their document. Their messages now show up in doc.takeLogs() and no longer only in the global buffer. Nodes reached through a definition (pattern, mask…) have no document and still log globally. (#91)

Faster

  • The async variants share the document's image map instead of copying it on every call. With 500 embedded images, the cost per call drops from about 75 µs to about 30 µs. (#90)

Internal

  • as casts are replaced by From/TryFrom. The only casts left are the two float narrowings Rust has no other way to write. Rendering is unchanged: all 1715 conformance references still match. (#92)
  • clippy -D warnings now also covers the generated bindings. (#93)
  • First release published through npm trusted publishing (OIDC).

What's Changed

  • perf: async twins share the image map instead of copying it by @p8nut in #90
  • fix: contain usvg/resvg panics, route node renders to the document log by @p8nut in #91
  • refactor: replace as casts with From/TryFrom by @p8nut in #92
  • refactor: lint the generated bindings with clippy by @p8nut in #93
  • chore(release): 0.4.1 by @p8nut in #94

Full Changelog: v0.4.0...v0.4.1