eBay / skin

Pure CSS framework designed & developed by eBay for a branded, e-commerce marketplace.
https://ebay.github.io/skin/
MIT License
179 stars 67 forks source link

Use pre-release tags when publishing to NPM #68

Closed seangates closed 6 years ago

seangates commented 6 years ago

Issue

Tonight I attempted to install the latest version of Skin in my personal project and the package that was pulled in was the "pre-release" version of Skin, and not the stable, current version.

The command I used was yarn add @ebay/skin which pulled in @ebay/skin@3.4.0-0 which is the pre-release version. The current latest should be 3.3.2.

Therefore, I believe skin should be using the x.x.x-beta tag on any pre-release version, following SemVer pre-release tags as prescribed by NPM. This would ensure Skin has NPM install the true latest package.

Additionally, Skin would be working in the developer's favor:

... a user who has opted into using a prerelease version has clearly indicated the intent to use that specific set of alpha/beta/rc versions. By including a prerelease tag in the range, the user is indicating that they are aware of the risk.

Proposed Publishing Commands

npm publish --tag beta

Reference: How to label packages with Dist-tags

Proposed Commands to Add beta Dist-tag to Previous Pre-releases

npm dist-tag add @ebay/skin@3.0.0-2 beta
npm dist-tag add @ebay/skin@3.2.0-0 beta
npm dist-tag add @ebay/skin@3.3.0-0 beta
npm dist-tag add @ebay/skin@3.4.0-0 beta

Thoughts? Concerns? Objections?

ianmcburnie commented 6 years ago

Urgh, that sucks that the npm prerelease command (npm version preminor) does not satisfy the semver prerelease convention (or maybe, and possibly more likely, I just misunderstood the command). Should I unpublish this version from NPM? I believe I have 24 hours to do so.

EDIT: oh wait, I've just seen your nom dist-tag add comment. So no need to unpublish, right?

ianmcburnie commented 6 years ago

Sean, what's your NPM username? Will add you to @ebay npm org.

seangates commented 6 years ago

I believe it’s seangates.

seangates commented 6 years ago

And yes, no need to unpublish. Just add the dist-tag.

Going forward we would just add the --tags beta to our publish command.

ianmcburnie commented 6 years ago

Ok. I ran npm dist-tag add @ebay/skin@3.4.0-0 beta

seangates commented 6 years ago

👍 I will try again tomorrow.

seangates commented 6 years ago

So ... per our Slack conversation about adding the beta tag to the other releases? Well, having run the yarn info @ebay/skin I see that the beta tag is now set on 3.0.0-0 ... only.

Oops.

It appears that the tag can only be used on one package version at a time. So, I think we need to run the npm dist-tag add @ebay/skin@3.4.0-0 beta to set it to the latest beta. I will try and do this.

seangates commented 6 years ago

I guess I don't have NPM access to the @ebay scope yet. 😉

seangates commented 6 years ago

And ... I was able to give myself access to publish. I was also able to update the latest tag to v3.3.2, which, at the time of this writing, is the actual latest version.

ianmcburnie commented 6 years ago

Can we close this now? Or do we need to add anything else to the docs?

seangates commented 6 years ago

We're good. Closing.