NPM outdated command not showing full list
Asked Answered
I

1

8

When I do on my terminal: npm outdated -g I get a list of global packages that have updates available, and that's fine:

Package              Current  Wanted  Latest  Location
create-next-app       10.0.3  10.0.4  10.0.4  global
eslint-plugin-react   7.21.5  7.22.0  7.22.0  global
firebase-tools         9.0.1   9.1.0   9.1.0  global

After I installed all of them, I wanted to make sure that I got all the packages updated, so I hit again, the same command, but accidentally hit npm outdated -g\. This time I got a package that not listed before:

Package                 Current  Wanted  Latest  Location
eslint-plugin-flowtype    3.9.1  3.13.0   5.2.0  global

I hit again npm outdated -g and got no result, and repeated with backslash and got this package.
I checked this and didn't see anything related. Does anyone know what's the issue? Of course I can see that this eslint-plugin-flowtype package have breaking changes (3.x vs 5.x), but how is it not displayed in the original npm outdated -g command?

Thanks.

Inositol answered 1/1, 2021 at 9:36 Comment(6)
This question is not programming related. You ought to ask at other fora.Bevash
Well, I think it is.Inositol
So where exactly is the code that is not performing as expected. Command line issues pulling down packages is not programming.Bevash
npm cli commands related to programming. You can see tons of questions in SO related theses commands. Search 'npm command'. I suggest you remove the close vote.Inositol
Then show the code you are having problems with.Bevash
This community is not about bugs only, but to understand processes, and commands, and things related to programming. I would appreciate if you would stop right here. Happy new year.Inositol
A
0

As shown in the docs, npm outdated defaults to a depth of 0, so unless you override that, you'll always be seeing only top-level dependencies that are outdated. You can run something like npm outdated --depth 9999 to see all.

Atronna answered 1/1, 2021 at 9:47 Comment(6)
Didn't know that. So If I hit `-g\` it's the same behavior, apparently. Or did I found a bug in their CLI?Inositol
Perhaps, when I run it with -g\ I don't get anything, so might be a bugAtronna
run with '-g\', not '\g'Inositol
Sorry was a typo, that's how I ran it :)Atronna
Welcome to my LinkedIn:)Inositol
npm outdated doesn't look for "outdated"/latest packages and the --depth won't help here. The npm command is useless.Lavernelaverock

© 2022 - 2024 — McMap. All rights reserved.