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

[POC] feat: Hono Action #3973

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

[POC] feat: Hono Action #3973

wants to merge 14 commits into from

Conversation

yusukebe
Copy link
Member

@yusukebe yusukebe commented Mar 4, 2025

WIP

This comment has been minimized.

Copy link

github-actions bot commented Mar 4, 2025

Bundle size check

main (8796371) #3973 (1b87e41) +/-
Bundle Size (B) 18,958B 19,005B 47B
Bundle Size (KB) 18.51K 18.56K 0.05K

Compiler Diagnostics

main (8796371) #3973 (1b87e41) +/-
Files 261 261 0
Lines 116,442 116,454 12
Identifiers 114,436 114,460 24
Symbols 303,841 303,858 17
Types 214,827 214,834 7
Instantiations 3,091,598 3,091,598 0
Memory used 453,418K 454,498K 1,080K
I/O read 0.02s 0.02s 0s
I/O write 0s 0s 0s
Parse time 0.81s 0.71s -0.1s
Bind time 0.36s 0.3s -0.06s
Check time 5.69s 5.87s 0.18s
Emit time 0s 0s 0s
Total time 6.86s 6.88s 0.02s

Reported by octocov

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 6.54206% with 200 lines in your changes missing coverage. Please review.

Project coverage is 89.66%. Comparing base (8796371) to head (71cdc6a).

Files with missing lines Patch % Lines
src/jsx/action/index.ts 0.00% 104 Missing ⚠️
src/jsx/action/client.ts 0.00% 93 Missing ⚠️
src/utils/url.ts 77.77% 2 Missing ⚠️
src/jsx/intrinsic-element/components.ts 75.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (6.54%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3973      +/-   ##
==========================================
- Coverage   91.29%   89.66%   -1.63%     
==========================================
  Files         168      170       +2     
  Lines       10772    10895     +123     
  Branches     3057     3029      -28     
==========================================
- Hits         9834     9769      -65     
- Misses        937     1125     +188     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yusukebe
Copy link
Member Author

yusukebe commented Mar 4, 2025

Hey @usualoma !

Shall we work on Hono Action as just POC? I think Hono Action will be super helpful with using HonoX.

In this PR, it throws the following error. Can you take a look at it?

App:

import { Hono } from '../../src'
import { createAction } from '../../src/jsx/action'
import { jsxRenderer } from '../../src/middleware/jsx-renderer'

const renderer = jsxRenderer(
  ({ children }) => {
    return (
      <html>
        <body>
          <main>{children}</main>
        </body>
      </html>
    )
  },
  {
    stream: true,
  }
)

const app = new Hono()

app.use(renderer)

const [action, Component] = createAction(app, async (data, c) => {
  return <></>
})

app.get('/', (c) => {
  return c.render(
    <section>
      <form>
        <Component />
      </form>
    </section>
  )
})

export default app

Error:

CleanShot 2025-03-04 at 16 33 49@2x

@usualoma
Copy link
Member

usualoma commented Mar 5, 2025

I'll check; give me a few days.

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.

2 participants