Files
Matt Travi 63323861a3 fix(deps): upgrade to the new beta of the npm plugin
BREAKING CHANGE: the npm cli is upgraded to v12. find details about
breaking changes at https://github.com/npm/cli/releases/tag/v12.0.0
2026-10-24 08:52:42 -05:00

9 lines
271 B
JavaScript

import { execa } from "execa";
export async function npmView(packageName, env) {
const view = JSON.parse((await execa("npm", ["view", packageName, "--json"], { env })).stdout);
// npm 12 wraps the result in an array
return Array.isArray(view) ? view[0] : view;
}