This is my package.json:
{
"name": "pr",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"typescript": "^2.0.3"
}
}
When I run npm install
, I get version 2.0.8
⇒ npm install
pr@1.0.0 /Users/shlomitc/WebstormProjects/pr
└── typescript@2.0.8
When I run npm update
I get version 2.1.1!
⇒ npm update
pr@1.0.0 /Users/shlomitc/WebstormProjects/pr
└── typescript@2.1.1
Why npm install and update behaves differently?