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

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 a team as a code owner March 20, 2019 15:09
@isaacs
Copy link
Contributor

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 isaacs added in-progress semver:patch semver patch level for changes labels Jun 26, 2019
isaacs pushed 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 pushed 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 pushed 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 pushed 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 pushed 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 pushed 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
Labels
semver:patch semver patch level for changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants