honojs / middleware

monorepo for Hono third-party middleware/helpers/wrappers
https://hono.dev
478 stars 173 forks source link

Also publish to JSR? #740

Open imcotton opened 2 months ago

imcotton commented 2 months ago

From the Hono document:

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

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

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

yusukebe commented 2 months ago

Hi @imcotton

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

imcotton commented 2 months ago

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:

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.

ingokpp commented 1 month ago

+1 For JSR support. I really like the idea of not using npm at all in my deno project.

dmint789 commented 1 month ago

+1 too. Would be nice to have the @hono/zod-validator package on there.

azohra commented 1 week ago

Took me longer than I care to admit to figure out these were not on JSR and that I had to use NPM. I am a newer Deno user and I can absolutely appreciate it may not be worth the effort to cross-publish.

My small ask would be if updating the docs to indicate that the 3rd party portions are only available on NPM. Happy to make a PR if this would be a desired outcome.