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

fix(compiler-cli): handle pre-release versions when checking version #44109

Closed
wants to merge 2 commits into from

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 8, 2021

Currently the TS version checking function interprets a version like 1.2.3-rc.5 as 1.2.NaN which would allow it to bypass the version checking altogether.

These changes add a little bit more logic to ensure that such versions are handled correctly. There's also an error if we don't manage to parse the version string.

Also it seemed like we never actually ran the version check unit tests, because they didn't have a test target.

@crisbeto crisbeto marked this pull request as ready for review November 8, 2021 10:48
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer area: compiler Issues related to `ngc`, Angular's template compiler target: patch This PR is targeted for the next patch release labels Nov 8, 2021
@ngbot ngbot bot modified the milestone: Backlog Nov 8, 2021
@crisbeto crisbeto changed the title fix(compiler-cli): handle pre-release versions in when checking version fix(compiler-cli): handle pre-release versions when checking version Nov 8, 2021
Currently the TS version checking function interprets a version like `1.2.3-rc.5` as `1.2.NaN` which would allow it to bypass the version checking altogether.

These changes add a little bit more logic to ensure that such versions are handled correctly. There's also an error if we don't manage to parse the version string.

Also it seemed like we never actually ran the version check unit tests, because they didn't have a test target.
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer action: presubmit The PR is in need of a google3 presubmit labels Nov 9, 2021
@atscott
Copy link
Contributor

atscott commented Nov 9, 2021

This PR was merged into the repository by commit 247c18d.

@atscott atscott closed this in 247c18d Nov 9, 2021
atscott pushed a commit that referenced this pull request Nov 9, 2021
…44109)

Currently the TS version checking function interprets a version like `1.2.3-rc.5` as `1.2.NaN` which would allow it to bypass the version checking altogether.

These changes add a little bit more logic to ensure that such versions are handled correctly. There's also an error if we don't manage to parse the version string.

Also it seemed like we never actually ran the version check unit tests, because they didn't have a test target.

PR Close #44109
@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 Dec 10, 2021
dimakuba pushed a commit to dimakuba/angular that referenced this pull request Dec 28, 2021
…ngular#44109)

Currently the TS version checking function interprets a version like `1.2.3-rc.5` as `1.2.NaN` which would allow it to bypass the version checking altogether.

These changes add a little bit more logic to ensure that such versions are handled correctly. There's also an error if we don't manage to parse the version string.

Also it seemed like we never actually ran the version check unit tests, because they didn't have a test target.

PR Close angular#44109
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 area: compiler Issues related to `ngc`, Angular's template compiler cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants