Current behavior: npm outdated gives a list of dependencies listed alphabetically, grouping packages that are defined as dependencies with those defined as devDependencies. If the developer has many packages, they are forced to look in their IDE at package.json to confirm the installation location for a particular package, which takes extra time and complicates the process. Additionally, this increases the risk that the developer mistakenly installs a package in the wrong group in package.json – which may happen if they choose
--save and include a development package in a long list of dependencies, or vice versa with
--save-dev and a package needed for production.
npm outdated --long does provide the location info for each outdated package, but again production and development dependencies are listed together.
Potential Future Behavior: npm outdated would provide two lists as an output, grouped by
dependencies and then by
devDependencies, with each list sorted alphabetically. Additionally,
npm outdated --long would be grouped and sorted in the same way.