aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r--packages/monorepo-scripts/src/publish.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 240158c77..d749ec630 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -112,8 +112,12 @@ async function lernaPublishAsync(packageToVersionChange: { [name: string]: strin
const child = spawn('lerna', ['publish', '--registry=https://registry.npmjs.org/'], {
cwd: constants.monorepoRootPath,
});
+ let shouldPrintOutput = false;
child.stdout.on('data', (data: Buffer) => {
const output = data.toString('utf8');
+ if (shouldPrintOutput) {
+ utils.log(output);
+ }
const isVersionPrompt = _.includes(output, 'Select a new version');
if (isVersionPrompt) {
const outputStripLeft = output.split('new version for ')[1];
@@ -129,6 +133,8 @@ async function lernaPublishAsync(packageToVersionChange: { [name: string]: strin
const isFinalPrompt = _.includes(output, 'Are you sure you want to publish the above changes?');
if (isFinalPrompt && !IS_DRY_RUN) {
child.stdin.write(`y\n`);
+ // After confirmations, we want to print the output to watch the `lerna publish` command
+ shouldPrintOutput = true;
} else if (isFinalPrompt && IS_DRY_RUN) {
utils.log(
`Submitted all versions to Lerna but since this is a dry run, did not confirm. You need to CTRL-C to exit.`,