Keep Your Dependencies Up-to-Date

Vincent Bas
partoo
Published in
6 min readMay 15, 2023
Photo by Bernard Hermant on Unsplash

During my previous professional experiences, I had the opportunity to work on several large-scale projects.

As a developer, I often found myself spending hours manually updating dependencies and tracking down compatibility issues. It was a tedious and time-consuming task, and I often wished there was a better way.

I recently joined Partoo as a Front-End Developer, and finally found a better way to automate this tedious process.

A magical tool “Dependabot” ✨

But before telling you about dependabot and how this tool has transformed my daily work, I will explain why being up-to-date on these dependencies is so important.

Lessons Learned From a React Library Migration …

Let me tell you a story that happened to me…

Some advice if you have decided to do a migration: never look back.

It’s like driving a car: you never look back when you’re on the road.

Similarly, when working on a migration, it’s important to keep moving forward and not get sidetracked by other priorities.

I remember when I was upgrading the react-router-dom library from version 5 to version 6. Initially, everything was going smoothly, but then unexpected deadlines arose, and I had to put the migration on hold.

When I finally returned to the migration, I found that the branch where the migration was done was far behind the main branch, and I had to spend some additional days resolving conflicts.

However, it’s important to note that in some cases, the process can be more complicated.

Imagine if during the break, a new version upgrade was available, I should have started the migration from scratch and made a larger leap of two versions. This experience taught me the importance of staying focused on the task at hand and constantly reassessing priorities to ensure that crucial projects don’t fall by the wayside.

I learnt to make sure to finish each task before moving on to the next one. It’s important to stay up-to-date with your dependencies, as it will make future tasks easier to complete. This will prevent the need to jump between different versions, making it simpler for developers to follow along, especially when there is clear documentation and migration guides available.

Now that we’ve learned some valuable lessons from a React library migration, let’s take a closer look about the benefits of keeping your project dependencies up-to-date. From new features to security patches, updating your dependencies can help your project run more smoothly and avoid potential headaches down the line.

From New Features to Security Patches: The Benefits of Updating Your Dependencies

Before joining Partoo, upgrading the obsolete libraries for my various projects has always been a challenge in terms of convincing my boss or manager to free up the necessary time and resources.

Why do we have to be up to date?

Let’s briefly go over our 4 major arguments

1. Unlock the Potential of Your Projects by Adding New Features

The rapid pace of technological advancements means that new features and tools are constantly emerging. To remain competitive, we need to take advantage of the latest techniques and tools that can help our projects stand out.

2. Boost Your Performance

Outdated dependencies can seriously impact our project’s performance. By upgrading to newer versions, we can often improve the speed and efficiency of our code, which is critical for maintaining a competitive edge.

Recently, Vite released version 4.3, and the gains that can be achieved with a simple update to the library are impressive. With some interesting modifications, the speed was boosted by anywhere between 24% to an astonishing 76%. I rarely see such significant improvements, especially in a minor release!

3. Protect Your Projects

Security is a major concern in today’s digital landscape. By staying up-to-date with our dependencies, we can ensure that any potential vulnerabilities are promptly patched, and our code is as secure as possible.

Security can also be an important sale argument for a B2B SaaS company.

In today’s digital age, the risks of cyber attacks and data breaches are becoming increasingly present.

So don’t forget, investing in security is a smart business strategy that can help you maintain trust with your clients and give you an edge over your competitors.

4. Stay Ahead of the Competition

Keeping up with the latest trends and technologies is essential for attracting top talent and demonstrating our value to potential employees. By showcasing our knowledge and expertise in the latest tools and techniques, we can position ourselves as valuable assets to any team.

In short, staying up-to-date with our dependencies is essential for maintaining a competitive edge, improving performance, ensuring security, and demonstrating our value to potential employees.

At Partoo, staying up to date with dependencies is not just essential, it’s a company policy.

The Zero Security Vulnerabilities Policy at Partoo 🎯

From the moment I started working here, I was pleasantly surprised to discover that Partoo had implemented a zero-security vulnerabilities policy on all of its projects.

Upgrading dependencies can be challenging due to time and resource constraints. However, at Partoo, a zero-security vulnerabilities policy is implemented across all projects. This ensures that every team member takes responsibility for keeping dependencies up-to-date and addressing any potential security issues promptly.

Partoo’s commitment to excellence also includes a zero-bug policy to maintain top-notch code quality. Check out our article on Partoo’s zero-bug policy to learn more about our approach.

Keeping track and updating outdated dependencies on a daily basis can be a challenge for large-scale applications. Manual testing is often unrealistic, as it can be time-consuming and prone to breaking changes. That’s why we decided to automate the update process.

To simplify life in this mission we have chosen a tool named dependabot.

One day, a colleague introduced me to Dependabot, and I was skeptical at first. I had never used an automated dependency management tool before, and I was worried about the potential for errors and conflicts.

But as I started to use Dependabot, I quickly realized how it simplified my daily work. No longer did I have to spend hours manually tracking down updates and fixing compatibility issues.

Once configured, Dependabot did it all for me, automatically creating pull requests to update dependencies and resolve any conflicts. You can, in turn, choose to merge those to your main branch.

Example pull request generated by Dependabot with the following configuration
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory:
- "/"
target-branch: "master"
schedule:
interval: "daily"
time: "09:00"
timezone: "Europe/Paris"
open-pull-requests-limit: 2
labels:
- "dependencies"
reviewers:
- "github_username"

Not only does Dependabot make my work easier, but it also makes it more enjoyable. With less time spent on tedious manual tasks, I can focus on the creative aspects of my job, such as writing code and experimenting with new features.

But the real game-changer ? Dependabot keeps my project secure and up-to-date, without the worry of missing critical updates or introducing vulnerabilities. With Dependabot, I can trust that my project is in good hands.

Thanks to Dependabot, my daily work as a developer became more productive, more enjoyable, and less stressful. It’s amazing how a simple tool can make such a big difference!

Conclusion

I hope you found this article inspiring and informative, particularly if you are a Developer. Remember, never look back during a migration, and always strive to be proactive. The benefits of upgrading to newer versions are many, including attracting top talent and demonstrating value to potential employers.

And if you’re interested in learning more about Partoo’s commitment to excellence in software development, and how we use Dependabot to keep our projects secure and up-to-date, we’d be happy to tell you more.

PS : If you’re a Developer looking for a challenging and rewarding career, do not hesitate to apply for one of our offers 😀

--

--