refactor: replace puppeteer with astral for screenshot and close #2919#2920
Merged
marvinhagemeister merged 5 commits intodenoland:mainfrom May 12, 2025
Merged
Conversation
his PR 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.
iuioiua
suggested changes
May 12, 2025
Contributor
iuioiua
left a comment
There was a problem hiding this comment.
These should work fine too.
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Contributor
Author
|
iuioiua
suggested changes
May 12, 2025
Contributor
iuioiua
left a comment
There was a problem hiding this comment.
Please run deno fmt. Also, are the deno.lock file changes needed?
## 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](lucacasonato/deno-puppeteer#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
iuioiua
approved these changes
May 12, 2025
marvinhagemeister
approved these changes
May 12, 2025
Collaborator
marvinhagemeister
left a comment
There was a problem hiding this comment.
LGTM, thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
due to resolves the
NotFound: No such file or directoryerror in thewww/utils/screenshot.tsscript, which was caused by improper file path construction. This error prevented screenshots from being saved correctly. close #2919-- update --patch1
Current Status
References
Changes Made
Dependency Replacement
Dependency Management Optimization
Testing Steps
Check output:
Run complete test suite: