Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(serve-static): silence NotFound warning on Deno #3542

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

pablo-abc
Copy link
Contributor

@pablo-abc pablo-abc commented Oct 21, 2024

Silences the NotFound warning when a file is not found using serveStatic for Deno.

NotFound: No such file or directory (os error 2)

Noticed that this is already the default behaviour for Bun's adapter according to #1810 but it is not with Deno due to Deno not allowing to check directly for a file's existence. Ignoring the error is the only way to avoid the warning.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

fix(serve-static): silence `NotFound` warning on Deno
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 94.28%. Comparing base (f8664b0) to head (b6f2059).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/adapter/deno/serve-static.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3542      +/-   ##
==========================================
- Coverage   94.30%   94.28%   -0.02%     
==========================================
  Files         157      157              
  Lines        9488     9490       +2     
  Branches     2773     2881     +108     
==========================================
  Hits         8948     8948              
- Misses        540      542       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

Hi @pablo-abc !

Looks good to me. Merging now. Thanks.

@yusukebe yusukebe merged commit 267186d into honojs:main Oct 22, 2024
16 checks passed
TinsFox pushed a commit to TinsFox/hono that referenced this pull request Oct 28, 2024
fix(serve-static): silence `NotFound` warning on Deno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants