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: use new h3 generics for defineCachedEventHandler #1640

Merged
merged 4 commits into from
Aug 26, 2023
Merged

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

When updating h3 we missed out updating the generic types for defineCachedEventHandler. This PR implements it although note that this is not backwards compatible. (Happy to add an overload as we did in h3 if we need to support previous generic pattern.)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added the bug Something isn't working label Aug 26, 2023
@danielroe danielroe requested a review from pi0 August 26, 2023 07:27
@danielroe danielroe self-assigned this Aug 26, 2023
@pi0
Copy link
Member

pi0 commented Aug 26, 2023

Thanks for quick PR! Would be nice if we keep supporting first generic type (although i know it is a pain to do but people might have been depending on it..)

@codecov
Copy link

codecov bot commented Aug 26, 2023

Codecov Report

Merging #1640 (4b2cfad) into main (61144e5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1640   +/-   ##
=======================================
  Coverage   77.76%   77.76%           
=======================================
  Files          76       76           
  Lines        7824     7824           
  Branches      803      803           
=======================================
  Hits         6084     6084           
  Misses       1738     1738           
  Partials        2        2           

@pi0
Copy link
Member

pi0 commented Aug 26, 2023

One small note: request body should be never in cached handlers

(also headers when we add type for, only ones from varies option are available)

@pi0 pi0 merged commit 60a8655 into main Aug 26, 2023
8 checks passed
@pi0 pi0 deleted the fix/cached-types branch August 26, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants