Description
Hello,
When unpublishing a package into an internal repository (such as artifactory) where the registry contains a path, the tarballUrl bellow (unpublish.js:71) will be wrong as it will contain the full registry path
const tarballUrl = url.parse(dist.tarball).pathname.substr(1)
Example :
C:>npm unpublish [email protected] --verbose --force --registry https://artifactory.example.com/api/npm/npm-snapshots/
npm info it worked if it ends with ok
npm verb cli [ 'C:\Tools\node-v10.16.3-win-x64\node.exe',
npm verb cli 'C:\Tools\node-v10.16.3-win-x64\node_modules\npm\bin\npm-cli.js',
npm verb cli 'unpublish',
npm verb cli '[email protected]',
npm verb cli '--verbose',
npm verb cli '--force',
npm verb cli '--registry',
npm verb cli 'https://artifactory.example.com/api/npm/npm-snapshots/' ]
npm info using [email protected]
npm info using [email protected]
npm WARN using --force I sure hope you know what you are doing.
npm verb npm-session 501f69ac7af05ab3
npm http fetch GET 200 https://artifactory.example.com/api/npm/npm-snapshots/my-app?write=true 372ms
npm http fetch PUT 200 https://artifactory.example.com/api/npm/npm-snapshots/my-app/-rev/1-0 44ms
npm http fetch GET 304 https://artifactory.example.com/api/npm/npm-snapshots/my-app?write=true 93ms
npm http fetch DELETE 200 https://artifactory.example.com/api/npm/npm-snapshots/api/npm/npm-snapshots/my-app/-/my-app-1.0-SNAPSHOT.tgz/-rev/1-0 79ms
[email protected]
npm verb exit [ 0, true ]
npm timing npm Completed in 5982ms
npm info ok
The last DELETE fetch is wrong the registry path has been duplicated