mbrevoort / node-reggie

An experimental light weight alternative to a full blown npm registry
416 stars 50 forks source link

Publish with version number which is previously published overrides previous version #19

Open trygve-lie opened 11 years ago

trygve-lie commented 11 years ago

NPM will complain if one try to publish an package with the same version number as a previously published package:

Example:

npm ERR! publish fail Cannot publish over existing version.
npm ERR! publish fail Update the 'version' field in package.json and try again.

Reggie silently publishes the package and overrides the old version. In my humble opinion I think Reggie should follow NPM on this. Its very easy to forget to up a version number when publishing and if its forgotten its good that the registry complains.

If this is a wanted feature I can take a stab at it and make a pull request.

bajtos commented 11 years ago

Thanks for reporting the issue.

I think Reggie should follow NPM on this.

Absolutely. See also #5.

If this is a wanted feature I can take a stab at it and make a pull request.

Excellent, go for it!

paolodm commented 11 years ago

Just curious what NPM would do in this scenario? Would it override?

trygve-lie commented 11 years ago

@paolodm NPM will prompt the user with an error message saying that the version already exist. NPM does then not override.

Bobris commented 9 years ago

This is source of many mistakes, it would be really good to have this implemented ... :+1:

bajtos commented 9 years ago

@Bobris we don't have enough time to maintain Reggie. My recommendation is to use sinopia, I believe it does not allow you to re-publish the same version.