Why do angular releated projects do not use semver 2.0 for prerelease tags?

411 views Asked by At

A lot of angular related projects use a pre-release versioning scheme of the following:

e.g. angular-cli

1.0.0-beta.22, 
1.0.0-beta.22-1,
1.0.0-beta.24

e.g. @angular/material

2.0.0-alpha.9
2.0.0-alpha.9-1,
2.0.0-alpha.9-2,
2.0.0-alpha.9-3,
2.0.0-alpha.10,
2.0.0-alpha.2.0.0-alpha.11, 
2.0.0-alpha.11-1, 

Due to the way semantic versioning works (dot separators, numeric always lower precedence to alphanumeric parts), 2.0.0-alpha.9-experimental-pizza is still the highest version for @angular/material, even tough 2.0.0-alpha.11 is released.

Similar for angular-cli, where 1.0.0-beta.22-1 is still the highest version, even though 1.0.0-beta.24 is released.

This causes package.json dependencies with ^ versions, e.g.

"angular-cli" : "^1.0.0-beta.22-1"

to not upgrade to 1.0.0-beta.24, because 24 is a numeric version and therefore smaller than 22-1. I also posted this as an issue to the @angular/material issue tracker here but got no response.

Is this just an oversight, or am I missing something?

Update:

angular-cli now has versions

[email protected]
[email protected]
[email protected]
[email protected]
etc.

So it seems this was an oversight.

2

There are 2 answers

0
Philipp Aumayr On BEST ANSWER

Long time later, I think it was an oversight in the alpha / betas. This is now resolved and angular projects follow semver also for the pre-release tags.

1
Meligy On

Short answer is that these are manual processes. The team hasn't invested in automating them yet. At least that's speaking for the Angular CLI, since I'm a contributor to the repository source code (but not a team member).

In pretty much all recent releases, something happened at the release, so they had to issue another version. Hence things like 1.0.0-beta.xx, has been quickly followed by 1.0.0-beta.xx-1.

Some tests are hard to run before publishing the packages. Especially for the CLI which publishes a range of packages not just one (a couple webpack plugins that the CLI uses are available as separate packages for other non-CLI seed projects to use).

Usually when the team is happy with a version, they explicitly tag it as latest, which is something npm allows publishers to do, so, you shouldn't in theory have this Angular Material alpha 9 vs alpha 11 problem, unless alpha 11 is not tagged as latest or something.