[RTFACT-14920] When publishing npm packages with --tag <tag> it affects the "latest" tag Created: 11/Sep/17  Updated: 10/Jun/18  Resolved: 28/Jan/18

Status: Resolved
Project: Artifactory Binary Repository
Component/s: NPM
Affects Version/s: 5.4.6
Fix Version/s: 5.9.0

Type: Bug Priority: High
Reporter: Mohammad Tibi Assignee: Gal Ben Ami
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
duplicates RTFACT-14111 npm 'latest' tagging is broken Resolved
relates to RTFACT-8184 `npm publish --tag={tag} not working Resolved
is related to RTFACT-16009 `latest` dist tag does not point back... Resolved
Assigned QA: Nadav Yogev
Epic Link: Q4 Customer Commitments Leap 27
Sprint: Leap 27, Leap 28


When publishing npm packages with --tag <tag> it affects the "latest" tag
When the --tag option is used while publishing a package, it should not set the latest tag to the published version

Steps to reproduce:
1. create a new package.json with version 1.2.0
2.run $ npm publish
3. edit the same package.json, change the version to 1.3.0
4. run $ npm publish --tag next
5. run $npm install <pck-name>@latest

You can see that ,after publishing both versions (“1.3.0” was tagged as next, not latest), when attempting to install the latest, “1.3.0” is installed.
Which should not happen, as the latest is 1.2.0 because we tagged 1.3.0 as next, not latest

Generated at Sun Jan 26 22:24:28 UTC 2020 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.