You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
I'm not sure if this should be a bug or a feature, it's more of an annoyance.
Every week when I check with 'ng update' it first complains that the CLI is outdated and starts installing a temporary CLI version, which takes a while. Then it tells me there is a new CLI version and I have to install it again with 'ng update @angular/cli', this time for real. Next time I do a 'ng update' it quickly shows me, without the delay.
Is it really necessary to install a new temporary cli version every week ?
Or maybe if there is a new one, can't we have question or a parameter to install the new CLI version (automatically), instead of installing it temporarily (and thus twice)? Just like when you type 'ng new' you also get a question.
Minimal Reproduction
ng update
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 14.2.5 to perform the update.
√ Packages successfully installed.
Primarily ng update is needed to update to a new major version as this is typically when code migrations are added. For minor and patch updates, updating the dependencies in the package.json or refreshing the lock file will suffice.
The temporary CLI is installed when an outdated version is used to perform the update. The latest version is always used as the update runner. This is extremely important when there are fixes and features that target the update process, as otherwise during the update the old version with potential bugs is used which might cause updates to fail. As such downloading the temporary version is definitely the better DX.
I strongly belief that developers should not perform dependency updates themselves (At least for non major versions).
There are a number of excellent tools that automate this, like RenovateBot which can also be self hosted and thus ideal for corp environments and DependaBot.
Following a convo with @clydin we decided that we will disable downloading a temporary version of the Angular CLI when running ng update without any package name. Since in this cases an update to date update executer is not neccessary.
Activity
alan-agius4 commentedon Oct 6, 2022
Primarily
ng updateis needed to update to a new major version as this is typically when code migrations are added. For minor and patch updates, updating the dependencies in the package.json or refreshing the lock file will suffice.The temporary CLI is installed when an outdated version is used to perform the update. The latest version is always used as the update runner. This is extremely important when there are fixes and features that target the update process, as otherwise during the update the old version with potential bugs is used which might cause updates to fail. As such downloading the temporary version is definitely the better DX.
egonknapen commentedon Oct 6, 2022
Which means that a batch file doing:
ng update @angular/cli
ng update
Would be the faster way to weekly check for updates of your system...
That CLI system is outdated every week.
alan-agius4 commentedon Oct 6, 2022
I strongly belief that developers should not perform dependency updates themselves (At least for non major versions).
There are a number of excellent tools that automate this, like RenovateBot which can also be self hosted and thus ideal for corp environments and DependaBot.
alan-agius4 commentedon Oct 6, 2022
Following a convo with @clydin we decided that we will disable downloading a temporary version of the Angular CLI when running
ng updatewithout any package name. Since in this cases an update to date update executer is not neccessary.fix(@angular/cli): skip downloading temp CLI when running `ng update`…
fix(@angular/cli): skip downloading temp CLI when running `ng update`…
fix(@angular/cli): skip downloading temp CLI when running `ng update`…
fix(@angular/cli): skip downloading temp CLI when running `ng update`…
fix(@angular/cli): skip downloading temp CLI when running `ng update`…
angular-automatic-lock-bot commentedon Nov 6, 2022
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.