Skip to content

Releases: un-es/canvas-npmmirror

v3.0.0

06 Dec 13:57
8970e6b
Compare
Choose a tag to compare

This release notably changes to using N-API. 🎉

Breaking

  • Dropped support for Node.js 16.x and below.

Changed

  • Migrated to N-API (by way of node-addon-api) and removed libuv and v8 dependencies
  • Defer the initialization of the op variable to the default switch case to avoid a compiler warning. (Automattic#2229)
  • Use a default switch case with a null statement if some enum values aren't suppsed to be handled, this avoids a compiler warning. (Automattic#2229)
  • Migrate from librsvg's deprecated rsvg_handle_get_dimensions() and rsvg_handle_render_cairo() functions to the new rsvg_handle_get_intrinsic_size_in_pixels() and rsvg_handle_render_document() respectively. (Automattic#2229)
  • Avoid calling virtual methods in constructors/destructors to avoid bypassing virtual dispatch. (Automattic#2229)
  • Remove unused private field backend in the Backend class. (Automattic#2229)
  • Add Node.js v20 to CI. (Automattic#2237)
  • Replaced dtslint with tsd (Automattic#2313)

Added

  • Added string tags to support class detection

Fixed

v2.11.2

10 Jul 08:02
fff6585
Compare
Choose a tag to compare

Fixed

  • Building on Windows in CI (and maybe other Windows configurations?) (Automattic#2216)

v2.11.0

10 Mar 08:19
Compare
Choose a tag to compare

Fixed

  • Replace triple-slash directive in types with own types to avoid polluting TS modules with globals (#1656)

v2.10.2

31 Oct 01:58
Compare
Choose a tag to compare

Fixed

  • Fix Assertion failed: (object->InternalFieldCount() > 0), function Unwrap, file nan_object_wrap.h, line 32. (#2025)
  • textBaseline and textAlign were not saved/restored by save()/restore(). (#1936)
  • Update nan to v2.17.0 to ensure Node.js v18+ support.

Changed

  • Improve performance and memory usage of save()/restore().
  • save()/restore() no longer have a maximum depth (previously 64 states).

v2.10.1

11 Sep 12:17
151cfd2
Compare
Choose a tag to compare

Fixed

  • Fix actualBoundingBoxLeft and actualBoundingBoxRight when textAlign='center' or 'right' (#1909)
  • Fix rgba(r,g,b,0) with alpha to 0 should parse as transparent, not opaque. (#2110)

v2.10.0

05 Sep 12:03
Compare
Choose a tag to compare

Added

Fixed

  • rgba(r,g,b) with no alpha should parse as opaque, not transparent. (#2029)
  • Typo in PngConfig.filters types. (#2072)
  • createPattern() always used "repeat" mode; now supports "repeat-x" and "repeat-y". (#2066)
  • Crashes and hangs when using non-finite values in context.arc(). (#2055)
  • Incorrect context.arc() geometry logic for full ellipses. (#1808, (#1736))
  • Added missing deregisterAllFonts to the Typescript declaration file (#2096)
  • Add User-Agent header when requesting remote images (#2099)