UNPKG

semantic-release-yarn

Version:

semantic-release plugin to publish a npm package with yarn

11 lines (10 loc) 372 B
import { getImplementation } from "./container.js"; export async function getWorkspaces({ cwd }) { const execa = await getImplementation("execa"); const { stdout } = await execa("yarn", ["workspaces", "list", "--json", "--no-private"], { cwd, }); return stdout .split("\n") .reduce((acc, line) => [...acc, JSON.parse(line)], []); }