@napi-rs/canvas 0.1.76 → 0.1.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +9 -4
  3. package/package.json +16 -16
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # `skr canvas`
2
2
 
3
3
  [![CI](https://github.com/Brooooooklyn/canvas/actions/workflows/CI.yaml/badge.svg)](https://github.com/Brooooooklyn/canvas/actions/workflows/CI.yaml)
4
- ![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm138-hotpink)
4
+ ![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm140-hotpink)
5
5
  [![install size](https://packagephobia.com/badge?p=@napi-rs/canvas)](https://packagephobia.com/result?p=@napi-rs/canvas)
6
6
  [![Downloads](https://img.shields.io/npm/dm/@napi-rs/canvas.svg?sanitize=true)](https://npmcharts.com/compare/@napi-rs/canvas?minimal=true)
7
7
 
package/index.js CHANGED
@@ -51,10 +51,15 @@ const _toBlob = CanvasElement.prototype.toBlob
51
51
  const _convertToBlob = CanvasElement.prototype.convertToBlob
52
52
  if ('Blob' in globalThis) {
53
53
  CanvasElement.prototype.toBlob = function toBlob(callback, mimeType, quality) {
54
- _toBlob.call(this, function(/** @type {Uint8Array} */ imageBuffer) {
55
- const blob = new Blob([imageBuffer.buffer], { type: mimeType })
56
- callback(blob)
57
- }, mimeType, quality)
54
+ _toBlob.call(
55
+ this,
56
+ function (/** @type {Uint8Array} */ imageBuffer) {
57
+ const blob = new Blob([imageBuffer.buffer], { type: mimeType })
58
+ callback(blob)
59
+ },
60
+ mimeType,
61
+ quality,
62
+ )
58
63
  }
59
64
  CanvasElement.prototype.convertToBlob = function convertToBlob(options) {
60
65
  return _convertToBlob.call(this, options).then((/** @type {Uint8Array} */ imageBuffer) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napi-rs/canvas",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
4
4
  "description": "Canvas for Node.js with skia backend",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -75,7 +75,7 @@
75
75
  "@jimp/custom": "^0.22.12",
76
76
  "@jimp/jpeg": "^0.22.12",
77
77
  "@jimp/png": "^0.22.12",
78
- "@napi-rs/cli": "^3.0.0",
78
+ "@napi-rs/cli": "^3.1.1",
79
79
  "@octokit/rest": "^22.0.0",
80
80
  "@swc-node/register": "^1.10.10",
81
81
  "@swc/core": "^1.11.31",
@@ -89,7 +89,7 @@
89
89
  "colorette": "^2.0.20",
90
90
  "conventional-changelog-cli": "^5.0.0",
91
91
  "core-js": "^3.42.0",
92
- "echarts": "^5.6.0",
92
+ "echarts": "^6.0.0",
93
93
  "electron": "^37.1.0",
94
94
  "husky": "^9.1.7",
95
95
  "lint-staged": "^16.1.0",
@@ -101,9 +101,9 @@
101
101
  "prettier": "^3.5.3",
102
102
  "pretty-bytes": "^7.0.0",
103
103
  "semver": "^7.7.2",
104
- "skia-canvas": "^2.0.2",
104
+ "skia-canvas": "^3.0.0",
105
105
  "table": "^6.9.0",
106
- "tinybench": "^4.0.1",
106
+ "tinybench": "^5.0.0",
107
107
  "typescript": "^5.8.3"
108
108
  },
109
109
  "lint-staged": {
@@ -141,17 +141,17 @@
141
141
  "singleQuote": true,
142
142
  "arrowParens": "always"
143
143
  },
144
- "packageManager": "yarn@4.9.2",
144
+ "packageManager": "yarn@4.9.4",
145
145
  "optionalDependencies": {
146
- "@napi-rs/canvas-linux-x64-gnu": "0.1.76",
147
- "@napi-rs/canvas-darwin-x64": "0.1.76",
148
- "@napi-rs/canvas-win32-x64-msvc": "0.1.76",
149
- "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.76",
150
- "@napi-rs/canvas-linux-x64-musl": "0.1.76",
151
- "@napi-rs/canvas-linux-arm64-gnu": "0.1.76",
152
- "@napi-rs/canvas-linux-arm64-musl": "0.1.76",
153
- "@napi-rs/canvas-darwin-arm64": "0.1.76",
154
- "@napi-rs/canvas-android-arm64": "0.1.76",
155
- "@napi-rs/canvas-linux-riscv64-gnu": "0.1.76"
146
+ "@napi-rs/canvas-linux-x64-gnu": "0.1.78",
147
+ "@napi-rs/canvas-darwin-x64": "0.1.78",
148
+ "@napi-rs/canvas-win32-x64-msvc": "0.1.78",
149
+ "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.78",
150
+ "@napi-rs/canvas-linux-x64-musl": "0.1.78",
151
+ "@napi-rs/canvas-linux-arm64-gnu": "0.1.78",
152
+ "@napi-rs/canvas-linux-arm64-musl": "0.1.78",
153
+ "@napi-rs/canvas-darwin-arm64": "0.1.78",
154
+ "@napi-rs/canvas-android-arm64": "0.1.78",
155
+ "@napi-rs/canvas-linux-riscv64-gnu": "0.1.78"
156
156
  }
157
157
  }