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

Support JSR #2201

Closed
yusukebe opened this issue Feb 13, 2024 · 12 comments
Closed

Support JSR #2201

yusukebe opened this issue Feb 13, 2024 · 12 comments
Labels
enhancement New feature or request.

Comments

@yusukebe
Copy link
Member

What is the feature you are proposing?

A new package repository:

https://jsr.io/

I've already got the namespace:

Screenshot 2024-02-13 at 11 41 16
@yusukebe yusukebe added the enhancement New feature or request. label Feb 13, 2024
@alexgleason
Copy link

It looks like @Kyiro has started this: https://jsr.io/@kyiro/hono/0.1.1/deno.json

How did he do it?

@Kyiro
Copy link
Contributor

Kyiro commented Mar 13, 2024

I described what I did in the discord server but I'll post it here as well:

  • JSR doesn't support global/module type augmentations (yet) so ContextVariableMap can't be augmented and JSX support had to be removed completely
  • Uses "slow types"
  • Publishes from the deno_dist folder instead of src (doesn't really matter except for the fact I forgot to add other adapter code in)

I was pretty much just experimenting, so that's why it's published as version 0.1.1.

@yusukebe
Copy link
Member Author

Thanks @Kyiro

I too would like to make Hono support JSR, but I haven't started working on it yet. Even if we could, I think we would have to figure out the release flow.

@ericlery
Copy link

ericlery commented May 5, 2024

Any news on this?

@alexgleason
Copy link

@ericlery I was just wondering the same thing.

I spent 20 minutes looking at Oak instead. And while I respect it, I concluded that hono is still the best.

Then I added this to my deno.json and pretended it's on JSR:

{
  "imports": {
    "hono": "https://deno.land/x/hono@v4.3.1/mod.ts"
  }
}

@yusukebe
Copy link
Member Author

yusukebe commented May 5, 2024

I'll be working on it for the next minor release.

@nakasyou
Copy link
Contributor

nakasyou commented May 5, 2024

I think that deno_dist will be unnecessary in the future if hono jsr package loads from src.
If you do that, we need to add publish command allowing sloppy-imports flag.

@yusukebe
Copy link
Member Author

I have some ideas. Wait a minute.

@nakasyou
Copy link
Contributor

I have seen people who doesn't know that deno.land/x has been deprecated.
As a solution, what do you think about share to Hono users?
For example, using X is most efficient way. Also publishing new version to deno.land/x with warning message on README is better way.

@yusukebe
Copy link
Member Author

@nakasyou

You are right! I'll work on it. Thank you!

@yusukebe
Copy link
Member Author

yusukebe commented May 31, 2024

@nakasyou

I've added the description for it on the migration guide and the readme: #2879

Plus, announced it on X.

Thanks for your suggestion!

@yusukebe
Copy link
Member Author

Hey! This was really completed by #2662. Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

5 participants