semantic versioning - semver caret behavior differ between npm install and update -


this 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 run npm install, version 2.0.8

⇒  npm install pr@1.0.0 /users/shlomitc/webstormprojects/pr └── typescript@2.0.8 

when run npm update version 2.1.1!

⇒  npm update pr@1.0.0 /users/shlomitc/webstormprojects/pr └── typescript@2.1.1 

why npm install , update behaves differently?

according npm guys, correct behavior, it's not described enough in docs.

npm install installs latest tagged version, 2.0.8

npm update installs highest possible version, 2.1.1

https://github.com/npm/npm/issues/14586


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -