← Latest papers
💻 computer science

A Longitudinal Study of Dependency Reclassifications in JavaScript Projects

This paper presents a longitudinal study of 33,087 JavaScript projects revealing that dependency reclassification, including removal and role reassignment, is a prevalent and often iterative maintenance activity that unfolds over extended periods, highlighting the need for improved tooling and research to support correct dependency declarations.

Original authors: Yuxin Liu, Cristian Bogdan, Benoit Baudry

Published 2026-04-13
📖 5 min read🧠 Deep dive

Original authors: Yuxin Liu, Cristian Bogdan, Benoit Baudry

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are building a massive, ever-changing Lego castle. To make your castle cool, you need to borrow pieces from other people's sets. In the world of software (specifically JavaScript), these borrowed pieces are called dependencies.

Every time you add a piece, you have to write it down in a "shopping list" (called package.json). But here's the tricky part: you have to decide what kind of piece it is.

  • Core: A piece that is essential for the castle to stand up and function right now (like the foundation).
  • Dev: A piece you only need while you are building the castle (like a hammer or a ruler), but you don't need it once the castle is finished.
  • Peer: A piece you think the owner of the castle should bring themselves, so you don't have to carry it.

The Problem: The "Oops, I Packed the Wrong Bag" Moment

For a long time, researchers thought developers just added new pieces or updated old ones to newer versions. They assumed that once you put a piece in the "Foundation" bag, it stayed there forever.

But this paper says: Nope! Developers are constantly repacking their bags.

The authors looked at over 33,000 software projects (like a giant library of Lego castles) and watched how developers changed their shopping lists over time. They found that developers are constantly realizing, "Wait, I don't need this hammer in the final castle," or "Oh no, I forgot to bring this essential brick!"

The Three Main Ways Developers "Repack"

The study found that developers do three main things to fix their lists:

1. The "Purge" (Removal)

Sometimes, a piece is just useless.

  • The Analogy: You realize you packed a snow shovel for a beach vacation. You take it out.
  • The Finding: This happens in 97% of projects. But here's the twist: 33% of the time, they take it out, realize they actually do need it, and put it back in later! It's like packing the shovel, realizing you need it for the snow day, and repacking it.

2. The "Role Swap" (Reassignment)

Sometimes, a piece is in the wrong bag.

  • The Analogy: You packed your "Construction Hammer" in the "Final Castle" bag. You realize, "Hey, this is only for building, not for living in!" So, you move it from the Foundation bag to the Construction Tools bag.
  • The Finding: This happens in 38% of projects. It's a constant game of musical chairs where tools move between "Production" (the real thing) and "Development" (the workshop).

3. The "Fence Jumper" (Peer to Core)

Sometimes, you tell a guest, "You bring your own chair," but then you realize, "Actually, I'll just buy a chair for you so you don't have to."

  • The Analogy: You stop asking the guest to bring the chair (Peer) and decide to buy it yourself (Core).
  • The Finding: This happens often because asking guests to bring their own stuff is confusing and error-prone.

The "Oscillation" (The Rollercoaster)

The most interesting finding is that this isn't a one-time fix.

  • The Analogy: Imagine you move a tool from the "Workshop" to the "Living Room." Then, two weeks later, you move it back. Then, a month later, you move it to the "Garage."
  • The Finding: About 11% of the time, developers keep moving a dependency back and forth between roles. It's like a pendulum swinging until they finally figure out where it belongs.

The Big Surprise: It Takes a Long Time!

You might think, "If I made a mistake, I'd fix it immediately."

  • The Reality: No. The study found that the median time to fix a role mistake is 408 days (more than a year!).
  • The Analogy: It's like realizing you packed the wrong shoes for a trip, but you don't swap them out until you've been walking in them for a whole year. Developers often let these mistakes sit for a long time before cleaning them up.

Why Should You Care?

This matters because:

  1. Bloat: If you keep "Construction Hammers" in your "Final Castle" bag, your castle becomes heavier and slower than it needs to be.
  2. Security: If you leave a tool in the wrong bag, hackers might find a way in through that tool.
  3. Confusion: If you tell a guest to bring a chair, but then you buy one, the guest might get confused and bring two, or none at all.

The Takeaway

Software isn't a static building; it's a living, breathing organism that constantly edits its own memory. Developers are constantly looking at their lists and saying, "Wait, that doesn't belong here," or "Actually, we need that back."

The authors suggest that our tools (the software that helps us build) are too dumb. They only look at the current list. They need to get smarter and say, "Hey, you moved this tool three times in the last year. Are you sure it belongs here?"

In short: Managing software dependencies is less like building a house and more like constantly reorganizing a messy garage, realizing you've been storing your winter coats in the summer shed for a year, and finally moving them to the right place.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →