drone-plugins / drone-npm

Drone plugin for publishing packages to NPM
http://plugins.drone.io/drone-plugins/drone-npm
Apache License 2.0
20 stars 18 forks source link

Fix for default case of using GlobalRegistry with a token #52

Closed tlee21 closed 5 years ago

tlee21 commented 5 years ago

Pull Request #50 appears to have caused a regression that prevents usage of GlobalRegistry with a token.

Please see issue #51 for details of the error. A test has also been included to show how it was failing.

Proposed solution

GlobalRegistry now needs to follow the conventions from #50 to include an '/' at the end.

lafriks commented 5 years ago

Other option would be probably check at https://github.com/drone-plugins/drone-npm/pull/52/files#diff-70e973989f81df39acd35aa417b206bcR284 that if Registry does not end with / than append it to it, so that if custom registry is provided http://custom.npm.registry it would not also fail with same problem

tlee21 commented 5 years ago

For the sake of other folks who may have already specified a custom url like that, we should do it anyways. Added the check + append for that case, as well as corresponding test cases.

natlibfi-arlehiko commented 5 years ago

:+1: for the fix. Waiting for the merge since we currently cannot publish anything to NPM.