-
Notifications
You must be signed in to change notification settings - Fork 120
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
Publish grammY
to JSR respository
#559
Comments
This will be done with the entire ecosystem, not just the core library. We have to make sure that things stay consistent and compatible. This requires a new build infrastructure. We still want to publish everything to It is currently unclear whether or not we are going to leverage the existing tools we built. We may also want to write a service called jsr2npm that
There are a lot of things to consider here, since people should be able to import grammY
and it should all just work with no further setup. We might have to make the difficult decision to drop support for CJS, but since this commit we might just ship ESM without TLA and require CJS users to pass a flag until it is stable. |
I advocate for writing a custom script that replaces imports with JSR ones, and vendors whatever cannot be replaced. |
Which imports? Do you mean |
Yeah, the support of grammy for ESM is excellent, and JSR provides a very simple way to migrate: https://jsr.io/docs/migrate-x-to-jsr |
@KnorpelSenf Yes, and grammY imports, of course. |
I’m also unsure how JSR handles peer dependencies for Node.js, so I don’t think it’d be good to recommend it for Node.js users (maybe?). |
Yep we're aware how JSR works, the pending question is just if we a) download npm tarballs from JSR and upload them to npm, or a) is much easier, but we depend on an API during build. b) is harder but naturally more reliable. |
I think it could be |
I've noticed, that hono dev doing some work on this too:) honojs/hono#2662 |
Btw, https://github.com/denoland/dnt allows to download a package and make it local in case of it can't be resolved as npm packcage. Also it supports shims and mappings like |
|
As I understand, d2n can't download packages and make it local when it can't be resolved as npm package. |
It can do this, but I don't think we use that feature anyway. If we can't get rid of custom build tooling, then we can switch to JSR immediately and close this issue. Moving to |
I think I would like to go with the following approach:
|
Do you want to spin up whole api and use endpoint or just get the tarball build code? |
Well, at least i want to try:D |
Nice! I'd fork JSR and extract the things myself so that we can work with it. If they accept a contribution upstream, that's great, but I would not want to wait for that. The best way to do this is to isolate the transpilation up to the point that we just need to provide a scope, a name, and a version, and receive a tarball. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@kamikazechaser have you read the above issue? |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
The title is What I am trying to say is that there is no downside to re-publishing this repo to JSR. It is going to go mainstream with Deno heavily investing into it. If you don;t want, I understand and that is fine. |
I think you just have not read this issue 😁 |
I think this is going nowhere. I'll leave it at this. I understand that you want to be consistent with all ecosystems and that is fine. |
@wojpawlik @niusia-ua I think we should not wait for jsr2npm to become a reality. We can start working on v2 before that, and publish beta releases to JSR for the time being. There will be enough time before a major release to figure out how to solve npm compat, so the tool can be written at a later point. In contrast to JSR, npm can actually install things from GH, so we won't even leave npm users behind. |
Issue: pushing a v2 tag will create a release on /x. It has no right to work there, since /x doesn't support import maps. |
Not an issue. We are not going to tag beta releases. We are simply going to push them to JSR without tagging. When 2.0 is released (that will be a big day), we are going to remove the webhook integration with /x and start tagging again. |
1.x releases after 2.0 won't be on /x. Is that ok? |
I'm afraid there's no other way with how /x is designed. Unless we want to temporarily re-add the webhook integration manually for a few seconds while adding a new 1.x tag. That could be an escape hatch if we want to provide further Bot API compatibility releases for 1.x |
s/re-add/re-enable/ |
True, we should disable it instead of removing it. At least as long as we want to support 1.x releases. |
You can use
npm
ordeno
to get packages from JSR.The text was updated successfully, but these errors were encountered: