Skip to content
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

Merged
merged 1 commit into from Jul 22, 2021
Merged

refactor(@schematics/angular): improve automatic versions #21401

merged 1 commit into from Jul 22, 2021

Conversation

alan-agius4
Copy link
Collaborator

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.

@alan-agius4 alan-agius4 added the target: minor This PR is targeted for the next minor release label Jul 22, 2021
@alan-agius4 alan-agius4 requested a review from clydin July 22, 2021 14:53
@google-cla google-cla bot added the cla: yes label Jul 22, 2021
Copy link
Member

@josephperrott josephperrott left a 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+)?/);
Copy link
Member

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?

Copy link
Collaborator Author

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.
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jul 22, 2021
@clydin clydin merged commit c92a381 into angular:master Jul 22, 2021
@alan-agius4 alan-agius4 deleted the latest-versions branch July 22, 2021 18:46
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants