chore: sweep dependabot updates and align Node 25 (#329)

* chore: sweep dependabot updates

* fix: narrow optional browser Buffer typing

* chore: align repo node pins to v25
This commit is contained in:
Cita
2026-03-30 19:14:41 +08:00
committed by GitHub
parent 9212b765cd
commit 9aeec87cfa
13 changed files with 344 additions and 282 deletions
+8 -2
View File
@@ -1,5 +1,11 @@
import { clearAuthSession, getAuthToken } from './authSession.js';
type BufferLike = {
from(data: ArrayBuffer): { toString(encoding: 'base64'): string };
};
const nodeBuffer = (globalThis as typeof globalThis & { Buffer?: BufferLike }).Buffer;
type RequestOptions = RequestInit & {
timeoutMs?: number;
};
@@ -58,8 +64,8 @@ function parseContentDispositionFilename(headerValue: string | null): string | n
}
function arrayBufferToBase64(buffer: ArrayBuffer): string {
if (typeof Buffer !== 'undefined') {
return Buffer.from(buffer).toString('base64');
if (nodeBuffer) {
return nodeBuffer.from(buffer).toString('base64');
}
let binary = '';
+2
View File
@@ -0,0 +1,2 @@
/// <reference types="vite/client" />