Open sanjayc-jfrog opened 11 months ago
For me, this is also clearly a bug but I found a Help Center article on this topic mentioning the JFrog CLI publishing as a workaround. This seems to be very weird to me.
I'd be really glad to have at least an option to enable the default npm publish behaviour, like jf npm publish --fail-if-exists
.
Describe the bug
When we publish a npm package which is already present in Artifactory using Jfrog CLI, The CLI allows to publish the same package which has same name and versioning but when we do the same with NPM client it will not allow to publish the package with same name and version and returns 403.
Current behavior
jf npm publish
allows packages to be published in Artifactory which NPM Client does not support which cause discrepancy to Customers. Ideally when we publish a package with same name and version in Artifactory usingnpm publish
the NPM client will give a 403 error but when we publish a package with same name and version in Artifactory using 'jf npm publish' which allows package to be published in Artifactory.Reproduction steps
jf c add
command.jf npm-config
command.jf npm publish
command.Below is the package.json file. { "name": "@testproject/test", "version": "2026.0.1+1000", "description": "sample project", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "sample", "license": "ISC" }
Expected behavior
Jfrog CLI should return a 403 response when we try to publish a package which is already exist with same name and version.
JFrog CLI version
2.46
Operating system type and version
Arm64/linux
JFrog Artifactory version
NA
JFrog Xray version
No response