mskelton / yarn-plugin-outdated

Yarn plugin to show outdated dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`yarn outdated` sits forever on exit

joshkel opened this issue · comments

I'm upgrading to Yarn Modern and am trying out yarn outdated. It appears to work; however, after its output, it never finishes:

➤ YN0000: ┌ Checking for outdated dependencies
➤ YN0000: └ Completed in 3s 490ms

...

➤ YN0000: Package                        Current    Latest    Workspace        Package Type
➤ YN0000: 33 dependencies are out of date
➤ YN0000: Done with warnings in 3s 493ms
➤ YN0000: ⠇ ============================================================================----

The progress bar on the last line sits at this state indefinitely, without ever finishing.

If I run yarn outdated --json, the command finishes as expected.

I'm using Yarn 3.2.0, https://mskelton.dev/yarn-outdated/v2, and Node 14.19.1.

I tried the following steps and could not reproduce this error:

yarn init -2
yarn plugin import https://mskelton.dev/yarn-outdated/v2
yarn add axios@1
yarn outdated

As expected I get the following output:

➤ YN0000: ┌ Checking for outdated dependencies
➤ YN0000: └ Completed

➤ YN0000: Package   Current   Latest   Package Type
➤ YN0000: axios     0.10.0    0.27.2   dependencies

➤ YN0000: 1 dependency is out of date
➤ YN0000: Done with warnings in 0s 150ms

Could you share a reproducible set of steps or a repo that causes this error?

(Un?)fortunately, the problem has cleared itself up. I've been making several changes as part of upgrading to Yarn Modern, so I'm not sure what might have resolved the issue.

Thanks for the quick reply. Since this isn't reproducible, I'll go ahead and close the issue.

I'm also running into this issue on Yarn v3.2.1. Seems like the progress bar hangs and stays present after the command finishes. I control + c to kill it each time.

Running Node 14 on macOS 12.4

@mutewinter Does it happen consistently? If so, could you share a reproduction repo?

It does. I’ll see if it happens in a new repo.

Does not happen in a new repo. My current repo is a monorepo using nodeLinker: node-modules. It happens when I run the yarn outdated command in the root of the project or in one of the packages.

I was able to reproduce this on one of my monorepos. Now that I can reproduce it, I'll figure out what's going on and get it fixed.

Just released a new version which fixes this. Turns out that it would happen if you had workspace dependencies which were skipped, but the code wasn't properly updating the progress for those dependencies.