Open oliamb opened 9 years ago
Official NPM documentation states in multiple location that npm publish should update the latest tag by default:
Yes, it should (unless other tag is specified).
What npm version do you use? It works fine for me with npm@2
.
I'm using 1.4.3 at this time. Will give a try to a 2. version.
Le 11 nov. 2014 à 03:10, Alex Kocharin notifications@github.com a écrit :
Official NPM documentation states in multiple location that npm publish should update the latest tag by default:
Yes, it should (unless other tag is specified).
What npm version do you use? It works fine for me with npm@2.
— Reply to this email directly or view it on GitHub.
Just tried with npm@2, same issue. When I query for the package, dist_tags is in the same state than before the publication (either empty or with the previously manually tagged version).
You could take a look into storage/{package}/package.json
to see what is actually tagged there.
We have a bit different behavior from npm, and if you publish two versions, they would both be tagged "latest", and it'll return the highest one. So if you publish 0.1.2
and then 0.1.0
, latest would still be 0.1.2
.
But I don't know why are you getting 0.1.0
as the latest. Also, I can't reproduce it.
You can also try latest sinopia with default config just to be sure.
I have the same problem. Published 0.1.0, then 0.1.1, but Sinopia continued to return 0.1.0 as the latest version.
In Sinopia registry file "package.json" contained two version blocks (0.1.0 and 0.1.1) in "versions", two blocks in "_attachments". But "latest" in "dist-tags" contained only 0.1.0:
"dist-tags": {
"latest": [
"0.1.0"
]
},
I manually added 0.1.1 and now it works fine.
Got the same issue again. $ sinopia -V 1.4.0 $ nodejs -v v0.12.7 $ npm -v 2.11.3
We have several packages in active development (published several times a day). Two different packages were affected.
Second package version was 0.3.0, then 0.3.2 was published, but "dist-tags"->"latest" was not updated.
This is a series problem: production relase is using the wrong version if it's using the 'latest' tag.
npm show xxxx
{ name: 'xxxx',
versions:
[ '1.5.28',
'1.5.29',
'1.5.30',
'1.5.31',
'1.5.32' ],
'dist-tags': { latest: '1.5.31' },
version: '1.5.31',
...
Once I have a
latest
version tag defined (0.1.0 for example), it won't be overridden when I publish version0.1.2
version usingnpm publish
.Steps to reproduce:
npm publish
commandnpm show my-app-name
--> check thatdist-tags.latest
property in the response is "0.1.0"npm publish
commandnpm show my-app-name
[expected]
dist-tags.latest
property in the response is "0.1.2" [actual]dist-tags.latest
property is still "0.1.0"Official NPM documentation states in multiple location that
npm publish
should update the latest tag by default:If someone can confirm me that this is an actual issue rather than something wrong in my setup, I would be glad to submit a patch.