yarn v2/v3 has no outdated command?
Asked Answered
E

6

11

on yarn outdated in yarn v2 or v3 there is this error:

Usage Error: Couldn't find a script named "outdated".

I found an alternative with yarn upgrade-interactive, but then I need to install this plugin into the project, which is wanted to avoid. Is there any alternative?

Exceptive answered 16/3, 2023 at 15:1 Comment(0)
E
3

ok, I found an easy alternative - using npm:

npm outdated
Exceptive answered 4/4, 2023 at 13:33 Comment(1)
Now it's just yarn plugin import interactive-tools the first time, then yarn upgrade-interactiveMyriad
E
10

yarn v2 / v3 no longer has the outdated command, however you can add a plugin which will allow you to interactively update packages.

First add the plugin: yarn plugin import interactive-tools (for each project)

Then you can run yarn upgrade-interactive

Link to documentation

Example of plugin:

Example of plugin

Eusebioeusebius answered 5/7, 2023 at 17:19 Comment(1)
Yarn 4 now supports the yarn upgrade-interactive command without the plugin.Hootenanny
F
6

In yarn 4, the upgrade-interactive tool comes with the yarn CLI, no need for a plugin.

Simply do

yarn upgrade-interactive
Frogmouth answered 19/3 at 12:51 Comment(0)
E
3

ok, I found an easy alternative - using npm:

npm outdated
Exceptive answered 4/4, 2023 at 13:33 Comment(1)
Now it's just yarn plugin import interactive-tools the first time, then yarn upgrade-interactiveMyriad
L
2

Possibly relevant GitHub issue. yarn outdated is gone, period.

yarn-plugin-outdated is a community-built plugin which does the same thing. But this may not be what you are looking for, since it is a plugin after all.

If plain NPM packages are okay for you, then see npm-check, npm-check-updates and check-outdated. Disclaimer: I have used none of these and do not know if they work for Yarn users. You should look into other options as well.

I suggest looking into Pnpm as an alternative to Yarn. It supports most of Yarn's features and has the pnpm outdated command out of the box.

Liaison answered 1/4, 2023 at 17:55 Comment(0)
T
1

Must use a plugin https://github.com/yarnpkg/berry/tree/master/packages/plugin-interactive-tools:

yarn plugin import interactive-tools
yarn upgrade-interactive
Terreverte answered 25/9, 2023 at 16:55 Comment(0)
N
0

You can use yarn add <package> --interactive to get an interactive upgrade prompt, which will allow you to select latest from the list.

https://yarnpkg.com/cli/add#details

Nombril answered 16/12, 2023 at 22:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.