menu

Questions & Answers

Angular 12 to Angular 13 upgrade - define what to change in package.json?

I have an Angular 12 project and package.json. To upgrade to Angular 13, this manual https://update.angular.io/?l=3&v=12.0-13.0 states to execute

ng update @angular/core@13 @angular/cli@13 
ng update @angular/material@13

So, for package.json I need to modify package.json instead. Manually. Correct? How to know what changes need to be done in package.json based on the info above? @angular/core, @angular/material, @angular/material? Any other dependencies? I guess Yes.

Should I prefer to upgrade @angular/core to 13.0.3 or 13.3.11 or the very last 13.Y.Z? How to guess, versions in what dependencies and to what version need to be upgraded? Should it be upgraded manually and then run npm i?

Comments:
2023-01-20 09:42:03
Why do you need to do it manually?
2023-01-20 09:42:03
Ok, if not manually, then will ng update @angular/core@13 @angular/cli@13 modify my package.json?
2023-01-20 09:42:03
If you have version control you shouldn't be afraid of running these to find out and if you have any issues doing git reset --hard and git clean -fd to undo. If you have uncommited local changes you can stash them before and then stash pop them after. But the answer is yes.
Answers(0) :