Npmjs seems to order versions by publish date, not by semantic versioning


(Kurtis Rainbolt Greene) #1

When I published v11.0.0 it was with the intent of releasing something that I had forgotten to release. I didn’t expect it to be the literally the last thing I published.

This is extra confusing when I see this:

𝑓 npm outdated
Package                      Current  Wanted  Latest  Location
@unction/allobjectp           12.0.0  12.0.0  11.0.0  blank-browser-react

On the slack I posited this question: If I have version 5.0.0 and version 6.0.0 with a bug, and I release 6.0.1, then realize I can fix v5 and release 5.0.1, the latest is…5.0.1?

(Matt Travi) #2

Every time you publish, the version is tagged as latest by default. If you don’t want it to be tagged that way, you can publish with a dist-tag for something other than latest. You can also modify the tags after the fact, if you change your mind after publishing.

(Kat Marchán) #3

This is working as designed and intended: the weirdness comes from a workflow that is exceptionally rare (people upgrading older semver versions).

Since this is more of a UX issue and is intentional, it would be interesting to get something in #ideas:rfcs about how specifically it could be improved, with suggestions specifically covering CLI installation, npm outdated/npm update, and the specifics of UX on the website itself.

I’ll also note that any changes to this are likely to be breaking changes.

I’ve moved this from #bugs to #support because I think it’s primarily from a misunderstanding/UX footgun, and @travi gave a pretty good answer as far as letting OP get back on track (the question of the larger UX concern aside).

(system) #4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.