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

feat(hono/context): contentful status code typing #3763

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

askorupskyy
Copy link
Contributor

@askorupskyy askorupskyy commented Dec 22, 2024

Contentful status code

Resolves #1518

All in all, prohibits returning c.json() or c.text() or c.html() with 101, 204, 205, and 304 status codes.

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

@askorupskyy askorupskyy force-pushed the feat/contenful-status-code-typing branch from 993739f to b15db32 Compare December 22, 2024 06:29
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.72%. Comparing base (4eb101d) to head (49f5d3e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/context.ts 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3763      +/-   ##
==========================================
- Coverage   91.72%   91.72%   -0.01%     
==========================================
  Files         159      159              
  Lines       10178    10174       -4     
  Branches     2896     2894       -2     
==========================================
- Hits         9336     9332       -4     
  Misses        841      841              
  Partials        1        1              

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

@yusukebe
Copy link
Member

Hi @askorupskyy

Thank you for this PR. I'll also review, but @EdamAme-x, can you review this?

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

@askorupskyy Thanks! Looks good to me.

@EdamAme-x Pinging again. Can you review this?

Copy link
Contributor

@EdamAme-x EdamAme-x left a comment

Choose a reason for hiding this comment

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

Sorry for late, LGTM.

@yusukebe
Copy link
Member

@askorupskyy @EdamAme-x

Thanks! I'll merge this now and include this change in the next patch release since this is feat change but it's slight.

@yusukebe yusukebe merged commit bfd839a into honojs:main Dec 25, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot response HTTP code 204 when using context.json()
3 participants