mskelton / yarn-plugin-outdated

Yarn plugin to show outdated dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hide major version updates

rightaway opened this issue · comments

Can there be an option to hide major version updates? I have package.json files that set exact dependency versions and there are times I just want to do non breaking updates or when I'm stuck on old versions of packages because of breaking changes.

I'd like to hide the major updates and only see minor and patch updates. Now I have to check all the output and ignore the lines that are from major updates. Would be good to run this plugin with a --hide-major option and not see any packages when I'm all up to date with non breaking changes.

Possible duplicate of #45?

This is a duplicate of #45 (comment). If we could pass --severity patch,minor that would hide major versions.

But the main feature for that one is #45 (comment) so I created a separate issue.

The error Usage Error: Invalid value for --severity: expected a valid enumeration value (got "patch,major") is gone but it's saying all my dependencies are up to date. When I don't include --severity there are patch and major versions that need to be updated.

You have to specify the flag multiple times.

yarn outdated --severity=patch --severity=minor

That said since most shells support brace expansion, you can do this.

yarn outdated --severity={patch,minor}

To be consistent with --workspace #61 can the = become optional, and can it allow commas between severity types too?

The equals is optional, this works just fine.

yarn outdated --severity patch --severity minor

and can it allow commas between severity types too?

That I'm not going to do, I want the API to be consistent and follow typical conventions for CLIs that accept the same arg multiple times. As I mentioned in #61, I'm changing the API for --workspace before the next release.