due to resolves the `NotFound: No such file or directory` error in the `www/utils/screenshot.ts` script, which was caused by improper file path construction. This error prevented screenshots from being saved correctly. close #2919 -- update --patch1 ## Current Status - Using npm:puppeteer for webpage screenshots - npm lifecycle script warnings present - deno-puppeteer is no longer maintained - npm:puppeteer still has compatibility issues ## References - [astral](https://github.com/lino-levan/astral): Browser automation library designed for Deno - [deno-puppeteer#92](https://github.com/lucacasonato/deno-puppeteer/issues/92): Recent discussion about deno-puppeteer ## Changes Made 1. Dependency Replacement - Replaced npm:puppeteer with jsr:@astral/astral - Removed npm lifecycle script warnings 2. Dependency Management Optimization - Centralized all imports in deno.json - Using jsr: and URL imports ## Testing Steps 1. Run screenshot command: ```bash deno task screenshot https://google.com google ``` 2. Check output: - Verify no npm warnings - Validate generated image files: - ./www/static/showcase/google2x.jpg - ./www/static/showcase/google1x.jpg - Confirm image quality 3. Run complete test suite: ```bash deno task ok ``` - Ensure all tests pass 4. Verify functionality: - Screenshot feature works correctly - Image processing (2x/1x) functions properly --------- Co-authored-by: 李嘉图·M·路 <146103794+Ricardo-M-Zheng@users.noreply.github.com> Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
This commit is contained in:
co-authored by
李嘉图·M·路
Asher Gomez
parent
09705b9b7f
commit
d68b5ecd5b
@@ -21,6 +21,7 @@
|
||||
"@std/path": "jsr:@std/path@1",
|
||||
"@std/semver": "jsr:@std/semver@1",
|
||||
"@opentelemetry/api": "npm:@opentelemetry/api@^1.9.0",
|
||||
"astral": "jsr:@astral/astral",
|
||||
"autoprefixer": "npm:autoprefixer@10.4.17",
|
||||
"cssnano": "npm:cssnano@6.0.3",
|
||||
"esbuild": "npm:esbuild@0.23.1",
|
||||
@@ -30,6 +31,7 @@
|
||||
"fresh/dev": "../src/dev/mod.ts",
|
||||
"fresh/runtime": "../src/runtime/shared.ts",
|
||||
"github-slugger": "npm:github-slugger@^2.0.0",
|
||||
"imagescript": "https://deno.land/x/imagescript@1.3.0/mod.ts",
|
||||
"marked": "npm:marked@^14.1.2",
|
||||
"marked-mangle": "npm:marked-mangle@^1.1.9",
|
||||
"postcss": "npm:postcss@8.4.35",
|
||||
|
||||
Reference in New Issue
Block a user