New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(@schematics/angular): improve automatic versions #21401
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just one question to check on
@@ -8,14 +8,14 @@ | |||
|
|||
/** Retrieve the minor version for the provided version string. */ | |||
function getEarliestMinorVersion(version: string) { | |||
const versionMatching = version.match(/^(\d+)\.(\d+)\.*/); | |||
const versionMatching = version.match(/^(\d+)\.(\d+)\.(?:\d+)(-\w+)?/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that @schematics/angular
could move into rc
while @angular/core
is still in next
resulting in a mismatch for this discovered prerelease
segment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, the FW is always released first.
With this change we improve the versions we set in the users project to be less confusing. Previously, for both stable and next versions we set the versions of Angular packages to the below; ``` "@angular/animations": "~12.2.0-" ``` This might be problematic as one might not immediately notice that they might depend on a prerelease. The `-` is short character and can be missed when having a large set of dependencies. With this can we are more explicate by adding `--next` when it's a prerelease and omit the suffix for stable releases.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
With this change we improve the versions we set in the users project to be less confusing. Previously, for both stable and next versions we set the versions of Angular packages to the below;
This might be problematic as one might not immediately notice that they might depend on a prerelease. The
-
is short character and can be missed when having a large set of dependencies.With this can we are more explicate by adding
--next
when it's a prerelease and omit the suffix for stable releases.