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(helper/factory): Calculate Context<Env> Type in createHandlers #3670

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

sushichan044
Copy link
Contributor

@sushichan044 sushichan044 commented Nov 14, 2024

closes #3467

This PR fixes a problem in createHandlers where the expected type information was not passed to subsequent handlers
when middlewares changed the Context type.

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

@sushichan044 sushichan044 changed the title feat: Calculate Context<Env> Type in createHandlers feat(helper/factory): Calculate Context<Env> Type in createHandlers Nov 14, 2024
@sushichan044 sushichan044 marked this pull request as ready for review November 14, 2024 19:22
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.70%. Comparing base (082862b) to head (087c5df).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3670   +/-   ##
=======================================
  Coverage   91.70%   91.70%           
=======================================
  Files         159      159           
  Lines       10145    10145           
  Branches     2851     2857    +6     
=======================================
  Hits         9303     9303           
  Misses        840      840           
  Partials        2        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

@sushichan044

Awesome! Thank you for your first contribution. Merging now.

@yusukebe yusukebe merged commit a15bec3 into honojs:main Nov 14, 2024
16 checks passed
@mecab
Copy link

mecab commented Nov 15, 2024

I raised #3467 and I'm so happy to hear it is fixed. It is super helpful. I will try it soon.

Thank you @sushichan044 and @yusukebe !

@Rykuno
Copy link

Rykuno commented Nov 18, 2024

I brought this issue up in the discord. Thank you!

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.

Context<Env> from middlewares are not inferred in factory.createHandlers
4 participants