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

Also publish to JSR? #740

Open
imcotton opened this issue Sep 13, 2024 · 2 comments
Open

Also publish to JSR? #740

imcotton opened this issue Sep 13, 2024 · 2 comments

Comments

@imcotton
Copy link

From the Hono document:

If you want to use Third-party Middleware with the TypeScript Type inferences, you need to use the npm: specifier. 1

For package like npm:@hono/valibot-validator, this holding my back from using Hono from JSR by:

  • jsr:@hono/hono
  • jsr:@valibot/valibot

Any plans to have middleware packages also available on JSR too?

Footnotes

  1. https://hono.dev/docs/getting-started/deno#npm-specifier

@yusukebe
Copy link
Member

Hi @imcotton

Supporting JSR is great. But there are some reasons I can't do it now:

  • Making them support JSR will be hard. Especially removing slow types.
  • Have to create deploy flow. I'm unsure if we can create a good flow to publicize them with Changesets.
  • Maintenance costs will be increased. We(almost I) must also check the JSR things by adding npm packages.

@imcotton
Copy link
Author

I think slow types is OK-ish for just publish with --allow-slow-types if it cost too much of effort.

Flow-wise, I think it'd be done by:

  • having one corresponding jsr.json file
  • add deno publish or npx jsr publish right after the npm publish on its CI

Maintenance indeed increased, but if I'm not missing anything else, above only be one time setup per package and then automatically carried afterwards.

Not sure the jsr:@hono/* is the intended place to publish these middleware, but right now it rather empty since only hosting the jsr:@hono/hono and nothing else.

I understand this is low priority and still up to decisions, in the meantime I could vendor the TypeScript source code by coping into my own project, but thought it worth to brought up to discussion, thanks for the participation.

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

No branches or pull requests

2 participants