I'm trying to do a simple test of npm update here is my package.json
{
"name": "nodetest3",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"chalk": "^0.1.0"
}
}
I can see chalk versions
npm view chalk versions
[
'0.1.0', '0.1.1', '0.2.0',
'0.2.1', '0.3.0', '0.4.0',
'0.5.0', '0.5.1', '1.0.0',
'1.1.0', '1.1.1', '1.1.2',
'1.1.3', '2.0.0', '2.0.1',
'2.1.0', '2.2.0', '2.2.2',
'2.3.0', '2.3.1', '2.3.2',
'2.4.0', '2.4.1', '2.4.2',
'3.0.0-beta.1', '3.0.0-beta.2', '3.0.0',
'4.0.0', '4.1.0'
]
At this point when I run
npm update
I should get a package version of chalk 0.5.1 because I used ^ in the dependencies, at least that is according to the manual(if I use ~ updates to the latest patch if I use ^ updates to the latest minor version), but I get version 0.1.1 which is wrong. What I don't understand is when I change the dependency to "^2.0.0" or "^1.0.0" and run
npm update chalk
or
npm update
chalk is updated to the correct version 2.4.2 or 1.1.3. Is there a way to update all of your packages at the same time with npm update to the correct version set in dependencies or this is just a bug or maybe something related to chalk specifically?