Peer Dependencies
ELI5 — The Vibe Check
Peer dependencies are like a library saying 'I work with React, but I'm not going to install it for you — you should already have it.' It's the BYOB (Bring Your Own Bottle) of package management. They prevent duplicate copies of large frameworks and ensure plugins use the same version as your app. The warnings they generate are the most ignored messages in all of npm.
Real Talk
Peer dependencies declare that a package is compatible with a specific version of another package that the consuming project must provide. They prevent version duplication of singleton packages (React, Angular) and ensure plugin compatibility. npm 7+ auto-installs peer dependencies, while pnpm requires explicit installation.
When You'll Hear This
"Our React component library declares React as a peer dependency — the app provides it." / "Peer dependency warnings are annoying but ignoring them causes subtle runtime bugs."
Related Terms
npm
npm is like a vending machine for code. You say 'I want React' and it delivers React, plus React's 47 friends, plus their friends' friends.
Optional Dependencies
Optional dependencies are packages that your code CAN use if they're available but won't cry about if they're not. It's like a recipe that says 'add truffl
Package Manager
A package manager is the app store for your code — it downloads libraries, manages versions, and makes sure everything plays nice together. It's like a gro
Semantic Versioning
Semantic Versioning is a numbering system for your software releases that communicates meaning. The three numbers MAJOR.MINOR.