0

I saw that there was a new version of Google Clasp available, so I decided to check if any of my other packages had updates. I ran npm outdated -g and didn't get any results. Running npm outdated @google/clasp -g shows the Clasp update I expected to see.

Note: Running npm update -g does update Clasp.

Are there any flags I can add to the outdated command to return the correct results without having to specify the package name?

Here is my output:

C:\>npm outdated -g

C:\>npm outdated @google/clasp -g
Package        Current  Wanted  Latest  Location                    Depended by
@google/clasp    2.4.1   2.4.2   2.4.2  node_modules/@google/clasp  node

C:\>node -v
v16.17.1

C:\>npm -v
8.19.2
  • run `npm list -g` to check if you have any global packages if not that's why you're getting nothing – monim Sep 27 '22 at 19:24
  • @monim - Running `npm list -g` does indeed list all of my global packages. If Clasp weren't installed as a global package, I wouldn't have gotten any results with `npm outdated @google/clasp -g` and `npm update -g` wouldn't have updated it. – Dustin Luck Sep 27 '22 at 20:26
  • Try `npm outdated --all` – monim Sep 27 '22 at 22:38
  • @monim - `npm outdated --all` doesn't return anything `npm outdated --all -g` returns 170 lines, whereas `npm ls -g` only returns 3. Google Clasp is listed within the 170 lines returned when using `--all`; the rest seem to be dependencies of Clasp and npm based on their locations. Any way to exclude dependencies? – Dustin Luck Sep 27 '22 at 23:44
  • I really don't know what is missing! but if you run `npm update -g` this will make all your packages updated then you run `npm outdated -g` you'll get nothing because there is no outdated package since you updated all of them – monim Sep 28 '22 at 06:11
  • this is the expected behavior but it is not the same for you. open an issue in npm GitHub repo – monim Sep 28 '22 at 06:14
  • @monim - You've got the order backwards. First I check for outdated packages, which returns nothing. If I then try an update, the package will update. – Dustin Luck Sep 29 '22 at 18:53

0 Answers0