Upgrading Nodejs projects

Updating a Nodejs based project can be a critical task so here’re some tips on how to do it in a secure way.
You should keep your project dependencies always up to date as much as possible (As in desktop OSs or simple applications). But you have to take care of breaking changes to don’t break your project normal working. This also pplies in performance issues comming from latest versions.

  • The first step to be good in upgrading task is fully understand how semver works and why it works like that.
  • The second usefull step (not only when upgrading but any task of a Developer) is to have a good testing suite with a good coverage. If it’s possible a project started with TDD in mind.
  • Third step is to have a separated git branch for your upgrade process. Much better if you can deploy your new version to staging server to play with real integrations if everything is working as expected.
  • Also having a good monitoring plan in your deployment servers will help you in your upgrade process.

Understanding Semantinc Versioning

Go to semver

Using yarn

Run

1
yarn upgrade-interactive

More info

Comments

⬆︎TOP