Is there an existing issue for this?
Current Behavior
With npm@7 and any other package installed globally that is not up to date (e.g. npm-check-updates@10) the cli call "npm outdated -g" outputs the next major version (npm-check-updates@11) as "wanted". Callign "npm update" updates to that major version.
Expected Behavior
npm@7 should never update to a different major version due to possible breaking changes. This worked in npm@6.
Steps To Reproduce
Test for npm 6
Install npm@6
sudo npm i -g npm@6
Create a test project and install a package locally
mkdir test
cd test
npm init
npm i --save npm-check-updates@10
npm outdated
OK: Column "wanted" for package "npm-check-updates" shows 10..
Install package globally
sudo npm i -g npm-check-updates@10
sudo npm outdated -g
OK: Column "wanted" for package "npm-check-updates" shows 10..
Test for npm 7
Install npm 7
sudo npm i -g npm@7
Create a test project and install a package locally
mkdir test
cd test
npm init
npm i --save npm-check-updates@10
npm outdated
OK: Column "wanted" for package "npm-check-updates" shows 10..
Install package globally
sudo npm i -g npm-check-updates@10
sudo npm outdated -g
ERROR: Column "wanted" for package "npm-check-updates" shows 11..
Environment
- OS: Linux Mint 20.2 Cinnamon
- Node: 16.6.0
- npm: 7.20.3 / 6.14.14
Is there an existing issue for this?
Current Behavior
With npm@7 and any other package installed globally that is not up to date (e.g. npm-check-updates@10) the cli call "npm outdated -g" outputs the next major version (npm-check-updates@11) as "wanted". Callign "npm update" updates to that major version.
Expected Behavior
npm@7 should never update to a different major version due to possible breaking changes. This worked in npm@6.
Steps To Reproduce
Test for npm 6
Install npm@6
sudo npm i -g npm@6Create a test project and install a package locally
mkdir testcd testnpm initnpm i --save npm-check-updates@10npm outdatedOK: Column "wanted" for package "npm-check-updates" shows 10..
Install package globally
sudo npm i -g npm-check-updates@10sudo npm outdated -gOK: Column "wanted" for package "npm-check-updates" shows 10..
Test for npm 7
Install npm 7
sudo npm i -g npm@7Create a test project and install a package locally
mkdir testcd testnpm initnpm i --save npm-check-updates@10npm outdatedOK: Column "wanted" for package "npm-check-updates" shows 10..
Install package globally
sudo npm i -g npm-check-updates@10sudo npm outdated -gERROR: Column "wanted" for package "npm-check-updates" shows 11..
Environment