-
-
Notifications
You must be signed in to change notification settings - Fork 617
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-base): tweaks fetch
signature for better compatibility with deno serve
#2661
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@yusukebe What do you think about this? |
yusukebe
approved these changes
May 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I didn't know the length
will be 1
with that implementation!
Thanks @usualoma ! This is good! I also wanted this feature. I'll merge this into the |
nicolewhite
referenced
this pull request
in autoblocksai/cli
May 13, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [hono](https://hono.dev/) ([source](https://github.com/honojs/hono)) | [`4.3.0` -> `4.3.6`](https://renovatebot.com/diffs/npm/hono/4.3.0/4.3.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/hono/4.3.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/hono/4.3.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/hono/4.3.0/4.3.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/hono/4.3.0/4.3.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>honojs/hono (hono)</summary> ### [`v4.3.6`](https://github.com/honojs/hono/releases/tag/v4.3.6) [Compare Source](https://github.com/honojs/hono/compare/v4.3.5...v4.3.6) #### What's Changed - feat(cache): improved customizability by [@​MathurAditya724](https://github.com/MathurAditya724) in [https://github.com/honojs/hono/pull/2652](https://github.com/honojs/hono/pull/2652) - fix(utils/body): support multiple `File`s by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/2665](https://github.com/honojs/hono/pull/2665) #### New Contributors - [@​MathurAditya724](https://github.com/MathurAditya724) made their first contribution in [https://github.com/honojs/hono/pull/2652](https://github.com/honojs/hono/pull/2652) **Full Changelog**: honojs/hono@v4.3.5...v4.3.6 ### [`v4.3.5`](https://github.com/honojs/hono/releases/tag/v4.3.5) [Compare Source](https://github.com/honojs/hono/compare/v4.3.4...v4.3.5) #### What's Changed - refactor(context): remove some `any` by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/2658](https://github.com/honojs/hono/pull/2658) - feat(hono-base): tweaks `fetch` signature for better compatibility with `deno serve` by [@​usualoma](https://github.com/usualoma) in [https://github.com/honojs/hono/pull/2661](https://github.com/honojs/hono/pull/2661) - perf(types): add type annotations by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/2663](https://github.com/honojs/hono/pull/2663) **Full Changelog**: honojs/hono@v4.3.4...v4.3.5 ### [`v4.3.4`](https://github.com/honojs/hono/releases/tag/v4.3.4) [Compare Source](https://github.com/honojs/hono/compare/v4.3.3...v4.3.4) #### What's Changed - chore: update the pull request template by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/2647](https://github.com/honojs/hono/pull/2647) - feat(validator): check for json subtypes in validator by [@​ztiromoritz](https://github.com/ztiromoritz) in [https://github.com/honojs/hono/pull/2634](https://github.com/honojs/hono/pull/2634) - feat(jsx/dom): support getServerSnapshot in useSyncExternalStore by [@​usualoma](https://github.com/usualoma) in [https://github.com/honojs/hono/pull/2646](https://github.com/honojs/hono/pull/2646) #### New Contributors - [@​ztiromoritz](https://github.com/ztiromoritz) made their first contribution in [https://github.com/honojs/hono/pull/2634](https://github.com/honojs/hono/pull/2634) **Full Changelog**: honojs/hono@v4.3.3...v4.3.4 ### [`v4.3.3`](https://github.com/honojs/hono/releases/tag/v4.3.3) [Compare Source](https://github.com/honojs/hono/compare/v4.3.2...v4.3.3) #### What's Changed - fix(types): relax the type of `c.req.param()` by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/2613](https://github.com/honojs/hono/pull/2613) - chore(eslint): enable `@typescript-eslint/unbound-method` by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/2622](https://github.com/honojs/hono/pull/2622) - fix(factory): support `createFactory()` destruction by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/2623](https://github.com/honojs/hono/pull/2623) - fix(aws-lambda): avoid duplicating already set headers by [@​Amorim33](https://github.com/Amorim33) in [https://github.com/honojs/hono/pull/2585](https://github.com/honojs/hono/pull/2585) - refactor: improve parseBody function and docs by [@​mgrithm](https://github.com/mgrithm) in [https://github.com/honojs/hono/pull/2628](https://github.com/honojs/hono/pull/2628) - fix(validator): `form` supports multiple values with `foo[]` by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/2639](https://github.com/honojs/hono/pull/2639) #### New Contributors - [@​Amorim33](https://github.com/Amorim33) made their first contribution in [https://github.com/honojs/hono/pull/2585](https://github.com/honojs/hono/pull/2585) **Full Changelog**: honojs/hono@v4.3.2...v4.3.3 ### [`v4.3.2`](https://github.com/honojs/hono/releases/tag/v4.3.2) [Compare Source](https://github.com/honojs/hono/compare/v4.3.1...v4.3.2) #### What's Changed - fix(types): correct inferring when Method has Endponts as Union by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/2610](https://github.com/honojs/hono/pull/2610) **Full Changelog**: honojs/hono@v4.3.1...v4.3.2 ### [`v4.3.1`](https://github.com/honojs/hono/releases/tag/v4.3.1) [Compare Source](https://github.com/honojs/hono/compare/v4.3.0...v4.3.1) #### What's Changed - fix(types): `ToSchema` compatibility by [@​NamesMT](https://github.com/NamesMT) in [https://github.com/honojs/hono/pull/2605](https://github.com/honojs/hono/pull/2605) **Full Changelog**: honojs/hono@v4.3.0...v4.3.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone America/Chicago, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/autoblocksai/cli). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #2653
Since deno checks
.length
as follows, this PR adjustapp.fetch.length
to be 1.https://github.com/denoland/deno/blob/dac49a116e094be1a3048305dfb6b10bbddcc030/ext/http/00_serve.ts#L796-L800
We will be able to use
export default app
fordeno serve
with this PR.This definition may seem a bit odd, but it is not overly complicated; I think the advantage of "you can write
dexport defult app
in deno just as well as in bun" is more significant.The author should do the following, if applicable
[ ] Add testsbun denoify
to generate files for Denobun run format:fix && bun run lint:fix
to format the code