From 4635b34e9bd08c3a66553c91bc96dc97f83bf8fc Mon Sep 17 00:00:00 2001 From: Orta Date: Sun, 1 Dec 2019 10:30:38 -0500 Subject: [PATCH] Adds a note of the workspace name when running commands in all workspaces (#7722) * Adds a note of the workspace name when running commands in all workspaces * Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ src/cli/commands/workspaces.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efe98eda74..5eb68a8014 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa ## Master +- Prints workspace names with `yarn workspaces` (silence with `-s`) + + [#7722](https://github.com/yarnpkg/yarn/pull/7722) - [**Orta**](https://twitter.com/orta) + - Implements `yarn init --install berry` [#7723](https://github.com/yarnpkg/yarn/pull/7723) - [**Maƫl Nison**](https://twitter.com/arcanis) diff --git a/src/cli/commands/workspaces.js b/src/cli/commands/workspaces.js index 616cffe041..5896e98b50 100644 --- a/src/cli/commands/workspaces.js +++ b/src/cli/commands/workspaces.js @@ -10,6 +10,7 @@ import {NODE_BIN_PATH, YARN_BIN_PATH} from '../../constants'; const invariant = require('invariant'); const path = require('path'); +const os = require('os'); const semver = require('semver'); export function hasWrapper(commander: Object, args: Array): boolean { @@ -79,7 +80,7 @@ export async function runScript(config: Config, reporter: Reporter, flags: Objec for (const workspaceName of Object.keys(workspaces)) { const {loc} = workspaces[workspaceName]; - + reporter.log(`${os.EOL}> ${workspaceName}`); await child.spawn(NODE_BIN_PATH, [YARN_BIN_PATH, ...rest], { stdio: 'inherit', cwd: loc,