Files
vscode/extensions/npm/src/features
Guilherme Menezes MagalhãesandGitHub 716116ebe3 Fix package.json hover metadata broken in npm 12+ (#327951)
* Fix npm view --json returning array in npm 12+

npm 12 changed npm view --json to always return an array [{...}]
instead of {...}. Handle both formats by checking Array.isArray.

Fixes #327228

* Extract npm view output parsing into a testable module with tests

Move the `npm view --json` parsing out of `npmView()` into a pure
`parseNpmViewOutput()` function so the npm 12+ array-format fix can be
unit tested without the vscode API. Add a mocha suite covering object
and array output, dist-tags.latest preference and fallback, missing
fields, invalid and non-object output, and register the npm extension
in .vscode-test.js so CI runs the tests.
2026-08-19 14:22:45 +00:00
..