Skip to content

ABANDON: NOT TO BE MERGED#9334

Open
yetanotheraryan wants to merge 5 commits intonpm:latestfrom
yetanotheraryan:json-unwrap-fix
Open

ABANDON: NOT TO BE MERGED#9334
yetanotheraryan wants to merge 5 commits intonpm:latestfrom
yetanotheraryan:json-unwrap-fix

Conversation

@yetanotheraryan
Copy link
Copy Markdown
Contributor

@yetanotheraryan yetanotheraryan commented May 9, 2026

The --json flag for npm view now always returns an array, even when only a single version matches. Previously, a single item result would be unwrapped and returned as a plain object/string, which made programmatic parsing fragile - consumers had to handle both array and non-array shapes depending on how many versions matched.

This doc update adds a note to npm-view.md clarifying that the output is always an array when --json is used, reflecting the behavioral fix.

References

@yetanotheraryan yetanotheraryan requested review from a team as code owners May 9, 2026 05:30
@yetanotheraryan yetanotheraryan changed the title docs: npm view outputs always array with --json doc update ABANDON May 9, 2026
@yetanotheraryan yetanotheraryan changed the title ABANDON ABANDON: NOT TO BE MERGED May 9, 2026
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.

1 participant