fix(types): param in ValidationTargets supports optional param#3229
Merged
fix(types): param in ValidationTargets supports optional param#3229
param in ValidationTargets supports optional param#3229Conversation
yusukebe
commented
Aug 3, 2024
|
|
||
| export type Endpoint = { | ||
| input: Partial<ValidationTargets> | ||
| input: any |
Member
Author
There was a problem hiding this comment.
Relaxing the type. It's not necessary to be strict.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3229 +/- ##
=======================================
Coverage 96.21% 96.21%
=======================================
Files 151 151
Lines 15096 15096
Branches 2656 2665 +9
=======================================
Hits 14524 14524
Misses 572 572 ☔ View full report in Codecov by Sentry. |
adamnolte
referenced
this pull request
in seekoai/cli
Aug 9, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [hono](https://hono.dev/) ([source](https://togithub.com/honojs/hono)) | [`4.5.1` -> `4.5.4`](https://renovatebot.com/diffs/npm/hono/4.5.1/4.5.4) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>honojs/hono (hono)</summary> ### [`v4.5.4`](https://togithub.com/honojs/hono/releases/tag/v4.5.4) [Compare Source](https://togithub.com/honojs/hono/compare/v4.5.3...v4.5.4) ##### What's Changed - fix(jsx): corrects the type of 'draggable' attribute in intrinsic-elements.ts by [@​yasuaki640](https://togithub.com/yasuaki640) in [https://github.com/honojs/hono/pull/3224](https://togithub.com/honojs/hono/pull/3224) - feat(jsx): allow to merge CSSProperties declaration by [@​jonasnobile](https://togithub.com/jonasnobile) in [https://github.com/honojs/hono/pull/3228](https://togithub.com/honojs/hono/pull/3228) - feat(client): Add WebSocket Provider Integration Tests and Enhance WebSocket Initialization by [@​naporin0624](https://togithub.com/naporin0624) in [https://github.com/honojs/hono/pull/3213](https://togithub.com/honojs/hono/pull/3213) - fix(types): `param` in `ValidationTargets` supports optional param by [@​yusukebe](https://togithub.com/yusukebe) in [https://github.com/honojs/hono/pull/3229](https://togithub.com/honojs/hono/pull/3229) ##### New Contributors - [@​jonasnobile](https://togithub.com/jonasnobile) made their first contribution in [https://github.com/honojs/hono/pull/3228](https://togithub.com/honojs/hono/pull/3228) **Full Changelog**: honojs/hono@v4.5.3...v4.5.4 ### [`v4.5.3`](https://togithub.com/honojs/hono/releases/tag/v4.5.3) [Compare Source](https://togithub.com/honojs/hono/compare/v4.5.2...v4.5.3) #### What's Changed - fix(validator): Add double quotation marks to multipart checker regex by [@​CPlusPatch](https://togithub.com/CPlusPatch) in [https://github.com/honojs/hono/pull/3195](https://togithub.com/honojs/hono/pull/3195) - fix(validator): support `application/json` with a charset as JSON by [@​yusukebe](https://togithub.com/yusukebe) in [https://github.com/honojs/hono/pull/3199](https://togithub.com/honojs/hono/pull/3199) - fix(jsx): fix handling of SVG elements in JSX. by [@​usualoma](https://togithub.com/usualoma) in [https://github.com/honojs/hono/pull/3204](https://togithub.com/honojs/hono/pull/3204) - fix(jsx/dom): fix performance issue with adding many new node listings by [@​usualoma](https://togithub.com/usualoma) in [https://github.com/honojs/hono/pull/3205](https://togithub.com/honojs/hono/pull/3205) - fix(service-worker): refer to `self.fetch` correctly by [@​yusukebe](https://togithub.com/yusukebe) in [https://github.com/honojs/hono/pull/3200](https://togithub.com/honojs/hono/pull/3200) #### New Contributors - [@​CPlusPatch](https://togithub.com/CPlusPatch) made their first contribution in [https://github.com/honojs/hono/pull/3195](https://togithub.com/honojs/hono/pull/3195) **Full Changelog**: honojs/hono@v4.5.2...v4.5.3 ### [`v4.5.2`](https://togithub.com/honojs/hono/releases/tag/v4.5.2) [Compare Source](https://togithub.com/honojs/hono/compare/v4.5.1...v4.5.2) #### What's Changed - fix(helper/adapter): don't check `navigator` is `undefined` by [@​yusukebe](https://togithub.com/yusukebe) in [https://github.com/honojs/hono/pull/3171](https://togithub.com/honojs/hono/pull/3171) - fix(types): handle readonly array correctly by [@​m-shaka](https://togithub.com/m-shaka) in [https://github.com/honojs/hono/pull/3172](https://togithub.com/honojs/hono/pull/3172) - Revert "fix(helper/adapter): don't check `navigator` is `undefined` by [@​yusukebe](https://togithub.com/yusukebe) in [https://github.com/honojs/hono/pull/3173](https://togithub.com/honojs/hono/pull/3173) - fix(type): degradation of generic type handling by [@​m-shaka](https://togithub.com/m-shaka) in [https://github.com/honojs/hono/pull/3138](https://togithub.com/honojs/hono/pull/3138) - fix:(csrf) fix typo of csrf middleware by [@​yasuaki640](https://togithub.com/yasuaki640) in [https://github.com/honojs/hono/pull/3178](https://togithub.com/honojs/hono/pull/3178) - feat(secure-headers): remove "X-Powered-By" should be an option by [@​EdamAme-x](https://togithub.com/EdamAme-x) in [https://github.com/honojs/hono/pull/3177](https://togithub.com/honojs/hono/pull/3177) **Full Changelog**: honojs/hono@v4.5.1...v4.5.2 </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 was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/autoblocksai/cli). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM4LjE4LjE3IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This was referenced Sep 17, 2024
1 task
This file contains hidden or 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
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 #3227
In the current branch,
paramwill beRecord<string, string> | Record<string, string | undefined>regardless of whether the value of path param is optional or not. With this PR, the value type will bestringby default, but it will bestring | undefinedif it is optional.The author should do the following, if applicable
bun run format:fix && bun run lint:fixto format the code