Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure, it's not a "Package Manager" by JavaScript nomenclature, where apparently the package manager refers only to the client side piece. Instead it's apparently a "Package Manager" and a "Package Registry"… which most other environments just call a "package manager".

As a non-JavaScript developer, drawing this distinction feels incredibly silly to me…



Well... go ahead and try installing JSR on your local machine. You can't, because JSR is a website. Let's do the inverse and try installing a package from pnpm.io! You can't, because the only thing available for download on that website is pnpm itself.

pnpm lets you download packages to your computer -- a "manager", if you will. JSR gives you a centralized place to find packages at -- a "registry", if you will. We use different words because these two things are not interchangeable and it's not just a JS thing.


They are completely separate concerns! Why would they necessarily be tightly coupled? Assuming use of an npm package registry (the default public one at npmjs.org, or a private one like jfrog artifactory), there's nothing "silly" about using a pnpm client instead of npm (or yarn).


I mean the exact same distinction is drawn in the Linux space: dpkg/apt and pacman and dnf and opkg are package managers, while Debian's repos and Ubuntu's repos and Arch Linux's repos and Alpine's repos and Fedora's repos and Red Hat's repos are "package registries". It's a natural distinction to draw IMO, even if some tools have a hard-coded "package registry" URL.


There's one primary tool¹ to access these "package registries" (repositories) though, and it's a 1:n relationship with the tool being generally able to use more than one repository. JavaScript seems to be doing n:1 instead with a whole bunch of frontends to npm.js? And the "special" thing about JSR is that it additionally(?) has its own repo?

Put differently — the tool is the standard, and you have a choice of repos. In JS it's the other way around?

I would describe the JS situation as… hmm… "oddly tilted" in comparison to other ecosystems; the closest thing I can think of is Python's package management situation?

[¹] I'm not counting GUI frontends here, since I'm relatively sure they just call into the same tool.


apt-get, the modern apt command, aptitude...

yum, dnf...

The package registries also have multiple. Sticking with apt repos, Ubuntu has one per release, Debian has one per release, Mint has one per release...

So it's an n:n situation.


> "relatively sure" Sorry, but you're flat-out incorrect. See e.g. https://pnpm.io/motivation

See also my response to your earlier comment; in the npm ecosystem you can choose your package registry, and your package manager/client, not to mention your target runtime. Coupling any of these distinct concepts is not the norm.


> Sorry, but you're flat-out incorrect.

I was talking about the non-JS world, i.e. tools like aptitude and Ubuntu's GUI package manager.


Rust's Cargo and crates.io are separate, just as another example.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: