Skip to content

Commit 0010cf8

Browse files
authored
update deps (#26)
1 parent 4634209 commit 0010cf8

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

bun.lockb

-19.9 KB
Binary file not shown.

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export default tseslint.config(
5252
"macos",
5353
"rmapi",
5454
"subfiles",
55+
"uint",
5556
"urls",
5657
"webcrypto",
5758
],

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@
3232
"uuid": "^11.1.0"
3333
},
3434
"devDependencies": {
35-
"@eslint/js": "^9.26.0",
36-
"@types/bun": "^1.2.11",
35+
"@eslint/js": "^9.33.0",
36+
"@types/bun": "^1.2.20",
3737
"@types/json-stable-stringify": "^1.2.0",
3838
"@types/uuid": "^10.0.0",
39-
"@typescript-eslint/eslint-plugin": "^8.31.1",
40-
"eslint": "^9.26.0",
41-
"eslint-config-prettier": "^10.1.2",
39+
"@typescript-eslint/eslint-plugin": "^8.39.1",
40+
"eslint": "^9.33.0",
41+
"eslint-config-prettier": "^10.1.8",
4242
"eslint-plugin-spellcheck": "^0.0.20",
4343
"eslint-plugin-tsdoc": "^0.4.0",
44-
"prettier": "^3.5.3",
45-
"prettier-plugin-organize-imports": "^4.1.0",
46-
"typedoc": "^0.28.4",
47-
"typescript": "~5.8.3",
48-
"typescript-eslint": "^8.31.1"
44+
"prettier": "^3.6.2",
45+
"prettier-plugin-organize-imports": "^4.2.0",
46+
"typedoc": "^0.28.10",
47+
"typescript": "~5.9.2",
48+
"typescript-eslint": "^8.39.1"
4949
}
5050
}

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ class Remarkable implements RemarkableApi {
790790
Authorization: `Bearer ${this.#userToken}`,
791791
...headers,
792792
},
793-
body,
793+
// fetch works correctly with uint8 arrays, but is not hinted correctly
794+
body: body as unknown as ArrayBuffer,
794795
});
795796
if (!resp.ok) {
796797
const msg = await resp.text();

src/raw.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,11 @@ const rootHash = properties(
653653
) satisfies CompiledSchema<RootHash, unknown>;
654654

655655
async function digest(buff: Uint8Array): Promise<string> {
656-
const digest = await crypto.subtle.digest("SHA-256", buff);
656+
const digest = await crypto.subtle.digest(
657+
"SHA-256",
658+
// NOTE this is type hinted wrong, but it does work correctly on a uint8 view
659+
buff as unknown as ArrayBuffer,
660+
);
657661
return [...new Uint8Array(digest)]
658662
.map((x) => x.toString(16).padStart(2, "0"))
659663
.join("");

0 commit comments

Comments
 (0)