Common ones
npm, Yarn and pnpm serve JavaScript; pip and Poetry serve Python; Composer serves PHP; NuGet serves .NET; Maven and Gradle serve Java; Bundler serves Ruby; Cargo serves Rust; Homebrew and apt install programs on computers and servers rather than libraries.
Files that matter
A manifest (package.json, composer.json) lists what you asked for. A lock file (package-lock.json, composer.lock) pins the exact versions that were installed. Commit both, otherwise a build next month could pull a newer, different library.
Risks
- Supply chain attacks: a hijacked or typo-squatted package can run malicious code at install time.
- Abandoned libraries that stop receiving security fixes.
- Deep dependency trees, where one small tool pulls in hundreds of others. Run an audit command regularly and update on a schedule rather than only when something breaks.
Questions, answered
It freezes exact versions, so installs are repeatable across machines and over time.
Check maintenance activity, download counts, the licence and the publisher before adding a dependency.