cosmos icon indicating copy to clipboard operation
cosmos copied to clipboard

Proposal: Alpha releases

Open siddharthkp opened this issue 6 years ago • 0 comments
trafficstars

Is your feature request related to a problem? Please describe.

As we get closer to 1.0.0, we need to do a lot of refactoring work - which makes our changes slightly more prone to bugs.

Our efforts in #1270 Improving Cosmos quality assurance will definitely help in this regard.

 

As an addition safety net, I propose we introduce alpha tags for releases.

Here's how tags on npm registry work:

Every release get's a version number (we follow semver) like 0.11.0. By default the npm registry will tag a new release with latest tag.

This is the version that gets downloaded on a clean install

/* when you run */
npm install package

/* the npm cli actually runs */
npm install package@latest

We can tag a new release with something other than latest like alpha / beta / next which will make it not the default

/* at the time of publishing */
npm publish package --tag alpha

To download the latest tagged version, the user has to explicitly ask for it:

npm install package@alpha

 

How do you version this alpha build?

There are multiple ways to do this, one of the popular one is to number the alpha version based on what it will eventually be

Example: 0.12.0-alpha.1 and 0.12.0-alpha.2 before a stable 0.12.0

At a point in time, this is how our releases tab on npm would look like:

image

 

When should we utilise an alpha build?

In theory, we can use it before every release.

In practice, we would want to use it when we're not completely confident of a release and want to request someone to try it out.

The most useful use case is 1.0.0-alpha-1. We might want to give access to an alpha build with breaking changes and use the feedback to polish it before releasing a stable version.

 

⚠️ Caveat: alpha releases should be tried, fixed and released as a stable version soon. Which means they are not fit for testing out proposals which will not make into stable in the immediate release

 

Implementation detail

Because releases are done in a jenkins build, we don't can't manually pass extra cli parameters (--tag alpha), we need to use a convention.

Based on the version in the root package.json file, the publishing script can infer the tag

version: 0.12.0 /* npm publish --tag latest */

version: 0.12.0-alpha.2 /* npm publish --tag alpha */

siddharthkp avatar Dec 28 '18 10:12 siddharthkp