Basically package.json stores the dependencies of you application. Everything under "dependencies" is updated when you do npm update .
"bson": "*" means that it will update to latest version of module bson.
When you do npm install xyz you are basically installing xyz without telling package.json. Next time you do npm update npm will update everything under dependencies but not xyz
Here are the commands that will help you :
- npm install xyzThis will install- xyzwithout telling- package.json.
- npm install --save xyzThis will install- xyzand also update- package.json, so that when next time you do- npm updateit will update- xyzas well.
- npm installThis will install everything under- dependenciesin- package.json.
- npm updateThis will update everything under- dependenciesin- package.json.