webdevreviews
← All field guides

Guide 02 / Tool selection

A dependency is a maintenance decision.

A repeatable evaluation method for packages, frameworks, and the code you will inherit.

Define the job, then inspect the package

A dependency saves implementation time by moving some responsibility outside your codebase. That trade can be worthwhile, but an installation command does not describe the full cost. Before searching for packages, state the problem in one sentence and list the behaviors you actually need. Separate essential requirements from attractive extras.

For example, a date display and a multi-time-zone scheduling interface are different problems. Native browser capabilities may cover the first while a well-scoped library helps with the second. Check platform support for your audience before assuming either that a package is necessary or that a native feature is available everywhere.

Look for evidence of maintainability

Read the documentation as a future maintainer. Can you find a minimal example, supported environments, a release history, and an upgrade guide? Check whether the documented API matches the installed version. Look at how issues are handled, not just how many exist. A small project with a clearly stated scope can be easier to reason about than a large project promising everything.

Release frequency alone is not a health score. A mature utility may need few changes; a fast-moving framework may release often because its surface area is large. Look for explanations, reproducible bug reports, and a clear compatibility policy. Do not infer security or quality from download counts, stars, or a familiar logo.

Read the license and check whether its requirements fit your intended use. If the obligations are unclear, seek qualified advice rather than treating package metadata as a legal review.

Inspect what arrives in production

Create a minimal integration in the actual build system you intend to use. Inspect the production output rather than the size of the package archive. A dependency can bring transitive packages, runtime requests, styles, polyfills, or initialization work that is not obvious from its import statement.

Check whether optional features remain optional after bundling. Test the functionality with keyboard input and representative assistive technology when it affects the interface. Review any network behavior and permissions. For software that handles untrusted input, examine its documented limits and failure modes. Automated vulnerability alerts are useful signals, but they do not replace understanding how the dependency is used.

Keep the experiment representative without turning it into an invented benchmark. Document the environment, version, and observations. “This increased our example bundle” is a narrower and more useful claim than “this library is slow.”

Plan the exit before adoption

Imagine replacing the dependency next year. Identify the types, data formats, and conventions that would spread through your application. A narrow adapter around a focused library can reduce replacement cost, but avoid building a complex abstraction around a hypothetical future need.

Record the choice in a short decision note with an owner or review responsibility appropriate to your team. Include the version range, update process, and the reason you rejected alternatives. Commit a lockfile where your ecosystem supports one, review dependency changes, and test upgrades before release.

The final question is not whether the tool is universally best. It is whether the benefit is worth the operational, accessibility, security, and replacement costs in this project. A decision that says “not needed yet” is a valid outcome of a careful evaluation.

Go to the source
MDN: package management
Use the authoritative documentation for implementation details and evolving guidance.