-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng update should provide instructions for updating major versions incrementally #19381
Comments
Or just provide the ability to update to specified version (like npm) and advise users to go through the motion of ng update @angular/core@8.0.0 -> ng update @angular/core@9.0.0 -> ng update @angular/core@10.0.0 and so on. |
Using a package version specifier is currently supported. For example, running |
With #21986 we now error when updating `@angular/` and `@nguniversal/` packages across multiple major versions. With this chnage we update `ng update` output to show the correct instructions. Before ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 13.0.0-rc.2 ng update @angular/core --next ``` Now ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 12.2.9 ng update @angular/core@12 ``` Closes #19381 (cherry picked from commit 9b32066)
With #21986 we now error when updating `@angular/` and `@nguniversal/` packages across multiple major versions. With this chnage we update `ng update` output to show the correct instructions. Before ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 13.0.0-rc.2 ng update @angular/core --next ``` Now ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 12.2.9 ng update @angular/core@12 ``` Closes #19381
With #21986 we now error when updating `@angular/` and `@nguniversal/` packages across multiple major versions. With this change we update `ng update` output to show the correct instructions. Before ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 13.0.0-rc.2 ng update @angular/core --next ``` Now ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 12.2.9 ng update @angular/core@12 ``` Closes #19381 (cherry picked from commit 9b32066)
With #21986 we now error when updating `@angular/` and `@nguniversal/` packages across multiple major versions. With this change we update `ng update` output to show the correct instructions. Before ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 13.0.0-rc.2 ng update @angular/core --next ``` Now ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 12.2.9 ng update @angular/core@12 ``` Closes #19381 (cherry picked from commit 9b32066)
With #21986 we now error when updating `@angular/` and `@nguniversal/` packages across multiple major versions. With this chnage we update `ng update` output to show the correct instructions. Before ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 13.0.0-rc.2 ng update @angular/core --next ``` Now ``` $ ng update --next We analyzed your package.json, there are some packages to update: Name Version Command to update -------------------------------------------------------------------------------- @angular/cli 12.2.12 -> 13.0.0-rc.2 ng update @angular/cli --next @angular/core 11.2.14 -> 12.2.9 ng update @angular/core@12 ``` Closes #19381 (cherry picked from commit 9b32066)
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. |
🚀 Feature request
Command (mark with an
x
)Description
A clear and concise description of the problem or missing capability...Say I'm on Angular v8.0.0 and run
ng update
. The current instructions displayed in the console shows a list of packages that can be updated together with a command.The suggested command is
ng update @angular/core
(as an example) which always attempts to update Angular to the latest stable version (11 at the time). This goes against the idea of incremental updates (also recommended in the official docs) where one will go from v8 -> v9 -> v10 ... latest.Describe the solution you'd like
If you have a solution in mind, please describe it.The suggested commands should take into consideration the current major project version and the current major stable version and provide appropriate instructions (commands) depending on the version "jump". If the difference is just one version then
ng update @angular/core
should be fine. If the jump is bigger, then an incremental update can be recommended.Describe alternatives you've considered
Have you considered any alternative solutions or workarounds?The text was updated successfully, but these errors were encountered: