georgy / nexus-npm-repository-plugin

Sonatype Nexus OSS plugin for npm (https://www.npmjs.org) repository suport
25 stars 7 forks source link

Construct tarball url for beta versions correctly #17

Closed scarlucci closed 10 years ago

scarlucci commented 10 years ago

https://issues.sonatype.org/browse/NX-634

When converting the tarball url for npm packages from the remote url to the Nexus url, an assumption was made about the tarball filename that was incorrect for beta versions.

For example, the tarball for the handlebars@1.0.5-beta version is supposed to be: .../handlebars/-/handlebars-1.0.5beta.tgz

but Nexus was constructing it as: .../handlebars/-/handlebars-1.0.5-beta.tgz

cstamas commented 10 years ago

Am unsure about this fix, as IMHO this is more about https://github.com/georgy/nexus-npm-repository-plugin/issues/12 (that would include support for "non standard" URLs too, not only off-site ones) ....

If you look at package metadata here (search for 1.0.5 beta): http://registry.npmjs.org/handlebars

You will see that metadata states:

 "version" : "1.0.5-beta"

so, the version contains the dash, while the tarball path seems non-standard....

In general, am +1 for this change, we will tackle the off-site URLs later anyway... just wanted to point out that in this case, package handlebars does some funky thing.

jdillon commented 10 years ago

The handlebars 1.0.5-beta package has a tarball entry, so it would just use the bits after the last / in the url, whatever it is (standard or non-standard) IIUC