Updating Dependencies, how and when to do it

#1

Is there some way to know what dependencies need to be updated and which ones cant ? I see that i have “@ionic-native/core”: “4.7.0” but i see an update for 4.10.1, Is this update safe to do? Or is this update only for Ionic 4 ? I really would like to keep all my dependencies up to date, and i want to know if there is an safe way to do this.

#2

Personally, I like to make sure I am updated to the latest version of the CLI, i.e:

npm install -g ionic

Then you can just generate a fresh new project (v1, v3, or v4, whichever your project is based on). The freshly generated project will have the latest stable dependencies listed in the package.json file. You can then just copy these over (making sure not to overwrite dependencies you have added, of course), and then run npm install.

Also a good idea to keep a copy of your old package.json file in case something breaks.

2 Likes