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

feat(request): Make request.ts available throught JSR for frameworks that need to instantiate HonoRequest #3425

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

Sorikairox
Copy link
Contributor

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

@yusukebe
Copy link
Member

Hey @Sorikairox

Thank you for the PR! The request.ts is not exported for the npm package, not only for Deno. I want to know the situation if you want to use the HonoRequest class. Can you share the use case for using the HonoRequest class?

@Sorikairox
Copy link
Contributor Author

@yusukebe

Thanks for your answer !

The context is for our framework Danet (https://github.com/savory/Danet).

For the past 12 months or so until last week, we were using Hono's deno.land/x/ version, where everything was accessible.
I decided to migrate to JSR, which is why I noticed that the class was not accessible.

To keep it simple, in order to allow our internal logic and our users to use the same code with either HTTP request or Websocket message, we instantiate a HonoRequest for the latter.

Copy link

codecov bot commented Sep 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.77%. Comparing base (dfbd717) to head (6fa0db1).
Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3425   +/-   ##
=======================================
  Coverage   95.77%   95.77%           
=======================================
  Files         155      155           
  Lines        9310     9310           
  Branches     2725     2757   +32     
=======================================
  Hits         8917     8917           
  Misses        393      393           

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

@yusukebe yusukebe changed the title Make request.ts available throught JSR for frameworks that need to instantiate HonoRequest feat(request): Make request.ts available throught JSR for frameworks that need to instantiate HonoRequest Sep 21, 2024
Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

@Sorikairox

Thank you for your explanation! I understood well. I'll merge this into main later and include it in the next patch release. In the npm package, the request.ts also may be exported.

@yusukebe yusukebe merged commit 27961dc into honojs:main Sep 24, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants