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: properly close middleware using next() #7

Merged
merged 2 commits into from Jan 17, 2023

Conversation

angeloashmore
Copy link
Member

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This fixes a bug where r19's Express middleware would prematurely close the response before it completed. The bug seems isolated to usage in h3 (tests in Express worked before this PR).

Checklist:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

@github-actions
Copy link

github-actions bot commented Jan 17, 2023

size-limit report 📦

Path Size
./dist/index.cjs 7.79 KB (-0.02% 🔽)
./dist/index.js 7.87 KB (+0.05% 🔺)
./dist/client/index.cjs 7.29 KB (0%)
./dist/client/index.js 7.43 KB (0%)

@codecov-commenter
Copy link

Codecov Report

Base: 86.92% // Head: 86.96% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (e128e7f) compared to base (7d7d43a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
+ Coverage   86.92%   86.96%   +0.04%     
==========================================
  Files           9        9              
  Lines         650      652       +2     
  Branches       58       58              
==========================================
+ Hits          565      567       +2     
  Misses         84       84              
  Partials        1        1              
Impacted Files Coverage Δ
src/createRPCMiddleware.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@angeloashmore angeloashmore merged commit 756fe88 into master Jan 17, 2023
@angeloashmore angeloashmore deleted the aa/fix-premature-close-bug branch January 17, 2023 23:57
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.

None yet

2 participants