angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.28k stars 6.71k forks source link

build(release): generates invalid semver versions and breaks material.angular.io builds #17264

Closed Splaktar closed 4 years ago

Splaktar commented 4 years ago

Reproduction

Steps to reproduce:

  1. Release a new version

Expected Behavior

Only valid semver should be used for the versions in https://github.com/angular/material2-docs-content/blob/8.2.x/package.json

Actual Behavior

We’re appending partial commit SHAs to the end of the versions, i.e. 8.2.0-c29c507, 8.2.1-a5d2ed8, and the latest 8.2.2-0462599.

However, 8.2.2-0462599 is not valid semver, so yarn won’t install it.

You can check using this validator: https://jubianchi.github.io/semver-check/#/8.2.2-0462599/8.2.2-0462599

The leading 0 is the issue. It doesn’t accept versions like 01.02.03, it has to be 1.2.3.

Checking with the 0 removed, says valid semver (https://jubianchi.github.io/semver-check/#/8.2.2-462599/8.2.2-462599).

The related commits:

What is seen when trying to build material.angular.io

$ yarn install
yarn install v1.17.3
[1/4] 🔍  Resolving packages...
error Can't add "@angular/material-examples": invalid package version "8.2.2-0462599".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
devversion commented 4 years ago

Seems like this is an issue we always had since introducing snapshot builds. The issue is generally quite rare as not every SHA starts with a leading zero. Definitely a good catch 😄

Here is a fix: #17267

angular-automatic-lock-bot[bot] commented 4 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.