skia-canvas 3.0.1 → 3.0.3
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/lib/prebuild.mjs +3 -2
- 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/lib/prebuild.mjs
CHANGED
|
@@ -113,8 +113,9 @@ async function download(...args){
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
function compile(...args){
|
|
116
|
-
let optimization = args.includes('
|
|
117
|
-
|
|
116
|
+
let optimization = args.includes('custom') || args.includes('dev') ? '' : "--release",
|
|
117
|
+
customFeatures = args.includes('custom') && (args[args.indexOf('custom')+1] || '').replace(/[^[a-z0-9\_\-\,]/g, ''),
|
|
118
|
+
features = `--features "${args.includes('custom') ? customFeatures || '' : CARGO_FEATURES}"`,
|
|
118
119
|
isFallback = args.includes('--fallback'),
|
|
119
120
|
isSrcRepo = existsSync(`${ROOT}/Cargo.toml`)
|
|
120
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skia-canvas",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
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:d19093374276990bd6c2237fb668b1d380af2a885aa7801e24204a3c05e46213",
|
|
74
|
+
"aws-lambda-x64.zip": "sha256:f95d53cb199a5cca8faf3d93c88f7c10aae09bb1f274512f5b68b4169f84c4c2",
|
|
75
|
+
"darwin-arm64.gz": "sha256:4a4c3aa2729aa77faa189815354ce917361c00f99d69afde3b30ac45894eaeab",
|
|
76
|
+
"darwin-x64.gz": "sha256:4ad7daa6d6236fe5a241ad3bf404d36b06418cb4e0f9e741deb2be2a590da52a",
|
|
77
|
+
"linux-arm64-glibc.gz": "sha256:ea0fbea46e9cf6be3fdfb9c901fd1ef15baf192a57f717b484b5b6c6c5cd695e",
|
|
78
|
+
"linux-arm64-musl.gz": "sha256:04237f1708dc39ab660449b8c805f9e88520dcc935e1b8a7d4b796705f9b1a6c",
|
|
79
|
+
"linux-x64-glibc.gz": "sha256:6a66eb3d83088971cebf6c871a97e7f2f45dd8d1ced2add017c9161d7b289f25",
|
|
80
|
+
"linux-x64-musl.gz": "sha256:7e0c187d63694db0e0ac2483b0178942007e46ccbf280324d1f73541584008d9",
|
|
81
|
+
"win32-arm64.gz": "sha256:401c3ab4726da81e35f5bf6291f0303268f0c5de8ffba044ee24ef19f5e0f56a",
|
|
82
|
+
"win32-x64.gz": "sha256:1634540d246eeec976632c0adb377ec11af0cff5c539ad374509f8a1fdc1fa24"
|
|
83
83
|
}
|
|
84
84
|
}
|