fix: the information time object output by `npm view` should sorted b…
…y version
When I execute npm view --json in my local project, the output is as follows:
| before | after |
|
|
|
References
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.
Draft PR for the pretty view change https://github.com/npm/cli/pull/7808
It does also potentially help programmatic use cases, the majority of which might want them in semver order anyways.