Skip to content

Commit

Permalink
chore(integ): use --json with yarn workspaces info
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaito Udagawa committed Jun 17, 2021
1 parent ad283b6 commit 41bcdb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/aws-cdk/test/integ/helpers/monorepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ const YARN_MONOREPO_CACHE: Record<string, any> = {};
*/
export async function findYarnPackages(root: string): Promise<Record<string, string>> {
if (!(root in YARN_MONOREPO_CACHE)) {
const output: YarnWorkspacesOutput = JSON.parse(await shell(['yarn', 'workspaces', 'info', '--silent'], {
const json: { data: string } = JSON.parse(await shell(['yarn', 'workspaces', '--json', 'info'], {
captureStderr: false,
cwd: root,
}));
const output: YarnWorkspacesOutput = JSON.parse(json.data);

const ret: Record<string, string> = {};
for (const [k, v] of Object.entries(output)) {
Expand Down

0 comments on commit 41bcdb3

Please sign in to comment.