From ca6493757eb3d07ba2383fd6d05a6d496e604cc1 Mon Sep 17 00:00:00 2001 From: zhizheng Date: Mon, 28 Apr 2025 21:11:10 +0800 Subject: [PATCH] fix: upgrade the puppteer version to enable the screenshot.ts (#2863) (#2866) the ts is not compatible with Deno 2.0 and cannot generate project screenshots. #2863 the old verison made by 3 year ago. --- www/utils/screenshot.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/utils/screenshot.ts b/www/utils/screenshot.ts index ed6b07e2..1493ece1 100644 --- a/www/utils/screenshot.ts +++ b/www/utils/screenshot.ts @@ -1,6 +1,6 @@ -import puppeteer from "https://deno.land/x/puppeteer@16.2.0/mod.ts"; +import puppeteer from "npm:puppeteer@22.4.1"; import { Image } from "https://deno.land/x/imagescript@1.2.17/mod.ts"; -import { join } from "https://deno.land/std@0.216.0/path/mod.ts"; +import { join } from "@std/path"; const url = Deno.args[0]; const id = Deno.args[1]; @@ -26,6 +26,7 @@ if (!id) { const outDir = "./www/static/showcase"; const browser = await puppeteer.launch({ defaultViewport: { width: 1200, height: 675 }, + headless: "new", }); const page = await browser.newPage(); await page.goto(url, { waitUntil: "networkidle2" });