'npm-check-updates (npm ncu): avoid breaking updates
The command npm-check-update
displays mayor updates in red. This can be already seen in the first image of the documentaton.
But is there a way to exclude these breaking changes from the automatic update? I do not find a parameter for that.
Solution 1:[1]
For my part I do :
ncu -u -x axios,eslint,eslint-plugin-prettier,eslint-plugin-vue,sass-loader,@tinymce/tinymce-vue,vue-browser-detect-plugin
All dependencies after "-x" are major upgrade for me.
Solution 2:[2]
It is actually in the readme file:
So, just do a ncu -t minor -u
to leave major version updates out (those that are most likely to break things).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Petter Friberg |
Solution 2 | Renxing Liu |