Motivation ("The Why")
Example
foo@latest -> 0.1.3
exec npm update foo
How
Current Behaviour
we need to add --save option now which is verbose, also npm update not support update the devDependencies
Desired Behaviour
there're two solution:
npm update, update both dependencies and devDependencies
- update
denpendencies only and -D or --save-dev update devDependencies
by the way, the above has already implemented by npm install, so we can also update dependencies by npm installl
References
Motivation ("The Why")
Example
foo: "^0.1.1"foo@latest -> 0.1.3
exec
npm update foofoo: "^0.1.3"How
Current Behaviour
we need to add
--saveoption now which is verbose, alsonpm updatenot support update thedevDependenciesDesired Behaviour
there're two solution:
npm update, update bothdependenciesanddevDependenciesdenpendenciesonly and-D or --save-devupdatedevDependenciesby the way, the above has already implemented by
npm install, so we can also update dependencies bynpm installlReferences