Open karlhorky opened 8 months ago
Agree, would be cool to see direct integration with JSR in other package managers. We provided this tiny cli here to start from somewhere and to show what the workflow can look like. Now that JSR is out to the public we're hoping that other package managers would be open to consider supporting JSR directly. Happy to see that some discussions are already happening on how to support multiple registries.
Marking as question, because there is nothing to do on our end for now in JSR.
Problem
If I take
@mxdvl/valibot
as an example, the commands are varied in DX:Deno: nice, 3 words, just like using npm registry packages with npm/Yarn/pnpm
All other package managers: verbose and hard to remember:
Proposal
Contribute / propose features to all common package managers npm, pnpm, yarn, bun to allow for simple 3-word commands with better DX:
Fallback to npm feature: If the package is not found in jsr.io's registry, then the npm registry will be searched, using the rules that jsr currently uses
This may require some sort of:
...or maybe package managers already have both these features? If so, maybe that should be suggested as the first way to install the package instead of the
npx
,bunx
,dlx
commands above...? 🤔Alternatives considered
Add a small global
jsr
binary that will add/update/remove the package with your current package manager, similar to CorepackRelevant discussion is happening recently about Corepack's
"packageManager"
field:"packageManager"
doesn't support npm https://github.com/nodejs/node/issues/51888"packagemanager"
field is too limited https://github.com/nodejs/corepack/issues/402