Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4.1k
Add the discord.js to JSR#10460
-
List discord.js onJSR. This would simplify package management for Discord bot developers and increase the library's visibility. |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment 9 replies
-
Good idea. I visited the website, and the style is better than npm. Discord.js team should really do this. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I will give my two cents, in no particular order...
|
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks for sharing your thoughts! You’re absolutely right that TypeScript sources can totally be published to npm too. That said, JSR does have some interesting benefits that make it worth considering. On dependency optimization, JSR usesES modules (ESM) natively, which skips the whole For security, JSR benefits from Deno’s approach, where packages don’t get unrestricted access to the system by default. That’s a nice layer of protection compared to traditional package managers. I get the point about needing a CLI to pull dependencies outside of Deno, that’s definitely not ideal yet. But I think early adoption could help push for improvements that make it smoother for everyone in the long run. Here are a couple of links with more details if you’re curious: |
BetaWas this translation helpful?Give feedback.
All reactions
-
To me, this sounds more like a reasoning for using Deno instead of a reasoning for using JSR or rather publishing to JSR.
You can totally use discord.js as ES module in Node.js (which is what I do in all of my bots, that are still using Node). Afaik, JSR just doesn't allow CommonJS (except for the packages dependencies). Also, if you use Node.js, you will have the
That also sounds rather like a Deno thing. I don't think the permission system will get used in Node.js if you use Regarding the links, the TL;DR: I think the message from about 35 minutes ago is mostly about Deno, and not about JSR. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Fair point, I probably leaned too much into Deno comparisons earlier. My intention was to highlight some of the benefits JSR could bring, even for Node.js users, like native ESM support and avoiding the
Yeah, that’s a great point, it’s more about the runtime. I get that Node.js will still use
Totally agree. Even though this security layer is more relevant to Deno right now, I think supporting JSR could encourage similar improvements for Node.js over time. It’s not about forcing anyone into that system, but the idea of stricter package security is definitely a step in the right direction, and I’d love to see it evolve.
That’s fair, those links weren’t great, I’ll admit. I’ll skip linking and stick to explaining directly this time, which probably makes for a clearer case anyway.
Yeah, I see where you’re coming from, and I agree my earlier comment veered too much into Deno territory. I just wanted to bring up how JSR could offer something new for Node.js users too, things like ESM-native handling and tighter security aren’t tied exclusively to Deno. Hopefully, this clears things up and makes a better case for why publishing discord.js on JSR could be worth considering! |
BetaWas this translation helpful?Give feedback.
All reactions
-
You cleared nothing up at all. You acknowledged that ESM native is already possible in Node.js independent of where the package is published. And you acknowledged that the security aspect didn’t apply to Node.js. So please enlighten me on
Because you keep on repeating the same buzzwords sounding like a salesman for that package repository or - even worse - an AI. |
BetaWas this translation helpful?Give feedback.