Releases: Automattic/node-canvas
Releases · Automattic/node-canvas
v3.0.0-rc3
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
- Change from node-pre-gyp to prebuild-install
- Defer the initialization of the
op
variable to thedefault
switch case to avoid a compiler warning. (#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. (#2229) - Migrate from librsvg's deprecated
rsvg_handle_get_dimensions()
andrsvg_handle_render_cairo()
functions to the newrsvg_handle_get_intrinsic_size_in_pixels()
andrsvg_handle_render_document()
respectively. (#2229) - Avoid calling virtual methods in constructors/destructors to avoid bypassing virtual dispatch. (#2229)
- Remove unused private field
backend
in theBackend
class. (#2229) - Add Node.js v20 to CI. (#2237)
- Replaced
dtslint
withtsd
(#2313) - Changed PNG consts to static properties of Canvas class
Added
- Added string tags to support class detection
- Throw Cairo errors in canvas.toBuffer()
Fixed
- Fix a case of use-after-free. (#2229)
- Fix usage of garbage value by filling the allocated memory entirely with zeros if it's not modified. (#2229)
- Fix a potential memory leak. (#2229)
- Fix the wrong type of setTransform
- Fix the improper parsing of rgb functions issue. (#2300)
- Fix issue related to improper parsing of leading and trailing whitespaces in CSS color. (#2301)
- RGB functions should support real numbers now instead of just integers. (#2339)
- Allow alternate or properly escaped quotes within font-family names
- Fix TextMetrics type to include alphabeticBaseline, emHeightAscent, and emHeightDescent properties
- Fix class properties should have defaults as standard js classes (#2390)
- Fixed Exif orientation in JPEG files being ignored (#1670)
v3.0.0-rc2
Note
Prebuilds are currently only available for Linux (x64, glibc), macOS (x64) and Windows (x64). Please give this version a try and let us know if you run into issues!
npm install canvas@next
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
- Change from node-pre-gyp to prebuild-install
- Defer the initialization of the
op
variable to thedefault
switch case to avoid a compiler warning. (#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. (#2229) - Migrate from librsvg's deprecated
rsvg_handle_get_dimensions()
andrsvg_handle_render_cairo()
functions to the newrsvg_handle_get_intrinsic_size_in_pixels()
andrsvg_handle_render_document()
respectively. (#2229) - Avoid calling virtual methods in constructors/destructors to avoid bypassing virtual dispatch. (#2229)
- Remove unused private field
backend
in theBackend
class. (#2229) - Add Node.js v20 to CI. (#2237)
- Replaced
dtslint
withtsd
(#2313)
Added
- Added string tags to support class detection
Fixed
v2.11.2
v2.11.1
v2.11.0
v2.10.2
Fixed
- Fix
Assertion failed: (object->InternalFieldCount() > 0), function Unwrap, file nan_object_wrap.h, line 32.
(#2025) textBaseline
andtextAlign
were not saved/restored bysave()
/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
v2.10.0
Added
- Export
pangoVersion
ctx.roundRect()
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)