fix: consider equality in publish dist tag check error message#7993
fix: consider equality in publish dist tag check error message#7993
Conversation
|
It seems like this entire message shouldn't be triggering if the version is equal - isn't there pre-existing logic for "you can't publish a version that's already published" that should be hit? |
|
I was thinking of this as a layer over the registry logic, the same that the front end and back end would implement overlapping validation. I think having this error thrown in the cli here is acceptable rather than intentionally letting them slip through and having the registry handle it, helps with debugging with |
|
In that case I'd expect a totally separate error - not about "latest" but about re-publishing an already-published version. |
Until npm 11 the cli did not have this information on publish. It send the new packument to the registry and all errors happened there. |
If anyone else is curious, the fetch of the existing packument was added in e2f4455 (and then updated in this PR) |
|
moving to another pr |
Currently the message for if it's the same version is wrong: