Answer the question
In order to leave comments, you need to log in
How to update installed packages in Node?
When I run npm outdated --depth=0 , the console responds:
Package Current Wanted Latest Location
grunt-contrib-watch 0.3.1 0.3.1 1.1.0 energy
I understand this package needs to be updated.
What is the command to update it?
When executing this npm update --save command, the console does not write anything.
I also ran the npm update grunt-contrib-watch command.
Contents of package:
{
"author": "Maxim",
"name": "energy",
"version": "1.0.0",
"devDependencies": {
"grunt": ">= 0.4",
"grunt-cli" : ">= 0.1.6",
"
"load-grunt-tasks": "^5.1.0"
}
}
Answer the question
In order to leave comments, you need to log in
Version 1.1.0 has been released.
But in your project, the restriction is on the minor version.
With a tilde, the version can be updated within the minor version, but the major version will not be updated because according to semver, the major version can break backward compatibility.
upd
probably explained crookedly ...
in general, the record ~ 0.3.1 allows updating to version 0.4, but not including it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question