Treat a major upgrade as a new product feature

When one of your core libraries releases a major version, it is time to start thinking about upgrading. The first questions that should come to mind are: “How mature is this version? Does it have several open issues? Is it stable enough to be used?”. Being an early adopter of a new library version always comes with some risks, mainly because bugs are common in new versions, that need time to be fixed. However, if time constraints aren’t a concern, being an early adopter is an excellent opportunity to contribute to open source projects. It allows you the chance to test any new versions first-hand and potentially provide solutions to any bugs you encounter. However, if time is a constraint, it is most likely better practice to wait until the library becomes more mature, in order to avoid dealing with potential bugs.

Whether you are an early adopter or not, the next step is checking the upgrade guide in order to estimate how difficult the upgrade will be from one version to the next. If the upgrade isn’t particularly challenging, you can most likely upgrade the library in a couple of hours without worrying about a potential impact to you and your team.

However, problems arise when a dependency has several breaking changes and issues can become even more complex if other dependencies also require upgrades. An example of this was the migration from React 15.6 to React 16.4. Besides breaking changes, several other dependencies (such as react-router) required upgrades since the new React version wasn’t compatible with existing dependencies. In this scenario, you should stress the importance of prioritizing this to your manager.

So far everything is going well until you realize that your task hasn’t moved in the backlog. Roadmaps are commonly full of new features, and we easily make the mistake of ignoring tasks deemed less important, such as upgrading sensitive dependencies, in order to give new features all of the attention. These features are often prioritized because, at the end of the day, these features make clients and users happy. If this is a common pattern in your team, it is your responsibility to speak up and make others see the importance of upgrading dependencies.

Here are the main reasons why upgrading libraries are important: