skia-canvas 3.0.1 → 3.0.2
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/lib/classes/typography.js +3 -8
- package/lib/fetch.js +3 -8
- package/package.json +13 -13
|
@@ -4,12 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
"use strict"
|
|
6
6
|
|
|
7
|
-
const {RustClass, readOnly, signature, inspect, REPR} = require('./neon')
|
|
8
|
-
{globSync, convertPathToPattern:quote} = require('fast-glob'),
|
|
9
|
-
glob = paths => globSync(
|
|
10
|
-
[paths].flat(2).map(p => p.indexOf('\\')>=0 ? quote(p) : p),
|
|
11
|
-
{dot:true}
|
|
12
|
-
)
|
|
7
|
+
const {RustClass, readOnly, signature, inspect, REPR} = require('./neon')
|
|
13
8
|
|
|
14
9
|
class FontLibrary extends RustClass {
|
|
15
10
|
constructor(){
|
|
@@ -27,11 +22,11 @@ class FontLibrary extends RustClass {
|
|
|
27
22
|
if (sig=='o'){
|
|
28
23
|
let results = {}
|
|
29
24
|
for (let [alias, paths] of Object.entries(args.shift())){
|
|
30
|
-
results[alias] = this.ƒ("addFamily", alias,
|
|
25
|
+
results[alias] = this.ƒ("addFamily", alias, [paths].flat())
|
|
31
26
|
}
|
|
32
27
|
return results
|
|
33
28
|
}else if (sig.match(/^s?[as]$/)){
|
|
34
|
-
let fonts =
|
|
29
|
+
let fonts = [args.pop()].flat()
|
|
35
30
|
let alias = args.shift()
|
|
36
31
|
return this.ƒ("addFamily", alias, fonts)
|
|
37
32
|
}else{
|
package/lib/fetch.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
? Promise.resolve(global.fetch)
|
|
5
|
-
: import('node-fetch').then(({default:fetch}) => fetch)
|
|
6
|
-
return fn.then(fetch => fetch(src, options))
|
|
1
|
+
// rapper that exports either native fetch (on node v18+) or node-fetch (for older systems)
|
|
2
|
+
module.exports = {
|
|
3
|
+
fetch: global.fetch || require('node-fetch')
|
|
7
4
|
}
|
|
8
|
-
|
|
9
|
-
module.exports = {fetch}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skia-canvas",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "A multi-threaded, GPU-accelerated, Canvas API for Node",
|
|
5
5
|
"author": "Christian Swinehart <drafting@samizdat.co>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,9 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"detect-libc": "^2.0.4",
|
|
32
|
-
"fast-glob": "^3.3.3",
|
|
33
32
|
"https-proxy-agent": "^7.0.6",
|
|
34
|
-
"node-fetch": "^
|
|
33
|
+
"node-fetch": "^2.7.0",
|
|
35
34
|
"string-split-by": "^1.0.0"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
@@ -40,6 +39,7 @@
|
|
|
40
39
|
"@types/node": "^24.2.1",
|
|
41
40
|
"cargo-cp-artifact": "^0.1",
|
|
42
41
|
"express": "^5.1.0",
|
|
42
|
+
"fast-glob": "^3.3.3",
|
|
43
43
|
"jest": "^30.0.5",
|
|
44
44
|
"lodash": "^4.17.21",
|
|
45
45
|
"nodemon": "^3.1.10",
|
|
@@ -70,15 +70,15 @@
|
|
|
70
70
|
"rust"
|
|
71
71
|
],
|
|
72
72
|
"prebuild": {
|
|
73
|
-
"aws-lambda-arm64.zip": "sha256:
|
|
74
|
-
"aws-lambda-x64.zip": "sha256:
|
|
75
|
-
"darwin-arm64.gz": "sha256:
|
|
76
|
-
"darwin-x64.gz": "sha256:
|
|
77
|
-
"linux-arm64-glibc.gz": "sha256:
|
|
78
|
-
"linux-arm64-musl.gz": "sha256:
|
|
79
|
-
"linux-x64-glibc.gz": "sha256:
|
|
80
|
-
"linux-x64-musl.gz": "sha256:
|
|
81
|
-
"win32-arm64.gz": "sha256:
|
|
82
|
-
"win32-x64.gz": "sha256:
|
|
73
|
+
"aws-lambda-arm64.zip": "sha256:c9b4d687110cc2a9246cfa0688f20100828cc2f4e239ffdccb4efe45fdec0b84",
|
|
74
|
+
"aws-lambda-x64.zip": "sha256:bdd29bf8be43f1b1d106d30e36a916406cbb0ba755d58b75dfb11f2eb2acc1dd",
|
|
75
|
+
"darwin-arm64.gz": "sha256:4a4c3aa2729aa77faa189815354ce917361c00f99d69afde3b30ac45894eaeab",
|
|
76
|
+
"darwin-x64.gz": "sha256:4ad7daa6d6236fe5a241ad3bf404d36b06418cb4e0f9e741deb2be2a590da52a",
|
|
77
|
+
"linux-arm64-glibc.gz": "sha256:73b66d5a9e5cf8841b94462f313323c4bad755d7a0e8202393fac6cdb31e4db8",
|
|
78
|
+
"linux-arm64-musl.gz": "sha256:3b704353a36428f31eaefe0870da29a1ad433272b81c1088efe770850b812609",
|
|
79
|
+
"linux-x64-glibc.gz": "sha256:80f9f5a54c92d99cb0cc6da23d7e0c12011b2e53f3c8540864007e1e83e82f65",
|
|
80
|
+
"linux-x64-musl.gz": "sha256:82fd698d543347ba49a531acad350dd146473c8bbac3e2c6fd137de7cdb02b01",
|
|
81
|
+
"win32-arm64.gz": "sha256:4b7cb850e87b084c785d7412b0c466daffcd5c7e89f359aa6ee23a36ae87abbb",
|
|
82
|
+
"win32-x64.gz": "sha256:95fdd138d2863f5fa1cf2e34947da3374f64df86eb88d0de0b3d8bee81d2a5c3"
|
|
83
83
|
}
|
|
84
84
|
}
|