skia-canvas 3.0.4 → 3.0.6

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/index.d.ts CHANGED
@@ -922,7 +922,7 @@ interface FontLibrary {
922
922
  use(fontPaths: readonly string[]): Font[]
923
923
  use(
924
924
  families: Record<string, readonly string[] | string>
925
- ): Record<string, Font[] | Font>
925
+ ): Record<string, Font[]>
926
926
 
927
927
  reset(): void
928
928
  }
package/lib/prebuild.mjs CHANGED
@@ -89,8 +89,8 @@ async function download(...args){
89
89
  let body = await new Promise((res, rej) => {
90
90
  https.get(url, {agent}, resp => {
91
91
  let {statusCode:status} = resp
92
- if (status == 404) rej(`Prebuilt library not found at "${url}" (HTTP error ${status})`)
93
- else if (status < 200 || status >= 300) rej(`Failed to load prebuilt binary from "${url}" (HTTP error ${status})`)
92
+ if (status == 404) rej(Error(`Prebuilt library not found at "${url}" (HTTP error ${status})`))
93
+ else if (status < 200 || status >= 300) rej(Error(`Failed to load prebuilt binary from "${url}" (HTTP error ${status})`))
94
94
  else res(resp)
95
95
  })
96
96
  })
@@ -128,10 +128,12 @@ function compile(...args){
128
128
  else if (isFallback) console.log("\nAttempting to rebuild locally...")
129
129
  else console.warn(`cargo build ${[optimization, features].filter(s=>s).join(' ')}`)
130
130
 
131
- child_process.spawnSync(
131
+ let {status} = child_process.spawnSync(
132
132
  `cargo-cp-artifact -nc ${BINARY_PATH} -- cargo build --message-format=json-render-diagnostics ${optimization} ${features}`,
133
133
  {shell:true, stdio:'inherit'}
134
134
  )
135
+
136
+ process.exit(status)
135
137
  }
136
138
 
137
139
  async function usage(){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skia-canvas",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "description": "A multi-threaded, GPU-accelerated, Canvas API for Node",
5
5
  "author": "Christian Swinehart <drafting@samizdat.co>",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "build": "node lib/prebuild.mjs compile",
26
26
  "install": "node lib/prebuild.mjs download --or-compile",
27
27
  "upload": "node lib/prebuild.mjs upload",
28
- "test": "jest"
28
+ "test": "node --test"
29
29
  },
30
30
  "dependencies": {
31
31
  "detect-libc": "^2.0.4",
@@ -34,15 +34,11 @@
34
34
  "string-split-by": "^1.0.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/jest": "^30.0.0",
38
- "@types/lodash": "^4.17.20",
39
- "@types/node": "^24.2.1",
37
+ "@hono/node-server": "^1.19.0",
38
+ "@types/node": "^24.3.0",
40
39
  "cargo-cp-artifact": "^0.1",
41
- "express": "^5.1.0",
42
- "fast-glob": "^3.3.3",
43
- "jest": "^30.0.5",
44
- "lodash": "^4.17.21",
45
- "nodemon": "^3.1.10",
40
+ "hono": "^4.9.4",
41
+ "nock": "^14.0.10",
46
42
  "tmp": "^0.2.5"
47
43
  },
48
44
  "files": [
@@ -70,15 +66,15 @@
70
66
  "rust"
71
67
  ],
72
68
  "prebuild": {
73
- "aws-lambda-arm64.zip": "sha256:7cd7d3347a8ed5a7a6a00a3dc7a05b3556a39eebd4a82c18def146dbcad415d3",
74
- "aws-lambda-x64.zip": "sha256:8cd71fae702245258bca77fae284793f0ee1760d44ff88ffb622200418ca48c6",
75
- "darwin-arm64.gz": "sha256:d20eaf98437640f0d25dae9dd1007176ccce7a473f1ecb6294fb86de8b08901a",
76
- "darwin-x64.gz": "sha256:11aa8f5fb42c79ddbf63d4e0f3e5774d2d5b9fc9d831cd267b88408379d0c163",
77
- "linux-arm64-glibc.gz": "sha256:d2d70378f797972463bab191a952a5b16c126e1b951aa47f16404bea2e2042ce",
78
- "linux-arm64-musl.gz": "sha256:f035ff50ada62106669deadc0e859ab07987ab1632e0176fd37cf9b68e05a575",
79
- "linux-x64-glibc.gz": "sha256:b133ce5c3ddc177078d41e1570423407345f162915acbb5f68dc657df75552ba",
80
- "linux-x64-musl.gz": "sha256:577ba30287b89c492d97e7af8417d613368418b068b3eb800c281f3bb69f01ec",
81
- "win32-arm64.gz": "sha256:480b9598d5b1d4c1dfd13947f7d5042218851493a79470a59e5b47943941de6c",
82
- "win32-x64.gz": "sha256:1bdfced1fc24e1e1af0f94809db6277b84aecb73b8aa258d42cf232fb79bc3d3"
69
+ "aws-lambda-arm64.zip": "sha256:b6b75593a57204fcdb54fce11aa668c8d6550be55dd94dd5e5f89ab36ac1403a",
70
+ "aws-lambda-x64.zip": "sha256:26b5d30ade12da69b947c8db2a0495ee39b5db2eab44d57f3d1c64bbfc00a3f5",
71
+ "darwin-arm64.gz": "sha256:32889ffe4318db4b8b7bab212156277786dfbba72917ad623586a2fe9f74135c",
72
+ "darwin-x64.gz": "sha256:b74083fc3b02b283218d3d485fb8aa89f98fd90c0281bb1e6d077df1a775a3d5",
73
+ "linux-arm64-glibc.gz": "sha256:2fe5687ebe2e576bf42d732301692c5d01b420f0681d991285637d533821b3b7",
74
+ "linux-arm64-musl.gz": "sha256:a581a24c38a23b4eff62fb989c9d14a83d0f461e805319bc14363779e4dab43a",
75
+ "linux-x64-glibc.gz": "sha256:6b9d384dff13189ad2271b60e13ed9b0de7f791582cb08cda538ad4e9c2cb7ef",
76
+ "linux-x64-musl.gz": "sha256:2bdf1b5223363509dddfd9c9311a6a409ef11587250efd5e58b2140b44e803aa",
77
+ "win32-arm64.gz": "sha256:0286d540d3d6f6b07e4028aac815fd013cab592bf1859ceede02f19db3de4d67",
78
+ "win32-x64.gz": "sha256:6e7469b6db7c779a6814e2f6d3da79ddf82ad79176dec23e048ab4bd2d046e7d"
83
79
  }
84
80
  }