You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way to define peer dependencies for packages published on JSR.
This is a major problem if we're authoring a package for React or Effect, where we want the end-user to be able to use different versions of React without errors.
Currently all dependencies are handled like direct dependencies, and in Deno there is no concept of peer dependencies.
Nonetheless, there should be some way to add peer dependencies, otherwise you simply can't publish usable packages on JSR for React, Effect + many other ecosystem libraries.
The text was updated successfully, but these errors were encountered:
Peer dependencies and regular dependencies are pretty much the same (also in NPM). Peer dependencies are just regular dependencies with very broad version ranges. As long as the version range of your dependency is broad, you will not get a duplicate copy.
This is actually exactly what npm does right now too. Since NPM version 7, peerDependencies and dependencies in package.json are actually treated in exactly the same way.
Okay, I didn't actually know that, thanks!! So basically let's say I wanna have end-users of my package able to use any effect@3 version, I should just do deno add npm:effect@3, then republish on JSR, and then there will no longer be any issues with having to install the exact same version?
Might be helpful to write a docs page on JSR or something, I don't think this is understood by most devs :D
Currently there is no way to define peer dependencies for packages published on JSR.
This is a major problem if we're authoring a package for React or Effect, where we want the end-user to be able to use different versions of React without errors.
Currently all dependencies are handled like direct dependencies, and in Deno there is no concept of peer dependencies.
Nonetheless, there should be some way to add peer dependencies, otherwise you simply can't publish usable packages on JSR for React, Effect + many other ecosystem libraries.
The text was updated successfully, but these errors were encountered: