Skip to content

Commit

Permalink
chore: bump hono (#354)
Browse files Browse the repository at this point in the history
* chore: bump hono

* chore: changesets

* fix: override

* fix: type issues

* nit: lint

* chore: bump hono peerdep in src/

* fix: type issues
  • Loading branch information
dalechyn authored Jun 10, 2024
1 parent 8286f21 commit e1d5597
Show file tree
Hide file tree
Showing 17 changed files with 103 additions and 75 deletions.
5 changes: 5 additions & 0 deletions .changeset/eleven-pigs-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"frog": patch
---

Bumped `hono` and related packages versions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"bun": "^1.0.28",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"hono": "^4",
"hono": "^4.4.4",
"picocolors": "^1.0.0",
"rimraf": "^5.0.5",
"tsx": "^4.7.1",
Expand All @@ -51,7 +51,7 @@
"packageManager": "pnpm@8.15.3",
"pnpm": {
"overrides": {
"hono": "4.1.0",
"hono": "4.4.4",
"typescript": "5.3.3"
}
}
Expand Down
83 changes: 44 additions & 39 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from 'hono/jsx/jsx-runtime'
import type { HtmlEscapedString } from 'hono/utils/html'

export const buttonPrefix = {
Expand Down
2 changes: 2 additions & 0 deletions src/components/TextInput.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { JSX } from 'hono/jsx/jsx-runtime'

export type TextInputProps = {
placeholder?: string | undefined
}
Expand Down
1 change: 1 addition & 0 deletions src/jsx/jsx-dev-runtime/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type JSXNode, jsx } from 'hono/jsx'
export type { JSX } from 'hono/jsx/jsx-runtime'
import type { HtmlEscapedString } from 'hono/utils/html'
export { Fragment } from 'hono/jsx'

Expand Down
2 changes: 1 addition & 1 deletion src/jsx/jsx-runtime/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { jsxDEV as jsx, Fragment } from '../jsx-dev-runtime/index.js'
export { jsxDEV as jsx, Fragment, type JSX } from '../jsx-dev-runtime/index.js'
export { jsxDEV as jsxs } from '../jsx-dev-runtime/index.js'

import { html, raw } from 'hono/html'
Expand Down
11 changes: 4 additions & 7 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
}
},
"peerDependencies": {
"hono": "^4",
"hono": "^4.4.4",
"typescript": ">=5.0.4"
},
"peerDependenciesMeta": {
Expand All @@ -100,8 +100,8 @@
},
"dependencies": {
"@bufbuild/protobuf": "^1.7.2",
"@hono/node-server": "^1.8.2",
"@hono/valibot-validator": "^0.2.2",
"@hono/node-server": "^1.11.2",
"@hono/valibot-validator": "^0.3.0",
"@noble/curves": "^1.3.0",
"@noble/hashes": "^1.3.3",
"cac": "^6.7.14",
Expand All @@ -121,10 +121,7 @@
"license": "MIT",
"homepage": "https://frog.fm",
"repository": "wevm/frog",
"authors": [
"awkweb.eth",
"jxom.eth"
],
"authors": ["awkweb.eth", "jxom.eth"],
"funding": [
{
"type": "github",
Expand Down
1 change: 1 addition & 0 deletions src/types/frame.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type ImageResponseOptions } from 'hono-og'
import type { JSX } from 'hono/jsx/jsx-runtime'
import type { Hash } from 'viem'
import type { TypedResponse } from './response.js'
import type { Pretty } from './utils.js'
Expand Down
1 change: 1 addition & 0 deletions src/types/image.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from 'hono/jsx/jsx-runtime'
import type { ImageOptions } from './frame.js'
import type { TypedResponse } from './response.js'

Expand Down
10 changes: 8 additions & 2 deletions src/types/routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// NOTE: THIS IS A FORK OF https://github.com/honojs/hono/blob/139e863aa214118397e442329121f8f39833b2f9/src/types.ts

import type { Context as Context_hono } from 'hono'
import type { StatusCode } from 'hono/utils/http-status'
import type {
IfAnyThenEmptyObject,
RemoveBlankRecord,
Expand Down Expand Up @@ -1490,13 +1491,18 @@ export type ToSchema<
}
}

export type KnownResponseFormat = 'json' | 'text' | 'redirect'
export type ResponseFormat = KnownResponseFormat | string

export type Schema = {
[Path: string]: {
[Method: `$${Lowercase<string>}`]: {
input: Partial<ValidationTargets> & {
param?: Record<string, string>
param?: Record<string, string | undefined>
}
output: any
outputFormat: ResponseFormat
status: StatusCode
}
}
}
Expand Down Expand Up @@ -1589,7 +1595,7 @@ export type ValidationTargets = {
json: any
form: Record<string, string | File>
query: Record<string, string | string[]>
param: Record<string, string>
param: Record<string, string> | Record<string, string | undefined>
header: Record<string, string>
cookie: Record<string, string>
}
Expand Down
1 change: 1 addition & 0 deletions src/ui/Box.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from 'hono/jsx/jsx-runtime'
import type {
Child,
Direction,
Expand Down
1 change: 1 addition & 0 deletions src/ui/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from 'hono/jsx/jsx-runtime'
import { Box, type BoxProps } from './Box.js'
import type { Child } from './types.js'
import type { DefaultVars, Vars } from './vars.js'
Expand Down
1 change: 1 addition & 0 deletions src/ui/createSystem.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from 'hono/jsx/jsx-runtime'
import type { Assign } from '../types/utils.js'
import { Box } from './Box.js'
import { Column, Columns } from './Columns.js'
Expand Down
1 change: 1 addition & 0 deletions src/ui/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Properties } from 'csstype'
import type { JSX } from 'hono/jsx/jsx-runtime'

export type Child = import('hono/jsx').Child | JSX.Element

Expand Down
2 changes: 2 additions & 0 deletions src/utils/parseImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export async function parseImage(
)) as Child
if (node_ instanceof Promise) return await node_

if (node_ === null) return null

let node = node_
const direction =
(node.tag as unknown as { direction: Direction } | undefined)?.direction ??
Expand Down
Loading

0 comments on commit e1d5597

Please sign in to comment.