@napi-rs/canvas 0.1.18 → 0.1.21

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.
package/CHANGELOG.md CHANGED
@@ -1,16 +1,43 @@
1
- ## [0.1.18](https://github.com/Brooooooklyn/canvas/compare/v0.1.17...v0.1.18) (2021-12-30)
1
+ ## [0.1.21](https://github.com/Brooooooklyn/canvas/compare/v0.1.20...v0.1.21) (2022-03-10)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * reduce install size for linux glibc/musl ([8e6c7e8](https://github.com/Brooooooklyn/canvas/commit/8e6c7e8f2aeceb2598c24f8b37faa39a961739f9))
6
+ * BlendMode::Source should be copy instead of source ([a010fba](https://github.com/Brooooooklyn/canvas/commit/a010fba4c8e7ae3bed2e8119c6862c98e5a466b4))
7
+ * prevent segmentation fault if mesuring empty text ([2117ddb](https://github.com/Brooooooklyn/canvas/commit/2117ddbb413df47df8a716eb66e79eb552b2a986))
8
+ * should not throw if fill/stroke style is invalid ([0d12337](https://github.com/Brooooooklyn/canvas/commit/0d12337e8ed6590a4788fd7758e30a77db312577))
9
+ * stroke/fill text should treat \n as space ([4c9ac1e](https://github.com/Brooooooklyn/canvas/commit/4c9ac1e60b8a16b5209d83e115947cd7cbbf273e))
10
+
11
+
12
+
13
+ ## [0.1.20](https://github.com/Brooooooklyn/canvas/compare/v0.1.19...v0.1.20) (2022-02-15)
7
14
 
15
+ ### Bug Fixes
16
+
17
+ - Fix the issue of arc to + bezier to + quad to at empty path case ([33f8558](https://github.com/Brooooooklyn/canvas/commit/33f8558f447842521213f5c685a932ac1412a530))
18
+ - scoot method for path empty case ([a1eb529](https://github.com/Brooooooklyn/canvas/commit/a1eb5292c4d3a5d2a500cdaab3ff5f0dc410ddd9))
19
+ - the quality default value case of encode(type, quality) method ([#418](https://github.com/Brooooooklyn/canvas/issues/418)) ([c4950ea](https://github.com/Brooooooklyn/canvas/commit/c4950ea88d75a5437aa85a48b1f1ca087a9784f7))
8
20
 
9
21
  ### Features
10
22
 
11
- * upgrade skia to chrome/m98 ([99e3635](https://github.com/Brooooooklyn/canvas/commit/99e363540db1572a832d65e1593721ad3b051493))
23
+ - skia chrome/m99 ([c0687c5](https://github.com/Brooooooklyn/canvas/commit/c0687c58b45eafc657d19e9b6a3643fce7003bce))
24
+ - upgrade to napi2 ([#422](https://github.com/Brooooooklyn/canvas/issues/422)) ([4a553c7](https://github.com/Brooooooklyn/canvas/commit/4a553c711a2d2f2fd6d71a58404884bff4fe57ad))
25
+
26
+ ## [0.1.19](https://github.com/Brooooooklyn/canvas/compare/v0.1.18...v0.1.19) (2021-12-31)
27
+
28
+ ### Bug Fixes
29
+
30
+ - text align and font fallback ([d80ac6b](https://github.com/Brooooooklyn/canvas/commit/d80ac6befc8861ebebc5855c1a5714b7f55e1d55))
31
+
32
+ ## [0.1.18](https://github.com/Brooooooklyn/canvas/compare/v0.1.17...v0.1.18) (2021-12-30)
12
33
 
34
+ ### Bug Fixes
35
+
36
+ - reduce install size for linux glibc/musl ([8e6c7e8](https://github.com/Brooooooklyn/canvas/commit/8e6c7e8f2aeceb2598c24f8b37faa39a961739f9))
37
+
38
+ ### Features
13
39
 
40
+ - upgrade skia to chrome/m98 ([99e3635](https://github.com/Brooooooklyn/canvas/commit/99e363540db1572a832d65e1593721ad3b051493))
14
41
 
15
42
  ## [0.1.17](https://github.com/Brooooooklyn/canvas/compare/v0.1.16...v0.1.17) (2021-12-12)
16
43
 
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # `skr canvas`
2
2
 
3
3
  ![CI](https://github.com/Brooooooklyn/canvas/workflows/CI/badge.svg)
4
- ![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm98-hotpink)
4
+ ![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm99-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
@@ -237,7 +237,7 @@ function createCanvas(width, height, flag) {
237
237
  }),
238
238
  )
239
239
  }
240
- return canvasEncode.call(this, type, qualityOrConfig || 92)
240
+ return canvasEncode.call(this, type, qualityOrConfig)
241
241
  }
242
242
 
243
243
  canvasElement.encodeSync = function encodeSync(type, qualityOrConfig) {
@@ -251,7 +251,7 @@ function createCanvas(width, height, flag) {
251
251
  }),
252
252
  )
253
253
  }
254
- return canvasEncodeSync.call(this, type, qualityOrConfig || 92)
254
+ return canvasEncodeSync.call(this, type, qualityOrConfig)
255
255
  }
256
256
 
257
257
  canvasElement.toBuffer = function toBuffer(type = 'image/png', qualityOrConfig) {
@@ -265,7 +265,7 @@ function createCanvas(width, height, flag) {
265
265
  }),
266
266
  )
267
267
  }
268
- return canvasToBuffer.call(this, type, qualityOrConfig || 92)
268
+ return canvasToBuffer.call(this, type, qualityOrConfig)
269
269
  }
270
270
 
271
271
  canvasElement.toDataURL = function toDataURL(type = 'image/png', qualityOrConfig) {
@@ -279,7 +279,7 @@ function createCanvas(width, height, flag) {
279
279
  }),
280
280
  )
281
281
  }
282
- return canvasToDataURL.call(this, type, qualityOrConfig || 92)
282
+ return canvasToDataURL.call(this, type, qualityOrConfig)
283
283
  }
284
284
 
285
285
  canvasElement.toDataURLAsync = function toDataURLAsync(type = 'image/png', qualityOrConfig) {
@@ -293,7 +293,7 @@ function createCanvas(width, height, flag) {
293
293
  }),
294
294
  )
295
295
  }
296
- return canvasToDataURLAsync.call(this, type, qualityOrConfig || 92)
296
+ return canvasToDataURLAsync.call(this, type, qualityOrConfig)
297
297
  }
298
298
 
299
299
  return canvasElement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napi-rs/canvas",
3
- "version": "0.1.18",
3
+ "version": "0.1.21",
4
4
  "description": "Canvas for Node.js with skia backend",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/Brooooooklyn/canvas.git",
@@ -64,33 +64,34 @@
64
64
  "@jimp/custom": "^0.16.1",
65
65
  "@jimp/jpeg": "^0.16.1",
66
66
  "@jimp/png": "^0.16.1",
67
- "@napi-rs/cli": "^1.3.5",
67
+ "@napi-rs/cli": "^2.4.2",
68
68
  "@octokit/rest": "^18.12.0",
69
- "@swc-node/register": "^1.4.0",
69
+ "@swc-node/register": "^1.4.2",
70
70
  "@types/lodash": "^4.14.178",
71
- "@typescript-eslint/eslint-plugin": "^5.6.0",
72
- "@typescript-eslint/parser": "^5.6.0",
73
- "ava": "^3.15.0",
71
+ "@typescript-eslint/eslint-plugin": "^5.10.2",
72
+ "@typescript-eslint/parser": "^5.10.2",
73
+ "ava": "^4.0.1",
74
74
  "benny": "^3.7.1",
75
- "canvas": "^2.8.0",
76
- "canvaskit-wasm": "^0.32.0",
77
- "chalk": "4",
78
- "conventional-changelog-cli": "^2.1.1",
79
- "eslint": "^8.4.1",
75
+ "canvas": "^2.9.0",
76
+ "canvaskit-wasm": "^0.33.0",
77
+ "colorette": "^2.0.16",
78
+ "conventional-changelog-cli": "^2.2.2",
79
+ "echarts": "^5.3.0",
80
+ "eslint": "^8.8.0",
80
81
  "eslint-config-prettier": "^8.3.0",
81
- "eslint-plugin-import": "^2.25.3",
82
+ "eslint-plugin-import": "^2.25.4",
82
83
  "eslint-plugin-prettier": "^4.0.0",
83
- "eslint-plugin-sonarjs": "^0.11.0",
84
+ "eslint-plugin-sonarjs": "^0.12.0",
84
85
  "husky": "^7.0.4",
85
- "lint-staged": "^12.1.2",
86
+ "lint-staged": "^12.3.3",
86
87
  "lodash": "^4.17.21",
87
88
  "npm-run-all": "^4.1.5",
88
- "pinst": "^2.1.6",
89
+ "pinst": "^3.0.0",
89
90
  "png.js": "^0.2.1",
90
91
  "prettier": "^2.5.1",
91
92
  "putasset": "^5.0.3",
92
- "skia-canvas": "^0.9.27",
93
- "typescript": "^4.5.3"
93
+ "skia-canvas": "^0.9.28",
94
+ "typescript": "^4.5.5"
94
95
  },
95
96
  "lint-staged": {
96
97
  "*.@(js|ts|tsx|yml|yaml|md|json)": [
@@ -107,6 +108,8 @@
107
108
  "extensions": [
108
109
  "ts"
109
110
  ],
111
+ "workerThreads": false,
112
+ "cache": false,
110
113
  "timeout": "3m",
111
114
  "environmentVariables": {
112
115
  "SWC_NODE_PROJECT": "./tsconfig.json",
@@ -121,14 +124,14 @@
121
124
  "arrowParens": "always"
122
125
  },
123
126
  "optionalDependencies": {
124
- "@napi-rs/canvas-win32-x64-msvc": "0.1.18",
125
- "@napi-rs/canvas-darwin-x64": "0.1.18",
126
- "@napi-rs/canvas-linux-x64-gnu": "0.1.18",
127
- "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.18",
128
- "@napi-rs/canvas-linux-x64-musl": "0.1.18",
129
- "@napi-rs/canvas-linux-arm64-gnu": "0.1.18",
130
- "@napi-rs/canvas-linux-arm64-musl": "0.1.18",
131
- "@napi-rs/canvas-darwin-arm64": "0.1.18",
132
- "@napi-rs/canvas-android-arm64": "0.1.18"
127
+ "@napi-rs/canvas-win32-x64-msvc": "0.1.21",
128
+ "@napi-rs/canvas-darwin-x64": "0.1.21",
129
+ "@napi-rs/canvas-linux-x64-gnu": "0.1.21",
130
+ "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.21",
131
+ "@napi-rs/canvas-linux-x64-musl": "0.1.21",
132
+ "@napi-rs/canvas-linux-arm64-gnu": "0.1.21",
133
+ "@napi-rs/canvas-linux-arm64-musl": "0.1.21",
134
+ "@napi-rs/canvas-darwin-arm64": "0.1.21",
135
+ "@napi-rs/canvas-android-arm64": "0.1.21"
133
136
  }
134
137
  }