0

I want to prepare an excel sheet with the current installed versions and latest versions of dependencies in my package.json file like this:

enter image description here

The current versions I can get from the package.json file but I am not sure how to get the latest version of all the packages. Also, I have tried running npm-check-updates in the console but unlike the name suggests, it upgrades all the versions instead of only checking the latest versions. Moreover, copying and pasting from console does not look good as I need to use "Data to Column" in the excel file.

Aurazo Script
  • 115
  • 1
  • 1
  • 9
  • If you `cd` to your project directory and run the [`npm ls`](https://docs.npmjs.com/cli/v8/commands/npm-ls) command that will more accurately indicate the current version of a package you have installed, more so than obtaining it from what's listed in _package.json_, e.g. `npm ls @angular/core`. To obtain the latest version of a package utilize the [`npm view`](https://docs.npmjs.com/cli/v8/commands/npm-view) command, e.g. running `npm view @angular/core version` indicates the _latest_ version available for `@angular/core`. – RobC Jul 13 '22 at 06:50
  • @RobC is there a command that can help list latest versions of all the dependencies at once instead of doing one by one? There is a huge list of dependencies installed. – Aurazo Script Jul 13 '22 at 07:23

0 Answers0