Skip to content

Commit

Permalink
chore(integ): correct --silent flag in yarn workspaces info (#15175)
Browse files Browse the repository at this point in the history
## Overview

The `--silent` flag in `yarn workspaces info` does not works.
The `--json` flag is suggested in yarnpkg/yarn#7881.

The output of `yarn workspaces --json info` is as follows and requires `JSON.parse()` twice:

```
{"type":"log","data":"{\n  \"aws-cdk-lib\": {\n    \"location\" --- snip --- \"workspaceDependencies\": [],\n    \"mismatchedWorkspaceDependencies\": []\n  }\n}"}
```

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
umireon committed Jun 21, 2021
1 parent 0fe236a commit a760173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk/test/integ/helpers/monorepo.ts
Expand Up @@ -13,7 +13,7 @@ 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 output: YarnWorkspacesOutput = JSON.parse(await shell(['yarn', 'workspaces', '--silent', 'info'], {
captureStderr: false,
cwd: root,
}));
Expand Down

0 comments on commit a760173

Please sign in to comment.