Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--format=json exits with 1 even without --check #81

Closed
uncleramsay opened this issue May 10, 2023 · 2 comments
Closed

--format=json exits with 1 even without --check #81

uncleramsay opened this issue May 10, 2023 · 2 comments

Comments

@uncleramsay
Copy link

Without format=json:

$ yarn outdated
➤ YN0000: ┌ Checking for outdated dependencies
➤ YN0000: └ Completed in 25s 650ms

➤ YN0000: Package           Current   Latest    Package Type
➤ YN0000: @types/node       20.1.1    20.1.2    devDependencies
➤ YN0000: @vue/test-utils   1.3.5     2.3.2     devDependencies
➤ YN0000: cypress           12.11.0   12.12.0   devDependencies
➤ YN0000: vue               2.7.14    3.2.47    devDependencies
➤ YN0000: vue-router        3.6.5     4.1.6     devDependencies
➤ YN0000: vue-tsc           1.3.8     1.6.4     devDependencies

➤ YN0000: 6 dependencies are out of date
➤ YN0000: Done with warnings in 25s 657ms

$ echo $?
0

With format=json:

$ yarn outdated --format=json
[{"current":"20.1.1","latest":"20.1.2","name":"@types/node","severity":"patch","type":"devDependencies"},{"current":"1.3.5","latest":"2.3.2","name":"@vue/test-utils","severity":"major","type":"devDependencies"},{"current":"12.11.0","latest":"12.12.0","name":"cypress","severity":"minor","type":"devDependencies"},{"current":"2.7.14","latest":"3.2.47","name":"vue","severity":"major","type":"devDependencies"},{"current":"3.6.5","latest":"4.1.6","name":"vue-router","severity":"major","type":"devDependencies"},{"current":"1.3.8","latest":"1.6.4","name":"vue-tsc","severity":"minor","type":"devDependencies"}]

$ echo $?
1

Please could the json formatted option be made to respect the --check flag, and return 0 if it's not present?

@mskelton
Copy link
Owner

Good catch!

@mskelton
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants