From bd66a5e9ce95e02a237a994cd65e14e5dc9e942e Mon Sep 17 00:00:00 2001 From: wxm <157215725@qq.com> Date: Sat, 21 Dec 2024 18:23:46 +0800 Subject: [PATCH] chore: up typescript --- package.json | 6 +++--- pnpm-lock.yaml | 11 +++++++++-- src/converts/dom-to-blob.ts | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1c7defa..d7eb0c9 100644 --- a/package.json +++ b/package.json @@ -52,8 +52,8 @@ } }, "files": [ - "worker.d.ts", - "dist" + "dist", + "worker.d.ts" ], "scripts": { "dev": "vite", @@ -83,7 +83,7 @@ "lint-staged": "^15.2.10", "puppeteer": "^23.7.0", "simple-git-hooks": "^2.11.1", - "typescript": "^5.6.3", + "typescript": "^5.7.2", "unbuild": "^2.0.0", "vite": "^5.4.10", "vitest": "^2.1.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cee26ae..fe2641e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,8 +48,8 @@ importers: specifier: ^2.11.1 version: 2.11.1 typescript: - specifier: ^5.6.3 - version: 5.6.3 + specifier: ^5.7.2 + version: 5.7.2 unbuild: specifier: ^2.0.0 version: 2.0.0(typescript@5.6.3) @@ -3937,6 +3937,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + engines: {node: '>=14.17'} + hasBin: true + ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} @@ -8652,6 +8657,8 @@ snapshots: typescript@5.6.3: {} + typescript@5.7.2: {} + ufo@1.5.4: {} uglify-js@3.19.3: diff --git a/src/converts/dom-to-blob.ts b/src/converts/dom-to-blob.ts index d043d0b..63e1ee6 100644 --- a/src/converts/dom-to-blob.ts +++ b/src/converts/dom-to-blob.ts @@ -16,7 +16,7 @@ export async function domToBlob(node: any, options?: any): Promise { const blob = await canvasToBlob(canvas, type, quality) if (['image/png', 'image/jpeg'].includes(type) && dpi) { const arrayBuffer = await blobToArrayBuffer(blob.slice(0, 33)) - let uint8Array = new Uint8Array(arrayBuffer) + let uint8Array = new Uint8Array(arrayBuffer) if (type === 'image/png') { uint8Array = changePngDpi(uint8Array, dpi) }