🛠️Dependency
Also known as Software Dependency, Package Dependency
Code someone else wrote that your project needs in order to work.
Think of it like
Think of it like the flour in a cake. The cake cannot be made until you have it.
Example
Jack adds one charting library to his app. It brings 12 more packages with it, and now his project has 13 dependencies.
Why it matters
Most of the code in a modern app is dependencies. Keeping them up to date keeps the app safe.
Definition
Example code
json
{
"dependencies": {
"lodash": "^4.18.1"
}
}Common mistake
Key takeaways
- 1Outside code. Written and kept by someone else.
- 2Chains of them. One package can pull in many more.
- 3Keep them fresh. Old versions can hold known holes.