fix!: do not unwrap single-item arrays in --json output#9160
fix!: do not unwrap single-item arrays in --json output#9160yetanotheraryan wants to merge 2 commits intonpm:latestfrom
Conversation
|
@wraithgar @owlstronaut I’ve opened a PR to address this : npm/statusboard#1068 The change ensures that --json output consistently returns arrays, even for single-item results. Happy to make any adjustments if needed! verified the same on local - |
owlstronaut
left a comment
There was a problem hiding this comment.
Since this is a breaking change, we'll need a fix!: and a footer of BREAKING CHANGE describing the break for npm 12.
Thanks for looking in to this!
There was a problem hiding this comment.
With the fix this can be removed. Maybe keep the 2nd line only?
There was a problem hiding this comment.
@owlstronaut I have kept the 2nd line and removed other comments, and pushed in the PR
I have also added fix!: in the PR along with BREAKING CHANGE in description of the PR.
Let me know if anything else is required.
|
@owlstronaut I have pushed the requested changes in the PR, please let me know if anything else is needed. |
BREAKING CHANGE:
npm view --jsonnow always returns an array when a semver range is used as the version specifier, even if the range matches exactly one version.Fixes
npm view --jsonreturning a single object/value when a semver range matches exactly one version.References
Fixes npm/statusboard#1074
Related to npm/statusboard#1068