Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency canvas to v3 #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Dec 23, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
canvas ^1.4.0 -> ^3.0.0 age adoption passing confidence

Release Notes

Automattic/node-canvas (canvas)

v3.0.0

Compare Source

==================

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 the default 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() and rsvg_handle_render_cairo() functions to the new rsvg_handle_get_intrinsic_size_in_pixels() and rsvg_handle_render_document() respectively. (#​2229)
  • Avoid calling virtual methods in constructors/destructors to avoid bypassing virtual dispatch. (#​2229)
  • Remove unused private field backend in the Backend class. (#​2229)
  • Add Node.js v20 to CI. (#​2237)
  • Replaced dtslint with tsd (#​2313)
  • Changed PNG consts to static properties of Canvas class
  • Reverted improved font matching on Linux (#​1572) because it doesn't work if fonts are installed. If you experience degraded font selection, please file an issue and use v3.0.0-rc3 in the meantime.
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)
  • Align DOMMatrix/DOMPoint to spec by adding missing methods

v2.11.2

Compare Source

==================

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

v2.11.1

Compare Source

==================

Fixed
  • Add missing property canvas to the CanvasRenderingContext2D type
  • Fixed glyph positions getting rounded, resulting text having a slight letter-spacing effect
  • Fixed ctx.font not being restored correctly after ctx.restore() (#​1946)

v2.11.0

Compare Source

==================

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

v2.10.2

Compare Source

==================

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

Compare Source

==================

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

Compare Source

==================

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)

v2.9.3

Compare Source

==================

Fixed
  • Wrong fonts used when calling registerFont multiple times with the same family name (#​2041)

v2.9.2

Compare Source

==================

Fixed
  • All exports now work when Canvas is used in ES Modules (ESM). (#​2047)
  • npm rebuild will now re-fetch prebuilt binaries to avoid NODE_MODULE_VERSION mismatch errors. (#​1982)

v2.9.1

Compare Source

==================

Fixed
  • Stringify CanvasGradient, CanvasPattern and ImageData like browsers do. (#​1639, #​1646)
  • Add missing include for toupper.
  • Throw an error instead of crashing the process if getImageData or putImageData is called on a PDF or SVG canvas (#​1853)
  • Compatibility with Typescript 4.6
  • Near-perfect font matching on Linux (#​1572)
  • Fix multi-byte font path support on Windows.
  • Allow rebuild of this library

v2.9.0

Compare Source

==================

Changed
  • Refactor functions to classes.
  • Changed DOMPoint() constructor to check for parameter nullability.
  • Changed DOMMatrix.js to use string literals for non-special cases.
  • Remove semicolons from Dommatrix.js.
  • Update nan to v2.15.0 to ensure Node.js v14+ support.
  • Clean up inf/nan macros and slightly speed up argument checking.
Added
  • Added deregisterAllFonts method to free up memory and reduce font conflicts.
Fixed
  • Support Apple M1 Homebrew install that puts canvas install library files in /opt/homebrew/lib

v2.8.0

Compare Source

==================

Changed
  • Upgrade dtslint
  • Upgrade node-pre-gyp to 1.0.0. Note that if you are using special node-pre-gyp
    features like node_pre_gyp_accessKeyId, you may need to make changes to your
    installation procedure. See https://github.com/mapbox/node-pre-gyp/blob/master/CHANGELOG.md#100.
  • Add Node.js v16 to CI.
  • The C++ class method nBytes() now returns a size_t. (Because this is a C++
    method only, this is not considered a breaking change.)
Added
  • Add support for inverse() and invertSelf() to DOMMatrix (#​1648)
  • Add support for context.getTransform() (#​1769)
  • Add support for context.setTransform(dommatrix) (#​1769)
Fixed
  • Fix actualBoundingBoxLeft and actualBoundingBoxRight returned by measureText to be the ink rect (#​1776, fixes #​1703).
  • Fix Pango logging "expect ugly output" on Windows (#​1643)
  • Fix benchmark for createPNGStream (#​1672)
  • Fix dangling reference in BackendOperationNotAvailable exception (#​1740)
  • Fix always-false comparison warning in Canvas.cc.
  • Fix Node.js crash when throwing from an onload or onerror handler.

v2.7.0

Compare Source

==================

Changed
  • Switch CI to Github Actions. (Adds Windows and macOS builds.)
  • Switch prebuilds to GitHub actions in the Automattic/node-canvas repository.
    Previously these were in the node-gfx/node-canvas-prebuilt
    and triggered manually.
  • Speed up fillStyle= and strokeStyle=
Added
  • Export rsvgVersion.
  • CanvasPattern’s setTransform method is no longer missing
Fixed
  • Fix BMP issues. (#​1497)
  • Update typings to support jpg and addPage on NodeCanvasRenderingContext2D (#​1509)
  • Fix assertion failure when using Visual Studio Code debugger to inspect Image prototype (#​1534)
  • Fix signed/unsigned comparison warning introduced in 2.6.0, and function cast warnings with GCC8+
  • Fix to compile without JPEG support (#​1593).
  • Fix compile errors with cairo
  • Fix Image#complete if the image failed to load.
  • Upgrade node-pre-gyp to v0.15.0 to use latest version of needle to fix error when downloading prebuilds.
  • Don't throw if fillStyle or strokeStyle is set to an object, but that object is not a Gradient or Pattern. (This behavior was non-standard: invalid inputs are supposed to be ignored.)

v2.6.1

Compare Source

==================

Fixed
  • Ignore maxWidth in fillText and strokeText if it is undefined
  • Fix crash (assertion failure) in Node.js 12.x when patterns or gradients are used
  • Fix crash (check failure) in Node.js 12.x when using RGB16_565 format. (The
    underlying arraybuffer was incorrectly sized.)
  • Fix rendering error when applying shadow width line style (lineCap lineJoin lineDash)

v2.6.0

Compare Source

==================

Changed
  • Allow larger buffers to be returned from toBuffer('raw').
Added
  • Support for various BMP headers and color depths (#​1435)
Fixed
  • Fix crash when changing canvas width/height while fillStyle or strokeStyle
    was set to a CanvasPattern or CanvasGradient (#​1357).
  • Fix crash when changing width/height of SVG canvases (#​1380).
  • Fix crash when using toBuffer('raw') with large canvases (#​1158).
  • Clarified meaning of byte ordering for toBuffer('raw') in readme. (#​1416)
  • Fix package.json Typings field to point to Declaration file (#​1432)
  • Properly check return value from Set and Call. (#​1415)
  • Use Get version from Nan instead of v8. (#​1415)

v2.5.0

Compare Source

==================

Added
  • Support redirects when fetching images (using simple-get) (#​1398)
  • Support Node.js v12
Fixed
  • Fix object literal & arrow function syntax usage for IE.

v2.4.1

Compare Source

==================

Fixed
  • Guard JPEG width/height against maximum supported (#​1385)
  • Fix electron 5 and node 12 compatibility
  • Fix encoding options (quality) parameter in canvas.toDataURL()

v2.4.0

Compare Source

==================

Added
  • (Actually) added resolution option for canvas.toBuffer("image/png") and
    canvas.createPNGStream(). This was documented since 2.0.0 but not working.
  • Add typescript definitions.
Fixed
  • PDF metadata (added in 2.3.0) wasn't being set with canvas.createPDFStream()
  • Fix custom "inspect" function deprecation warnings (#​1326)

v2.3.1

Compare Source

==================

Fixed
  • Fix canvas.toBuffer() for JPEGs (#​1350)

v2.3.0

Compare Source

==================

Added
  • Add support for multiple PDF page sizes
  • Add support for embedding document metadata in PDFs
Fixed
  • Don't crash when font string is invalid (bug since 2.2.0) (#​1328)
  • Fix memory leak in canvas.toBuffer() (#​1202, #​1296)
  • Fix memory leak in ctx.font= (#​1202)

v2.2.0

Compare Source

==================

Added
  • BMP support
Fixed

v2.1.0

Compare Source

==================

Added
  • Warn when building with old, unsupported versions of cairo or libjpeg.

v2.0.1

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

netlify bot commented Dec 23, 2024

Deploy Preview for gestalten-in-code ready!

Name Link
🔨 Latest commit 7023f38
🔍 Latest deploy log https://app.netlify.com/sites/gestalten-in-code/deploys/6769c5206054400008d6bd84
😎 Deploy Preview https://deploy-preview-78--gestalten-in-code.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

Deploying gestalten-in-code with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7023f38
Status:🚫  Build failed.

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants