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

Fix: Always return JSON for `outdated --json` command #176

Closed
wants to merge 1 commit into from

Conversation

@sreeramjayan
Copy link

sreeramjayan commented Mar 20, 2019

Return JSON when no outdated packages are found.
https://npm.community/t/npm-outdated-json-not-always-json/5953

@sreeramjayan sreeramjayan requested a review from npm/cli-team as a code owner Mar 20, 2019
@isaacs

This comment has been minimized.

Copy link
Member

isaacs commented Jun 26, 2019

This seems like it'd result in printing out an empty list when --json isn't set. Maybe it should be if (er || silent || list.length === 0 && !opts.json) to have the intended effect?

isaacs added a commit that referenced this pull request Jun 28, 2019
Close: #176

EDIT: Added test, do not set exitStatus to 1 if we're just printing an
empty list as JSON. -- @isaacs
isaacs added a commit that referenced this pull request Jun 28, 2019
Close: #176

EDIT: Added test, do not set exitStatus to 1 if we're just printing an
empty list as JSON. -- @isaacs
isaacs added a commit that referenced this pull request Jun 29, 2019
Close: #176

EDIT: Added test, do not set exitStatus to 1 if we're just printing an
empty list as JSON. -- @isaacs
isaacs added a commit that referenced this pull request Jun 29, 2019
Close: #176

EDIT: Added test, do not set exitStatus to 1 if we're just printing an
empty list as JSON. -- @isaacs
isaacs added a commit that referenced this pull request Jun 29, 2019
Close: #176

EDIT: Added test, do not set exitStatus to 1 if we're just printing an
empty list as JSON. -- @isaacs
isaacs added a commit that referenced this pull request Jun 29, 2019
Close: #176

EDIT: Added test, do not set exitStatus to 1 if we're just printing an
empty list as JSON. -- @isaacs
@isaacs isaacs mentioned this pull request Jul 1, 2019
@isaacs isaacs closed this in 87fef4e Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.