Skip to content

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 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.

2 participants