Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@btea
Copy link
Contributor

@btea btea commented Oct 2, 2024

…y version

When I execute npm view --json in my local project, the output is as follows:

before after
image image

References

@btea btea requested a review from a team as a code owner October 2, 2024 09:52
@wraithgar
Copy link
Member

wraithgar commented Oct 2, 2024

I'm not so sure about this, --json is for computer parsing, not human reading. We do sort the results in what's called the prettyView.

I do have a PR underway to sort the tags by publish date, and to truncate them, so that the pretty view is more useful at a glance. It will be part of npm 11.

ETA: I guess we already sort the versions in this display, so the cat's out of the bag there. It still seems silly formatting json for human display.

@wraithgar
Copy link
Member

Draft PR for the pretty view change #7808

@ljharb
Copy link
Contributor

ljharb commented Oct 3, 2024

It does also potentially help programmatic use cases, the majority of which might want them in semver order anyways.

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

Successfully merging this pull request may close these issues.

3 participants